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
As per the python-ideas thread starting at https://mail.python.org/pipermail/python-ideas/2017-October/047508.html, this is proposal to add a pip -r compatible recommended-packages.txt file to the venv documentation that summarises replacement module recommendations in other parts of the standard library documentation.
Suggested entries are:
requests # Recommendation in urllib.request docs
regex # Recommendation in re docs
cffi # More typesafe alternative to ctypes
six # Python 2/3 compatibility library
setuptools # Alternative to distutils that supports modern packaging standards
I'm also tempted to suggest pytz as the preferred source of up-to-date named timezones, but I'm not sure how often that's really needed in situations where you can't just depend on it explicitly instead.
https://bugs.python.org/issue31899 is a follow-up issue to discuss whether or not it would make sense to expand these recommendations to cover explicit compatibility testing against these libraries for CPython updates
As part of this, a new subsection would be added to https://docs.python.org/devguide/stdlibchanges.html to document the process for adding new packages to the recommended packages list: propose them for standard library inclusion, and while "No" is still the most likely outcome, being added to the recommended packages list would be a potential middle ground for "Approved in principle, but the actual logistics of doing so probably don't work".
Thinking about it further, this list is actually going to be version independent, suggest it may actually belong somewhere outside the main documentation.
The Developer's Guide may be a reasonable stopgap measure until there's a better option available (e.g. if I ever get around to turning https://github.com/python/redistributor-guide/ into something more than a nearly empty repo)
it clearly gives the information PEP level status (which merely being in the developer guide wouldn't)
it means the guidance can be mostly version independent (which would be a source of irritation if the list was in the reference documentation)
it means we can use the same process for amendments as we do for other informational PEPs (a combination of python-dev discussions, bugs.python.org issues, and specific PR reviews)
Tone/Audience: I'll aim the PEP primarily at answering the "Why isn't <X> in the standard library?" question, as that helps us keep the list focused on python-dev specific concerns and avoid turning it into a general categorised list of Python library recommendations like https://github.com/vinta/awesome-python
The key criterion for something being mentioned will be when the standard library *already* contains comparable functionality, but there's a language version independent third party alternative that even core developers will often use instead. That list is currently:
urllib.requests -> requests (pace of change in web standards)
re -> regex (technical challenges with backend migration)
datetime.timezone -> pytz.timezone (updates driven by IANA timezone database)
ctypes -> cffi (build tools should be version independent)
distutils -> setuptools (build tools should be version independent)
I'll likely also include a list of libraries where version independence is a key feature, so they've never even been proposed for stdlib inclusion, despite their broad popularity:
the six compatibility module
various backport libraries (e.g. importlib2, contextlib2, unittest2)
datetime.timezone -> pytz.timezone (updates driven by IANA timezone database)
I will note that pytz.timezone and datetime.timezone are not really comparable (they do two very different things), and as of Python 3.6, dateutil.tz is the recommended source for IANA time zones, not pytz, per https://docs.python.org/3/library/datetime.html
I don't think this issue aged well. regex and cffi are still valid; we might recommend attrs over dataclasses or tomlkit over tomllib; babel over gettext; there's cryptography...
I don't think the core dev team should maintain such a list. The "why isn't in the standard library?" is nowadays better answered by "because there's no pressing reason to add in; get it from PyPI".
I don't think we should keep this idea filed as an issue. Would you be OK with closing it?
I don't think closing the issue solves the problem, as there are recommendations in some of the standard library modules, but they're not necessarily being kept up to date over time (for example, I'd recommend httpx over requests as a client-side HTTP library these days, but the urllib docs still suggest the latter).
The tomllib docs do mention tomlkit and tomli-w as options for folks looking for read/write support.
I added some suggestions for potential 3rd-party argument parsing alternatives when we were rescuing optparse and getopt from their previous soft deprecation (but I also know that at least Guido would prefer I hadn't done that - they just didn't annoy him enough to actively pursue removing them once they were there).
So the status quo is that these recommendations do exist, but they're completely ad hoc: they're added when a core dev feels strongly enough about a recommendation that they add it in the interest of users at a given point in time (and no other core dev objects strongly enough to remove it), but there's no consistent review mechanism that tracks all of the recommendations we're making and regularly asks "Is this recommendation still serving the interests of users, or does it need to be updated or removed?".
At time of writing, there are 641,215 projects on PyPI. While it's far from being a perfect solution, the core devs collectively listing out the tools we would reach for in problem domains that are common enough to have related code in the standard library is going to offer a better on-ramp to the wider ecosystem than leaving them to figure things out from the internet at large (or by asking their friendly neighbourhood LLM to recommend third party packages and getting responses that sound plausible, but may not actually exist).
I don't think closing the issue solves the problem
The issue is rather vague on what the specific problem is.
Closing the issue doesn't solve the problems, but neither does keeping it open here, especially under the current title.
“You'll need to write a PEP for that” is usually a reason to close an issue -- if it's a newly filed one of course.
So, a concrete next step here would be to a list of recommendations we currently have in the docs, to starting point?
I guess a good way would be to add a Sphinx extension and replace all the .. seealso:: (and plain sections) with something like .. thirdparty::, which would add a standardized disclaimer, and would allow easily extracting the full list.
Activity
ncoghlan commentedon Oct 30, 2017
As per the python-ideas thread starting at https://mail.python.org/pipermail/python-ideas/2017-October/047508.html, this is proposal to add a
pip -rcompatiblerecommended-packages.txtfile to thevenvdocumentation that summarises replacement module recommendations in other parts of the standard library documentation.Suggested entries are:
requests # Recommendation in urllib.request docs
regex # Recommendation in re docs
cffi # More typesafe alternative to ctypes
six # Python 2/3 compatibility library
setuptools # Alternative to distutils that supports modern packaging standards
I'm also tempted to suggest pytz as the preferred source of up-to-date named timezones, but I'm not sure how often that's really needed in situations where you can't just depend on it explicitly instead.
ncoghlan commentedon Oct 30, 2017
https://bugs.python.org/issue31899 is a follow-up issue to discuss whether or not it would make sense to expand these recommendations to cover explicit compatibility testing against these libraries for CPython updates
ncoghlan commentedon Oct 31, 2017
As part of this, a new subsection would be added to https://docs.python.org/devguide/stdlibchanges.html to document the process for adding new packages to the recommended packages list: propose them for standard library inclusion, and while "No" is still the most likely outcome, being added to the recommended packages list would be a potential middle ground for "Approved in principle, but the actual logistics of doing so probably don't work".
ncoghlan commentedon Oct 31, 2017
Thinking about it further, this list is actually going to be version independent, suggest it may actually belong somewhere outside the main documentation.
The Developer's Guide may be a reasonable stopgap measure until there's a better option available (e.g. if I ever get around to turning https://github.com/python/redistributor-guide/ into something more than a nearly empty repo)
[-]Add `recommended-packages.txt` to `venv` documentation[/-][+]Add a `recommended-packages.txt` file[/+]ncoghlan commentedon Nov 4, 2017
In https://mail.python.org/pipermail/python-ideas/2017-October/047599.html, Guido suggested managing this as an occasionally updated Informational PEP (somewhat akin to PEP-394), and I think that will actually work fairly well:
My current thoughts on structuring that:
Title: Recommended Independently Updated Python Packages
Tone/Audience: I'll aim the PEP primarily at answering the "Why isn't <X> in the standard library?" question, as that helps us keep the list focused on python-dev specific concerns and avoid turning it into a general categorised list of Python library recommendations like https://github.com/vinta/awesome-python
The key criterion for something being mentioned will be when the standard library *already* contains comparable functionality, but there's a language version independent third party alternative that even core developers will often use instead. That list is currently:
urllib.requests -> requests (pace of change in web standards)
re -> regex (technical challenges with backend migration)
datetime.timezone -> pytz.timezone (updates driven by IANA timezone database)
ctypes -> cffi (build tools should be version independent)
distutils -> setuptools (build tools should be version independent)
I'll likely also include a list of libraries where version independence is a key feature, so they've never even been proposed for stdlib inclusion, despite their broad popularity:
I'm not sure if or how I'll cover the scientific Python stack (especially NumPy.ndarray being the reference implementation for multi-dimensional arrays), but Nathaniel Smith has some interesting thoughts on that in https://mail.python.org/pipermail/python-ideas/2017-November/047636.html
pganssle commentedon Jul 5, 2018
I will note that
pytz.timezoneanddatetime.timezoneare not really comparable (they do two very different things), and as of Python 3.6,dateutil.tzis the recommended source for IANA time zones, notpytz, per https://docs.python.org/3/library/datetime.htmlncoghlan commentedon Jun 28, 2020
Removing the issue assignment, as I'm not actively working on this (although I still think it's a reasonable idea).
encukou commentedon May 29, 2025
I don't think this issue aged well. regex and cffi are still valid; we might recommend attrs over dataclasses or tomlkit over tomllib; babel over gettext; there's cryptography...
I don't think the core dev team should maintain such a list. The "why isn't in the standard library?" is nowadays better answered by "because there's no pressing reason to add in; get it from PyPI".
I don't think we should keep this idea filed as an issue. Would you be OK with closing it?
ncoghlan commentedon May 29, 2025
I don't think closing the issue solves the problem, as there are recommendations in some of the standard library modules, but they're not necessarily being kept up to date over time (for example, I'd recommend
httpxoverrequestsas a client-side HTTP library these days, but theurllibdocs still suggest the latter).The
tomllibdocs do mentiontomlkitandtomli-was options for folks looking for read/write support.I added some suggestions for potential 3rd-party argument parsing alternatives when we were rescuing
optparseandgetoptfrom their previous soft deprecation (but I also know that at least Guido would prefer I hadn't done that - they just didn't annoy him enough to actively pursue removing them once they were there).The C API docs now have a consolidated list of recommended binding generators in https://docs.python.org/3/c-api/intro.html#recommended-third-party-tools
So the status quo is that these recommendations do exist, but they're completely ad hoc: they're added when a core dev feels strongly enough about a recommendation that they add it in the interest of users at a given point in time (and no other core dev objects strongly enough to remove it), but there's no consistent review mechanism that tracks all of the recommendations we're making and regularly asks "Is this recommendation still serving the interests of users, or does it need to be updated or removed?".
At time of writing, there are 641,215 projects on PyPI. While it's far from being a perfect solution, the core devs collectively listing out the tools we would reach for in problem domains that are common enough to have related code in the standard library is going to offer a better on-ramp to the wider ecosystem than leaving them to figure things out from the internet at large (or by asking their friendly neighbourhood LLM to recommend third party packages and getting responses that sound plausible, but may not actually exist).
encukou commentedon May 30, 2025
The issue is rather vague on what the specific problem is.
Closing the issue doesn't solve the problems, but neither does keeping it open here, especially under the current title.
“You'll need to write a PEP for that” is usually a reason to close an issue -- if it's a newly filed one of course.
So, a concrete next step here would be to a list of recommendations we currently have in the docs, to starting point?
I guess a good way would be to add a Sphinx extension and replace all the
.. seealso::(and plain sections) with something like.. thirdparty::, which would add a standardized disclaimer, and would allow easily extracting the full list.