Not to mention that all efforts would be focused on improving a single package manager. Even if the one that was standardized wasn't the "best" at first (by whichever metric you prefer), giving everyone an incentive to improve that one will likely make it the best within a few years.
The npm/yarn fork that formed in 2016 is the closest analogy I can think of. My impression is that npm improved on its biggest weaknesses (e.g. a lock file) and has remained the default choice in that ecosystem. I suspect the same would happen with pip if it too made significant improvements.
python3.9 -m pip
python3.10 -m pip
The standard library is the reason why python is popular to begin with.
IMHO it’s absolutely the toolchain’s job to manage that for me. I’d never adopt a toolchain that wouldn’t.
You can just use 3.11 with everything.
Generally speaking, if you're on a modern OS - like recent Ubuntu LTS or MacOS you're getting 3.8 -> 3.10 and compatibility is very good in these releases.
The same goes if my project depends on a library or framework that doesn’t support 3.11.
There’s no doubt it’s the default though.
Things NPM has by default that are impossible to achieve in Python-land without external tools:
* Lock files. If you check in `package-lock.json` (which is always automatically generated), then everyone who clones and installs your project will install exactly the same versions, every time. In Python you need to either run pip freeze manually when you make a change (and even then, that's not quite the same thing), or you need to use third party tools with varying degrees of manual labour.
* Local installs. Unless you explicitly ask for it, NPM will always try and set up an isolated, local environment for every project you work on. I don't think this is even possible with pip alone, which is why Python also now comes with a sledgehammer of a solution: venvs.
* Consistency. `npm install` will set the project up. `npm run <TAB>` will give me a list of useful development commands. Packages are always installed to `node_modules`. Most NPM projects work in pretty much the same way, which makes it very easy to make changes to other people's projects, or get started on your own. I have very rarely seen two Python packages that work the same. Different venv names, different places where the dependencies are specified, different procedures for installing those dependencies, different ways of locking dependencies (if any were used at all), etc, etc. That's not too get started on the different options for task runners.
* Workspaces. It turns out, it's often useful to develop multiple Python packages at the same time (because they need to be consumed by different people or different systems, or just because it's convenient to split a project up sometimes). With NPM you just need to configure this once and it'll all get linked up properly by default. How do you do this in Python? I ended up leaving my last job before I managed to figure this out, which was disappointing to my sense of professional pride, but oh so valuable for my sanity. Now I work with Javascript projects and don't need to worry about things like that because it just works.
* Multiple versions of the same package can be installed at the same time. Wasteful? Possibly. Useful? Very. When a dependency makes a breaking change, it doesn't need to split the whole ecosystem in two while we wait for all of the other dependencies to update their version. This is simply impossible with Python.
And that's just a comparison with Python, which at least has a package manager. I've heard the same claims from people who develop C/C++ projects, which can surely only be a form of Stockholm syndrome...
If poetry (or similar) were renamed to Pip and it were to be included in the stdlib id obviously switch.
It doesn’t solve the single static binary problem or docs problems, but it’s much much closer.
You didn't even understand the point they made: the need for Pipenv and poetry would pretty much go away if pip added support for a proper lockfile and venvs. And that's the only correct choices as pip is already pythons package manager.
If there two steps, one part of the community will insist they belong in: a makefile, bash script, python script, lambda network service, bazel, pants, scons, terraform, ansible, npm …
I spent a long time migrating a project to use poetry. One of the reasons I opted for poetry over others was that the lockfile retained all of the environment markers in the packaging metadata, so that the lockfile could support multiple interpreters and interpreter versions, multiple platforms, etc.
For example, your package might depend on `foo`, which in turn could sniff the host OS and select the appropriate subdependency. You'd then end up pinning that subdependency, which would be incorrect on a different host OS.
(Similarly for Python versions: a subdependency might be required on < 3.7, so re-installing from a lockfile generated from an older Python could produce a spurious runtime dependency.)
Metadata for the ultimate software package should probably include a sufficient number of attributes in its declarative manifest:
Package namespace and name,
Per-file paths and Checksums, and at least one cryptographic signature from the original publisher. Whether the server has signed what was uploaded is irrelevant if it and the files within don't match a publisher signature at upload time?
And then there's the permissions metadata, the ACLs and context labels to support any or all of: SELinux, AppArmor, Flatpak, OpenSnitch, etc.. Neither Python packages nor conda packages nor RPM support specifying permissions and capabilities necessary for operation of downstream packages.
You can change the resolver, but the package metadata would need to include sufficient data elements for Python packaging to be the ideal uni-language package manager imho
And we've always had such tool, the humble "pip". Now it even works great with pyproject.toml. Plus built-in "virtulalenv" if you need isolation.
Pradyun's point about unnecessary competition rings especially true to me, and points to (IMO) a hard reality about where the ecosystem needs to go: at some point, there need to be some prescriptions about the one good tool to use for 99.9% of use cases, and with that will probably come some hurt feelings and disregarded technical opinions (including possibly mine!). But that's what needs to happen in order to produce a uniform tooling environment and UX.