LWN: Comments on "Python and "dead" batteries" https://lwn.net/Articles/790677/ This is a special feed containing comments posted to the individual LWN article titled "Python and "dead" batteries". en-us Thu, 25 Sep 2025 18:34:48 +0000 Thu, 25 Sep 2025 18:34:48 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Python and "dead" batteries https://lwn.net/Articles/843772/ https://lwn.net/Articles/843772/ ceplm <div class="FormattedComment"> There is hope that these modules would shift to independent PyPI packages, so you can get it from there.<br> </div> Mon, 25 Jan 2021 10:32:16 +0000 Python and "dead" batteries https://lwn.net/Articles/792060/ https://lwn.net/Articles/792060/ HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; For example there is no way of take ownership of modules if the original author disappears.</font><br> That sounds like a feature to me, not a bug. How would you protect users from wrongdoers who seize unmaintained modules and then ship malware that way?<br> </div> Tue, 25 Jun 2019 23:17:09 +0000 Python and "dead" batteries https://lwn.net/Articles/791533/ https://lwn.net/Articles/791533/ njs <div class="FormattedComment"> There's definitely been discussion of this option – it's basically how Python has been shipping 'pip' for a few years now, and one of the outcomes of Amber's talk at the language summit was the idea to start experimenting with doing the same for IDLE. There's also a discussion here that goes into more detail: <a rel="nofollow" href="https://discuss.python.org/t/1738">https://discuss.python.org/t/1738</a><br> </div> Thu, 20 Jun 2019 07:13:13 +0000 Python and "dead" batteries https://lwn.net/Articles/791131/ https://lwn.net/Articles/791131/ NAR <I>"Unsuspecting developers could be writing new code today that won't be supported on 3.10 when it's released around 2021."</I> <P> If those unsuspecting developers will maintain their code in 2021, then they will update their code. If they don't maintain it, their users are screwed anyway. Fri, 14 Jun 2019 10:53:26 +0000 Python and "dead" batteries https://lwn.net/Articles/791097/ https://lwn.net/Articles/791097/ rgmoore <p>That's not exactly what I had in mind, but I like it. The basic approach of bundling libraries with the distribution that aren't organizationally part of the core is a good compromise. It avoids the complaint that moving things out of the core makes them unavailable to people with strict install policies while still getting the benefit of developing them outside the core. Thu, 13 Jun 2019 19:32:07 +0000 Python and "dead" batteries https://lwn.net/Articles/791095/ https://lwn.net/Articles/791095/ logang <div class="FormattedComment"> I don't think the 2026 number is valid and it still should be slower. At this rate, users who are affected are forced to update their code or not support versions past 3.9. Just because 3.9 is supported until 2026 doesn't really help the issue. Unsuspecting developers could be writing new code today that won't be supported on 3.10 when it's released around 2021. That's effectively only two years between looking perfectly safe to use and requiring it to be changed; and only one year before their users start complaining about warnings. The python team should mark the documentation as deprecated for a *lot* longer than that so users writing new code have a lot longer to notice the deprecation and stop using those features.<br> <p> This is one of the things I think Linus gets right with Linux: his uncompromising stance toward breaking users and the general policy of very long deprecation cycles -- typically features aren't removed until there is a reasonable argument that nobody is using them. If more libraries and programming languages took that stance we'd be in a much better position. Too many projects just break things and foist the pain and responsibility on their user base.<br> <p> </div> Thu, 13 Jun 2019 19:10:48 +0000 Python and "dead" batteries https://lwn.net/Articles/791094/ https://lwn.net/Articles/791094/ rgmoore <blockquote>If they are going to remove modules they should use a multiple-cycle process that starts with deprecation in the documentation a couple cycles later start printing warnings and a couple cycles after that finally removing.</blockquote> <p>They are proposing a multi-cycle process. They're suggesting only one cycle each for "pending deprecation" and "deprecation" rather than several, but according to the article that would still leave them available until 2026, so they're not disappearing overnight by any means. And presumably they could be rescued from deprecation if a maintainer were willing to step forward and promise to support them moving forward. Thu, 13 Jun 2019 18:50:05 +0000 Python and "dead" batteries https://lwn.net/Articles/791065/ https://lwn.net/Articles/791065/ logang <div class="FormattedComment"> I know this comment is a bit of a troll but I think it gets at the heart of an important issue. People choose to use standard libraries largely because they have a high chance of being maintained and available for the foreseeable future. People avoid PyPi modules because the maintenance and quality story is often questionable.<br> <p> Python caused a lot of headaches for their users with the 3.0 transition and I don't think they can afford pushing more pain their users way. If they are going to remove modules they should use a multiple-cycle process that starts with deprecation in the documentation a couple cycles later start printing warnings and a couple cycles after that finally removing. The only code they should remove quickly is code that they can prove no one is using because it's obviously broken -- and I don't think many of the candidates that were proposed fit that bill. The argument that a module could be made available through PyPi so it can be quickly removed from the standard library is a bad one.<br> <p> Some of the candidate modules don't seem like a large maintenance burden anyway compared to the pain that would be caused for potential users. For example: colorsys, fileinput, imghdr, pipes, and probably others seem like relatively small helper functions that shouldn't take a lot of effort to maintain but would cause anyone who chose to use them big pains if they were to suddenly disappear. Also, based on its documentation, imghdr shows improvements have been made in recent versions so, today, it seems well maintained and appropriate to use.<br> </div> Thu, 13 Jun 2019 17:12:38 +0000 Python and "dead" batteries https://lwn.net/Articles/791036/ https://lwn.net/Articles/791036/ cesarb <div class="FormattedComment"> Was this before or after the npm event-stream incident? I expect taking over abandoned modules to have become harder after that.<br> </div> Thu, 13 Jun 2019 12:09:29 +0000 Python and "dead" batteries https://lwn.net/Articles/791034/ https://lwn.net/Articles/791034/ roc <div class="FormattedComment"> Yeah, I'm not saying PyPI is great.<br> </div> Thu, 13 Jun 2019 11:19:24 +0000 Python and "dead" batteries https://lwn.net/Articles/791030/ https://lwn.net/Articles/791030/ dottedmag <div class="FormattedComment"> I remember taking over an abandoned module by sending a e-mail to PyPI maintainers and answering some questions.<br> </div> Thu, 13 Jun 2019 09:37:16 +0000 Python and "dead" batteries https://lwn.net/Articles/791028/ https://lwn.net/Articles/791028/ LtWorf <div class="FormattedComment"> I don't think Pypi is that modern. For example there is no way of take ownership of modules if the original author disappears. So on such occasions, forks are required, and of course developers won't know of the fork, and so on…<br> </div> Thu, 13 Jun 2019 08:47:51 +0000 Python and "dead" batteries https://lwn.net/Articles/791026/ https://lwn.net/Articles/791026/ smcv <div class="FormattedComment"> Perl has had the same thing for a long time ("dual-life" modules that exist both bundled with Perl and on CPAN). It seems like a good approach.<br> </div> Thu, 13 Jun 2019 08:23:20 +0000 Python and "dead" batteries https://lwn.net/Articles/791023/ https://lwn.net/Articles/791023/ fyrchik <div class="FormattedComment"> It is still possible to work with uuencode format using `binascii` module.<br> </div> Thu, 13 Jun 2019 07:14:43 +0000 Python and "dead" batteries https://lwn.net/Articles/791016/ https://lwn.net/Articles/791016/ NYKevin <p>I think it depends on your perspective. One possible perspective: <ul> <li>This code is useful. <li>Useful code should be maintained. <li>Therefore, somebody should maintain the code, regardless of whether it continues living in the stdlib. </ul> <p>Another possibility: <ul> <li>No core developer wants to maintain this code. <li>Unmaintained code should not live in the stdlib. <li>Therefore, we should remove the code from the stdlib, regardless of whether some other developers want to maintain it elsewhere. </ul> <p>These perspectives are not in conflict with one another. In fact, they are entirely orthogonal. You can agree with either or both of them without contradiction. However, I feel obligated to point out that the first perspective does not identify who, precisely, ought to maintain the code. Unless someone volunteers, that perspective is rather academic. <p>Equally obvious is that you can <em>disagree</em> with either or both of these perspectives, of course. For example, I have no evidence whatsoever that "no developer wants to maintain this code" is in fact true. Thu, 13 Jun 2019 02:04:43 +0000 Python and "dead" batteries https://lwn.net/Articles/791015/ https://lwn.net/Articles/791015/ ms-tg <div class="FormattedComment"> <font class="QuotedText">&gt; If anything, this seems like an argument in favor of replacing the current stdlib version with the better version from PyPI, not removing the feature from stdlib completely.</font><br> <p> <font class="QuotedText">&gt; It also seems to me that this might be a sign that there needs to be a different relationship between the core developers and PyPI. Instead of having a separate set of modules that are developed in stdlib, all of the stdlib modules could be developed in PyPI. Long term support versions could be branched to include in the stdlib, but users who wanted the newest features could replace it with the latest, greatest version if they chose. It would require changing the PyPI rules for those modules, but it would provide a useful compromise between development speed and stability.</font><br> <p> Is this project similar to what you're thinking of? <br> <a href="https://stdgems.org/">https://stdgems.org/</a><br> </div> Thu, 13 Jun 2019 01:45:32 +0000 Python and "dead" batteries https://lwn.net/Articles/791013/ https://lwn.net/Articles/791013/ rgmoore <blockquote>I disagree with the idea that just because there is something better as a 3rd party dep, the stdlib version should be killed off.</blockquote> <p>If anything, this seems like an argument in favor of replacing the current stdlib version with the better version from PyPI, not removing the feature from stdlib completely. <p>It also seems to me that this might be a sign that there needs to be a different relationship between the core developers and PyPI. Instead of having a separate set of modules that are developed in stdlib, all of the stdlib modules could be developed in PyPI. Long term support versions could be branched to include in the stdlib, but users who wanted the newest features could replace it with the latest, greatest version if they chose. It would require changing the PyPI rules for those modules, but it would provide a useful compromise between development speed and stability. Thu, 13 Jun 2019 00:35:30 +0000 Python and "dead" batteries https://lwn.net/Articles/791012/ https://lwn.net/Articles/791012/ JohnVonNeumann <div class="FormattedComment"> <font class="QuotedText">&gt; The modules are scattered throughout the standard library, but: "the majority of modules are for old data formats or old APIs. Some others are rarely useful and have better replacements on PyPI [the Python Package Index]." </font><br> <p> See I get what's going on and that the community doesn't have enough maintainers, but IMO if I can do something with the stdlib I'll most likely do it with the stdlib, I try to avoid calling in 3rd party deps if I can. Naturally, this only works for smaller pieces of work but I disagree with the idea that just because there is something better as a 3rd party dep, the stdlib version should be killed off. I'm slightly simplifying their argument though.<br> </div> Thu, 13 Jun 2019 00:04:41 +0000 Python and "dead" batteries https://lwn.net/Articles/791011/ https://lwn.net/Articles/791011/ ms-tg <div class="FormattedComment"> I’d like to remind the members of the Python community that hang out on LWN of the nearly identical problem domain encountered somewhat earlier by the Ruby community, and that the solution path chosen by the Ruby community is probably also ultimately going to be what’s most attractive for the Python community.<br> <p> Out of a similar set of options, it was decided to strip many libraries over time out of the stdlib, and move them to Ruby gems distributed on rubygems.org (equivalent of PyPI).<br> <p> As mentioned near the end of this article as a “if only we could” suggestion, this separation of project and code maintenance of each library is decoupled from the pace of their removal from Ruby releases, by including a set of “bundled” and “default” gems with each of the forthcoming Ruby releases. I imagine a Python solution will at some point adopt the same decoupled structure.<br> <p> For more information on the Ruby process here, please see the official website for this effort:<br> <p> <a href="https://stdgems.org/">https://stdgems.org/</a><br> </div> Wed, 12 Jun 2019 23:49:11 +0000 Python and "dead" batteries https://lwn.net/Articles/791006/ https://lwn.net/Articles/791006/ rgmoore <blockquote>While moving some set of modules out of the standard library will certainly help alleviate the maintenance headaches for those modules, it will not magically grow new maintainers for them.</blockquote> <p>This seems like the key point to me. If the packages are unmaintained, that's the problem, not whether they're distributed with the standard library or through PyPI. The only way this improves things is if being moved out of the standard library makes it easier to attract developers. That seems like something that needs to be discussed. Wed, 12 Jun 2019 21:02:58 +0000 Python and "dead" batteries https://lwn.net/Articles/791005/ https://lwn.net/Articles/791005/ roc <div class="FormattedComment"> More proof, if any were needed, that modern package management with some curation beats "batteries included".<br> </div> Wed, 12 Jun 2019 20:30:39 +0000 Python and "dead" batteries https://lwn.net/Articles/791004/ https://lwn.net/Articles/791004/ MortenSickel <div class="FormattedComment"> Maybe for you. Which of the listed modules do you need? Are you standing up to maintain them?<br> <p> <p> <p> </div> Wed, 12 Jun 2019 20:18:12 +0000 Python and "dead" batteries https://lwn.net/Articles/790996/ https://lwn.net/Articles/790996/ pgdx <div class="FormattedComment"> You will also have the option of installing legacylib [1].<br> <p> [1] <a href="https://github.com/tiran/legacylib">https://github.com/tiran/legacylib</a><br> </div> Wed, 12 Jun 2019 18:18:25 +0000 Python and "dead" batteries https://lwn.net/Articles/790989/ https://lwn.net/Articles/790989/ NYKevin <div class="FormattedComment"> After Python 3.x drops support for these modules, there is nothing stopping you from pulling their source code out of the Git history.<br> <p> I mean, it obviously wouldn't have upstream support, but at the end of this year, neither will 2.7.<br> </div> Wed, 12 Jun 2019 17:18:37 +0000 Python and "dead" batteries https://lwn.net/Articles/790987/ https://lwn.net/Articles/790987/ mirabilos <div class="FormattedComment"> Hehe… nice one.<br> <p> “chunk” is a PITA… I tried to make <a href="https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=useful-scripts/useful-scripts.git;a=blob;f=RIFF/riffedit.py;hb=HEAD">https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=u...</a> extend it first, but it’s only for reading, *and* it’s buggy, so I gave up and implemented the whole shit myself, using “chunk” only as a rough guideline.<br> <p> “uu” is a mandatory piece of Unix history (and still in use) though… so it must not go. I cannot imagine this to be a maintenance burden, either… either it works or it’s trivial to fix and never worked. It’s not like uuencode format changes now.<br> </div> Wed, 12 Jun 2019 17:13:03 +0000 Python and "dead" batteries https://lwn.net/Articles/790983/ https://lwn.net/Articles/790983/ ikm <div class="FormattedComment"> Yet another reason to stick to 2.7.<br> </div> Wed, 12 Jun 2019 16:47:02 +0000