{"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-636234759", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 636234759, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjIzNDc1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-29T23:27:35Z", "updated_at": "2020-05-29T23:27:35Z", "author_association": "OWNER", "body": "Oh dear... it looks like `.raw_args` is used in my TIL script, which has been copied by a few people!\r\n\r\nhttps://github.com/search?q=request+raw_args+datasette&type=Code\r\n\r\nI'll fix it in mine and file pull requests against other pieces before this code gets released.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-636234067", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 636234067, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjIzNDA2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-29T23:24:34Z", "updated_at": "2020-05-29T23:24:34Z", "author_association": "OWNER", "body": "Updated documentation for `RequestParameters`: https://datasette.readthedocs.io/en/latest/internals.html#the-requestparameters-class", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-636229764", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 636229764, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjIyOTc2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-29T23:05:48Z", "updated_at": "2020-05-29T23:05:48Z", "author_association": "OWNER", "body": "I'm going to rebuild `RequestParameters` to no longer subclass `dict`. I'll keep the following methods:\r\n\r\n- `__contains__()`\r\n- `__getitem__()` (with the new behaviour)\r\n- `keys()`\r\n- iterating iterates keys\r\n- `__len__`\r\n- `get`\r\n- `getlist`\r\n\r\nIt won't support writing, so it will effectively be immutable after you have constructed it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-636228656", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 636228656, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjIyODY1Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-29T23:01:22Z", "updated_at": "2020-05-29T23:01:22Z", "author_association": "OWNER", "body": "As far as I can tell the only code I've ever written that would break if I made this change is in `russian-ira-facebook-ads`:\r\n\r\nhttps://github.com/simonw/russian-ira-facebook-ads-datasette/blob/e7106710abdd7bdcae035bedd8bdaba75ae56a12/plugins/target.py#L22\r\n\r\nhttps://github.com/simonw/russian-ira-facebook-ads-datasette/blob/b8a22348c6b315ab94ddba69e8117dfdfd9573dc/plugins/regexp.py#L17\r\n\r\nThat doesn't work against latest Datasette anyway, so I think I can safely make this change.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-636227927", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 636227927, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjIyNzkyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-29T22:58:32Z", "updated_at": "2020-05-29T22:58:32Z", "author_association": "OWNER", "body": "I think I want `request.args[\"key\"]` to return the FIRST item for that key or raise a `KeyError` if none are found.\r\n\r\nRight now it returns the full list.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-635702385", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 635702385, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNTcwMjM4NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-29T01:21:15Z", "updated_at": "2020-05-29T01:21:15Z", "author_association": "OWNER", "body": "I think `request.args.getlist()` should return a list, not None, if the key does not exist.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-635702201", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 635702201, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNTcwMjIwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-29T01:20:34Z", "updated_at": "2020-05-29T01:20:34Z", "author_association": "OWNER", "body": "Or change `request.args` to behave more like `request.raw_args` - mainly to return a single value when you look things up by key.\r\n\r\nIt's currently defined like this: https://github.com/simonw/datasette/blob/3c1a60589e14849344acd8aa6da0a60b40fbfc60/datasette/utils/__init__.py#L756-L766", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/774#issuecomment-635530876", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/774", "id": 635530876, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNTUzMDg3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-28T18:50:18Z", "updated_at": "2020-05-28T18:50:18Z", "author_association": "OWNER", "body": "How about moving this functionality to the request object itself?\r\n```python\r\nq = request[\"q\"] # Raises KeyError if missing, otherwise returns first\r\nq = request.get(\"q\", \"default\") # Returns first, or optional default or None\r\nfacets = request.getlist(\"_facet\")\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 626078521, "label": "Consolidate request.raw_args and request.args"}, "performed_via_github_app": null}