{"html_url": "https://github.com/simonw/datasette/issues/594#issuecomment-552732500", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/594", "id": 552732500, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjczMjUwMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T04:47:04Z", "updated_at": "2019-11-12T04:47:04Z", "author_association": "OWNER", "body": "Closing this in favour of #627 which upgrades to uvicorn 0.10.4", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 506297048, "label": "upgrade to uvicorn-0.9 to be Python-3.8 friendly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/622#issuecomment-552729978", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/622", "id": 552729978, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjcyOTk3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T04:33:00Z", "updated_at": "2019-11-12T04:33:00Z", "author_association": "OWNER", "body": "Here's the error I'm getting with Python 3.8 at the moment:\r\n```\r\n~/Dropbox/Development/datasette $ venv-py3.8.0/bin/datasette --memory -p 8055\r\nServe! files=() (immutables=()) on port 8055\r\nTraceback (most recent call last):\r\n File \"venv-py3.8.0/bin/datasette\", line 11, in \r\n load_entry_point('datasette', 'console_scripts', 'datasette')()\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py\", line 764, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py\", line 717, in main\r\n rv = self.invoke(ctx)\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py\", line 956, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py\", line 555, in invoke\r\n return callback(*args, **kwargs)\r\n File \"/Users/simonw/Dropbox/Development/datasette/datasette/cli.py\", line 365, in serve\r\n uvicorn.run(ds.app(), host=host, port=port, log_level=\"info\")\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/main.py\", line 279, in run\r\n server.run()\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/main.py\", line 305, in run\r\n self.config.setup_event_loop()\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/config.py\", line 218, in setup_event_loop\r\n loop_setup()\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/loops/auto.py\", line 3, in auto_loop_setup\r\n import uvloop\r\n File \"/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvloop/__init__.py\", line 7, in \r\n from .loop import Loop as __BaseLoop # NOQA\r\n File \"uvloop/includes/stdlib.pxi\", line 114, in init uvloop.loop\r\nAttributeError: module 'sys' has no attribute 'set_coroutine_wrapper'\r\n```\r\nI'm pretty confident upgrading uvicorn (and uvloop with it) will fix this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520715188, "label": "Datasette should work with Python 3.8 (and drop compatibility with Python 3.5)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/622#issuecomment-552730304", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/622", "id": 552730304, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjczMDMwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T04:34:55Z", "updated_at": "2019-11-12T04:34:55Z", "author_association": "OWNER", "body": "Confirmed: upgrading to `uvicorn~=0.10.4` fixed it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520715188, "label": "Datasette should work with Python 3.8 (and drop compatibility with Python 3.5)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/622#issuecomment-552731544", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/622", "id": 552731544, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjczMTU0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T04:41:48Z", "updated_at": "2019-11-12T04:41:48Z", "author_association": "OWNER", "body": "Here's where Python 3.5 started failing: https://travis-ci.org/simonw/datasette/builds/610682852", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520715188, "label": "Datasette should work with Python 3.8 (and drop compatibility with Python 3.5)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/622#issuecomment-552745890", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/622", "id": 552745890, "node_id": "MDEyOklzc3VlQ29tbWVudDU1Mjc0NTg5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T05:52:49Z", "updated_at": "2019-11-12T05:52:49Z", "author_association": "OWNER", "body": "Released in [Datasette 0.31](https://datasette.readthedocs.io/en/latest/changelog.html#v0-31).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520715188, "label": "Datasette should work with Python 3.8 (and drop compatibility with Python 3.5)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/626#issuecomment-552729658", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/626", "id": 552729658, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjcyOTY1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T04:31:13Z", "updated_at": "2019-11-12T04:31:13Z", "author_association": "OWNER", "body": "I'm giving up on this. I spent a bunch of time trying to get it to work and couldn't.\r\n\r\nMy final attempt was inspired by https://github.com/encode/uvicorn/blob/e821fd1ff5653f989d500d41fa6ba070858f6843/tests/test_main.py#L10-L32\r\n\r\nHere's the code that didn't work:\r\n```\r\ndef test_asgi_app(app_client):\r\n from uvicorn.config import Config\r\n from uvicorn.main import Server\r\n\r\n class CustomServer(Server):\r\n def install_signal_handlers(self):\r\n pass\r\n\r\n def run_server():\r\n asyncio.set_event_loop(asyncio.new_event_loop())\r\n print(\"ooh new loop\")\r\n config = Config(app=app_client.asgi_app, limit_max_requests=1, port=8642)\r\n config.load()\r\n server = CustomServer(config=config)\r\n server.run()\r\n\r\n with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:\r\n future = executor.submit(run_server)\r\n future.result()\r\n while not server.started:\r\n print(server.__dict__)\r\n time.sleep(0.01)\r\n assert 200 == urllib.request.urlopen(\"http://localhost:8642/\").status\r\n # This line will raise if there's an exception:\r\n future.result()\r\n```\r\nI got `RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-1_0'`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 521282013, "label": "Unit tests should fail under Python 3.8"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/629#issuecomment-552739324", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/629", "id": 552739324, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjczOTMyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T05:23:22Z", "updated_at": "2019-11-12T05:23:22Z", "author_association": "OWNER", "body": "This change needs to wait until `datasette 0.31` has been published to PyPI, because the Docker containers produced by `datasette publish` run `pip install datasette` and they need to be able to retrieve a version from PyPI that works with 3.8.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 521335335, "label": "\"datasette publish\" commands should deploy with Python 3.8"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/404#issuecomment-552735296", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/404", "id": 552735296, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjczNTI5Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T05:02:13Z", "updated_at": "2019-11-12T05:02:13Z", "author_association": "OWNER", "body": "Closing this because it was written against Sanic. #628 tracks future work on this topic.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 403499298, "label": "Experiment: run Jinja in async mode"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/595#issuecomment-552732445", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/595", "id": 552732445, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjczMjQ0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T04:46:48Z", "updated_at": "2019-11-12T04:46:48Z", "author_association": "OWNER", "body": "Closing this in favour of #627 which upgrades to uvicorn 0.10.4", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 506300941, "label": "bump uvicorn to 0.9.0 to be Python-3.8 friendly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/627#issuecomment-552737357", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/627", "id": 552737357, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MjczNzM1Nw==", "user": {"value": 2680980, "label": "willingc"}, "created_at": "2019-11-12T05:13:46Z", "updated_at": "2019-11-12T05:13:46Z", "author_association": "NONE", "body": "Thanks @simonw. I appreciate your work on this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 521323012, "label": "Support Python 3.8, stop supporting Python 3.5"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553170650", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/66", "id": 553170650, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MzE3MDY1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T23:49:29Z", "updated_at": "2019-11-12T23:49:29Z", "author_association": "OWNER", "body": "This relates to this bug: https://github.com/dogsheep/github-to-sqlite/pull/8#issuecomment-549233778", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 521868864, "label": "The \".upsert()\" method is misnamed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553171011", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/66", "id": 553171011, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MzE3MTAxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T23:50:52Z", "updated_at": "2019-11-12T23:50:52Z", "author_association": "OWNER", "body": "Fixing this is going to be a real pain. There's lots of code out there that uses `sqlite-utils` with the expectation that `upsert()` behaves as it currently does.\r\n\r\nMaybe I need to introduce new terms for both of these different patterns and deprecate the existing `.upsert()` and `.upsert_all()` since their behaviour can't be changed?\r\n\r\nOr maybe I fix this and ship `sqlite-utils 2.0` with a breaking change?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 521868864, "label": "The \".upsert()\" method is misnamed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553171414", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/66", "id": 553171414, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MzE3MTQxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-12T23:52:35Z", "updated_at": "2019-11-12T23:52:35Z", "author_association": "OWNER", "body": "If I do implement the correct definition of `.upsert()` I think I'll use this pattern, since it works in versions of SQLite prior to 3.24:\r\n```sql\r\nINSERT OR IGNORE INTO book(id) VALUES(1001);\r\nUPDATE book SET name = 'Programming' WHERE id = 1001;\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 521868864, "label": "The \".upsert()\" method is misnamed"}, "performed_via_github_app": null}