Title: Regression in `urllib.parse.parse_qsl(None)` behavior · Issue #116764 · python/cpython · GitHub
Open Graph Title: Regression in `urllib.parse.parse_qsl(None)` behavior · Issue #116764 · python/cpython
X Title: Regression in `urllib.parse.parse_qsl(None)` behavior · Issue #116764 · python/cpython
Description: Bug report Bug description: #115771 introduced a change in some currently working behavior. Previously: import urllib.parse >>> urllib.parse.parse_qsl(None) [] but now it raises TypeError: cannot convert 'NoneType' object to bytes. (pars...
Open Graph Description: Bug report Bug description: #115771 introduced a change in some currently working behavior. Previously: import urllib.parse >>> urllib.parse.parse_qsl(None) [] but now it raises TypeError: cannot c...
X Description: Bug report Bug description: #115771 introduced a change in some currently working behavior. Previously: import urllib.parse >>> urllib.parse.parse_qsl(None) [] but now it raises TypeError:...
Opengraph URL: https://github.com/python/cpython/issues/116764
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression in `urllib.parse.parse_qsl(None)` behavior","articleBody":"# Bug report\n\n### Bug description:\n\nhttps://github.com/python/cpython/pull/115771 introduced a change in some currently working behavior. Previously:\n```python\nimport urllib.parse\n\u003e\u003e\u003e urllib.parse.parse_qsl(None)\n[]\n```\nbut now it raises `TypeError: cannot convert 'NoneType' object to bytes`.\n\n(`parse_qs` also broke, since it calls `parse_qsl`)\n\nI think it's obviously pretty debatable whether the old behavior was desirable but there *is* popular code in the wild that depends on it: https://github.com/encode/httpx/blob/7df47ce4d93a06f2c3310cd692b4c2336d7663ba/httpx/_urls.py#L431-L433. \n\n(I stumbled across this when one of my colleagues was accidentally using a current dev branch of 3.11 and started getting mysterious errors from inside the bowels of the httpx client.)\n\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-116801\n* gh-116894\n* gh-116895\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/msullivan","@type":"Person","name":"msullivan"},"datePublished":"2024-03-13T21:03:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/116764/cpython/issues/116764"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7064dde7-61c8-7dfb-4ffa-319b4f0fa589 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E378:9B927:14DCCB5:1E3C8C6:6A4CE18B |
| html-safe-nonce | 8c2f3c2507258becb1778c76aae620d08884c77b20fcab1c9e7acf6050ec0aca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzc4OjlCOTI3OjE0RENDQjU6MUUzQzhDNjo2QTRDRTE4QiIsInZpc2l0b3JfaWQiOiI2MzY4NzA0NTc0ODk5Njc1NTMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b0f0805425e18c8d52294b724a7f569ed9419b6fd67ebd48fa111fe8c451c335 |
| hovercard-subject-tag | issue:2184881313 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/116764/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fd36b86336567890f4e9aef4d1ea9b5cc9d00c1116e892ec5ee40b75db322e5c/python/cpython/issues/116764 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fd36b86336567890f4e9aef4d1ea9b5cc9d00c1116e892ec5ee40b75db322e5c/python/cpython/issues/116764 |
| og:image:alt | Bug report Bug description: #115771 introduced a change in some currently working behavior. Previously: import urllib.parse >>> urllib.parse.parse_qsl(None) [] but now it raises TypeError: cannot c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msullivan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width