Re:Python Is Eating the World
by icebraining on Monday August 12, 2019 @04:14AM
(#20673503)
Python has had multi-version installation of libraries for a long time: https://packaging.python.org/guides/multi-version-installs/
Unfortunately, pip came along and took over, despite lacking support for that. It would have been nice if a better packaging tool had replaced easy_install, but alas.
Re:Python Is Eating the World
by irishsultan on Monday August 12, 2019 @06:19AM
(#20674077)
That only helps when installing multiple versions at the same time, it doesn't help with using multiple versions in the same application.
Re:Python Is Eating the World
by heavenlyblue on Tuesday August 13, 2019 @06:38AM
(#20684356)
Yeah, and the compiler will also report errors if different modules use different versions of the same package.
- module A uses v1 and uses trait v1.A
- module B uses v2 and uses trait v2.A
- will be reported as "A does not implement trait A"
It's actually quite discomforting for newcomers.They definitly gave this a thought while designing the library system (”crates”) for the language. I am not sure if it is feasible to retrofit such a solution to something like python.. Python 4 maybe?
Cargo, though, has a silver bullet. If it can't find a solution to determine a single version for a package, it simply includes more than one version in the object code. That would take a lot of work to duplicate in Python.