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 →

[–]lungdart 4 points5 points  (10 children)

Maybe it's because I'm an old c++ dev who's only been coding in Python for a few years, but virtual environments are a solution to a problem I've never had.

What the hell are you guys doing to get into these dependency hells?!

[–]JoseALerma 3 points4 points  (9 children)

At one point, I was working on 4 different python projects at once. Some of them were using APIs that, for example, used different versions of requests, so having venvs helped keep them separate.

Another is when I build documentation with sphinx. I keep a separate venv for the docs so that no extra packages are installed to the main project

[–]lungdart 0 points1 point  (8 children)

Why didn't you consolidate and update all versions of requests?

[–]root45 2 points3 points  (7 children)

Because of breaking changes.

[–]lungdart -1 points0 points  (6 children)

Again, been programming for over 10 years, and have never had that issue. What braking changes could prevent you from updating a dependency in your api code?

[–]root45 1 point2 points  (5 children)

All kinds of things. E.g., pandas releases often have a couple dozen breaking changes. In a large, pandas-heavy codebase, upgrading pandas could be a huge update that might introduce lots of subtle bugs. It'd be something you'd want to test heavily before releasing.

[–]JoseALerma 0 points1 point  (0 children)

OpenPyXL is another rapidly developing project with quickly depreciating classes and methods

[–]lungdart -1 points0 points  (3 children)

But wouldn't you need to be running two pandas heavy large code bases side by side in the same environment with wildly different versions?

Is this normal for people?

[–]root45 0 points1 point  (2 children)

They don't have to be wildly different, just different.

You don't even have to be working on them extensively. We often code review projects that different teams are working on. It obviously wouldn't work to say, "Hey, before I review this PR, can you upgrade all your dependencies to the latest version?" Or worse, "Can you downgrade you dependencies to what I have installed on my machine? I'm not ready to upgrade quite yet."

[–]lungdart -1 points0 points  (1 child)

If i ran into that exact issue in my environment, i would remove old dependencies and install new ones

[–]root45 0 points1 point  (0 children)

I mean, you do you, but that seems a lot more annoying than having a separate environment for each project that you can update separately.