Skip to content

gh-135567 Add customization to country code second-level domains in DefaultPolicy of lib http.cookiejar and update the default list of it #135569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

LamentXU123
Copy link
Contributor

@LamentXU123 LamentXU123 commented Jun 16, 2025

Following the previous discussion, I've defined a class var self.slds, and add a attr additional_country_code_slds which is a set type (defaulting {}) and will be merged into the default set which is discussed before.

        well_known_slds = {"co", "ac", "com", "edu", "org", "net",
                        "gov", "mil", "int", "aero", "biz", "cat", "coop",
                        "info", "jobs", "mobi", "museum", "name", "pro",
                        "travel", "eu", "tv", "or", "nom", "sch", "web"}

Yeah I think customization is the true way to solve the problem, updating list in hard code is just not a good idea IMO.

What do you guys think? @picnixz @Zheaoli

Note that we could just update the list in hard code if the FR is rejected tho, which I think is not good. I know we could deal it in seperate issues but I think only support more domains doesn't sounds great,

So sry for all the noise i've made.


📚 Documentation preview 📚: https://cpython-previews--135569.org.readthedocs.build/

Please do not laugh at the commit history, I am totally an idiot in late nights >_< (I've uploaded cookiejar.py to cookie.py lol)

@LamentXU123 LamentXU123 changed the title gh-135528 Add customization to country code second-level domains in DefaultPolicy of lib http.cookiejar and update the default list of it gh-135567 Add customization to country code second-level domains in DefaultPolicy of lib http.cookiejar and update the default list of it Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant