René's URL Explorer Experiment


Title: gh-67041: Allow to distinguish between empty and not defined URI components by serhiy-storchaka · Pull Request #123305 · python/cpython · GitHub

Open Graph Title: gh-67041: Allow to distinguish between empty and not defined URI components by serhiy-storchaka · Pull Request #123305 · python/cpython

X Title: gh-67041: Allow to distinguish between empty and not defined URI components by serhiy-storchaka · Pull Request #123305 · python/cpython

Description: Changes in the urllib.parse module: Add option allow_none missing_as_none in urlparse(), urlsplit() and urldefrag(). If it is true, represent not defined components as None instead of an empty string. Add option keep_empty in urlunparse() and urlunsplit(). If it is true, keep empty non-None components in the resulting string. By default it is the same as the allow_none value for the result of the urlparse() and urlsplit() calls. Add option keep_empty in the geturl() method of DefragResult, SplitResult, ParseResult and the corresponding bytes counterparts. Issue: gh-67041

Open Graph Description: Changes in the urllib.parse module: Add option allow_none missing_as_none in urlparse(), urlsplit() and urldefrag(). If it is true, represent not defined components as None instead of an empty str...

X Description: Changes in the urllib.parse module: Add option allow_none missing_as_none in urlparse(), urlsplit() and urldefrag(). If it is true, represent not defined components as None instead of an empty str...

Opengraph URL: https://github.com/python/cpython/pull/123305

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7e95a01e-f8fb-32a2-c7ca-217a7edf93f9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD2E6:8D142:A3BBC5:DE21BC:696AB99B
html-safe-nonce740ceb73d1568bacc48f5255aa0d176e42f6f9de5da6275011070f8f710e506c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkU2OjhEMTQyOkEzQkJDNTpERTIxQkM6Njk2QUI5OUIiLCJ2aXNpdG9yX2lkIjoiODkxMTY3ODY4NDM2Nzg5NjU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4469a8a6c5bcf74dc9eb689d6c45dfcc3fe2417c2cbb909e17208bdbe2672a3e
hovercard-subject-tagpull_request:2035895412
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/123305/files
twitter:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
og:image:altChanges in the urllib.parse module: Add option allow_none missing_as_none in urlparse(), urlsplit() and urldefrag(). If it is true, represent not defined components as None instead of an empty str...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None46ce962e0e18113ea447391b6ace8b02d4d2861e57b4fbab3658698f73d8855b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release30300f30bb3949de255e84a146706a3bdb5c19c9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/123305/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F123305%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F123305%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/123305/files
Reloadhttps://github.com/python/cpython/pull/123305/files
Reloadhttps://github.com/python/cpython/pull/123305/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
serhiy-storchaka:urllib-parse-allow-nonehttps://github.com/serhiy-storchaka/cpython/tree/urllib-parse-allow-none
Conversation 26 https://github.com/python/cpython/pull/123305
Commits 19 https://github.com/python/cpython/pull/123305/commits
Checks 42 https://github.com/python/cpython/pull/123305/checks
Files changed https://github.com/python/cpython/pull/123305/files
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
gh-67041: Allow to distinguish between empty and not defined URI components https://github.com/python/cpython/pull/123305/files#top
Show all changes 19 commits https://github.com/python/cpython/pull/123305/files
a60c9be gh-67041: Allow to distinguish between empty and not defined URI comp… serhiy-storchaka Aug 22, 2024 https://github.com/python/cpython/pull/123305/commits/a60c9beb50050fe1dde3352dea7136073c85c606
a1dbfa6 Document the things. serhiy-storchaka Aug 31, 2024 https://github.com/python/cpython/pull/123305/commits/a1dbfa6eb8a131ec1d5a222bd870e85b46177aed
b50b778 Merge branch 'main' into urllib-parse-allow-none serhiy-storchaka Nov 26, 2024 https://github.com/python/cpython/pull/123305/commits/b50b778ef8196b440ac8cc066637029bc5105454
eaa9ce6 Preserve the status of allow_none in results. serhiy-storchaka Nov 27, 2024 https://github.com/python/cpython/pull/123305/commits/eaa9ce6564ff0d1025991d872f9d88a85ed8c726
e5c31dd Preserve _keep_empty in copying and encoding. serhiy-storchaka Dec 5, 2024 https://github.com/python/cpython/pull/123305/commits/e5c31dd38d8679ffddafa54283a9549227b6c3a6
78bdc13 Merge branch 'main' into urllib-parse-allow-none serhiy-storchaka Nov 14, 2025 https://github.com/python/cpython/pull/123305/commits/78bdc1388ed34e04f2fbbba397104620d562ecc7
5846bf2 Remove redundant import. serhiy-storchaka Nov 14, 2025 https://github.com/python/cpython/pull/123305/commits/5846bf2dde7d3e96ba7e273a2c42be1a0bc896ee
b578c9d Merge branch 'main' into urllib-parse-allow-none serhiy-storchaka Nov 17, 2025 https://github.com/python/cpython/pull/123305/commits/b578c9d7b79dc23c36d03510c6ceba6b690eae59
7d59b7e Rename allow_none to missing_as_none. serhiy-storchaka Nov 17, 2025 https://github.com/python/cpython/pull/123305/commits/7d59b7ed22336618f662ccd8c2eb61332bd75d3f
d025fa8 Address review comments. serhiy-storchaka Nov 19, 2025 https://github.com/python/cpython/pull/123305/commits/d025fa82338d60f14f9686d2d6c390e596c0030c
af0a520 Merge branch 'main' into urllib-parse-allow-none serhiy-storchaka Nov 22, 2025 https://github.com/python/cpython/pull/123305/commits/af0a520a78ef07f0696ac147e85e494462cb334c
76f2049 Merge branch 'main' into urllib-parse-allow-none serhiy-storchaka Jan 4, 2026 https://github.com/python/cpython/pull/123305/commits/76f204951a5149b55e2d4b365ad5e56f63c621ec
37044d9 Merge branch 'main' into urllib-parse-allow-none serhiy-storchaka Jan 4, 2026 https://github.com/python/cpython/pull/123305/commits/37044d9632c750d5fa3055d53c41712651b2c407
ef79d2d Merge branch 'urllib-parse-allow-none' of github.com:serhiy-storchaka… serhiy-storchaka Jan 6, 2026 https://github.com/python/cpython/pull/123305/commits/ef79d2dbfc71e95c6abca47165ac725a9eb7f25d
1429c9e Merge branch 'main' into urllib-parse-allow-none serhiy-storchaka Jan 6, 2026 https://github.com/python/cpython/pull/123305/commits/1429c9e4099966758d3b5623d19498a27ccef1e1
ba37be6 Use slots. serhiy-storchaka Jan 6, 2026 https://github.com/python/cpython/pull/123305/commits/ba37be6ab118c13b7f47d00c0c96e9659c5841f5
dd4bf2b Minimize pickle by default. serhiy-storchaka Jan 6, 2026 https://github.com/python/cpython/pull/123305/commits/dd4bf2b4e0579c1b921fc0248b859baa766ee3c7
f70e5de Fix lint. serhiy-storchaka Jan 6, 2026 https://github.com/python/cpython/pull/123305/commits/f70e5dec1b31cfaa5bb2fe5c3db6aaa24277054e
669fbb4 Apply suggestions from code review serhiy-storchaka Jan 6, 2026 https://github.com/python/cpython/pull/123305/commits/669fbb4304b9c585e4a63d7e4f94f1a8b7e206bc
Clear filters https://github.com/python/cpython/pull/123305/files
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
urllib.parse.rst https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
3.15.rst https://github.com/python/cpython/pull/123305/files#diff-bd7a9c5b54eeb2b40e6db5e48e8d79d309d8738e776a40918773c6840189edf9
test_urlparse.py https://github.com/python/cpython/pull/123305/files#diff-bb89d64e7413a637b421609f9a4f532c294037171c3f0150479930acf30425fa
parse.py https://github.com/python/cpython/pull/123305/files#diff-b3712475a413ec972134c0260c8f1eb1deefb66184f740ef00c37b4487ef873e
2024-11-27-13-11-16.gh-issue-67041.ym2WKK.rst https://github.com/python/cpython/pull/123305/files#diff-e99dccbf3fbea59956dcbf2338840556e14160568f20c899eae7fba3e23d240f
Doc/library/urllib.parse.rsthttps://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
View file https://github.com/python/cpython/blob/669fbb4304b9c585e4a63d7e4f94f1a8b7e206bc/Doc/library/urllib.parse.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/123305/{{ revealButtonHref }}
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/actions/runs/20755485234/job/59596341312?pr=123305
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
gpsheadhttps://github.com/gpshead
Nov 19, 2025https://github.com/python/cpython/pull/123305/files#r2540620942
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Nov 19, 2025https://github.com/python/cpython/pull/123305/files#r2540922198
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
merwokhttps://github.com/merwok
Jan 6, 2026https://github.com/python/cpython/pull/123305/files#r2665550500
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Jan 6, 2026https://github.com/python/cpython/pull/123305/files#r2665572336
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
gpsheadhttps://github.com/gpshead
Nov 19, 2025https://github.com/python/cpython/pull/123305/files#r2540624150
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
https://github.com/python/cpython/pull/123305/files#diff-f97a457691dcc7fd019d5f47ddea5cd6166b5b6efffc3d9a04e04455eb2deeba
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
Please reload this pagehttps://github.com/python/cpython/pull/123305/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.