{"html_url": "https://github.com/simonw/datasette/issues/1506#issuecomment-968192980", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1506", "id": 968192980, "node_id": "IC_kwDOBm6k_c45tXPU", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T02:22:40Z", "updated_at": "2021-11-14T02:22:40Z", "author_association": "OWNER", "body": "I think the answer is to spot this case and link to `?_item_exact=x` instead of `?_item=x` - it looks like that's already recommended in the documentation here: https://docs.datasette.io/en/stable/json_api.html#column-filter-arguments\r\n\r\n> **?column__exact=value** or **?_column=value**\r\n> Returns rows where the specified column exactly matches the value.\r\n\r\nSo maybe the facet selection rendering logic needs to spot this and link correctly to it?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1052826038, "label": "Columns beginning with an underscore do not facet correctly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1503#issuecomment-968207906", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1503", "id": 968207906, "node_id": "IC_kwDOBm6k_c45ta4i", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T05:08:26Z", "updated_at": "2021-11-14T05:08:26Z", "author_association": "OWNER", "body": "Error:\r\n```\r\n def test_table_html_filter_form_column_options(\r\n path, expected_column_options, app_client\r\n ):\r\n response = app_client.get(path)\r\n assert response.status == 200\r\n form = Soup(response.body, \"html.parser\").find(\"form\")\r\n column_options = [\r\n o.attrs.get(\"value\") or o.string\r\n for o in form.select(\"select[name=_filter_column] option\")\r\n ]\r\n> assert expected_column_options == column_options\r\nE AssertionError: assert ['- column -'...wid', 'value'] == ['- column -', 'value']\r\nE At index 1 diff: 'rowid' != 'value'\r\nE Left contains one more item: 'value'\r\nE Use -v to get the full diff\r\n```\r\nThis is because `rowid` isn't a table column but IS returned by the query used on that page.\r\n\r\nMy solution: start with the query columns, but then add any table columns that were not already returned by the query to the end of the `filter_columns` list.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1050163432, "label": "`?_nocol=` removes that column from the filter interface"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1507#issuecomment-968209560", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1507", "id": 968209560, "node_id": "IC_kwDOBm6k_c45tbSY", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T05:26:36Z", "updated_at": "2021-11-14T05:26:36Z", "author_association": "OWNER", "body": "It looks like my builds there still run on Python 2!\r\n\r\n```\r\ngit clone --no-single-branch --depth 50 https://github.com/simonw/datasette .\r\ngit checkout --force de1e031713f47fbd51eb7239db3e7e6025fbf81a\r\ngit clean -d -f -f\r\npython2.7 -mvirtualenv /home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/0.59.2\r\n/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/0.59.2/bin/python -m pip install --upgrade --no-cache-dir pip setuptools\r\n/home/docs/checkouts/readthedocs.org/user_builds/datasette/envs/0.59.2/bin/python -m pip install --upgrade --no-cache-dir mock==1.0.1 pillow==5.4.1 alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.8.1 recommonmark==0.5.0 sphinx<2 sphinx-rtd-theme<0.5 readthedocs-sphinx-ext<2.2\r\ncat docs/conf.py \r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1052851176, "label": "ReadTheDocs build failed for 0.59.2 release"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1507#issuecomment-968209616", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1507", "id": 968209616, "node_id": "IC_kwDOBm6k_c45tbTQ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T05:27:22Z", "updated_at": "2021-11-14T05:27:22Z", "author_association": "OWNER", "body": "https://blog.readthedocs.com/default-python-3/ they started defaulting new projects to Python 3 back in Feb 2019 but clearly my project was created before then.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1052851176, "label": "ReadTheDocs build failed for 0.59.2 release"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1507#issuecomment-968209731", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1507", "id": 968209731, "node_id": "IC_kwDOBm6k_c45tbVD", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T05:28:41Z", "updated_at": "2021-11-14T05:28:41Z", "author_association": "OWNER", "body": "I will try adding a `.readthedocs.yml` file: https://docs.readthedocs.io/en/stable/config-file/v2.html#python-version\r\n\r\nThis might work:\r\n\r\n```\r\nversion: 2\r\n\r\nbuild:\r\n os: ubuntu-20.04\r\n tools:\r\n python: \"3.9\"\r\n\r\nsphinx:\r\n configuration: docs/conf.py\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": 1052851176, "label": "ReadTheDocs build failed for 0.59.2 release"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1507#issuecomment-968209957", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1507", "id": 968209957, "node_id": "IC_kwDOBm6k_c45tbYl", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T05:31:07Z", "updated_at": "2021-11-14T05:31:07Z", "author_association": "OWNER", "body": "Looks like ReadTheDocs builds started failing for `latest` a few weeks ago:\r\n\r\n\"Banners_and_Alerts_and_Builds___Read_the_Docs\"\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": 1052851176, "label": "ReadTheDocs build failed for 0.59.2 release"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1507#issuecomment-968210222", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1507", "id": 968210222, "node_id": "IC_kwDOBm6k_c45tbcu", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T05:34:14Z", "updated_at": "2021-11-14T05:34:14Z", "author_association": "OWNER", "body": "Here's the new build using Python 3: https://readthedocs.org/projects/datasette/builds/15268482/\r\n\r\nIt's still broken. Here's one of many issue threads about it, this one has a workaround fix: https://github.com/readthedocs/readthedocs.org/issues/8616#issuecomment-952034858\r\n\r\n> For future readers, the solution for this problem is to pin `docutils<0.18` in your `requirements.txt` file, and have a `.readthedocs.yaml` file with these contents:\r\n> \r\n> ```\r\n> version: 2\r\n> \r\n> python:\r\n> install:\r\n> - requirements: docs/requirements.txt\r\n> ```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1052851176, "label": "ReadTheDocs build failed for 0.59.2 release"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1507#issuecomment-968210842", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1507", "id": 968210842, "node_id": "IC_kwDOBm6k_c45tbma", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T05:41:55Z", "updated_at": "2021-11-14T05:41:55Z", "author_association": "OWNER", "body": "Here's the build with that fix: https://readthedocs.org/projects/datasette/builds/15268498/\r\n\r\nIt passed and published the docs: https://docs.datasette.io/en/latest/changelog.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1052851176, "label": "ReadTheDocs build failed for 0.59.2 release"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968359137", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968359137, "node_id": "IC_kwDOCGYnMM45t_zh", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:37:00Z", "updated_at": "2021-11-14T20:37:00Z", "author_association": "OWNER", "body": "This is strange - the code already checks that an index doesn't exist before attempting to create it: https://github.com/simonw/sqlite-utils/blob/92aa5c9c5d26b0889c8c3d97c76a908d5f8af211/sqlite_utils/db.py#L893-L902", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968359868", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968359868, "node_id": "IC_kwDOCGYnMM45t_-8", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:41:42Z", "updated_at": "2021-11-14T20:41:42Z", "author_association": "OWNER", "body": "The \"index idx_generators_eia860_report_date already exists\" error suggests that the problem here is actually one of an index name collision.\r\n\r\n```python\r\n table.create_index([fk.column]) \r\n```\r\nThis will derive a name for the index automatically from the name of the table and the name of the passed in columns: https://github.com/simonw/sqlite-utils/blob/92aa5c9c5d26b0889c8c3d97c76a908d5f8af211/sqlite_utils/db.py#L1536-L1539\r\n\r\nSo perhaps `.create_index()` should grow an extra option that creates the index even if the name already exists, by finding a new name.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968360387", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968360387, "node_id": "IC_kwDOCGYnMM45uAHD", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:45:44Z", "updated_at": "2021-11-14T20:45:44Z", "author_association": "OWNER", "body": "What would such an option be called? Some options:\r\n\r\n- `table.create_index([fk.column], force=True)` - not obvious what `force` means here\r\n- `table.create_index([fk.column], ignore_existing_name=True)` - not obvious what `ignore` means here\r\n- `table.create_index([fk.column], pick_unique_name=True)` - bit verbose\r\n\r\nIf the user doesn't pass in an explicit name it seems like their intent is \"just create me the index, I don't care what name you use\" - so actually perhaps the default behaviour here should be to pick a new unique name if that name is already in use.\r\n\r\nThen maybe there should be an option to disable that - some options there:\r\n\r\n- `table.create_index([fk.column], error_on_existing_index_name=True)` - too verbose\r\n- `table.create_index([fk.column], force=False)` - not clear what `force` means\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": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968360538", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968360538, "node_id": "IC_kwDOCGYnMM45uAJa", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:46:56Z", "updated_at": "2021-11-14T20:46:56Z", "author_association": "OWNER", "body": "I'm tempted to not provide an opt-out option either: if you call `table.create_index(...)` without specifying an index name I think the tool should create the index for you, quietly picking an index name that works.\r\n\r\nBut... it feels wasteful to create an index that exactly duplicates an existing index. Would SQLite even let you do that or would it notice and NOT double the amount of disk space used for that index?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968361285", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968361285, "node_id": "IC_kwDOCGYnMM45uAVF", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:51:57Z", "updated_at": "2021-11-14T20:51:57Z", "author_association": "OWNER", "body": "SQLite will happily create multiple identical indexes on a table, using more disk space each time:\r\n```pycon\r\n>>> import sqlite_utils\r\n>>> db = sqlite_utils.Database(\"dupes.db\")\r\n>>> db[\"t\"].insert_all({\"id\": i} for i in range(10000))\r\n\r\n# dupes.db is 98304 bytes\r\n>>> db[\"t\"].create_index([\"id\"])\r\n
\r\n# dupes.db is 204800 bytes\r\n>>> db[\"t\"].indexes\r\n[Index(seq=0, name='idx_t_id', unique=0, origin='c', partial=0, columns=['id'])]\r\n>>> db[\"t\"].create_index([\"id\"], index_name=\"t_idx_t_id_2\")\r\n
\r\n# 311296 bytes\r\n>>> db[\"t\"].create_index([\"id\"], index_name=\"t_idx_t_id_3\")\r\n
\r\n# 417792 bytes\r\n>>> db.vacuum()\r\n# Still 417792 bytes\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968361409", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968361409, "node_id": "IC_kwDOCGYnMM45uAXB", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:52:55Z", "updated_at": "2021-11-14T20:52:55Z", "author_association": "OWNER", "body": "Looking at the method signature: https://github.com/simonw/sqlite-utils/blob/92aa5c9c5d26b0889c8c3d97c76a908d5f8af211/sqlite_utils/db.py#L1518-L1524\r\n\r\n`if_not_exists` just adds a `IF NOT EXISTS` clause here: https://github.com/simonw/sqlite-utils/blob/92aa5c9c5d26b0889c8c3d97c76a908d5f8af211/sqlite_utils/db.py#L1549-L1561", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968361671", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968361671, "node_id": "IC_kwDOCGYnMM45uAbH", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:54:53Z", "updated_at": "2021-11-14T21:01:14Z", "author_association": "OWNER", "body": "I'm leaning towards `table.create_index(columns, ignore_existing_name=True)` now.\r\n\r\nOr `resolve_existing_name` - or `skip_existing_name`?\r\n\r\n\"ignore\" sounds like it might not create the index if the name exists, but we want to still create the index but pick a new name.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968362214", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968362214, "node_id": "IC_kwDOCGYnMM45uAjm", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:59:15Z", "updated_at": "2021-11-14T20:59:15Z", "author_association": "OWNER", "body": "How to figure out if an index name is already in use? `PRAGMA index_list(t)` requires a table name. This does it:\r\n\r\n```sql\r\nSELECT name \r\nFROM sqlite_master \r\nWHERE type = 'index';\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968362285", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968362285, "node_id": "IC_kwDOCGYnMM45uAkt", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T20:59:44Z", "updated_at": "2021-11-14T20:59:44Z", "author_association": "OWNER", "body": "I think I'll attempt to create the index and re-try if it fails with that error.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968371112", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968371112, "node_id": "IC_kwDOCGYnMM45uCuo", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T21:57:43Z", "updated_at": "2021-11-14T22:21:31Z", "author_association": "OWNER", "body": "`create_index(..., find_unique_name=)` is good. Default to false. `index_foreign_keys` can set it to true.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968380387", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968380387, "node_id": "IC_kwDOCGYnMM45uE_j", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T22:55:56Z", "updated_at": "2021-11-14T22:55:56Z", "author_association": "OWNER", "body": "OK, this should fix it.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/332#issuecomment-968380675", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/332", "id": 968380675, "node_id": "IC_kwDOCGYnMM45uFED", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T22:57:56Z", "updated_at": "2021-11-14T22:57:56Z", "author_association": "OWNER", "body": "This is a great idea.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1028056713, "label": "`sqlite-utils memory --flatten` option to flatten nested JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/331#issuecomment-968381939", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/331", "id": 968381939, "node_id": "IC_kwDOCGYnMM45uFXz", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T23:06:20Z", "updated_at": "2021-11-14T23:06:20Z", "author_association": "OWNER", "body": "Thanks - I didn't know this was needed!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1026794056, "label": "Mypy error: found module but no type hints or library stubs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/331#issuecomment-968384005", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/331", "id": 968384005, "node_id": "IC_kwDOCGYnMM45uF4F", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T23:19:29Z", "updated_at": "2021-11-14T23:20:32Z", "author_association": "OWNER", "body": "Tested it like this, against a freshly built `.tar.gz` package from my development environment:\r\n```\r\n(w) w % mypy . \r\nhello.py:1: error: Skipping analyzing \"sqlite_utils\": found module but no type hints or library stubs\r\nhello.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports\r\nFound 1 error in 1 file (checked 1 source file)\r\n(w) w % pip install ~/Dropbox/Development/sqlite-utils/dist/sqlite-utils-3.17.1.tar.gz\r\nProcessing /Users/simon/Dropbox/Development/sqlite-utils/dist/sqlite-utils-3.17.1.tar.gz\r\n...\r\nSuccessfully installed sqlite-utils-3.17.1\r\n(w) w % mypy . \r\nSuccess: no issues found in 1 source file\r\n```\r\nI tested against the `.whl` too.\r\n\r\nMy `hello.py` script contained this:\r\n```python\r\nimport sqlite_utils\r\nfrom typing import cast\r\n\r\nif __name__ == \"__main__\":\r\n db = sqlite_utils.Database(memory=True)\r\n table = cast(sqlite_utils.db.Table, db[\"foo\"])\r\n table.insert({\"id\": 5})\r\n print(list(db.query(\"select * from foo\")))\r\n```\r\nThat `cast()` is necessary because without it you get this error:\r\n```\r\n(w) w % mypy .\r\nhello.py:7: error: Item \"View\" of \"Union[Table, View]\" has no attribute \"insert\"\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1026794056, "label": "Mypy error: found module but no type hints or library stubs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/324#issuecomment-968384988", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/324", "id": 968384988, "node_id": "IC_kwDOCGYnMM45uGHc", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T23:25:16Z", "updated_at": "2021-11-14T23:25:16Z", "author_association": "OWNER", "body": "Yes this was absolutely the intention! Thanks, I wonder how often I've made that mistake in other projects?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 988013247, "label": "Use python-dateutil package instead of dateutils"}, "performed_via_github_app": null}