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

Broken import for HTTPHeaderDict in 1.26.0 #2045

Closed
markstory opened this issue Nov 11, 2020 · 5 comments
Closed

Broken import for HTTPHeaderDict in 1.26.0 #2045

markstory opened this issue Nov 11, 2020 · 5 comments

Comments

@markstory
Copy link

markstory commented Nov 11, 2020

Subject

Responses has historically used from urllib3.connection import HTTPHeaderDict but that import is now failing in 1.26.0. Looking through the history this was changed as part of #2018

This change wasn't in the release notes and seems like an accidental regression. Is there a more stable package we should be importing HTTPHeaderDict from?

Environment

Describe your environment.

  • Using responses and urllib>=1.25.10

Steps to Reproduce

from urllib3.connection import HTTPHeaderDict

Expected Behavior

This import has worked for at least the past year.

Actual Behavior

An import error is raised.

Refs getsentry/responses#354

@sigmavirus24
Copy link
Contributor

Is there a more stable package we should be importing HTTPHeaderDict from?

This passive aggressive tact is unnecessary.

@sethmlarson
Copy link
Member

HTTPHeaderDict isn't supposed to be a public class (hence being defined in _collections). The import of HTTPHeaderDict in urllib3.response is likely more stable but there aren't any guarantees there either.

@sethmlarson
Copy link
Member

I've opened #2046 against 1.26 to relieve your users pain over this issue, however this import will not work in v2.

@sethmlarson
Copy link
Member

Will be released in v1.26.1

@markstory
Copy link
Author

This passive aggressive tact is unnecessary.

I'm sorry. That was not my intent, I will try to be more direct in the future.

... however this import will not work in v2.
@sethmlarson In responses, we use this class when creating stubbed HTTP responses as it makes handling cookies easier. Will there be a different path to achieve that?

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

No branches or pull requests

3 participants