Python 3.5.8 is finally here!
The end of October marks the new version of Python, and a lot of things did change. Python has finally entered the “security fixes only” mode, and thus the new version pretty much focuses mainly on security fixes.
Currently, the new version has only been released in source code form, and no more official binary installers will be produced.
The new syntax features are the coroutines with async and await syntax, a new matrix multiplication operator (a @ b), and the additional unpacking generalizations.
Among new major features and changes, the main ones are:
- The improvement of Python zip application support
- The additional unpacking generalization
- “%formatting” for bytes and bytearray objects
- Addition of a new operator (@) for matrix multiplication
- The addition of support for automatic retires of interrupted system calls
- Change of StopIteration handling inside generators
- Elimination of the .pyo files
- Coroutines with async and await syntax
And so many more.
One of the main fixes that should come in handy is the escape from the server title of xmlrpc.server.DocXMLRPCServer when rendering the document page as HTML. This will definitely avoid some errors on the way!
Additionally, you should know that the new Python 3.5.8 allows the rare code that wants to send invalid HTTP requests from the http.client library a way to do so! Even though, this fix led to breakage for a couple of projects that were relying on this ability to test on their own behavior in the face of bad requests.
There used to be an infinite loop when parsing specially crafter email headers, but it got fixed on this version too. Also, the new version avoids file reading by disallowing local-file:// and local_file:// URL schemes in URLOpener().open and URLOpened.retrieve() of the urllib.request.
Take a look at the blog about what’s new in Python 3.5.8 here.
Some other small fixes that are left unsaid are:
- Fixing the parsing of invalid e-mail addresses with more than one @ to not return the part before the second @ as a valid e-mail address.
- Fixes of the mishandling of pre-normalization characters in urlsplit()
- The compatibility with ISO C89 needed by the “gnu89” standard of GCC 4.8 by using the C89 for loops in the backported pickle patch.
- Fixes of the multiprocessing regression on newer glibcs
- The SSL module now also compiles with LibreSSL 2.7.1
- Minimal fixes to prevent buffer overrun in os.symlink on Windows.
- Fixing the potential crash during GC caused by tp_dealloc which doesn’t call PyObject_GC_UnTrack().
Notes on this release
There are a couple of notes you should be on the lookout for the new Python 3.5.8.
You can use the binaries for the AMD64 on processors that implement the Intel 64 architecture (even though it’s better known as the “x64” architecture). Where it will not work is on Intel Itanium Processors (a.k.a “IA-64”).
If you’re using Windows, you should take care of the following:
- If you’re installing the new Python 3.5.8 as a non-privileged user, you have to install an update on your C runtime libraries as administrator
- There are now web-based installers for Windows platforms, the installer will download all the necessary software components at installation time
- The redistribution of Python is made much easier with the new redistributable zip files that contain the Windows builds
- Important: Some virus scanners (especially Microsoft Security Essentials) are flagging the “Lib/distutils/command/wininst-14.0.exe” as malware. This is a false-positive as the file doesn’t contain any malware.Don’t be alarmed if you see this, a request has been sent to take care of it.
On the other hand, if you’re using macOS, here’s what you need to take care of:
- The OSX installers are finally distributed as signed installer package files, and are compatible with the OS X Gatekeeper security feature
- There is some important information about the IDLE, Tkinter and other imporant features that you can read about here.
You can download and get to know with the new Python 3.5.8 here
Alicia Newman is a 29-year-old programming professor who enjoys working with computers, and solve programming challenges. She is an Australian citizen and has a very exciting and bright personality. She is currently a PhD candidate.