Hey so the 2.16.0 release broke all of the vendored things I am assuming. I have issued two PRs to two frameworks I use that rely on the vendored packages in requests.
The changelog was a bit obscure about this
2.16.0
Unvendor ALL the things!
Something like BREAKING CHANGE: Vendor packages have been removed, if you relied on these you will need to modify your code would be nice in a 2.16.1 changelog update maybe?
I realize that it can be said these vendored packages are internal and should not be relied on but at least these packages had a use case for using requests and some of the underlying libs and used the vendor packages to ensure everything worked as expected with requests.
Anyone who was relying on these will have their code break upon upgrade, so perhaps a bigger version bump would have been welcome, but at least this can be a warning to people coming here wondering why stuff broke. My solution was a compat.py that conditionally imported urllib3 (works the same for other vendored packages), see my PRs for that fix.
Yeah, I don't know why @kennethreitz released that: it was pretty obviously going to break a lot of software. Not sure what I can say here: this is ultimately @kennethreitz's software and he can do what he wants, and I'm not going to revert his changes. But there was simply no reason that unvendoring needed to be shipped prior to v3, so I really hope @kennethreitz reverts and pushes a release containing that revert.
Related: #4073
@audiolion can you provide a sample of the code you were importing to utilize the internal packaged code? I'd like to test that I'm brining back the namespace properly.
2.16.1 released, which restores the packages namespace. Sorry for the hiccup!
@kennethreitz hey! its the two PRs that I have in my first comment, you can check either for how I did it, worked for both of those libs
v2.16.2 of requests fixes the backwards incompatibility completely :)
Sorry to ruin your Saturday! thanks for all you do
No, sorry for ruining yours! :)
This still does not work with 2.16.2.
>>> import requests
>>> requests.packages
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'requests' has no attribute 'packages'
Was trying out the apistar project today and ran into this issue since it uses that way of accessing the module.
ah, I can fix that.
@thrawny v2.16.3 released, which restores this.
Thanks for the report!
Most helpful comment
v2.16.2 of requests fixes the backwards incompatibility completely :)