Skip to content
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

Remove support for passing a bytes key to HTTPHeaderDict #2397

Closed
wants to merge 1 commit into from
Closed

Remove support for passing a bytes key to HTTPHeaderDict #2397

wants to merge 1 commit into from

Conversation

jdufresne
Copy link
Member

No description provided.

@jdufresne
Copy link
Member Author

Motivation for this change started in thread: #2395 (comment)

@codecov
Copy link

codecov bot commented Aug 29, 2021

Codecov Report

Merging #2397 (1f2b22a) into main (52e9830) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2397      +/-   ##
==========================================
- Coverage   99.95%   99.95%   -0.01%     
==========================================
  Files          25       25              
  Lines        2472     2468       -4     
==========================================
- Hits         2471     2467       -4     
  Misses          1        1              
Impacted Files Coverage Δ
src/urllib3/_collections.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52e9830...1f2b22a. Read the comment docs.

@sethmlarson
Copy link
Member

Even though this is a "major" release we're trying to minimize breaking changes while opening up potential for future improvements. Supporting byte keys is both fortunately (because imo it's the correct way to do HTTP headers) and unfortunately (strings are easy to work with, users prefer them, it's what our API has historically been) widely used. So we're kinda soft-disallowing them in v2.0 via type hints but still secretly accepting them.

@jdufresne
Copy link
Member Author

Thanks for clarifying. I have updated #2395 with this in mind and will close this PR.

@jdufresne jdufresne closed this Aug 29, 2021
@jdufresne jdufresne deleted the header-bytes branch August 29, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants