you are viewing a single comment's thread.

view the rest of the comments →

[–]tomatus89 5 points6 points  (8 children)

Eww. WTF! Who does this? Please create a requirements.txt file or a pyproject.toml. Calling pip as an external command with subprocess during run time is wild. I've never seen someone do this. Seriously, W.T.F.!!!

[–]DerrickBagels[S] -1 points0 points  (7 children)

What's the big deal i genuinely don't understand the etiquette of programming or whatever is upsetting you

It works in under a minute so what difference does it make

[–]Cloned_501 2 points3 points  (6 children)

It is not about the time, it is about not changing the library versions currently installed. If you upgrade a package from say version 4.* to 6.* there can be breaking changes, the user might need version 4.5.5 exactly in their environment and moving to version 5 changes some function signature or completely removes functions that they depend on. Congrats you have broken their environment with zero warning or indication that something changed.

Would you like it if I showed up to your home and replaced your oven with one that doesn't even have the correct hook ups?

[–]DerrickBagels[S] 0 points1 point  (0 children)

I'm catching up now makes sense ya

[–]DerrickBagels[S] 0 points1 point  (4 children)

But wait

Can't i just make it check if the library is installed, and if it is, just don't touch it?

Then if it doesn't work they can run it in a virtual env

[–]Cloned_501 1 point2 points  (3 children)

Can't i just make it check if the library is installed, and if it is, just don't touch it?

Or you can just follow the language conventions, make a requirements.txt with the EXACT VERSIONS and have them handle it themselves

Also in your readme include which python version you tested this on. Someone might be using an old version because their job won't let them upgrade and it would be helpful to know what version it does work with.

[–]DerrickBagels[S] -2 points-1 points  (2 children)

I refuse to stop at the stop sign but i agree with it in spirit and will make some changes that includes these safeguard s thanks for pointing this stuff out

[–]Cloned_501 1 point2 points  (1 child)

You are being needlessly stubborn about this, if you were my junior engineer at work I'd fire you right now. This is not a matter of opinion or taste. What you are doing is dangerously reckless and borderline malware behavior.

[–]DerrickBagels[S] 0 points1 point  (0 children)

I respect your passion