r/programming • • Aug 25 '26

EVE Online: The Move to Python 3 Begins!

https://www.eveonline.com/news/view/the-move-to-python-3-begins
802 Upvotes

290 comments sorted by

View all comments

102

u/Promant Aug 25 '26

Props to them for actually doing the honest hard work instead of just feeding all the code to AI and praying it will work.

88

u/FlukyS Aug 25 '26 edited Aug 25 '26

I've done dozens of migrations from 2.6 and 2.7 to 3, it isn't hard really, it is just whack a mole. What I'd say though most of the changes I've ever done was just straight up rewriting things that were horrible before but just weren't touched more than just syntax differences or whatever. People made a big deal about requiring for instance print to have brackets but if your service had a million print statements then you are already going to be much happier spending time moving to use logging or maybe pruning unnecessary stuff. Strings in Python3 in particular are much nicer with fstrings, templating...etc and the debugging in the newest versions of Python are a dream.

EDIT: Just for examples of stuff I've had to do, almost every 2.* migration I've done has involved completely rewriting networking endpoints either from urllib to requests or stuff like Twisted to FastAPI or before that aiohttp. Syntax is easy, the library migrations are usually hard breaks because it is easier just to start fresh.

25

u/def-pri-pub Aug 25 '26

The first company I worked at full time (in late 2010's) we were trying to migrate the code base from Python 2.x to 3.x. I don't think it went much of anywhere because the big bottle neck for us at the time was Twisted, which IIRC didn't have 3.x support and all of our code was based off of Twisted.

27

u/FlukyS Aug 25 '26

Yeah the answer was just get rid of Twisted for every project I've worked on. Twisted itself isn't close to the style of modern Python in general so moving to other tools is a good shout regardless.

23

u/jayroger Aug 25 '26 edited Aug 25 '26

The syntax changes were the easiest part, same with library renames and changes. The really hard part was the str/unicode -> bytes/str migration. But I'm very glad that we collectively bit the bullet, because it also meants that after the migration the continuous Unicode encoding/decoding errors were gone and the new data types make much more sense.

8

u/FlukyS Aug 25 '26

Well that's the whack a mole side of the port but usually the easiest part. The harder part is tool selection, migrating to the new build tools, rewrites of stuff when you can improve things with newer libraries or whatever. It depends on the codebase really

14

u/jmickeyd Aug 25 '26

The problem is they're not just doing a 2 -> 3 migration. They use a heavily modified internal fork of 2 that they've added coroutines to. Presumably they migrate that to native await/async, which is a much larger task.

3

u/FlukyS Aug 25 '26

Well newer Python has better multiprocessing support and different interpreters and stuff. It would be much easier to do what they are doing with that in theory.

6

u/Memitim Aug 25 '26

LOL, too real. The actual work in migrations is the extra crap you end up doing after seeing old code and then immediately looking around to see if anyone saw it before you can scrub it from existence and replace with code that shouldn't be hidden away in a closet next to an aging portrait and the Ark of the Covenant.

→ More replies (1)

23

u/lulaloops Aug 25 '26

You're delusional if you think this won't be heavily assisted by AI.

37

u/Fated777 Aug 25 '26

Well, they didn’t deny use of AI, they’re just saying they’ll be careful and do it in parts. Funny that they had 6 years to “start”, but yeah, better late than never

7

u/iamthewhatt Aug 25 '26

I mean, how is that any different than using the tools built into the editors that we didn't ever call "AI" years ago? A tool to help speed up programming is always better, and like before, you must always do your due diligence when testing it.

The real "problems" with AI start when you use it for non-testable functions (like as a therapist or "yes bot") or for illegally acquired data like images or books.

→ More replies (1)

8

u/SchrodingerSemicolon Aug 25 '26

But THIS is the kind of work I want AI to do. Menial, repetitive shit that involves no creativity.

158

u/ozziegt Aug 25 '26

Ai is built for stuff like this. Just need to make sure good tests are in place before starting to migrate.

75

u/Glasgesicht Aug 25 '26

Yep, it's actually quite good at it. The worst part about these sort of migrations usually isn't that it's particularly hard - it's just really, really boring.

15

u/mescad Aug 25 '26 edited Aug 25 '26

For the "spreadsheets in space" game, I doubt the tedious boring part is even considered a downside.

8

u/ShepPawnch Aug 25 '26

They could probably even trick the players into doing it for them.

4

u/ModusPwnins Aug 26 '26

Ender's Game, but instead of war behind the scenes, it's a Python migration

15

u/nvn911 Aug 25 '26 edited Aug 25 '26

Exactly. People who shit on the AI tooling these days stem from two places, sheer ignorance or deliberate malice.

Edit. Love the downvotes. From programmers. We've changed the face of countless industries over the years. Been the focus of paradigm shifting technology and responsible for changing the nature of work for millions of people. Colour me surprised for this particular irony.

22

u/wrecklord0 Aug 25 '26

Keep in mind that the denizens here are not just programmers, they are.... shudders redditors

→ More replies (4)

11

u/awhaling Aug 25 '26

I’ve used it extensively, it can be very impressive. At the same time, it can be crummy and do things quite poorly or even totally fail. Even when it does produce impressive results, there are other reasons to be weary of using it. I don’t like the idea that the only people that would critique it are the ignorant or the malicious.

→ More replies (6)
→ More replies (13)
→ More replies (38)

3

u/taw Aug 25 '26

This kind of software upgrade is literally best use of AI. Going through millions of lines of code following complicated by strict rules, and having access to all the tooling to double check every step, AI would absolutely ace it like nothing else.

AI can fail so hard on more novel tasks, but this is very straightforward mechanical task that's just huge.

3

u/Jacen1618 Aug 25 '26

But AI is in fact the best tool to get migration like this done not only correctly but quickly…

17

u/devraj7 Aug 25 '26

AI is more likely to get this migration right than humans. Migrating Python 2 to 3 is an absolute nightmare if you don't have a solid test suite.

→ More replies (21)
→ More replies (8)