r/Python • u/capilot git push -f • Mar 25 '26
Meta Bloody hell, cgi package went away
<rant>
I knew this was coming, but bloody Homebrew snuck an update in on me when I wasn't ready for it.
In Hitch-Hiker's Guide to the Galaxy, the book talks about a creature called the Damogran Frond Crested Eagle, which had heard of survival of the species, but wanted nothing to do with it.
That's how I feel about Python sometimes. It was bad enough that they made Python3 incompatible with Python2 in ways that were entirely unnecessary, but pulling stunts like this just frosts my oats.
Yes, I get that cgi was old-fashioned and inefficient, and that there are better ways to do things in this modern era, but that doesn't change the fact that there's a fuckton of production code out there that depended on it.
For now, I can revert back to the older version of Python3, but I know I need to revamp a lot of code before too long for no damn good reason.
</rant>
View all comments
Show parent comment
-5
u/capilot git push -f Mar 26 '26
Hmm, off the top of my head ...
They removed
basestringwhich allowed you to check for eitherstrorunicode. I get that they're both the same thing now, but there was no reason to removebasestring. Now all my code that wanted to test if something was a string or not broke.Renamed
ConfigparserasconfigparserMoved
cgi.escape()tohtml.escape()Got rid of
raw_input()Broke up urllib into urllib.request, urllib.error, urllib.parse, urllib.robotparser
Oh, and got rid of cgi
I get that there are workarounds for all of these issues, but there didn't need to be. They could have kept compatibility wrappers and such so that we don't all have to debug our code all over again.