Skip to content

gh-135528: Support more second-level domain names in http.cookiejar#135820

Merged
hugovk merged 6 commits intopython:mainfrom
LamentXU123:Add-more-supported-slds
Apr 29, 2026
Merged

gh-135528: Support more second-level domain names in http.cookiejar#135820
hugovk merged 6 commits intopython:mainfrom
LamentXU123:Add-more-supported-slds

Conversation

@LamentXU123
Copy link
Copy Markdown
Contributor

@LamentXU123 LamentXU123 commented Jun 22, 2025

Sorry to reopen it. I want to support customization in this. But since the FR has not discussed before, its not proper to directly create PR on this. I should treat this seperately. Just forget about the previous FR.

This PR only concerns of adding new common slds in the lib based on wiki figure, as its been a very long time from 2006 when the list is wrote.

So sorry for reopening this.

@hugovk hugovk changed the title gh-135528: Support more Second-Level Domain Names in lib http.cookiejar gh-135528: Support more second-level domain names in http.cookiejar Jun 24, 2025
Comment thread Lib/http/cookiejar.py
"gov", "mil", "int", "aero", "biz", "cat", "coop",
"info", "jobs", "mobi", "museum", "name", "pro",
"travel", "eu") and len(tld) == 2:
known_slds = (
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also add tests for the newly added sld's?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need IMO, the original test script only test .co.uk for this.

Copy link
Copy Markdown
Contributor Author

@LamentXU123 LamentXU123 Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry to miss that, it actually test [".co.uk", ".org.za", ".tx.us", ".name.us"] but it's just four of them, I think it's still no need to add tests.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 26, 2026
@hugovk hugovk enabled auto-merge (squash) April 29, 2026 10:56
@hugovk hugovk merged commit 4a5d25c into python:main Apr 29, 2026
93 of 95 checks passed
@hugovk
Copy link
Copy Markdown
Member

hugovk commented Apr 29, 2026

Thanks!

manoj-km24 pushed a commit to manoj-km24/cpython that referenced this pull request Apr 29, 2026
…ejar (python#135820)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants