{"html_url": "https://github.com/simonw/datasette/issues/915#issuecomment-675751136", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/915", "id": 675751136, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc1MTEzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:28:36Z", "updated_at": "2020-08-18T22:28:36Z", "author_association": "OWNER", "body": "I'm closing this in favour of an internal requests mechanism in #943.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671763164, "label": "Refactor TableView class so things like datasette-graphql can reuse the logic"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/943#issuecomment-675750845", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/943", "id": 675750845, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc1MDg0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:27:43Z", "updated_at": "2020-08-18T22:27:43Z", "author_association": "OWNER", "body": "What about authentication checks etc? Won't they run twice?\r\n\r\nI think that's OK too, in fact it's desirable: think of the case of `datasette-graphql` where a bunch of different TableView calls are being made as part of the same GraphQL queries. Having those calls take advantage of finely grained per-table authentication and permission checks seems like a good feature.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681375466, "label": "await datasette.client.get(path) mechanism for executing internal requests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/943#issuecomment-675750382", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/943", "id": 675750382, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc1MDM4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:26:15Z", "updated_at": "2020-08-18T22:26:15Z", "author_association": "OWNER", "body": "Should internal requests executed in this way be handled by plugins that used the `asgi_wrapper()` hook?\r\n\r\nHard to be sure one way or the other. I'm worried about logging middleware triggering twice - but actually anyone doing serious logging of their Datasette instance is probably doing it in a different layer (uvicorn logs or nginx proxy or whatever) so they wouldn't be affected. There aren't any ASGI logging middlewares out there that I've seen.\r\n\r\nAlso: if you run into a situation where your stuff is breaking because `datasette.get()` is calling ASGI middleware twice you can fix it by running your ASGI middleware outside of the `asgi_wrapper` plugin hook mechanism.\r\n\r\nSo I think it DOES execute `asgi_wrapper()` middleware.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681375466, "label": "await datasette.client.get(path) mechanism for executing internal requests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/943#issuecomment-675749319", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/943", "id": 675749319, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc0OTMxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:23:01Z", "updated_at": "2020-08-18T22:23:01Z", "author_association": "OWNER", "body": "Actually no - `requests.get()` and `httpx.get()` prove that having a `.get()` method for an HTTP-related API isn't confusing to people at all.\r\n\r\n`datasette.get()` it is.\r\n\r\n(I'll probably add `datasette.post()` in the future too).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681375466, "label": "await datasette.client.get(path) mechanism for executing internal requests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/943#issuecomment-675749076", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/943", "id": 675749076, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc0OTA3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:22:21Z", "updated_at": "2020-08-18T22:22:21Z", "author_association": "OWNER", "body": "Alternative name possibilities:\r\n\r\n- `datasette.http_get(...)` - slightly misleading since it's not going over the HTTP protocol\r\n- `datasette.internal_get(...)` - the `internal_` might suggest its not an API for external use, which isn't true - it's for plugins\r\n- `datasette.get(...)` - clashes with `dict.get()` but I'm not at all sure that's a good reason not to use it", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681375466, "label": "await datasette.client.get(path) mechanism for executing internal requests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/943#issuecomment-675748573", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/943", "id": 675748573, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc0ODU3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:20:52Z", "updated_at": "2020-08-18T22:20:52Z", "author_association": "OWNER", "body": "Should it default to treating things as if they had the `.json` extension? There are use-cases for the non-JSON method, such as https://github.com/natbat/tidepools_near_me/commit/ec102c6da5a5d86f17628740d90b6365b671b5e1\r\n\r\nI think I'm OK with people having to add `.json` to their internal calls. Maybe they could use `format=\"json\"`) as an optional parameter which would automatically handle the very weird edge-cases where you need to use `?_format=json` instead of `.json` (due to table names existing with a `.json` suffix).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681375466, "label": "await datasette.client.get(path) mechanism for executing internal requests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/943#issuecomment-675747878", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/943", "id": 675747878, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc0Nzg3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:18:46Z", "updated_at": "2020-08-18T22:19:12Z", "author_association": "OWNER", "body": "Could be as simple as `response = await datasette.get(\"/path/blah\")` - which could also be re-used by the implementation of the `datasette --get /` CLI option introduced in #927.\r\n\r\nBit weird calling it `.get()` since that clashes with Python's dictionary `.get()` method.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681375466, "label": "await datasette.client.get(path) mechanism for executing internal requests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/915#issuecomment-675746544", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/915", "id": 675746544, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc0NjU0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:14:41Z", "updated_at": "2020-08-18T22:14:41Z", "author_association": "OWNER", "body": "I'm actually pretty happy with how `datasette-graphql` works now - maybe the trick here is to redesign the JSON format in #782 such that it can be used as a documented interface by things like `datasette-graphql` and then ensure Datasette has a documented mechanism for dispatching internal requests.\r\n\r\nI just did a horrible hack here that simulates an internal request, so supporting them as a feature would definitely make sense: https://github.com/natbat/tidepools_near_me/commit/ec102c6da5a5d86f17628740d90b6365b671b5e1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671763164, "label": "Refactor TableView class so things like datasette-graphql can reuse the logic"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/268#issuecomment-675725464", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/268", "id": 675725464, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTcyNTQ2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T21:18:07Z", "updated_at": "2020-08-18T21:18:35Z", "author_association": "OWNER", "body": "I want this on the table page - but that means that the table page will need to run a slightly more complex query since it needs access to a `rank` column to sort by - which it gets from running a join.\r\n\r\nBUT... that join needs to be constructed in a way that keeps existing filters, `?_where=` clauses etc intact.\r\n\r\nHere's a prototype using SQLite CTEs: https://register-of-members-interests.datasettes.com/regmem?sql=with+original+as+%28select+rowid%2C+*+from+items%29%0D%0Aselect%0D%0A++original.*%2C%0D%0A++items_fts.rank+as+items_fts_rank%0D%0Afrom%0D%0A++original+join+items_fts+on+original.rowid+%3D+items_fts.rowid%0D%0Awhere%0D%0A++items_fts+match+escape_fts%28%3Asearch%29%0D%0Aorder+by+items_fts_rank+desc+limit+10&search=hotel\r\n\r\n```sql\r\nwith original as (\r\n select\r\n rowid,\r\n *\r\n from\r\n items\r\n)\r\nselect\r\n original.*,\r\n items_fts.rank as items_fts_rank\r\nfrom\r\n original\r\n join items_fts on original.rowid = items_fts.rowid\r\nwhere\r\n items_fts match escape_fts(:search)\r\norder by\r\n items_fts_rank desc\r\nlimit\r\n 10\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323718842, "label": "Mechanism for ranking results from SQLite full-text search"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-675720040", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 675720040, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTcyMDA0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T21:05:24Z", "updated_at": "2020-08-18T21:05:24Z", "author_association": "OWNER", "body": "Is `columns` the right key for this in the table metadata block? I might want to use that for initial values for `?_col=` in #615.\r\n\r\nAlternative names:\r\n\r\n- `column_descriptions`\r\n- `column_info`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-675718593", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 675718593, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTcxODU5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T21:02:11Z", "updated_at": "2020-08-18T21:02:24Z", "author_association": "OWNER", "body": "Easiest solution: if you provide column metadata it gets displayed above the table, something like on https://fivethirtyeight.datasettes.com/fivethirtyeight/antiquities-act%2Factions_under_antiquities_act\r\n\r\n\"fivethirtyeight__antiquities-act_actions_under_antiquities_act__344_rows\"\r\n\r\nHTML `title=` tooltips are also added to the table headers, which won't be visible on touch devices but that's OK because the information is visible on the page already.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-675715472", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 675715472, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTcxNTQ3Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T20:55:02Z", "updated_at": "2020-08-18T20:55:02Z", "author_association": "OWNER", "body": "Could display these as tooltips on icons something like this (from the experimental `datasette-inspect-columns` plugin):\r\n\r\n\"fixtures__facetable__15_rows_and_NOAA_tides_second_attempt_-_Jupyter_Notebook\"\r\n\r\nThis would need to take accessibility into account, and would need a different display for the mobile web layout. Need to consider how it will interact with the column menu suggested in #690.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/873#issuecomment-675610275", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/873", "id": 675610275, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTYxMDI3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T17:24:05Z", "updated_at": "2020-08-18T17:26:10Z", "author_association": "OWNER", "body": "Maybe I can do this with ASGI after all. Here's the output of `/-/asgi-scope` with `datasette-debug-asgi` installed:\r\n```\r\n{'asgi': {'spec_version': '2.1', 'version': '3.0'},\r\n 'client': ('127.0.0.1', 62035),\r\n 'headers': [(b'host', b'127.0.0.1:62029'),\r\n (b'user-agent',\r\n b'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:79.0) Gecko'\r\n b'/20100101 Firefox/79.0'),\r\n (b'accept',\r\n b'text/html,application/xhtml+xml,application/xml;q=0.9,image/'\r\n b'webp,*/*;q=0.8'),\r\n (b'accept-language', b'en-US,en;q=0.5'),\r\n (b'accept-encoding', b'gzip, deflate'),\r\n (b'dnt', b'1'),\r\n (b'connection', b'keep-alive'),\r\n (b'upgrade-insecure-requests', b'1'),\r\n (b'cache-control', b'max-age=0')],\r\n 'http_version': '1.1',\r\n 'method': 'GET',\r\n 'path': '/-/asgi-scope',\r\n 'query_string': b'',\r\n 'raw_path': b'/-/asgi-scope',\r\n 'root_path': '',\r\n 'scheme': 'http',\r\n 'server': ('127.0.0.1', 62029),\r\n 'type': 'http'}\r\n```\r\nThat `'server': ('127.0.0.1', 62029)` bit has the correct port. Question is, can I access that programmatically on server startup?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 647095487, "label": "\"datasette -p 0 --root\" gives the wrong URL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/873#issuecomment-675609109", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/873", "id": 675609109, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTYwOTEwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T17:21:51Z", "updated_at": "2020-08-18T17:21:51Z", "author_association": "OWNER", "body": "Asked about this on the encode gitter here: https://gitter.im/encode/community?at=5f3c0dcaa8c17801765940c0", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 647095487, "label": "\"datasette -p 0 --root\" gives the wrong URL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-675538586", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 675538586, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTUzODU4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T15:11:36Z", "updated_at": "2020-08-18T15:11:36Z", "author_association": "OWNER", "body": "I tested this new publish pattern (running the tests in parallel before the deploy step) on `github-to-sqlite` - skipping the Docker step - and it worked: https://github.com/dogsheep/github-to-sqlite/actions/runs/213809864", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/47#issuecomment-675523053", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/47", "id": 675523053, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTUyMzA1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T14:45:53Z", "updated_at": "2020-08-18T14:45:53Z", "author_association": "MEMBER", "body": "```\r\n% github-to-sqlite emojis emojis.db --fetch\r\n [########----------------------------] 397/1682 23% 00:03:43\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681086659, "label": "emojis command"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/39#issuecomment-675509550", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/39", "id": 675509550, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTUwOTU1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T14:23:56Z", "updated_at": "2020-08-18T14:23:56Z", "author_association": "MEMBER", "body": "I think this is fixed: https://github-to-sqlite.dogsheep.net/github/issues?_facet=repo", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 613777056, "label": "issues foreign key to repo isn't working"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/46#issuecomment-675259273", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/46", "id": 675259273, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTI1OTI3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T05:28:32Z", "updated_at": "2020-08-18T05:28:32Z", "author_association": "MEMBER", "body": "Oh that's interesting - i didn't realize \"reviews\" were a separate concept. I'd definitely accept a pull request adding those!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 664485022, "label": "Feature: pull request reviews and comments"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-675253373", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 675253373, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTI1MzM3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T05:10:17Z", "updated_at": "2020-08-18T05:10:17Z", "author_association": "OWNER", "body": "I'll close this after the next release successfully goes out.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-675251613", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 675251613, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTI1MTYxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T05:05:15Z", "updated_at": "2020-08-18T05:05:15Z", "author_association": "OWNER", "body": "I think this is ready. I'll only know for sure the first time I push a release through it though!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-674590583", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 674590583, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU5MDU4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T23:15:51Z", "updated_at": "2020-08-18T05:04:43Z", "author_association": "OWNER", "body": "This example of jobs depending on each other and sharing data via artifacts looks relevant: https://docs.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts#passing-data-between-jobs-in-a-workflow", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-675250280", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 675250280, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTI1MDI4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T05:01:34Z", "updated_at": "2020-08-18T05:01:42Z", "author_association": "OWNER", "body": "I think `${GITHUB_REF#refs/tags/}` is the equivalent of `$TRAVIS_TAG`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-674589472", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 674589472, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU4OTQ3Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T23:05:57Z", "updated_at": "2020-08-16T23:05:57Z", "author_association": "OWNER", "body": "When I figure this out I'll update the https://github.com/simonw/datasette-plugin/blob/main/datasette-%7B%7Bcookiecutter.hyphenated%7D%7D/.github/workflows/publish.yml default workflow to do this - right now it runs the tests once on just a single version of Python as part of the package deploy to PyPI step.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-674589321", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 674589321, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU4OTMyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T23:04:34Z", "updated_at": "2020-08-16T23:04:34Z", "author_association": "OWNER", "body": "https://docs.github.com/en/actions/getting-started-with-github-actions/core-concepts-for-github-actions#job\r\n\r\n> A set of steps that execute on the same runner. You can define the dependency rules for how jobs run in a workflow file. Jobs can run at the same time in parallel or run sequentially depending on the status of a previous job. For example, a workflow can have two sequential jobs that build and test code, where the test job is dependent on the status of the build job. If the build job fails, the test job will not run.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-674589035", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 674589035, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU4OTAzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T23:02:23Z", "updated_at": "2020-08-16T23:02:23Z", "author_association": "OWNER", "body": "I'd like to set these up as different workflows that depend on each other, if that's possible.\r\n\r\nI want to start three test runs in parallel (on three different Python versions), then if all three pass kick off the PyPI push (without running more tests), then if that passes do the Docker build and push.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/914#issuecomment-674578388", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/914", "id": 674578388, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU3ODM4OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T21:10:27Z", "updated_at": "2020-08-16T21:10:27Z", "author_association": "OWNER", "body": "Demo of the fix: https://latest.datasette.io/fixtures/binary_data.json?_sort_desc=data&_shape=array&_nl=on\r\n\r\n```\r\n{\"rowid\": 2, \"data\": {\"$base64\": true, \"encoded\": \"FRwDx60F/g==\"}}\r\n{\"rowid\": 1, \"data\": {\"$base64\": true, \"encoded\": \"FRwCx60F/g==\"}}\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671056788, "label": "\"Object of type bytes is not JSON serializable\" for _nl=on"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/940#issuecomment-674566618", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/940", "id": 674566618, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU2NjYxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T19:20:58Z", "updated_at": "2020-08-16T19:20:58Z", "author_association": "OWNER", "body": "I need to figure out how to build and push the Docker image on releases. Here's the Travis code for that: https://github.com/simonw/datasette/blob/52eabb019d4051084b21524bd0fd9c2731126985/.travis.yml#L38-L47", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679808124, "label": "Move CI to GitHub Issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/938#issuecomment-674558631", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/938", "id": 674558631, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU1ODYzMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T18:10:23Z", "updated_at": "2020-08-16T18:10:23Z", "author_association": "OWNER", "body": "Documentation: https://github.com/simonw/datasette/blob/3a4c8ed36aa97211e46849d32a09f2f386f342dd/docs/plugin_hooks.rst#extra-template-vars-template-database-table-columns-view-name-request-datasette", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679700269, "label": "Pass columns to extra CSS/JS/etc plugin hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/938#issuecomment-674551826", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/938", "id": 674551826, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU1MTgyNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T17:07:57Z", "updated_at": "2020-08-16T17:07:57Z", "author_association": "OWNER", "body": "extra_tenplate_vars should he documented first and should be the only one to document the arguments and the async return feature. Others should refer back to it rather than duplicating that.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679700269, "label": "Pass columns to extra CSS/JS/etc plugin hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/939#issuecomment-674548163", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/939", "id": 674548163, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU0ODE2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T16:34:30Z", "updated_at": "2020-08-16T16:34:30Z", "author_association": "OWNER", "body": "Docs also need to note that `request` may be `None` for all of these hooks.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679779797, "label": "extra_ plugin hooks should take the same arguments"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/939#issuecomment-674547811", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/939", "id": 674547811, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU0NzgxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T16:31:20Z", "updated_at": "2020-08-16T16:31:20Z", "author_association": "OWNER", "body": "And the docs need to be updated too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679779797, "label": "extra_ plugin hooks should take the same arguments"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/939#issuecomment-674547788", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/939", "id": 674547788, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU0Nzc4OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T16:31:08Z", "updated_at": "2020-08-16T16:31:08Z", "author_association": "OWNER", "body": "Also: they should all be able to return `async def` inner functions. At the moment only `extra_template_vars` supports that pattern.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679779797, "label": "extra_ plugin hooks should take the same arguments"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/939#issuecomment-674545058", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/939", "id": 674545058, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU0NTA1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T16:07:20Z", "updated_at": "2020-08-16T16:07:20Z", "author_association": "OWNER", "body": "I'm going to implement this first as a single commit, then implement `columns` from #938 as a separate change.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679779797, "label": "extra_ plugin hooks should take the same arguments"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/939#issuecomment-674544973", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/939", "id": 674544973, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU0NDk3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T16:06:34Z", "updated_at": "2020-08-16T16:06:34Z", "author_association": "OWNER", "body": "They should also be next to each other in the documentation - right now they're a bit scattered in terms of page order:\r\n\r\n\"Plugin_hooks_\u2014_Datasette_documentation\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679779797, "label": "extra_ plugin hooks should take the same arguments"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/939#issuecomment-674544875", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/939", "id": 674544875, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU0NDg3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T16:05:36Z", "updated_at": "2020-08-16T16:05:36Z", "author_association": "OWNER", "body": "They should all take:\r\n\r\n template, database, table, view_name, request, datasette, columns\r\n\r\n`columns` is new, see #938.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679779797, "label": "extra_ plugin hooks should take the same arguments"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/938#issuecomment-674544691", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/938", "id": 674544691, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDU0NDY5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-16T16:03:52Z", "updated_at": "2020-08-16T16:03:52Z", "author_association": "OWNER", "body": "Four plugin hooks need this extra `columns` argument:\r\n\r\n- `extra_css_urls(template, database, table, datasette)`\r\n- `extra_js_urls(template, database, table, datasette)`\r\n- `extra_body_script(template, database, table, view_name, datasette)`\r\n- `extra_template_vars(template, database, table, view_name, request, datasette)`\r\n\r\nIt's weird that these take different arguments. I should fix that too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679700269, "label": "Pass columns to extra CSS/JS/etc plugin hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/936#issuecomment-674453318", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/936", "id": 674453318, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDQ1MzMxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-15T22:29:15Z", "updated_at": "2020-08-15T22:32:58Z", "author_association": "OWNER", "body": "Test failure:\r\n```\r\ntests/test_canned_queries.py F\r\n>>> captured stdout >>> \r\n__enter__\r\n>>> traceback >>> \r\n\r\ncanned_write_client = \r\n\r\n def test_insert(canned_write_client):\r\n response = canned_write_client.post(\r\n \"/data/add_name\",\r\n {\"name\": \"Hello\"},\r\n allow_redirects=False,\r\n csrftoken_from=True,\r\n cookies={\"foo\": \"bar\"},\r\n )\r\n assert 302 == response.status\r\n> assert \"/data/add_name?success\" == response.headers[\"Location\"]\r\nE AssertionError: assert '/data/add_name?success' == '/data/add_name'\r\nE - /data/add_name\r\nE + /data/add_name?success\r\nE ? ++++++++\r\n\r\n/Users/simon/Dropbox/Development/datasette/tests/test_canned_queries.py:66: AssertionError\r\n```\r\nNo idea why this change would affect that test.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679650632, "label": "Don't hang in db.execute_write_fn() if connection fails"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/935#issuecomment-674451012", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/935", "id": 674451012, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDQ1MTAxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-15T21:56:13Z", "updated_at": "2020-08-15T21:56:13Z", "author_association": "OWNER", "body": "This implementation seems to fix it, need to work out how to test though.\r\n```diff\r\ndiff --git a/datasette/database.py b/datasette/database.py\r\nindex ffa7a79..7ba1456 100644\r\n--- a/datasette/database.py\r\n+++ b/datasette/database.py\r\n@@ -89,14 +89,22 @@ class Database:\r\n def _execute_writes(self):\r\n # Infinite looping thread that protects the single write connection\r\n # to this database\r\n- conn = self.connect(write=True)\r\n+ conn_exception = None\r\n+ conn = None\r\n+ try:\r\n+ conn = self.connect(write=True)\r\n+ except Exception as e:\r\n+ conn_exception = e\r\n while True:\r\n task = self._write_queue.get()\r\n- try:\r\n- result = task.fn(conn)\r\n- except Exception as e:\r\n- print(e)\r\n- result = e\r\n+ if conn_exception is not None:\r\n+ result = conn_exception\r\n+ else:\r\n+ try:\r\n+ result = task.fn(conn)\r\n+ except Exception as e:\r\n+ print(e)\r\n+ result = e\r\n task.reply_queue.sync_q.put(result)\r\n \r\n async def execute_fn(self, fn):\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679646710, "label": "db.execute_write_fn(create_tables, block=True) hangs a thread if connection fails"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/935#issuecomment-674450652", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/935", "id": 674450652, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDQ1MDY1Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-15T21:51:22Z", "updated_at": "2020-08-15T21:51:22Z", "author_association": "OWNER", "body": "The easiest way to recreate this is to attempt a write against an immutable database, which triggers this assertion error:\r\n\r\nhttps://github.com/simonw/datasette/blob/13b3b51087964d5e1a8c1cdd2495e07bdbe176b8/datasette/database.py#L47-L55", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679646710, "label": "db.execute_write_fn(create_tables, block=True) hangs a thread if connection fails"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/935#issuecomment-674450607", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/935", "id": 674450607, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDQ1MDYwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-15T21:50:41Z", "updated_at": "2020-08-15T21:50:41Z", "author_association": "OWNER", "body": "The bug is here:\r\n\r\nhttps://github.com/simonw/datasette/blob/13b3b51087964d5e1a8c1cdd2495e07bdbe176b8/datasette/database.py#L89-L100\r\n\r\nIf `conn = self.connect(write=True)` raises an exception the entire server hangs, like this:\r\n```\r\n% datasette -i fixtures.db --get / \r\nException in thread Thread-1:\r\nTraceback (most recent call last):\r\n File \"/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py\", line 932, in _bootstrap_inner\r\n self.run()\r\n File \"/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py\", line 870, in run\r\n self._target(*self._args, **self._kwargs)\r\n File \"/Users/simon/.local/share/virtualenvs/latest-datasette-with-all-plugins-PJL_Xy9e/lib/python3.8/site-packages/datasette/database.py\", line 92, in _execute_writes\r\n conn = self.connect(write=True)\r\n File \"/Users/simon/.local/share/virtualenvs/latest-datasette-with-all-plugins-PJL_Xy9e/lib/python3.8/site-packages/datasette/database.py\", line 55, in connect\r\n assert not (write and not self.is_mutable)\r\nAssertionError\r\n\r\n... server hangs here ...\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 679646710, "label": "db.execute_write_fn(create_tables, block=True) hangs a thread if connection fails"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/932#issuecomment-674144798", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/932", "id": 674144798, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NDE0NDc5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-14T16:02:24Z", "updated_at": "2020-08-14T16:02:24Z", "author_association": "OWNER", "body": "Things to go in here:\r\n\r\n- What is Datasette?\r\n- A *database* contains *tables* full of *records*. A table has *rows* and *columns*.\r\n- Understanding faceting\r\n- How to use the filter interface\r\n- How to export data\r\n- How to link to data\r\n- How to run SQL", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 678760988, "label": "End-user documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/932#issuecomment-673735299", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/932", "id": 673735299, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzczNTI5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-13T22:10:40Z", "updated_at": "2020-08-13T22:11:06Z", "author_association": "OWNER", "body": "Idea: plugins can provide their own user-facing documentation. Datasette can like to eg `datasette.io/help?plugins=datasette-vega,datasette-cluster-map` to get the user manual with extra sections for those plugins.\r\n\r\nOr... link to `?url=datasette-url` and the documentation site can hit `/-/plugins.json` to figure out what extra manual sections to display!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 678760988, "label": "End-user documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/932#issuecomment-673734387", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/932", "id": 673734387, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzczNDM4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-13T22:08:06Z", "updated_at": "2020-08-13T22:08:06Z", "author_association": "OWNER", "body": "One challenge: how does this interact with plugins?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 678760988, "label": "End-user documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/932#issuecomment-673733904", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/932", "id": 673733904, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzczMzkwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-13T22:06:50Z", "updated_at": "2020-08-13T22:06:50Z", "author_association": "OWNER", "body": "Title: **Using Datasette**. `using.rst`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 678760988, "label": "End-user documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/931#issuecomment-673123213", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/931", "id": 673123213, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzEyMzIxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T21:36:20Z", "updated_at": "2020-08-12T21:36:20Z", "author_association": "OWNER", "body": "That worked: https://hub.docker.com/r/datasetteproject/datasette/tags", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677926613, "label": "Docker container is no longer being pushed (it's stuck on 0.45)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/931#issuecomment-673104851", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/931", "id": 673104851, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzEwNDg1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T20:52:08Z", "updated_at": "2020-08-12T20:52:08Z", "author_association": "OWNER", "body": "```\r\ndocker run -p 8001:8001 -v `pwd`:/mnt \\ \r\n datasette-updated-spatialite \\\r\n datasette -p 8001 -h 0.0.0.0 /mnt/fixtures.db --load-extension=/usr/local/lib/mod_spatialite.so\r\n```\r\nThis seems to work `/-/versions` reports the SpatiaLite versions as expected:\r\n```\r\n \"extensions\": {\r\n \"json1\": null,\r\n \"spatialite\": \"4.4.0-RC0\"\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": 677926613, "label": "Docker container is no longer being pushed (it's stuck on 0.45)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/931#issuecomment-673088110", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/931", "id": 673088110, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzA4ODExMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T20:15:28Z", "updated_at": "2020-08-12T20:15:28Z", "author_association": "OWNER", "body": "I changed the Dockerfile and built it on my laptop using:\r\n\r\n docker build -f Dockerfile -t datasette-updated-spatialite .\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677926613, "label": "Docker container is no longer being pushed (it's stuck on 0.45)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/931#issuecomment-673074297", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/931", "id": 673074297, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzA3NDI5Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T19:46:29Z", "updated_at": "2020-08-12T19:46:29Z", "author_association": "OWNER", "body": "Looks like the old files have moved to:\r\n\r\n- http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/\r\n- http://www.gaia-gis.it/gaia-sins/libspatialite-sources/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677926613, "label": "Docker container is no longer being pushed (it's stuck on 0.45)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/931#issuecomment-673070308", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/931", "id": 673070308, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzA3MDMwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T19:37:55Z", "updated_at": "2020-08-12T19:37:55Z", "author_association": "OWNER", "body": "Project news here: https://groups.google.com/g/spatialite-users/c/8AG3hQzXDmo\r\n\r\n> FreeXL\r\n> ==============================\r\n> the current stable version is now 1.0.6\r\n> (supporting few minor bug fixes and refreshed\r\n> build scripts)\r\n> DONE: no further development is expected in\r\n> the near future.\r\n> \r\n> http://www.gaia-gis.it/gaia-sins/freexl-1.0.6.tar.gz\r\n> http://www.gaia-gis.it/gaia-sins/freexl-1.0.6.zip\r\n> \r\n> \r\n> ReadOSM\r\n> ===============================\r\n> the current stable version is now 1.1.0a\r\n> (supporting few minor bug fixes and refreshed\r\n> build scripts)\r\n> DONE: no further development is expected in\r\n> the near future.\r\n> \r\n> http://www.gaia-gis.it/gaia-sins/readosm-1.1.0a.tar.gz\r\n> http://www.gaia-gis.it/gaia-sins/readosm-1.1.0a.zip\r\n> \r\n> \r\n> VirtualPG\r\n> ===============================\r\n> the current stanle version is now 2.0.0\r\n> (supporting few minor bug fixes and refreshed\r\n> build scripts)\r\n> DONE: no further development is expected in\r\n> the near future.\r\n> \r\n> http://www.gaia-gis.it/gaia-sins/virtualpg-2.0.0.tar.gz\r\n> http://www.gaia-gis.it/gaia-sins/virtualpg-2.0.0.zip\r\n> \r\n> \r\n> libspatialite\r\n> ===============================\r\n> 5.0.0 Release Candidate 1 (RC1) is now ready\r\n> to become a stable release.\r\n> I'll simply wait for more or less a week so to\r\n> allow for a reasonable community testing; if\r\n> no critical issue will be reported in the meanwhile\r\n> I'll go ASAP to release 5.0.0 \"stable\"\r\n> \r\n> http://www.gaia-gis.it/gaia-sins/libspatialite-5.0.0-RC1.tar.gz\r\n> http://www.gaia-gis.it/gaia-sins/libspatialite-5.0.0-RC1.zip\r\n> \r\n> \r\n> librasterlite2\r\n> ================================\r\n> still under active development.\r\n> a very relevant milestone has been achieved,\r\n> now the DB layout required for fully integrating\r\n> libspatialte and librasterlie2 is definetely \r\n> consolidated, no further changes are expected.\r\n> \r\n> http://www.gaia-gis.it/gaia-sins/librasterlite2-sources/librasterlite2-1.1.0-beta1.tar.gz\r\n> http://www.gaia-gis.it/gaia-sins/librasterlite2-sources/librasterlite2-1.1.0-beta1.zip\r\n> \r\n> more development activity is still required for\r\n> fully implementing SQL-driven graphic rendering \r\n> of both Vector and Raster Coverages based on\r\n> standard SLD/SE styles.\r\n> \r\n> a reasonable estimate is two man-month (and\r\n> not necessarily one development month equals\r\n> one calendar month)\r\n> \r\n> \r\n> spatialite_gui\r\n> =================================\r\n> the GUI tool is expected to take full profit from\r\n> the advanced features of RasterLite2 so to\r\n> become a complete self-contained GIS viewer \r\n> with map editing capabilities.\r\n> \r\n> consequently it wiil surely be the last\r\n> member of the SpatiaLite family to be\r\n> released in a final stable form. \r\n> several transient development versions\r\n> will be possibly released so to closely\r\n> follow the evolution of RasterLite2.\r\n> \r\n> http://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/spatialite_gui-2.1.0-beta1.tar.gz\r\n> http://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/spatialite_gui-2.1.0-beta1.zip", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677926613, "label": "Docker container is no longer being pushed (it's stuck on 0.45)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/931#issuecomment-673068919", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/931", "id": 673068919, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzA2ODkxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T19:34:57Z", "updated_at": "2020-08-12T19:34:57Z", "author_association": "OWNER", "body": "Looks like SpatiaLite released new versions: https://www.gaia-gis.it/fossil/freexl/index says \"Sources: current version is 1.0.6 (released on 2020-08-02)\" and links to http://www.gaia-gis.it/gaia-sins/freexl-1.0.6.tar.gz", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677926613, "label": "Docker container is no longer being pushed (it's stuck on 0.45)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/931#issuecomment-673068327", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/931", "id": 673068327, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MzA2ODMyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T19:33:42Z", "updated_at": "2020-08-12T19:33:42Z", "author_association": "OWNER", "body": "https://hub.docker.com/r/datasetteproject/datasette/tags shows this:\r\n\r\n\"datasetteproject_datasette_Tags_-_Docker_Hub\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677926613, "label": "Docker container is no longer being pushed (it's stuck on 0.45)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/133#issuecomment-672997703", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/133", "id": 672997703, "node_id": "MDEyOklzc3VlQ29tbWVudDY3Mjk5NzcwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T17:05:06Z", "updated_at": "2020-08-12T17:05:06Z", "author_association": "OWNER", "body": "Released.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677839979, "label": "Release a sdist to PyPI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/930#issuecomment-672550662", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/930", "id": 672550662, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjU1MDY2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T03:30:59Z", "updated_at": "2020-08-12T03:30:59Z", "author_association": "OWNER", "body": "https://datasette.readthedocs.io/en/stable/changelog.html#v0-47-1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677326155, "label": "Datasette sdist is missing templates (hence broken when installing from Homebrew)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/930#issuecomment-672519787", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/930", "id": 672519787, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjUxOTc4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T02:52:46Z", "updated_at": "2020-08-12T02:52:46Z", "author_association": "OWNER", "body": "Homebrew install is now fixed, using a temporary URL while waiting for Travis to ship the new release to PyPI: https://github.com/simonw/homebrew-datasette/issues/6", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677326155, "label": "Datasette sdist is missing templates (hence broken when installing from Homebrew)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/930#issuecomment-672488293", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/930", "id": 672488293, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjQ4ODI5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T02:35:34Z", "updated_at": "2020-08-12T02:35:34Z", "author_association": "OWNER", "body": "OK, this has fixed it - I used `sdist` to create the `.tar.gz` and then `pip installed` it into a new environment, and everything worked just fine. Going to ship this as Datasette 0.47.1.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677326155, "label": "Datasette sdist is missing templates (hence broken when installing from Homebrew)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/930#issuecomment-672480811", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/930", "id": 672480811, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjQ4MDgxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T02:31:38Z", "updated_at": "2020-08-12T02:31:38Z", "author_association": "OWNER", "body": "The root cause appears to be that the `templates/` are missing from the `sdist` `.tar.gz`: https://github.com/simonw/homebrew-datasette/issues/6#issuecomment-672477352", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677326155, "label": "Datasette sdist is missing templates (hence broken when installing from Homebrew)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/930#issuecomment-672472518", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/930", "id": 672472518, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjQ3MjUxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T02:24:49Z", "updated_at": "2020-08-12T02:24:49Z", "author_association": "OWNER", "body": "I checked and `datasette publish` deploys a 0.47 version that works fine too: https://datasette-0-47-j7hipcg4aq-uc.a.run.app/-/versions", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677326155, "label": "Datasette sdist is missing templates (hence broken when installing from Homebrew)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/930#issuecomment-672471431", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/930", "id": 672471431, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjQ3MTQzMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T02:21:19Z", "updated_at": "2020-08-12T02:21:19Z", "author_association": "OWNER", "body": "Correction: pip installed Datasette works fine, it's just the Homebrew release that is broken.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677326155, "label": "Datasette sdist is missing templates (hence broken when installing from Homebrew)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/926#issuecomment-672393737", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/926", "id": 672393737, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM5MzczNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T00:26:17Z", "updated_at": "2020-08-12T00:26:17Z", "author_association": "OWNER", "body": "```\r\n$ datasette --get '/:memory:.json?sql=select+sqlite_version()' | jq .\r\n{\r\n \"database\": \":memory:\",\r\n \"query_name\": null,\r\n \"rows\": [\r\n [\r\n \"3.32.3\"\r\n ]\r\n ],\r\n \"truncated\": false,\r\n \"columns\": [\r\n \"sqlite_version()\"\r\n ],\r\n \"query\": {\r\n \"sql\": \"select sqlite_version()\",\r\n \"params\": {}\r\n },\r\n \"private\": false,\r\n \"allow_execute_sql\": true,\r\n \"query_ms\": 1.165628433227539\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": 677250834, "label": "datasette fixtures.db --get \"/fixtures.json\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/927#issuecomment-672391299", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/927", "id": 672391299, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM5MTI5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T00:19:20Z", "updated_at": "2020-08-12T00:19:20Z", "author_association": "OWNER", "body": "Docs: https://github.com/simonw/datasette/blob/2111da01a03cfc62303b6a4b59ea9f96d22c0f78/docs/getting_started.rst#datasette---get", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677265716, "label": "'datasette --get' option, refs #926"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/927#issuecomment-672382108", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/927", "id": 672382108, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM4MjEwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-12T00:09:18Z", "updated_at": "2020-08-12T00:09:18Z", "author_association": "OWNER", "body": "Documentation can go here: https://datasette.readthedocs.io/en/latest/getting_started.html#datasette-serve-options", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677265716, "label": "'datasette --get' option, refs #926"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/928#issuecomment-672373061", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/928", "id": 672373061, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM3MzA2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:56:19Z", "updated_at": "2020-08-11T23:56:19Z", "author_association": "OWNER", "body": "New implementation of the `install` command:\r\nhttps://github.com/simonw/datasette/blob/afdeda8216d4d3027f87583ccdbef17ad85022ef/datasette/cli.py#L235-L240", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677272618, "label": "Test failures caused by failed attempts to mock pip"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/928#issuecomment-672372465", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/928", "id": 672372465, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM3MjQ2NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:54:28Z", "updated_at": "2020-08-11T23:54:28Z", "author_association": "OWNER", "body": "While debugging this I found a useful clue in https://github.com/pypa/pip/blob/e060970d51c5946beac8447eb95585d83019582d/src/pip/_internal/cli/main.py#L23-L47\r\n\r\n```\r\n# Do not import and use main() directly! Using it directly is actively\r\n# discouraged by pip's maintainers. The name, location and behavior of\r\n# this function is subject to change, so calling it directly is not\r\n# portable across different pip versions.\r\n\r\n# In addition, running pip in-process is unsupported and unsafe. This is\r\n# elaborated in detail at\r\n# https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program.\r\n# That document also provides suggestions that should work for nearly\r\n# all users that are considering importing and using main() directly.\r\n\r\n# However, we know that certain users will still want to invoke pip\r\n# in-process. If you understand and accept the implications of using pip\r\n# in an unsupported manner, the best approach is to use runpy to avoid\r\n# depending on the exact location of this entry point.\r\n\r\n# The following example shows how to use runpy to invoke pip in that\r\n# case:\r\n#\r\n# sys.argv = [\"pip\", your, args, here]\r\n# runpy.run_module(\"pip\", run_name=\"__main__\")\r\n#\r\n# Note that this will exit the process after running, unlike a direct\r\n# call to main. As it is not safe to do any processing after calling\r\n# main, this should not be an issue in practice.\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677272618, "label": "Test failures caused by failed attempts to mock pip"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/928#issuecomment-672372197", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/928", "id": 672372197, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM3MjE5Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:53:38Z", "updated_at": "2020-08-11T23:53:38Z", "author_association": "OWNER", "body": "Caused by the tests for #925", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677272618, "label": "Test failures caused by failed attempts to mock pip"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/927#issuecomment-672357176", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/927", "id": 672357176, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM1NzE3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:32:08Z", "updated_at": "2020-08-11T23:33:09Z", "author_association": "OWNER", "body": "Needs documentation and tests.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677265716, "label": "'datasette --get' option, refs #926"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/927#issuecomment-672357902", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/927", "id": 672357902, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM1NzkwMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:32:39Z", "updated_at": "2020-08-11T23:32:39Z", "author_association": "OWNER", "body": "It works:\r\n```\r\n$ datasette --get '/:memory:.json?sql=select * from sqlite_master' | jq . \r\n{\r\n \"database\": \":memory:\",\r\n \"query_name\": null,\r\n \"rows\": [],\r\n \"truncated\": false,\r\n \"columns\": [\r\n \"type\",\r\n \"name\",\r\n \"tbl_name\",\r\n \"rootpage\",\r\n \"sql\"\r\n ],\r\n \"query\": {\r\n \"sql\": \"select * from sqlite_master\",\r\n \"params\": {}\r\n },\r\n \"private\": false,\r\n \"allow_execute_sql\": true,\r\n \"query_ms\": 0.8032321929931641\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": 677265716, "label": "'datasette --get' option, refs #926"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/926#issuecomment-672338113", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/926", "id": 672338113, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMzODExMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:57:28Z", "updated_at": "2020-08-11T22:57:28Z", "author_association": "OWNER", "body": "I partly want this so I can easily implement a better `test` method for the Homebrew package. The test I have right now looks like this:\r\n\r\nhttps://github.com/simonw/homebrew-datasette/blob/8aa30aa183158051a987a7e3f50e7e3ee05d8ee9/Formula/datasette.rb#L125-L127\r\n\r\n```\r\n test do\r\n system bin/\"datasette\", \"--help\"\r\n end\r\n```\r\nThe Homebrew docs at https://docs.brew.sh/Formula-Cookbook#add-a-test-to-the-formula say:\r\n\r\n> We want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite their widespread use) `foo --version` and `foo --help` are bad tests. However, a bad test is better than no test at all.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677250834, "label": "datasette fixtures.db --get \"/fixtures.json\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672336720", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672336720, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMzNjcyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:53:07Z", "updated_at": "2020-08-11T22:53:07Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/blob/5126ecb1267ed3850bf3b0ab270accd031a02e79/docs/installation.rst#using-homebrew", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672329101", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672329101, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMyOTEwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:35:13Z", "updated_at": "2020-08-11T22:35:13Z", "author_association": "OWNER", "body": "I added the `datasette install name-of-plugin` command in #925 mainly to simplify the process of installing plugins if Datasette itself was installed using homebrew.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/925#issuecomment-672328807", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/925", "id": 672328807, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMyODgwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:34:37Z", "updated_at": "2020-08-11T22:34:37Z", "author_association": "OWNER", "body": "This will simplify the instructions for installing plugins with Datasette install via homebrew, refs #923", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677227912, "label": "\"datasette install\" and \"datasette uninstall\" commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/925#issuecomment-672328436", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/925", "id": 672328436, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMyODQzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:33:32Z", "updated_at": "2020-08-11T22:33:42Z", "author_association": "OWNER", "body": "```\r\n$ datasette install --help\r\nUsage: datasette install [OPTIONS] PACKAGES...\r\n\r\n Install Python packages - e.g. Datasette plugins - into the same\r\n environment as Datasette\r\n\r\nOptions:\r\n --help Show this message and exit.\r\n$ datasette uninstall --help\r\nUsage: datasette uninstall [OPTIONS] PACKAGES...\r\n\r\n Uninstall Python packages (e.g. plugins) from the Datasette environment\r\n\r\nOptions:\r\n -y, --yes Don't ask for confirmation\r\n --help Show this message and exit.\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677227912, "label": "\"datasette install\" and \"datasette uninstall\" commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/925#issuecomment-672304650", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/925", "id": 672304650, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMwNDY1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:04:48Z", "updated_at": "2020-08-11T22:04:48Z", "author_association": "OWNER", "body": "Prototyped in this thread: https://github.com/simonw/datasette/issues/335#issuecomment-671005731", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677227912, "label": "\"datasette install\" and \"datasette uninstall\" commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672288845", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672288845, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjI4ODg0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T21:28:17Z", "updated_at": "2020-08-11T21:28:17Z", "author_association": "OWNER", "body": "Here's a pattern for installing plugins:\r\n```\r\n$ datasette plugins\r\n[]\r\n$ /usr/local/opt/datasette/libexec/bin/pip install datasette-vega\r\nCollecting datasette-vega\r\n Using cached datasette_vega-0.6.2-py3-none-any.whl (1.8 MB)\r\nRequirement already satisfied: datasette in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette-vega) (0.46)\r\nRequirement already satisfied: click~=7.1.1 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (7.1.2)\r\nRequirement already satisfied: click-default-group~=1.2.2 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.2.2)\r\nRequirement already satisfied: Jinja2<2.12.0,>=2.10.3 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (2.11.2)\r\nRequirement already satisfied: hupper~=1.9 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.10.2)\r\nRequirement already satisfied: pint~=0.9 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.14)\r\nRequirement already satisfied: pluggy~=0.13.0 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.13.1)\r\nRequirement already satisfied: uvicorn~=0.11 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.11.8)\r\nRequirement already satisfied: aiofiles<0.6,>=0.4 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.5.0)\r\nRequirement already satisfied: janus<0.6,>=0.4 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.5.0)\r\nRequirement already satisfied: asgi-csrf>=0.6 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.6.1)\r\nRequirement already satisfied: PyYAML~=5.3 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (5.3.1)\r\nRequirement already satisfied: mergedeep<1.4.0,>=1.1.1 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.3.0)\r\nRequirement already satisfied: itsdangerous~=1.1 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.1.0)\r\nRequirement already satisfied: python-baseconv==1.2.2 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.2.2)\r\nRequirement already satisfied: MarkupSafe>=0.23 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from Jinja2<2.12.0,>=2.10.3->datasette->datasette-vega) (1.1.1)\r\nRequirement already satisfied: setuptools in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from pint~=0.9->datasette->datasette-vega) (49.3.1)\r\nRequirement already satisfied: packaging in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from pint~=0.9->datasette->datasette-vega) (20.4)\r\nRequirement already satisfied: h11<0.10,>=0.8 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (0.9.0)\r\nRequirement already satisfied: websockets==8.* in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (8.1)\r\nRequirement already satisfied: httptools==0.1.* in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (0.1.1)\r\nRequirement already satisfied: uvloop>=0.14.0 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (0.14.0)\r\nRequirement already satisfied: pyparsing>=2.0.2 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from packaging->pint~=0.9->datasette->datasette-vega) (2.4.7)\r\nRequirement already satisfied: six in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from packaging->pint~=0.9->datasette->datasette-vega) (1.15.0)\r\nInstalling collected packages: datasette-vega\r\nSuccessfully installed datasette-vega-0.6.2\r\n$ datasette plugins \r\n[\r\n {\r\n \"name\": \"datasette-vega\",\r\n \"static\": true,\r\n \"templates\": false,\r\n \"version\": \"0.6.2\",\r\n \"hooks\": [\r\n \"extra_css_urls\",\r\n \"extra_js_urls\"\r\n ]\r\n }\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": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672287754", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672287754, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjI4Nzc1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T21:25:33Z", "updated_at": "2020-08-11T21:25:33Z", "author_association": "OWNER", "body": ".. and confirm if `brew tap ...` is even needed if you run `brew install simonw/datasette/datasette`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672089281", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672089281, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjA4OTI4MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T16:54:50Z", "updated_at": "2020-08-11T16:54:50Z", "author_association": "OWNER", "body": "Also need to talk about how you install plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-672088880", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 672088880, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjA4ODg4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T16:54:06Z", "updated_at": "2020-08-11T16:54:06Z", "author_association": "OWNER", "body": "It works!\r\n```\r\n$ brew tap simonw/datasette\r\n$ brew install simonw/datasette/datasette\r\n$ datasette --version\r\ndatasette, version 0.46\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671733187", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671733187, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTczMzE4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T05:25:23Z", "updated_at": "2020-08-11T05:25:23Z", "author_association": "OWNER", "body": "I got this almost working in `simonw/homebrew-datasette` - see https://github.com/simonw/homebrew-datasette/issues/2 for the last missing detail.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/132#issuecomment-671151461", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/132", "id": 671151461, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTE1MTQ2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-10T03:54:06Z", "updated_at": "2020-08-10T03:54:06Z", "author_association": "OWNER", "body": "For the moment I'll build it without the `--retry` mode.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675839512, "label": "Features for enabling and disabling WAL mode"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/132#issuecomment-671151170", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/132", "id": 671151170, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTE1MTE3MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-10T03:52:02Z", "updated_at": "2020-08-10T03:52:02Z", "author_association": "OWNER", "body": "I'm having trouble figuring out how to write a test that locks a SQLite database (so I can test that `--retry` actually works). I tried this recipe but it didn't seem to prevent another process from running `pragma journal_mode='wal';` against that database:\r\n\r\n```python\r\nimport time\r\nimport sys\r\nimport sqlite3\r\n\r\nfilename = sys.argv[-1]\r\n\r\ndb = sqlite3.connect(filename)\r\nwith db:\r\n db.execute(\"create table if not exists counter(id integer primary key, counter text)\")\r\n time.sleep(100)\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675839512, "label": "Features for enabling and disabling WAL mode"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/132#issuecomment-671147344", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/132", "id": 671147344, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTE0NzM0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-10T03:29:00Z", "updated_at": "2020-08-10T03:29:00Z", "author_association": "OWNER", "body": "The CLI options should take multiple database files:\r\n\r\n $ sqlite-utils enable-wal *.db\r\n\r\nIt's possible for this to fail if the DB is locked. How about a `--retry` option that causes it to retry a bunch of times if that happens?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675839512, "label": "Features for enabling and disabling WAL mode"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/132#issuecomment-671147148", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/132", "id": 671147148, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTE0NzE0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-10T03:27:50Z", "updated_at": "2020-08-10T03:27:50Z", "author_association": "OWNER", "body": "https://www.sqlite.org/pragma.html#pragma_journal_mode lists six modes: DELETE | TRUNCATE | PERSIST | MEMORY | WAL | OFF\r\n\r\nI'm only going to implement utilities for DELETE (wal-off) and WAL (wal-on) - the other modes look like they're for specialist purposes that I don't need to support.\r\n\r\nIf it turns out I do need them I can add those to `sqlite-utils` later.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675839512, "label": "Features for enabling and disabling WAL mode"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/132#issuecomment-671146948", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/132", "id": 671146948, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTE0Njk0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-10T03:26:51Z", "updated_at": "2020-08-10T03:26:51Z", "author_association": "OWNER", "body": "For the CLI:\r\n\r\n $ sqlite-utils enable-wal github.db\r\n $ sqlite-utils disable-wal github.db\r\n\r\nFor the Python library:\r\n\r\n```python\r\nimport sqlite_utils\r\n\r\ndb = sqlite_utils.Database(\"github.db\")\r\ndb.enable_wal()\r\ndb.disable_wal()\r\nmode = db.journal_mode # \"wal\" or \"delete\" or others\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675839512, "label": "Features for enabling and disabling WAL mode"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/131#issuecomment-671088832", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/131", "id": 671088832, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA4ODgzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T19:00:41Z", "updated_at": "2020-08-09T19:00:41Z", "author_association": "OWNER", "body": "Should be consistent with the `create-table` command as much as possible:\r\n```\r\n$ sqlite-utils create-table mydb.db mytable \\\r\n id integer \\\r\n name text \\\r\n age integer \\\r\n is_good integer \\\r\n --not-null name \\\r\n --not-null age \\\r\n --default is_good 1 \\\r\n --pk=id\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675753042, "label": "sqlite-utils insert: options for column types"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671077168", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671077168, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3NzE2OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T17:10:15Z", "updated_at": "2020-08-09T18:13:39Z", "author_association": "OWNER", "body": "Here's the issue that explains that warning: https://github.com/pypa/pip/issues/5599\r\n\r\nThis should fix it (risky):\r\n\r\n from pip._internal.cli.main import main", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671076975", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671076975, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3Njk3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T17:08:34Z", "updated_at": "2020-08-09T17:09:21Z", "author_association": "OWNER", "body": "Quick prototype of `datasette install`:\r\n```diff\r\ndiff --git a/datasette/cli.py b/datasette/cli.py\r\nindex 287195a..95b6eb7 100644\r\n--- a/datasette/cli.py\r\n+++ b/datasette/cli.py\r\n@@ -231,6 +231,18 @@ def package(\r\n call(args)\r\n \r\n \r\n+@cli.command()\r\n+@click.argument(\"packages\", nargs=-1, required=True)\r\n+def install(packages):\r\n+ \"Install Python packages - e.g. Datasette plugins - into the same environment as Datasett\"\r\n+ import pip\r\n+\r\n+ try:\r\n+ pip.main([\"install\"] + list(packages))\r\n+ except SystemExit as e:\r\n+ pass\r\n+\r\n+\r\n @cli.command()\r\n @click.argument(\"files\", type=click.Path(exists=True), nargs=-1)\r\n @click.option(\r\n```\r\n\r\n```\r\n$ datasette install\r\nUsage: datasette install [OPTIONS] PACKAGES...\r\nTry 'datasette install --help' for help.\r\n\r\nError: Missing argument 'PACKAGES...'.\r\n$ datasette install datasette-vega\r\nWARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.\r\nPlease see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.\r\nTo avoid this problem you can invoke Python with '-m pip' instead of running pip directly.\r\nCollecting datasette-vega\r\n Using cached datasette_vega-0.6.2-py3-none-any.whl (1.8 MB)\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": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671005731", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671005731, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTAwNTczMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T04:44:13Z", "updated_at": "2020-08-09T17:04:21Z", "author_association": "OWNER", "body": "Telling people how to figure out that `pip` location is going to be pretty unpleasant.\r\n\r\nHow about instead providing a `datasette plugins --install=datasette-graphql` command?\r\n\r\nOr `datasette install datasette-vega`\r\n\r\nIt would run `pip install` in the same virtualenv as Datasette itself.\r\n\r\nhttp://jelly.codes/articles/python-pip-module/ shows how to do this:\r\n\r\n```python\r\n\r\nimport pip\r\n\r\ntry:\r\n pip.main([\"install\", \"plumbum\"])\r\nexcept SystemExit as e:\r\n pass\r\n```\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": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/918#issuecomment-671075764", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/918", "id": 671075764, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3NTc2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:56:48Z", "updated_at": "2020-08-09T16:56:48Z", "author_association": "OWNER", "body": "GitHub security advisory: https://github.com/simonw/datasette/security/advisories/GHSA-q6j3-c4wc-63vw", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675724951, "label": "Security issue: read-only canned queries leak CSRF token in URL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/915#issuecomment-671073223", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/915", "id": 671073223, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3MzIyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:35:20Z", "updated_at": "2020-08-09T16:36:10Z", "author_association": "OWNER", "body": "`datasette-graphql` uses the logic from `TableView` right now. It wasn't too unpleasant, but I do worry about the two of them being coupled together in this way.\r\n\r\nhttps://github.com/simonw/datasette-graphql/blob/cc65ec294b0bf8e26213fc68bb5487066de9caab/datasette_graphql/utils.py#L412-L417\r\n\r\n```python\r\n request = Request.fake(path_with_query_string)\r\n\r\n view = TableView(DatasetteSpecialConfig(datasette))\r\n data, _, _ = await view.data(\r\n request, database=database_name, hash=None, table=table_name, _next=after\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": 671763164, "label": "Refactor TableView class so things like datasette-graphql can reuse the logic"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/919#issuecomment-671072223", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/919", "id": 671072223, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3MjIyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:26:17Z", "updated_at": "2020-08-09T16:26:17Z", "author_association": "OWNER", "body": "Should be released in a couple of minutes: https://travis-ci.org/github/simonw/datasette/builds/716328883", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 1, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675727366, "label": "Travis should not build the master branch, only the main branch"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/918#issuecomment-671071710", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/918", "id": 671071710, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3MTcxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:21:41Z", "updated_at": "2020-08-09T16:21:41Z", "author_association": "OWNER", "body": "Submitting the form on https://latest.datasette.io/fixtures/neighborhood_search demonstrates that this is fixed.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675724951, "label": "Security issue: read-only canned queries leak CSRF token in URL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/919#issuecomment-671071461", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/919", "id": 671071461, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3MTQ2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:19:37Z", "updated_at": "2020-08-09T16:19:37Z", "author_association": "OWNER", "body": "That appears to have worked.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675727366, "label": "Travis should not build the master branch, only the main branch"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/918#issuecomment-671070528", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/918", "id": 671070528, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3MDUyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:12:16Z", "updated_at": "2020-08-09T16:12:16Z", "author_association": "OWNER", "body": "It's worth noting that in order to exploit this issue the following would all need to be true:\r\n\r\n- A user is running a copy of Datasette protected by a cookie-based authentication plugin AND configured with at least one writable canned query\r\n- An attacker is in control of a URL that could concievably be returned on a page that is displayed as the result of submitting a read-only canned query\r\n- An authenticated user of that Datasette instance, who is running a browser that doesn't support the `SameSite=lax` cookie parameter (which is [widely supported](https://caniuse.com/#feat=same-site-cookie-attribute) by modern browsers), submits the read-only canned query form and then clicks a link to the attacker's off-site page, exposing their CSRFToken in the attacker's HTTP referer logs\r\n- The attacker then tricks that user into visiting their own malicious web page which includes a POST form that auto-submits against the writable canned query that the attacker wishes to exploit, including the CSRF token as a hidden field\r\n\r\nThe attacker would need full knowledge of the URL and form layout of the Datasette instance that they are exploiting.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675724951, "label": "Security issue: read-only canned queries leak CSRF token in URL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/918#issuecomment-671070486", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/918", "id": 671070486, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3MDQ4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:11:59Z", "updated_at": "2020-08-09T16:11:59Z", "author_association": "OWNER", "body": "Fix has been released in Datasette 0.46: https://datasette.readthedocs.io/en/latest/changelog.html#v0-46", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 675724951, "label": "Security issue: read-only canned queries leak CSRF token in URL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671001457", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671001457, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTAwMTQ1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T03:37:39Z", "updated_at": "2020-08-09T03:37:39Z", "author_association": "OWNER", "body": "Here's what happened when I installed `homebrew-vd`: https://gist.github.com/simonw/7bfd971a62743d7ca248e6b5e696c240\r\n\r\nIt worked! And from digging around, it has a virtual environment at `/usr/local/Cellar/visidata/1.5.2/libexec/`\r\n\r\nWhich means `/usr/local/Cellar/visidata/1.5.2/libexec/bin/pip` is a working `pip`\r\n\r\nAnd I tried running these commands and confirmed that I get a `datasette` with an additional plugin:\r\n\r\n```\r\n/usr/local/Cellar/visidata/1.5.2/libexec/bin/pip install datasette\r\n/usr/local/Cellar/visidata/1.5.2/libexec/bin/pip install datasette-graphql\r\n/usr/local/Cellar/visidata/1.5.2/libexec/bin/datasette plugins\r\n[\r\n {\r\n \"name\": \"datasette-graphql\",\r\n \"static\": false,\r\n \"templates\": true,\r\n \"version\": \"0.11\",\r\n \"hooks\": [\r\n \"register_routes\",\r\n \"startup\"\r\n ]\r\n }\r\n]\r\n```\r\nSo I can package Datasette as a homebrew package AND I can give people instructions for installing plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-670999860", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 670999860, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MDk5OTg2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T03:12:44Z", "updated_at": "2020-08-09T03:12:44Z", "author_association": "OWNER", "body": "How would plugin installation work if Datasette was installed via homebrew?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-670999832", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 670999832, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MDk5OTgzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T03:12:14Z", "updated_at": "2020-08-09T03:12:14Z", "author_association": "OWNER", "body": "Another useful example: https://github.com/Homebrew/homebrew-core/blob/master/Formula/trailscraper.rb", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/swarm-to-sqlite/issues/8#issuecomment-669241341", "issue_url": "https://api.github.com/repos/dogsheep/swarm-to-sqlite/issues/8", "id": 669241341, "node_id": "MDEyOklzc3VlQ29tbWVudDY2OTI0MTM0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-05T14:55:14Z", "updated_at": "2020-08-05T14:55:14Z", "author_association": "MEMBER", "body": "Looks like there's a column that's not consistently there, so the table got created without it.\r\n\r\nEasiest fix is to add `alter=True` to this line:\r\n\r\nhttps://github.com/dogsheep/swarm-to-sqlite/blob/f4a82633da927cde672c9d9af92930bfca2e3ddf/swarm_to_sqlite/utils.py#L94\r\n\r\nThat will cause `sqlite-utils` to notice if there's a missing column and add it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 648245071, "label": "Error thrown: table photos has no column named hasSticker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/130#issuecomment-667585598", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/130", "id": 667585598, "node_id": "MDEyOklzc3VlQ29tbWVudDY2NzU4NTU5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-01T20:51:28Z", "updated_at": "2020-08-01T20:51:28Z", "author_association": "OWNER", "body": "CLI documentation: https://github.com/simonw/sqlite-utils/commit/57e4eb8e5564af5d97f892b3be8342451ee177a2?short_path=7240b7c#diff-7240b7c71b1a8194da0c001c64fc8d40", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671130371, "label": "Support tokenize option for FTS"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/130#issuecomment-667585561", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/130", "id": 667585561, "node_id": "MDEyOklzc3VlQ29tbWVudDY2NzU4NTU2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-01T20:50:59Z", "updated_at": "2020-08-01T20:50:59Z", "author_association": "OWNER", "body": "Turns out it works for FTS4 as well: https://www.sqlite.org/fts3.html#tokenizer", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671130371, "label": "Support tokenize option for FTS"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/130#issuecomment-667584567", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/130", "id": 667584567, "node_id": "MDEyOklzc3VlQ29tbWVudDY2NzU4NDU2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-01T20:41:09Z", "updated_at": "2020-08-01T20:41:09Z", "author_association": "OWNER", "body": "API documentation here: https://github.com/simonw/sqlite-utils/commit/617e6f070c85be66ea04c80b78dafd08c875f8c8?short_path=e156262#diff-e1562629b8def6da772d9b0903faf703", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671130371, "label": "Support tokenize option for FTS"}, "performed_via_github_app": null}