gh-135567 Add customization to country code second-level domains in DefaultPolicy of lib http.cookiejar and update the default list of it #135569
+18
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following the previous discussion, I've defined a class var
self.slds
, and add a attradditional_country_code_slds
which is a set type (defaulting {}) and will be merged into the default set which is discussed before.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)