this post was submitted on 15 Sep 2023
33 points (77.0% liked)
Rust
5980 readers
132 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
That honestly makes me curious, what issues have you encountered when upgrading your python(3) version?
https://stackoverflow.com/questions/74715990/node-gyp-err-invalid-mode-ru-while-trying-to-load-binding-gyp
They removed a flag that didn't do anything any more. It also didn't hurt anybody, but since they removed it, my JavaScript project doesn't build on Python 3.11 and needs Python 3.10. I can't upgrade the version of node-gyp, because it's a transitive dependency of another package I can't upgrade.
That's interesting, thanks for the reply
So first of all, I had to upgrade something from Python 2.something to 3.something. I forget the specifics of what went wrong, but modern versions of pip just do not handle Python2 gracefully, at least when working with virtual environments. I tried to freeze to get a list of current dependencies, but
pip freeze
in a virtualenv just ended up writing out the system's packages, not those in the virtual environment. I get it, Python2 isn't officially supported any more, but at the same time, why is a language version not supported? Why is it not handled gracefully? This doesn't happen in other programming languages.Anyway, as for bumping up through Python 3 versions. I used a framework to do most of the heavy lifting in my project, but I think Python 3.8 or 3.9 introduced some syntax changes which made it not compatible any more. Changing how string literals are handled, and adding/removing arguments to functions. So I had to bump to a new version of the framework. Of course, because this was a webdev project, updating the framework also meant changing my project itself because of the "move quickly and break things" mindset that they have. So yeah, bumping up through versions of my framework until I got to one which was officially supported with the current python version.
I also used a python program to automatically run some scripts on boot. Turns out a while ago they decided that they wanted to redesign how they did everything, so you have to know to use the 1.x branch (which is still being updated) rather than the 2.x branch.
It honestly feels like everyone has a mindset that anything you write in Python and Node will be perpetually updated, and that long term maintenance isn't a thing that happens. That you should always be using the latest version of anything.
And yes, I know I could probably work around all of this using Anaconda or docker or some other rube goldberg machine of programs. But I can't be bothered dealing with that nonsense. I just want to keep something I wrote many years ago running.
If I start a new webdev project, I'm just going to use some Rust framework for the backend, and plain JS for the frontend.
Some wheel didn't install for me, so I downgraded 1 minor version and then it installed. Some cuda wheel I think.
I work on a team that has some old projects in python that we're gradually deprecating. A major one is stuck on 3.7 because 3.8 added automatic async mocking (which is great!), but this broke the existing third-party async mocking framework and it's never been updated to be compatible with newer Python versions. So we'd have to invest time in porting all the tests from the 3rd-party framework to the standard library, but it's not worth it because we're hoping to deprecate the whole project soon anyway.
I think they introduce new keywords every now and then. Match and async I think?
Edit: I was wrong, this is done in a backwards compatible manner
Those doesn't break backwards compatibility though. Naturally you can't use match with a python 3.7 interpreter, but what scripts written for python 3.7 wouldn't work with a 3.11 interpreter?
I haven't encountered that issue before, so I'm curious what those problems OP have encountered looks like.
Huh, ok. I thought something like
match = 0
in an old script might break a more recent version.But you may very well be correct.
match
isn't a protected keyword likeif
is.Is legal and will give print out 0.
Well, today I learned. Thanks for pointing it out.