You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We realized in #1726 that all HTTPS connections go through the VerifiedHTTPSConnection class, even when they're unverified. This means we can merge VerifiedHTTPSConnection into HTTPSConnection.
HTTPSConnection is not visible, but is exported as UnverifiedHTTPSConnection
VerifiedHTTPSConnection is available directly, but is also exported as HTTPSConnection
To preserve compatibility, we can expose HTTPSConnection directly, and then also export it as VerifiedHTTPSConnection and UnverifiedHTTPSConnection. This allows us to move to a single class while still exposing the same classes as before.
It will actually be an improvement, because HTTPSConnection exported as UnverifiedHTTPSConnection currently does not work as its connect() method uses variables that don't exist.
We realized in #1726 that all HTTPS connections go through the VerifiedHTTPSConnection class, even when they're unverified. This means we can merge VerifiedHTTPSConnection into HTTPSConnection.
However, those classes are part of our public API (see https://urllib3.readthedocs.io/en/latest/reference/index.html#module-urllib3.connection). The current layout is:
To preserve compatibility, we can expose HTTPSConnection directly, and then also export it as VerifiedHTTPSConnection and UnverifiedHTTPSConnection. This allows us to move to a single class while still exposing the same classes as before.
It will actually be an improvement, because HTTPSConnection exported as UnverifiedHTTPSConnection currently does not work as its connect() method uses variables that don't exist.
Another option is to stop exporting aliases, and only expose HTTPSConnection, but this is a breaking change. For example, it's likely to break vcrpy: https://github.com/kevin1024/vcrpy/blob/7caf29735ac6bae9fd17310460a00d66c3eb3a95/vcr/stubs/requests_stubs.py. So let's not do this.
(It would be interesting to make sure that vcr.py still works after this change.)
The text was updated successfully, but these errors were encountered: