github
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | pull_request | body | repo | type | active_lock_reason | performed_via_github_app | reactions | draft | state_reason |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
870227815 | MDExOlB1bGxSZXF1ZXN0NjI1NDU3NTc5 | 1311 | Bump black from 20.8b1 to 21.4b1 | 27856297 | closed | 0 | 2 | 2021-04-28T18:25:58Z | 2021-04-29T13:58:11Z | 2021-04-29T13:58:09Z | CONTRIBUTOR | simonw/datasette/pulls/1311 | Bumps [black](https://github.com/psf/black) from 20.8b1 to 21.4b1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p> <blockquote> <h2>21.4b1</h2> <h4><em>Black</em></h4> <ul> <li> <p>Fix crash on docstrings ending with "\ ". (<a href="https://github-redirect.dependabot.com/psf/black/issues/2142">#2142</a>)</p> </li> <li> <p>Fix crash when atypical whitespace is cleaned out of dostrings (<a href="https://github-redirect.dependabot.com/psf/black/issues/2120">#2120</a>)</p> </li> <li> <p>Reflect the <code>--skip-magic-trailing-comma</code> and <code>--experimental-string-processing</code> flags in the name of the cache file. Without this fix, changes in these flags would not take effect if the cache had already been populated. (<a href="https://github-redirect.dependabot.com/psf/black/issues/2131">#2131</a>)</p> </li> <li> <p>Don't remove necessary parentheses from assignment expression containing assert / return statements. (<a href="https://github-redirect.dependabot.com/psf/black/issues/2143">#2143</a>)</p> </li> </ul> <h4><em>Packaging</em></h4> <ul> <li>Bump pathspec to >= 0.8.1 to solve invalid .gitignore exclusion handling</li> </ul> <h2>21.4b0</h2> <h4><em>Black</em></h4> <ul> <li> <p>Fixed a rare but annoying formatting instability created by the combination of optional trailing commas inserted by <code>Black</code> and optional parentheses looking at pre-existing "magic" trailing commas. This fixes issue <a href="https://github-redirect.dependabot.com/psf/black/issues/1629">#1629</a> and all of its many many duplicates. (<a href="https://github-redirect.dependabot.com/psf/black/issues/2126">#2126</a>)</p> </li> <li> <p><code>Black</code> now processes one-line docstrings by stripping leading and trailing spaces, and adding a padding space when needed to break up """". (<a href="https://github-redirect.dependabot.com/psf/black/issues/1740">#1740</a>)</p> </li> <li> <p><code>… | 107914493 | pull | { "url": "https://api.github.com/repos/simonw/datasette/issues/1311/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
0 | |||||
870125126 | MDU6SXNzdWU4NzAxMjUxMjY= | 1310 | I'm creating a plugin to export a spreadsheet file (.ods or .xlsx) | 3747136 | closed | 0 | 2 | 2021-04-28T16:20:11Z | 2021-04-30T07:26:11Z | 2021-04-30T06:58:46Z | NONE | Hi, I have started developing a plugin to export records as a spreadsheet file. It could be ods or xlsx, whatever is easier. I have spotted the following packages: - ods files: https://pypi.org/project/odswriter/ - xlsx files: https://openpyxl.readthedocs.io/en/stable/index.html (quite powerful) or https://xlsxwriter.readthedocs.io/ (faster) This is the code I have so far, I test it with the `--plugins-dir` option: ```python from datasette import hookimpl from datasette.utils.asgi import Response import odswriter as ods def render_spreadsheet(rows): with ods.writer(open("test.ods","wb")) as odsfile: for row in rows: odsfile.writerow(["String", "ABCDEF123456", "123456"]) return Response(odsfile, content_type="application/vnd.oasis.opendocument.spreadsheet", status=200) @hookimpl def register_output_renderer(): return {"extension": "ods", "render": render_spreadsheet} ``` I get the following error: ``` Traceback (most recent call last): File "/home/colin/.local/lib/python3.8/site-packages/datasette/app.py", line 1128, in route_path await response.asgi_send(send) File "/home/colin/.local/lib/python3.8/site-packages/datasette/utils/asgi.py", line 339, in asgi_send body = body.encode("utf-8") AttributeError: 'ODSWriter' object has no attribute 'encode' ERROR: Exception in ASGI application Traceback (most recent call last): File "/home/colin/.local/lib/python3.8/site-packages/datasette/app.py", line 1128, in route_path await response.asgi_send(send) File "/home/colin/.local/lib/python3.8/site-packages/datasette/utils/asgi.py", line 339, in asgi_send body = body.encode("utf-8") AttributeError: 'ODSWriter' object has no attribute 'encode' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/colin/.local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi result = await app(self.scope, self.recei… | 107914493 | issue | { "url": "https://api.github.com/repos/simonw/datasette/issues/1310/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed |