10000 [tools/depends] Bump Python 3.12.5 by fuzzard · Pull Request #25608 · xbmc/xbmc · GitHub
[go: up one dir, main page]

Skip to content

[tools/depends] Bump Python 3.12.5 #25608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Conversation

fuzzard
Copy link
Contributor
@fuzzard fuzzard commented Aug 14, 2024

Description

Bump tools/depends platforms python to 3.12.5

Motivation and context

There are some large changes coming regarding cpython that will affect ios/tvos/android considerably in the way we currently build, and will require rather large changes.
I figure i need to get closer to 3.13 to minimise the grief

Major changes in 3.12

  • distutils removal from stdlib. It now requires setuptools.
    A number of patches (samba/mesa) are done to handle this change. I dont want to fuck with mesa updates, and samba updates have proven extremely difficult for me to get going.
  • All sorts of build options have changed. eg modules.setup no longer "needed". It can be valid, but it is processed after modules.stdlib which we would have to patch things in/out. Was just easer to move to py_cv_module_* exclusions.

A major note is the inclusion of a patch that was denied upstream for the 3.12 branch. This is in relation to python/cpython#116510
A backport of the 3.13+ fix python/cpython#118618 was done by a python developer, but was rejected for merge as they felt it was too risky. We have already seen linux users using python 3.12 getting trouble because of this issue, so i think we are best to include the commits anyway to resolve it for android/apple platforms. There were reports from linux kodi users that the commits did fix crashes.

As is always the case with python version bumps, im sure some shit gonna be broken, so i figure the sooner this gets in, the sooner the cleanup for those inevitable issues can be found and made.

One other note. For bisection, Most of this would need to be a single commit (native/target python, mesa, samba commits). Im not sure how best to handle that. Do i squash it all?

How has this been tested?

Jenkins build for all platforms
android aarch64 runtime used some video plugins and seemed to work

What is the effect on users?

N/A

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

fuzzard added 4 commits August 14, 2024 17:16
meson.build:615: WARNING: dri3 option "false" deprecated, please use "disabled" instead.
meson.build:661: WARNING: gallium-vdpau option "false" deprecated, please use "disabled" instead.
meson.build:803: WARNING: gallium-va option "false" deprecated, please use "disabled" instead.
meson.build:847: WARNING: gallium-xa option "false" deprecated, please use "disabled" instead.
As per https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig
Recommended solution for now is to duplicate, which turns off warning.

DEPRECATION: "pkgconfig" entry is deprecated and should be replaced by "pkg-config"
@fuzzard
Copy link
Contributor Author
fuzzard commented Aug 14, 2024

Jenkins build this please


CONFIGURE=./configure --prefix=$(NATIVEPREFIX) \
--disable-shared \
--disable-framework \
--without-pymalloc \
--with-system-ffi

NATIVE_SITEPACKAGES=$(NATIVEPREFIX)/lib/python$(PYTHON_VERSION)/site-packages
NATIVE_SITEPACKAGES=$(NATIVEPREFIX)/lib/python3.12/site-packages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why drop the variable for a hard-coded version string?

Copy link
Contributor Author
@fuzzard fuzzard Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oversight, was meant to bring it back when the target python3 was updated. This goes back to the comment in the PR
One other note. For bisection, Most of this would need to be a single commit (native/target python, mesa, samba commits). Im not sure how best to handle that. Do i squash it all?

Copy link
8000 Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can read history by commit title or by full commits, so by squashing commit titles into the single commit description, there's no loss of history.

I like the separate commits for review but I think what's merged should be bisectable.

[tools/depends][native] Bump Markupsafe 2.1.5

[tools/depends][native] Bump Mako 1.3.5

[tools/depends][target] Bump pythonmodules-setuptools 72.1.0

[tools/depends][target] Bump Python 3.12.5

[tools/depends][target] samba-gplv3 patch distutils usage

python 3.12 removed distutils from core cpython, and it is now only available from
setuptools. Patch to import setuptools before trying to use distutils in samba
python functionality testing

[tools/depends][target] Mesa support setuptools for py3.12

Fix failure to find Mako due to error on import of distutils
Patch imports setuptools first, which allows distutils to succeed
@emveepee
Copy link
Contributor

Is the Windows version of python going to continue at 3.8.15 in Piers? The further the python versions get apart the harder it is to make plugins compatible as deprecated functions get removed https://docs.python.org/3/whatsnew/3.12.html#removed. Although I understand the system python might be used in some cases this difference eventually will need to be addressed.

@fuzzard
Copy link
Contributor Author
fuzzard commented Aug 16, 2024

Prs are always open to someone dealing with it

@emveepee
Copy link
Contributor

Prs are always open to someone dealing with it

Right I personally don't care, but bumping the non-Windows builds is the cause of the problem so it should be considered.

@fuzzard fuzzard requested a review from wsnipex August 20, 2024 06:24
@graysky2
Copy link
Contributor

A backport of the 3.13+ fix python/cpython#118618 was done by a python developer, but was rejected for merge as they felt it was too risky. We have already seen linux users using python 3.12 getting trouble because of this issue, so i think we are best to include the commits anyway to resolve it for android/apple platforms. There were reports from linux kodi users that the commits did fix crashes.

I can confirm that this does fix the kodi segfault on exit. I tested vanilla python 3.12.5 and the segfaults are still present. Patching 3.12.5 with that PR fixes it.

@fuzzard fuzzard merged commit 63d2f4d into xbmc:master Sep 13, 2024
2 checks passed
@fuzzard fuzzard deleted the depends_py3.12 branch September 13, 2024 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet