{"html_url": "https://github.com/simonw/datasette/issues/272#issuecomment-502393267", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/272", "id": 502393267, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjM5MzI2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-15T19:28:27Z", "updated_at": "2019-06-15T19:28:27Z", "author_association": "OWNER", "body": "I'll probably revert 9fdb47ca952b93b7b60adddb965ea6642b1ff523 from https://github.com/simonw/datasette/issues/272#issuecomment-494192779 since I won't need it now that ASGI is getting `raw_path` support.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324188953, "label": "Port Datasette to ASGI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/509#issuecomment-502393573", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/509", "id": 502393573, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjM5MzU3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-15T19:32:56Z", "updated_at": "2019-06-15T19:32:56Z", "author_association": "OWNER", "body": "Experimental exploratory patch:\r\n```diff\r\ndiff --git a/datasette/app.py b/datasette/app.py\r\nindex 2ef7da4..ca51866 100644\r\n--- a/datasette/app.py\r\n+++ b/datasette/app.py\r\n@@ -164,8 +164,10 @@ class Datasette:\r\n is_memory = True\r\n is_mutable = path not in self.immutables\r\n db = Database(self, path, is_mutable=is_mutable, is_memory=is_memory)\r\n+ i = 1\r\n if db.name in self.databases:\r\n- raise Exception(\"Multiple files with same stem: {}\".format(db.name))\r\n+ db.stem = db.name + \"-\" + str(i)\r\n+ i += 1\r\n self.databases[db.name] = db\r\n self.cache_headers = cache_headers\r\n self.cors = cors\r\ndiff --git a/datasette/database.py b/datasette/database.py\r\nindex e491577..75c8681 100644\r\n--- a/datasette/database.py\r\n+++ b/datasette/database.py\r\n@@ -14,6 +14,8 @@ from .inspect import inspect_hash\r\n \r\n \r\n class Database:\r\n+ stem = None\r\n+\r\n def __init__(self, ds, path=None, is_mutable=False, is_memory=False):\r\n self.ds = ds\r\n self.path = path\r\n@@ -73,6 +75,8 @@ class Database:\r\n def name(self):\r\n if self.is_memory:\r\n return \":memory:\"\r\n+ elif self.stem:\r\n+ return self.stem\r\n else:\r\n return Path(self.path).stem\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": 456568880, "label": "Support opening multiple databases with the same stem"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/272#issuecomment-502394420", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/272", "id": 502394420, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjM5NDQyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-15T19:45:46Z", "updated_at": "2019-06-15T19:45:46Z", "author_association": "OWNER", "body": "For reference, here's some WIP code I wrote last year against the old ASGI 2 spec: https://github.com/simonw/datasette/commit/4fd36ba2f3f91da7258859808616078e3464fb97", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324188953, "label": "Port Datasette to ASGI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/272#issuecomment-502395689", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/272", "id": 502395689, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjM5NTY4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-15T20:05:26Z", "updated_at": "2019-06-15T20:05:26Z", "author_association": "OWNER", "body": "For the routing component: I'm going to base my implementation on the one from Django Channels.\r\n\r\nhttps://github.com/django/channels/blob/507cb54fcb36df63282dd19653ea743036e7d63c/channels/routing.py#L123-L149\r\n\r\nDocumented here: https://channels.readthedocs.io/en/latest/topics/routing.html#urlrouter\r\n\r\nParticularly relevant: my view classes need access to the components that were already parsed out of the URL by the router. I'm going to copy the Django Channels mechanism of stashing those in `scope[\"url_route\"][\"kwargs\"]`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324188953, "label": "Port Datasette to ASGI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/272#issuecomment-502401078", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/272", "id": 502401078, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjQwMTA3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-15T21:35:26Z", "updated_at": "2019-06-15T21:35:26Z", "author_association": "OWNER", "body": "Started sketching out the router in the `asgi` branch: https://github.com/simonw/datasette/commit/7cdc55c6836fe246b1ca8a13a965a39991c9ffec", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 324188953, "label": "Port Datasette to ASGI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/187#issuecomment-502401636", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/187", "id": 502401636, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjQwMTYzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-15T21:44:23Z", "updated_at": "2019-06-15T21:44:23Z", "author_association": "OWNER", "body": "I'm closing his as a duplicate of the new #511 - I hope to have his working very shortly as a result of #272 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309033998, "label": "Windows installation error"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/507#issuecomment-502402586", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/507", "id": 502402586, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjQwMjU4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-15T22:00:14Z", "updated_at": "2019-06-15T22:00:14Z", "author_association": "OWNER", "body": "I need to find a good tool for taking screenshots on OSX that are reliably the same dimension across multiple sessions. Maybe in Firefox?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 455852801, "label": "Every datasette plugin on the ecosystem page should have a screenshot"}, "performed_via_github_app": null}