Skip to content
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

Python3 update to 3.11.0 #7072

Merged
merged 7 commits into from
Nov 12, 2022
Merged

Python3 update to 3.11.0 #7072

merged 7 commits into from
Nov 12, 2022

Conversation

heitbaum
Copy link
Contributor

@heitbaum heitbaum commented Nov 1, 2022

First revision of patch to support:

the buildroot patches need to be reviewed.

Looking at the buildroot changes https://git.busybox.net/buildroot/tree/CHANGES?id=aa8903447ca1c8da34b205d67cda4161723fd048 - not expecting buildroot Python to be updated to 3.11.x until at least after 22.11 is released in ? 4-6 weeks ?

cd ..
git clone https://git.busybox.net/buildroot
cat buildroot/package/python3/*.patch > LibreELEC.tv/packages/lang/Python3/patches/Python3-0100-buildroot-patches.patch
cd LibreELEC.tv
s/build Python3:host
git co -- packages/lang/Python3/patches/Python3-0100-buildroot-patches.patch
@CvH
Copy link
Member

CvH commented Nov 3, 2022

  • [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support
    tests are disabled

  • [PATCH] Serial ioctl() workaround
    not sure that hit us at all

  • [PATCH] Add an option to disable lib2to3

lib2to3 is a library to convert Python 2.x code to Python 3.x. As
such, it is probably not very useful on embedded system targets.

we have it enabled, do we need this or do we disable lib2to3 ?

  • [PATCH] Add an option to disable expat
    we have it enabled

  • [PATCH] Add an option to disable unicodedata
    we have it enabled

  • [PATCH] Add an option to disable openssl support
    we have it enabled

  • [PATCH] Add options to disable zlib, bzip2 and xz modules
    we have it enabled, besides bzip2:host even we require it as dep at :host ? So if we build it for host we can drop the patch or we do not build it and do not require bzip2:host at all ?

  • [PATCH] Add an option to disable uuid module
    we do not use the option

  • [PATCH] fix building on older distributions

fixes building on older systems such as CentOS7, that only come
with python 2

do we need this ? it is 2022 and Centos7 does not matter for us

  • [PATCH] configure.ac: fixup $CC --print-multiarch output for musl/uclibc GCC 8+ toolchains
    i think it is musl specific ?

  • [PATCH] Add an option to disable the berkeleydb module
    we do not use the option

  • [PATCH] lib/crypt: uClibc-ng doesn't set errno when encryption method is not available
    i think it is musl specific ?

overall there are a lot stuff included that should be up streamed for ages :(
Likewise nobody cares at buildroot to do it

@heitbaum
Copy link
Contributor Author

heitbaum commented Nov 3, 2022

overall there are a lot stuff included that should be up streamed for ages :( Likewise nobody cares at buildroot to do it

I would prefer to take the patches we actually want / need. As it was a bit of a pain rebasing it as it was… but that being said either / or …

Also should we leave it as a single build root patch, or separate into the [?] patches we actually want, and add a note/readme in the commit of which patches weren’t worthy of inclusion.

@CvH
Copy link
Member

CvH commented Nov 3, 2022

Please split them, easier to maintain

@heitbaum
Copy link
Contributor Author

heitbaum commented Nov 4, 2022

@CvH - Latest update.

patches split apart.

see my comments on the “rebased patches” as in that we use at least 7-8 of the 11.
pretty sure 0029 is not required.
0027 - I’m not 100% sure.

  • 6a00e29baae9083e411fc3a68dbff3e69030df44 is a direct copy of the buildroot Python 3.10.8 patches
  • 32e944b037ec89b880fde5288eef5062fc73fd77 is the patches rebased against Python 3.11.0
    • patches rebased
      • 0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch
      • 0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch ** we use this
      • 0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch ** we probable use this
      • 0011-Add-an-option-to-disable-pydoc.patch ** we use this
      • 0012-Add-an-option-to-disable-lib2to3.patch
      • 0013-Add-option-to-disable-the-sqlite3-module.patch ** we use this
      • 0014-Add-an-option-to-disable-the-tk-module.patch ** we use this
      • 0016-Add-an-option-to-disable-expat.patch ** we use this
      • 0020-Add-an-option-to-disable-IDLE.patch
      • 0021-Add-an-option-to-disable-decimal.patch ** we use this
      • 0022-Add-an-option-to-disable-the-ossaudiodev-module.patch ** we use this
    • patches dropped
      • 0027-Fix-cross-compiling-the-uuid-module.patch
      • 0029-fix-building-on-older-distributions.patch

@HiassofT
Copy link
Member

HiassofT commented Nov 6, 2022

Runtime testing on RPi4 looks good so far - I only use very few addons though

@fuzzard
Copy link

fuzzard commented Nov 9, 2022

Just a heads up, may want to keep an eye on this PR at cpython python/cpython#99268

It aims to fix what looks to be a pretty large memleak that will probably add up on devices that stay on (eg media centres)

Memleak issue is python/cpython#99205

From kodi perspective, I'll probably patch our builds with this rather than wait for 3.11.1, but your timing is obviously different to Kodi release I've got scheduled

@SupervisedThinking
Copy link
Contributor

@heitbaum please add python/cpython#99301 to the PR

@heitbaum
Copy link
Contributor Author

Thanks @fuzzard / @SupervisedThinking - added

@CvH
Copy link
Member

CvH commented Nov 10, 2022

what about the lib2to3 patch ?
so remove it or disable py2-py3 (I think we do not need this at all because everything is py3 these days)

so keep the patch and disable lib2to3 ?

@heitbaum
Copy link
Contributor Author

Done - I have set --disable-lib2to3

@CvH
Copy link
Member

CvH commented Nov 12, 2022

GTG? Still wip

@heitbaum
Copy link
Contributor Author

Squashed the commits. Dropped WIP Tag.
GTG from my perspective.

@HiassofT HiassofT merged commit f3f89e8 into LibreELEC:master Nov 12, 2022
@heitbaum heitbaum deleted the Python3 branch November 12, 2022 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants