{"html_url": "https://github.com/simonw/datasette/issues/2067#issuecomment-1532304714", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2067", "id": 1532304714, "node_id": "IC_kwDOBm6k_c5bVR1K", "user": {"value": 39538958, "label": "justmars"}, "created_at": "2023-05-03T00:16:03Z", "updated_at": "2023-05-03T00:16:03Z", "author_association": "NONE", "body": "Curiously, after running commands on the database that was litestream-restored, datasette starts to work again, e.g.\r\n\r\n```sh\r\nlitestream restore -o data/db.sqlite s3://mytestbucketxx/db\r\ndatasette data/db.sqlite\r\n# fails (OperationalError described above)\r\n```\r\n\r\n```sh\r\nlitestream restore -o data/db.sqlite s3://mytestbucketxx/db\r\nsqlite-utils enable-wal data/db.sqlite\r\ndatasette data/db.sqlite\r\n# works\r\n```\r\n\r\n```sh\r\nlitestream restore -o data/db.sqlite s3://mytestbucketxx/db\r\nsqlite-utils optimize data/db.sqlite\r\ndatasette data/db.sqlite\r\n# works\r\n```\r\n\r\n```sh\r\nlitestream restore -o data/db.sqlite s3://mytestbucketxx/db\r\nsqlite3 data/db.sqlite \".clone test.db\"\r\ndatasette test.db\r\n# works\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1690765434, "label": "Litestream-restored db: errors on 3.11 and 3.10.8; but works on py3.10.7 and 3.10.6"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/496#issuecomment-1294408928", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/496", "id": 1294408928, "node_id": "IC_kwDOCGYnMM5NJxzg", "user": {"value": 39538958, "label": "justmars"}, "created_at": "2022-10-28T03:36:56Z", "updated_at": "2022-10-28T03:37:50Z", "author_association": "NONE", "body": "With respect to the typing of Table class itself, my interim solution:\r\n\r\n```python\r\nfrom sqlite_utils.db import Table\r\ndef tbl(self, table_name: str) -> Table:\r\n tbl = self.db[table_name]\r\n if isinstance(tbl, Table):\r\n return tbl\r\n raise Exception(f\"Missing {table_name=}\")\r\n```\r\n\r\nWith respect to @chapmanjacobd concern on the `DEFAULT` being an empty class, have also been using `# type: ignore`, e.g.\r\n\r\n```python\r\n@classmethod\r\ndef insert_list(cls, areas: list[str]):\r\n return meta.tbl(meta.Areas).insert_all(\r\n ({\"area\": a} for a in areas), ignore=True # type: ignore\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": 1393202060, "label": "devrel/python api: Pylance type hinting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1082#issuecomment-721547177", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1082", "id": 721547177, "node_id": "MDEyOklzc3VlQ29tbWVudDcyMTU0NzE3Nw==", "user": {"value": 39538958, "label": "justmars"}, "created_at": "2020-11-04T06:52:30Z", "updated_at": "2020-11-04T06:53:16Z", "author_association": "NONE", "body": "I think I tried the same db size on the following scenarios in Digital Ocean:\r\n1. Basic ($5/month) with 512MB RAM\r\n2. Basic ($10/month) with 1GB RAM\r\n3. Pro ($12/month) with 1GB RAM\r\n\r\nAll such attempts conked out with \"out of memory\" errors", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 735852274, "label": "DigitalOcean buildpack memory errors for large sqlite db?"}, "performed_via_github_app": null}