-
Notifications
You must be signed in to change notification settings - Fork 62
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
regression: event header can't be copied with normal Python syntax. #112
Comments
@kdart-brt The way headers work has changed with #104 which was released recently |
Right, so the intent was not to cause any regressions in how we approached #104, but that's obviously not quite been the case here, since you've found a wrinkle. The change here is that the requirement in #104, of "allow h11 to expose the original header casing" meant that we've needed to change headers from a list to a sequence-like interface in the 0.11 release. There's two options for us here:
Of those two I'd probably tend towards the first. From a user POV that'd mean using the following if you want a list-copy of the structure...
|
That alternate list constructor works. So, whatever you do is fine by me. |
👍 on the simple amendment |
BTW, thanks for the help. |
You're very welcome. 💛 |
Does #125 help this? |
Yes. |
I have been using h11 for a while now. In my code, I made a copy of the headers like this:
That is the normal way to copy a list (headers was a list).
Now, after an update, it does this:
ValueError: too many values to unpack (expected 3)
in debugger, the same:
1:Debug:1/2> ev.headers[:]
*** ValueError: too many values to unpack (expected 3)
Something changed in the
headers
attrbibute. It also does not have acopy
method.1:Debug:1/2> ev.headers.copy()
*** AttributeError: 'Headers' object has no attribute 'copy'
The text was updated successfully, but these errors were encountered: