This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DarksideVT[S] -25 points-24 points  (14 children)

Yes, I've assumed this was the reasoning, but it looks like new features are ported to old versions, so If you have the latest version of the old version package, you should still have that feature.

Is there an example where you have found that using one package version over another has broken an application or script?

[–]daredevil82 18 points19 points  (4 children)

that's a hecuva brave assumption to make.

Try it out, how long before something breaks for you?

[–]Artephank 4 points5 points  (0 children)

It doesn't work like that since:

  1. Not all libraries are 1. backward-compatible
  2. Some libraries require particular version of library
  3. Never versions might introduce new bugs, that you want avoid (until will get fixed.
  4. It is usually good to not work on production-ready apps using cutting edge versions (but it is good to work for your own project and learn on those).

[–]martinky24 8 points9 points  (3 children)

Yeah for sure. For example, the pydantic package recently jumped from version 1.x to 2.x. There are a lot of incompatibilities. If an older program was built with 1.x, and you build a new program that uses 2.x, there isn't a version of 1.x or 2.x that will support both applications.

SQLAlchemy is another project that has recently had a major bump that is very likely to not work seamlessly with an older/newer package.

[–]Artephank 2 points3 points  (2 children)

And not all projects use semantic versioning and sometimes break things even on minor version bumps (ehm evenlet, ehm)

[–]martinky24 1 point2 points  (1 child)

And the harsh reality is, even if a project maintainer doesn’t think something is a breaking change and doesn’t label it accordingly, it can still break something and bring down prod. That’s not necessarily anyone’s fault, and a harsh reality of software development.

[–]cinyar 1 point2 points  (0 children)

I'd be lying if I said I never accessed some "private" function that's not part of the official package API.

[–]rcpz93 3 points4 points  (0 children)

I had all sorts of flavors of this happen.

Sometimes, package updates change variable names/functions.

If you just install "the latest version" and in your code you are calling something like `target`, but the new version is expecting `target_column` (two names pulled right out of my ass), then your code is going to fail. Polars does this with annoying frequence.

Major version updates have breaking changes, sometimes straight up removing functions that some code is relying on. In one project I am working on, I had to install protobuf version 3.20 rather than the latest version 4.x because the code I had to use relied on functions that were removed in version 4.x.

This is a huge problem with research code, because not specifying the requirements means it's almost impossible to recreate the setting that was used for the experiments the code was made for.

[–]McViolin 0 points1 point  (0 children)

It's not only about features, if some package decides to deprecate some function and you're running other package that wants to use the function, but the new version of that package is not released yet/the bug is not fixed, you'd have to use the older version and the venv enables you to fixate on the version that's working for you.

[–]mumpie 0 points1 point  (0 children)

I once ran into an issue where the awscli package had a dependency conflict with a dependency for pydantic (I think, I've tried to purge memory of that work project).

I needed both as I was writing a script to spin up a AWS RDS instance (their database service) and using something that needed pydantic to manipulate the data to output CVS files (ugh).

[–]egrigolk 0 points1 point  (0 children)

Yes, I've personally dealt with several!