{"html_url": "https://github.com/simonw/datasette/issues/1733#issuecomment-1115404729", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1733", "id": 1115404729, "node_id": "IC_kwDOBm6k_c5Ce7m5", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-05-02T21:49:01Z", "updated_at": "2022-05-02T21:49:38Z", "author_association": "OWNER", "body": "That alpha release works!\r\n\r\nhttps://pyodide.org/en/stable/console.html\r\n\r\n```pycon\r\nWelcome to the Pyodide terminal emulator \ud83d\udc0d\r\nPython 3.10.2 (main, Apr 9 2022 20:52:01) on WebAssembly VM\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import micropip\r\n>>> await micropip.install(\"datasette==0.62a0\")\r\n>>> import ssl\r\n>>> import setuptools\r\n>>> from datasette.app import Datasette\r\n>>> ds = Datasette(memory=True, settings={\"num_sql_threads\": 0})\r\n>>> await ds.client.get(\"/.json\")\r\n\r\n>>> (await ds.client.get(\"/.json\")).json()\r\n{'_memory': {'name': '_memory', 'hash': None, 'color': 'a6c7b9', 'path': '/_memory', 'tables_and_views_truncated': [], 'tab\r\nles_and_views_more': False, 'tables_count': 0, 'table_rows_sum': 0, 'show_table_row_counts': False, 'hidden_table_rows_sum'\r\n: 0, 'hidden_tables_count': 0, 'views_count': 0, 'private': False}}\r\n>>> \r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1223234932, "label": "Get Datasette compatible with Pyodide"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/1733#issuecomment-1115318417", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1733", "id": 1115318417, "node_id": "IC_kwDOBm6k_c5CemiR", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-05-02T20:13:43Z", "updated_at": "2022-05-02T20:13:43Z", "author_association": "OWNER", "body": "This is good enough to push an alpha.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1223234932, "label": "Get Datasette compatible with Pyodide"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/1733#issuecomment-1115318303", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1733", "id": 1115318303, "node_id": "IC_kwDOBm6k_c5Cemgf", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-05-02T20:13:36Z", "updated_at": "2022-05-02T20:13:36Z", "author_association": "OWNER", "body": "I got a build from the `pyodide` branch to work!\r\n\r\n```\r\nWelcome to the Pyodide terminal emulator \ud83d\udc0d\r\nPython 3.10.2 (main, Apr 9 2022 20:52:01) on WebAssembly VM\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import micropip\r\n>>> await micropip.install(\"https://s3.amazonaws.com/simonwillison-cors-allowed-public/datasette-0.62a0-py3-none-any.whl\")\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\n File \"/lib/python3.10/asyncio/futures.py\", line 284, in __await__\r\n yield self # This tells Task to wait for completion.\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 304, in __wakeup\r\n future.result()\r\n File \"/lib/python3.10/asyncio/futures.py\", line 201, in result\r\n raise self._exception\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 234, in __step\r\n result = coro.throw(exc)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 183, in install\r\n transaction = await self.gather_requirements(requirements, ctx, keep_going)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 173, in gather_requirements\r\n await gather(*requirement_promises)\r\n File \"/lib/python3.10/asyncio/futures.py\", line 284, in __await__\r\n yield self # This tells Task to wait for completion.\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 304, in __wakeup\r\n future.result()\r\n File \"/lib/python3.10/asyncio/futures.py\", line 201, in result\r\n raise self._exception\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 232, in __step\r\n result = coro.send(None)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 245, in add_requirement\r\n await self.add_wheel(name, wheel, version, (), ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 316, in add_wheel\r\n await self.add_requirement(recurs_req, ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 291, in add_requirement\r\n await self.add_wheel(\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 316, in add_wheel\r\n await self.add_requirement(recurs_req, ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 291, in add_requirement\r\n await self.add_wheel(\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 316, in add_wheel\r\n await self.add_requirement(recurs_req, ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 276, in add_requirement\r\n raise ValueError(\r\nValueError: Requested 'h11<0.13,>=0.11', but h11==0.13.0 is already installed\r\n>>> await micropip.install(\"https://s3.amazonaws.com/simonwillison-cors-allowed-public/datasette-0.62a0-py3-none-any.whl\")\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\n File \"/lib/python3.10/asyncio/futures.py\", line 284, in __await__\r\n yield self # This tells Task to wait for completion.\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 304, in __wakeup\r\n future.result()\r\n File \"/lib/python3.10/asyncio/futures.py\", line 201, in result\r\n raise self._exception\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 234, in __step\r\n result = coro.throw(exc)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 183, in install\r\n transaction = await self.gather_requirements(requirements, ctx, keep_going)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 173, in gather_requirements\r\n await gather(*requirement_promises)\r\n File \"/lib/python3.10/asyncio/futures.py\", line 284, in __await__\r\n yield self # This tells Task to wait for completion.\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 304, in __wakeup\r\n future.result()\r\n File \"/lib/python3.10/asyncio/futures.py\", line 201, in result\r\n raise self._exception\r\n File \"/lib/python3.10/asyncio/tasks.py\", line 232, in __step\r\n result = coro.send(None)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 245, in add_requirement\r\n await self.add_wheel(name, wheel, version, (), ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 316, in add_wheel\r\n await self.add_requirement(recurs_req, ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 291, in add_requirement\r\n await self.add_wheel(\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 316, in add_wheel\r\n await self.add_requirement(recurs_req, ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 291, in add_requirement\r\n await self.add_wheel(\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 316, in add_wheel\r\n await self.add_requirement(recurs_req, ctx, transaction)\r\n File \"/lib/python3.10/site-packages/micropip/_micropip.py\", line 276, in add_requirement\r\n raise ValueError(\r\nValueError: Requested 'h11<0.13,>=0.11', but h11==0.13.0 is already installed\r\n>>> await micropip.install(\"h11==0.12\")\r\n>>> await micropip.install(\"https://s3.amazonaws.com/simonwillison-cors-allowed-public/datasette-0.62a0-py3-none-any.whl\")\r\n>>> import datasette\r\n>>> from datasette.app import Datasette\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\n File \"/lib/python3.10/site-packages/datasette/app.py\", line 9, in \r\n import httpx\r\n File \"/lib/python3.10/site-packages/httpx/__init__.py\", line 2, in \r\n from ._api import delete, get, head, options, patch, post, put, request, stream\r\n File \"/lib/python3.10/site-packages/httpx/_api.py\", line 4, in \r\n from ._client import Client\r\n File \"/lib/python3.10/site-packages/httpx/_client.py\", line 9, in \r\n from ._auth import Auth, BasicAuth, FunctionAuth\r\n File \"/lib/python3.10/site-packages/httpx/_auth.py\", line 10, in \r\n from ._models import Request, Response\r\n File \"/lib/python3.10/site-packages/httpx/_models.py\", line 16, in \r\n from ._content import ByteStream, UnattachedStream, encode_request, encode_response\r\n File \"/lib/python3.10/site-packages/httpx/_content.py\", line 17, in \r\n from ._multipart import MultipartStream\r\n File \"/lib/python3.10/site-packages/httpx/_multipart.py\", line 7, in \r\n from ._types import (\r\n File \"/lib/python3.10/site-packages/httpx/_types.py\", line 5, in \r\n import ssl\r\n File \"/lib/python3.10/ssl.py\", line 98, in \r\n import _ssl # if we can't import it, let the error propagate\r\nModuleNotFoundError: No module named '_ssl'\r\n>>> import ssl\r\n>>> from datasette.app import Datasette\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\n File \"/lib/python3.10/site-packages/datasette/app.py\", line 14, in \r\n import pkg_resources\r\nModuleNotFoundError: No module named 'pkg_resources'\r\n>>> import setuptools\r\n>>> from datasette.app import Datasette\r\n>>> ds = Datasette(memory=True)\r\n>>> ds\r\n\r\n>>> await ds.client.get(\"/\")\r\nTraceback (most recent call last):\r\n File \"/lib/python3.10/site-packages/datasette/app.py\", line 1268, in route_path\r\n response = await view(request, send)\r\n File \"/lib/python3.10/site-packages/datasette/views/base.py\", line 134, in view\r\n return await self.dispatch_request(request)\r\n File \"/lib/python3.10/site-packages/datasette/views/base.py\", line 89, in dispatch_request\r\n await self.ds.refresh_schemas()\r\n File \"/lib/python3.10/site-packages/datasette/app.py\", line 353, in refresh_schemas\r\n await self._refresh_schemas()\r\n File \"/lib/python3.10/site-packages/datasette/app.py\", line 358, in _refresh_schemas\r\n await init_internal_db(internal_db)\r\n File \"/lib/python3.10/site-packages/datasette/utils/internal_db.py\", line 65, in init_internal_db\r\n await db.execute_write_script(create_tables_sql)\r\n File \"/lib/python3.10/site-packages/datasette/database.py\", line 116, in execute_write_script\r\n results = await self.execute_write_fn(_inner, block=block)\r\n File \"/lib/python3.10/site-packages/datasette/database.py\", line 155, in execute_write_fn\r\n self._write_thread.start()\r\n File \"/lib/python3.10/threading.py\", line 928, in start\r\n _start_new_thread(self._bootstrap, ())\r\nRuntimeError: can't start new thread\r\n\r\n>>> ds = Datasette(memory=True, settings={\"num_sql_threads\": 0})\r\n>>> await ds.client.get(\"/\")\r\n\r\n>>> (await ds.client.get(\"/\")).text\r\n'\\n\\n\\n Datasette: _memory\\n \\n \\n\\n\\n\\n