Skip to content

gh-135528: Support more Second-Level Domain Names in lib http.cookiejar #135529

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

Closed
wants to merge 4 commits into from

Conversation

LamentXU123
Copy link
Contributor

@LamentXU123 LamentXU123 commented Jun 15, 2025

LamentXU123 and others added 2 commits June 15, 2025 19:40
…ssMeM.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@LamentXU123 LamentXU123 requested a review from picnixz June 15, 2025 16:22
"gov", "mil", "int", "aero", "biz", "cat", "coop",
"info", "jobs", "mobi", "museum", "name", "pro",
"travel", "eu") and len(tld) == 2:
known_slds = (
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure hard code here would be a good idea.

  1. I think known_slds should be a global variable
  2. Maybe we can allow people to customize the slds

Copy link
Member

@picnixz picnixz Jun 15, 2025

Choose a reason for hiding this comment

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

It's already been there for a while, and it doesn't cost to have a local variable. I prefer treating customization as a separate FR (and it should rather be a class variable rather than a global one)

Copy link
Contributor Author

@LamentXU123 LamentXU123 Jun 16, 2025

Choose a reason for hiding this comment

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

Yes, I will work on this recently for a feature request. Good idea tho. I'm pretty interested. I will launch another issue with PR when I'm done.

Copy link
Contributor Author

@LamentXU123 LamentXU123 Jun 16, 2025

Choose a reason for hiding this comment

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

but I think we could just use this before the FR, since its been there for a while. And I'm not sure changing it to global var(or class var) and add customizing won't cause some strange bugs elsewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and the updated list of second-domain will likely become the default one in customization. For now I think we could just update it as a hard code and change it after the FR is done

@LamentXU123
Copy link
Contributor Author

I will deal with the customize FR later, but since we dont know if the FR will pass, I think we can merge this list update before.

@LamentXU123 LamentXU123 closed this by deleting the head repository Jun 16, 2025
@LamentXU123
Copy link
Contributor Author

I will open a new PR for the customizations and directly add the new second-domains in the default list.

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.

3 participants