On Tue, May 23, 2023 at 2:07 PM 'Michael Rochefort' via
vfx-platform-discuss <
vfx-platfo...@googlegroups.com> wrote:
>
> As of now the CY2024 draft specification designates 3.11.x as the target Python version. Is there any appetite for bumping this to Python 3.12.x?
>
>
https://docs.python.org/dev/whatsnew/3.12.html
>
> Some developer and performance benefits I can see from this:
>
> * Support for Linux perf profiling of Python code (Linux only)[1]
> * Inlined comprehension for up to 2x performance improvement[2]
> * Ability to profile and trace all running Python threads, not just the calling thread hierarchy[3]
>
> There are a lot of minor changes and additions in this release as well, but their impact will be localized to developer usage. However, it would be good to have a comprehensive review around the impact of the standard library removals[4] and cAPI changes[5].
>
> Besides any potential incompatibilities or significant lift required to target Python 3.12, there are two primary issues I see with bumping: availability[6] and ecosystem support.
>
> The PSF is targeting to have release candidate versions available for testing July 31st, and the first beta was released yesterday (no new features from now on). The GA, though, won't be available until October 2nd, which may be too late for the platform to accept. And it's uncertain if any of the changes in 3.12 will require extensive compatibility testing and validation for a number of ecosystem packages that vendors will not have enough time to complete.
>
> Thoughts?
>
The perf stuff doesn't do you much good unless you're using a platform
that is compiled with frame pointers enabled. As of today, the only
distribution that does that is Fedora with Fedora Linux 38 and newer:
https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer
Currently, it is disabled in ELN (which is the protoform used as an
input for creating CentOS Stream 10):
https://src.fedoraproject.org/rpms/redhat-rpm-config/c/9e10bb665ec2d3cc4b1ea613a7fe8e99e467e64e
I don't know if they will enable it, that may depend on requests for
the capability. But this capability missing affects the ability to
profile and trace Python threads too. While it's possible to compile
Python itself with frame pointers (and I believe upstream will start
recommending that), anything that calls outside of Python would be
missing that information. Given how much Python is used as "glue"
between C/C++ libraries and applications, that can be a problem.
For more info about the utility and usability of this stuff, this blog
post is a decent starting point:
https://rwmj.wordpress.com/2023/02/14/frame-pointers-vs-dwarf-my-verdict/
So when you leave out that stuff, you're not left with much to make it
an attractive upgrade.
--
真実はいつも一つ!/ Always, there's only one truth!