python / python/cpython

Add customization to country code second-level domains in DefaultPolicy of lib http.cookiejar

Open
#135,567 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Proposal:

This is a feature request of

  • adding a "additional_country_code_slds" attribute to DefaultPolicy in lib http.cookiejar
  • updating the default list of country code slds, which is previously discussed in #135528

The idea is basically from @Zheaoli. yes I think hard code is never a good idea because it's not even possible to add all country code slds to the list, since every country has its unique naming strategy (or it could be incrediblely long). Just updating "well-known slds" is kind of meaningless, I think.

So I think we can make the sld list customizable, let users to set them in their specific scene.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

#135529
#135528

Linked PRs
  • gh-135569

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib http.cookiejar at DefaultPolicy, then read discussions #135528 and #135529 and the linked PR gh-135569. Done means DefaultPolicy supports an additional_country_code_slds customization and the country-code SLD behavior is covered by the associated changes and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.