Breaking changes in Python releases are nothing new, that’s why none of my Python projects are using the latest version :shrug:
The title is referencing this line (not TFA's actual title): > In the unittest module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2). I doubt your projects are using 3.1 or 3.2 (or older, except perhaps 2.7, but then you wouldn't care that 3.12 was removing something deprecated vs 3.11 which has it)?
Python 3.12.0 is to remove long-deprecated items
21–30 of 257 posts
Re: Python 3.12.0 is to remove long-deprecated items
#22While it's been coming for a long time, it's still frustrating to see the cgi module go. It's going to create a load of busy work to rewrite some low-traffic scripts. Modules being removed [edit: in 3.13]: https://docs.python.org/dev/whatsnew/3.12.html#pending-remov... Updating CGI scripts will be a bit fiddly: https://peps.python.org/pep-0594/#cgi
#!/usr/bin/env python
from wsgiref.handlers import CGIHandler
def app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
return [
b"foobar"
]
if __name__ == '__main__':
CGIHandler().run(app)Re: Python 3.12.0 is to remove long-deprecated items
#23Great, so now not only Python will be incompatible with itself, but also incompatible with itself even if you use Python 3. Sigh.
Re: Python 3.12.0 is to remove long-deprecated items
#24While it's been coming for a long time, it's still frustrating to see the cgi module go. It's going to create a load of busy work to rewrite some low-traffic scripts. Modules being removed [edit: in 3.13]: https://docs.python.org/dev/whatsnew/3.12.html#pending-remov... Updating CGI scripts will be a bit fiddly: https://peps.python.org/pep-0594/#cgi
There is CGIHandler that ships with python. Not many examples that are simple, so... #!/usr/bin/env python from wsgiref.handlers import CGIHandler def app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return [ b" foo bar " ] if __name__ == '__main__': CGIHandler().run(app)
Re: Python 3.12.0 is to remove long-deprecated items
#25While it's been coming for a long time, it's still frustrating to see the cgi module go. It's going to create a load of busy work to rewrite some low-traffic scripts. Modules being removed [edit: in 3.13]: https://docs.python.org/dev/whatsnew/3.12.html#pending-remov... Updating CGI scripts will be a bit fiddly: https://peps.python.org/pep-0594/#cgi
You linked to Python 3.13 removals. Python 3.12 removals are here: https://docs.python.org/dev/whatsnew/3.12.html#removed
Re: Python 3.12.0 is to remove long-deprecated items
#26> Remove the filename attribute of gzip.GzipFile, deprecated since Python 2.6, use the name attribute instead.
2.6 wow, that's some compatibility right there. About time that got removed then! Either that or undeprecate it, if it's fine to use. Any decision at this point is a good one.
Re: Python 3.12.0 is to remove long-deprecated items
#27- Set global and per-project python versions
- Not written in Python.
- Shims your PATH
- Linux, Mac, Windows
Re: Python 3.12.0 is to remove long-deprecated items
#28Earlier quoted context omitted.
The stdlib is linked to the version of the language, yes.
I wonder if there are languages (that have a stdlib) where that isn't the case
Re: Python 3.12.0 is to remove long-deprecated items
#29This is a reminder that the excellent pyenv [0] project can help you manage all your Python versions. - Set global and per-project python versions - Not written in Python. - Shims your PATH - Linux, Mac, Windows [0]: https://github.com/pyenv/pyenv
Re: Python 3.12.0 is to remove long-deprecated items
#30As it is now, there were breaking changes in wxPython (likely due to the culture of breaking working code extant in Python) which result in WikidPad being broken.
It seems to me that if the Python community continues in this direction, nothing will work more than 3 months after it's last github commit.
[edit/append] No, I'm not sure it's wxPython and not wxWindows that is the issue. I'll have to stuff my Linux boot SSD in, and then try to build WikidPad again to know for sure (it's been too long)
I didn't write WikidPad, it seems to have been last maintained about 2012, but I use it for my notes, etc. I really like it, but the breakage on the Linux side is a show stopper. It's really unfortunate that Linux doesn't have a stable API like Win32, and forces dependence on source code.
I'd consider installing an older version of Linux to force older python, wxPython, wxWindows, etc... and try to figure it from there... the last time I looked at it I got a wall of confusing errors, and couldn't patch it enough to get any functionality out of it.