{"html_url": "https://github.com/simonw/datasette/issues/1632#issuecomment-1032057472", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1632", "id": 1032057472, "node_id": "IC_kwDOBm6k_c49g_KA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-07T23:50:01Z", "updated_at": "2022-02-07T23:50:01Z", "author_association": "OWNER", "body": "Released in https://github.com/simonw/datasette/releases/tag/0.60.2", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1126604194, "label": "datasette one.db one.db opens database twice, as one and one_2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1632#issuecomment-1032050489", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1632", "id": 1032050489, "node_id": "IC_kwDOBm6k_c49g9c5", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-07T23:39:11Z", "updated_at": "2022-02-07T23:42:08Z", "author_association": "OWNER", "body": "That implementation broke on Python 3.6 - which is still a supported Python version for the 0.60.x branch - `test_homepage` failed.\r\n\r\n```\r\n> assert (\r\n \"2 rows in 1 table, 5 rows in 4 hidden tables, 1 view\" == counts_p.text.strip()\r\n )\r\nE AssertionError: assert '2 rows in 1 ...ables, 1 view' == '1 table, 4 h...ables, 1 view'\r\nE - 1 table, 4 hidden tables, 1 view\r\nE + 2 rows in 1 table, 5 rows in 4 hidden tables, 1 view\r\nE ? ++++++++++ ++++++++++\r\n```\r\nThat's because this idiom isn't guaranteed to preserve order in versions earlier than Python 3.7:\r\n\r\nhttps://github.com/simonw/datasette/blob/fa5fc327adbbf70656ac533912f3fc0526a3873d/datasette/cli.py#L552-L553\r\n\r\nI could say that `0.60.2` is the first version to require Python 3.7 - but that feels a little surprising.\r\n\r\nI'm going to use a different idiom for order-preserving de-duplication from [this StackOverflow](https://stackoverflow.com/questions/480214/how-do-you-remove-duplicates-from-a-list-whilst-preserving-order) instead.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1126604194, "label": "datasette one.db one.db opens database twice, as one and one_2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1632#issuecomment-1032037391", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1632", "id": 1032037391, "node_id": "IC_kwDOBm6k_c49g6QP", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-07T23:21:07Z", "updated_at": "2022-02-07T23:21:07Z", "author_association": "OWNER", "body": "For the record, here's the code that picks the `one_2` name if that stem is already used as a database name: https://github.com/simonw/datasette/blob/03305ea183b1534bc4cef3a721fe5f3700273b84/datasette/app.py#L401-L417", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1126604194, "label": "datasette one.db one.db opens database twice, as one and one_2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1632#issuecomment-1032036525", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1632", "id": 1032036525, "node_id": "IC_kwDOBm6k_c49g6Ct", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-07T23:19:59Z", "updated_at": "2022-02-07T23:19:59Z", "author_association": "OWNER", "body": "I'm going to fix this in the CLI code itself, rather than fixing it in the `Datasette` constructor. That way if someone has a truly weird reason to want this behaviour they can construct Datasette directly.\r\n\r\nhttps://github.com/simonw/datasette/blob/03305ea183b1534bc4cef3a721fe5f3700273b84/datasette/cli.py#L535-L550", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1126604194, "label": "datasette one.db one.db opens database twice, as one and one_2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1632#issuecomment-1032034015", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1632", "id": 1032034015, "node_id": "IC_kwDOBm6k_c49g5bf", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-07T23:17:57Z", "updated_at": "2022-02-07T23:17:57Z", "author_association": "OWNER", "body": "I'm going to fix this in a 0.60.2 bug fix release.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1126604194, "label": "datasette one.db one.db opens database twice, as one and one_2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1632#issuecomment-1032032686", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1632", "id": 1032032686, "node_id": "IC_kwDOBm6k_c49g5Gu", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-07T23:16:10Z", "updated_at": "2022-02-07T23:16:10Z", "author_association": "OWNER", "body": "I found this bug while trying to get the following to work:\r\n\r\n datasette /data/one.db /data/two.db /data/*.db --create\r\n\r\nI want this to create any missing database files on startup out of that literal list of `one.db` and `two.db` and to also open any other `*.db` files in that folder - needed for `datasette-publish-fly` in https://github.com/simonw/datasette-publish-fly/pull/12#issuecomment-1032029874", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1126604194, "label": "datasette one.db one.db opens database twice, as one and one_2"}, "performed_via_github_app": null}