Removed the bundled charade and urllib3.#1812
Removed the bundled charade and urllib3.#1812sontek wants to merge 3 commits intopsf:masterfrom sontek:stop_bundling_charade_and_requests
Conversation
This removes the bundled versions of charade and urllib3, allowing users to upgrade those packages separately. This also provides a nice way for Linux distro packages to be able to package requests and have it depend on their packaged version of those libraries.
|
👍 |
|
These projects are vendored for a reasons that I discuss publicly on a regular basis. Also, my code decisions are not be influenced by the random decisions of Linux distros :) |
|
Although, the work of said distros is much appreciated :) |
|
@kennethreitz Any write-ups/blogs you can point to on the reasons? |
|
Not that I know of — mostly in Q/A form. The tl;dr is:
|
|
I could produce a patch that addressed the third of those points very effectively. The others only partially. The strategy would be that requests.packages would check for the existence of bundled versions of urllib3, charade, etc. If those were available, it would implement requests.packages.$foo via the bundled versions. If they weren't available, it would implement them via the system packages. Distros could then simply rm the bundled versions in their packages in order to use system packages. The tarball downloaded from pypi (since it included the bundled versions of the libraries) would continue to use the bundled copies. Would that be an acceptable patch? Or should I not waste my time working on something like that? |
|
I hope this doesn't come across as abrasive (it's not meant to be!) — but, Requests has been through all of these cycles already. We supported exactly what you're proposing for a long time. It was a waste of a time, and a big headache for me. The less branching and indeterminacy the codebase has, the better. Believe it or not, we also removed the bundled versions altogether for a good year! So many wasted lines in requirements.txt files around the world :) This is the only solution that I'm happy with. As a matter of fact, I'm extremely happy with the current design :) 🍰 At the end of the day, Requests is valuable purely because of its opinions — and this is one of its strongest ones. It's the little things that matter the most — the most subjective things. This is the type of thing that I find we teach ourselves to trivialize — as it's the source of endless bikeshed.
The architectural decisions of this project are a personal decision. I am simply choosing to make my own decision. Open source is all about freedom — and if one of the founding forces of the open source movement, the linux distros, are encouraging developers to contort their works of art to acclimate to their packaging ideologies — I'm a little concerned for the state of things :) |
|
No worries. The distros are going to unbundle the bundled code anyway -- I was just seeing if you'd take a patch to make that easier on them. Since you won't it saves me some coding time at the expense of the individual maintainers' times maintaining their patches to implement the unbundling. :-) |
|
Thank you for requests. Standard questions about bundling dependencies:
...
|
|
Everything is at my discretion, as it is all an implementation detail. None of any of this should matter to any user. |
|
Also, it's worth noting as I did on the superfluous issue created before this PR that this has been discussed several times before. No amount of discussion will sway us. |
|
@westurner |
|
How many outdated bundled/embedded copies of OpenSSL could there be? Are Here's this: https://news.ycombinator.com/item?id=7385150 Wes Turner
|
|
From the Python programmer's perspective, embedded copies of OpenSSL are less dangerous than using the standard library's SSL module, which is a broken insecure mess is any version of Python less than 3.3. |
|
@westurner while I appreciate your concern, your efforts are for naught. Allow me to relay to you what I recently learned, security is not the foremost concern of requests (not @Lukasa's or my opinion). Its API is the first concern. Trying to support your point by making valid points about security will do nothing. Since little is likely to change, I'm unsubscribing from this issue and would encourage others who value their time to do the same. |
|
I share abadgers' interest in making it easier to devendorize, even as i sympathize with upstream's strong desire to vendorize known good versions of packages. It's a tough bit of tension between upstream's requirements and a distro's very real requirements. I just devendorized pip, and with good upstream discipline, grep, and a decent editor it wasn't too hard. The pip developers are going to make it easier (as piotr-dobrogost's reference implies), but as long as we can identify and easily hack the import lines, I'm okay with it. |
Having said that I agree with @abadger and I see making is easy to use non-bundled dependencies as something maintainers of every software should do. |
|
@kennethreitz totally agree with the decisions made here. If anyone has ever tried to ship Python software to be standalone you'll know why it's done like this. |
|
@whalesalad exxxactly :) |
This removes the bundled versions of charade and urllib3, allowing
users to upgrade those packages separately. This also provides a
nice way for Linux distro packages to be able to package requests
and have it depend on their packaged version of those libraries.