Commit Graph

223 Commits

Author SHA1 Message Date
Peter Marko
5ae239f8ea python3: patch CVE-2025-12084
Pick patch from 3.12 branch according to [1].

[1] https://nvd.nist.gov/vuln/detail/CVE-2025-12084

(From OE-Core rev: c3ed0dfa3a7b8716008968b0d7f80885b2f61a84)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2026-01-26 09:45:38 +00:00
Praveen Kumar
792947d444 python3: fix CVE-2025-6075
If the value passed to os.path.expandvars() is user-controlled a
performance degradation is possible when expanding environment variables.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-6075

Upstream-patch:
9ab89c026a

(From OE-Core rev: 5313fa5236cd3943f90804de2af81358971894bc)

Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-12-05 07:13:42 -08:00
Peter Marko
2e5bb26c2c python3: upgrade 3.12.11 -> 3.12.12
Drop upstreamed patch and refresh remaining patches.

Release information:
* https://www.python.org/downloads/release/python-31212/
* The release you're looking at is Python 3.12.12, a security bugfix
  release for the legacy 3.12 series.

Handles CVE-2025-59375.

(From OE-Core rev: f1234b8451ba843b5f9ec1d2066c21f54d6bc3b8)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-24 06:23:40 -07:00
Peter Marko
6d83b872af python3: patch CVE-2025-8194
Pick commit from 3.12 branch mentioned in NVD report.
https://nvd.nist.gov/vuln/detail/CVE-2025-8194

(From OE-Core rev: 34f1b4877a0601d2057453c159c76a54754f229a)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Peter Marko
c4f82e3fd5 python3: upgrade 3.12.9 -> 3.12.11
Drop upstreamed patch and refresh remaining patches.

* https://www.python.org/downloads/release/python-31210/

  Python 3.12.10 is the latest maintenance release of Python 3.12, and
  the last full maintenance release. Subsequent releases of 3.12 will be
  security-fixes only.

* https://www.python.org/downloads/release/python-31211/

  Security content in this release
  * gh-135034: [CVE 2024-12718] [CVE 2025-4138] [CVE 2025-4330]
    [CVE 2025-4435] [CVE 2025-4517] Fixes multiple issues that allowed
    tarfile extraction filters (filter="data" and filter="tar") to be
    bypassed using crafted symlinks and hard links.
  * gh-133767: Fix use-after-free in the “unicode-escape” decoder with a
    non-“strict” error handler.
  * gh-128840: Short-circuit the processing of long IPv6 addresses early
    in ipaddress to prevent excessive memory consumption and a minor
    denial-of-service.

gh-133767 got meawhile CVE-2025-4516 assigned.

(From OE-Core rev: 6cca08b2857efd5481e837ecd6bb295cb8a99ee1)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-06-13 08:58:01 -07:00
Peter Marko
c9c3355836 python3: upgrade 3.12.8 -> 3.12.9
Release notes:
https://docs.python.org/release/3.12.9/whatsnew/changelog.html#python-3-12-9

Solves CVE-2025-0938, CVE-2024-12254 and 3 other vulnerabilities without
CVE number assigment.

Add a patch to fix failure of a new test.

(From OE-Core rev: 685b2719ae9b44c238e63942efabe52e5df7d640)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-02-14 06:38:54 -08:00
Guðni Már Gilbert
321943e627 python3: upgrade 3.12.7 -> 3.12.8
Changelog:
https://docs.python.org/release/3.12.8/whatsnew/changelog.html#python-3-12-8

(From OE-Core rev: db5081254adacf6c87269fd43af7199267ad535c)

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-01-09 06:25:36 -08:00
Guðni Már Gilbert
a7abc52998 python3: upgrade 3.12.6 -> 3.12.7
Changelog:
https://docs.python.org/release/3.12.7/whatsnew/changelog.html#python-3-12-7

(From OE-Core rev: 197048667f69ed559baf54831eb7b1606320f3e8)

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-01-09 06:25:36 -08:00
Ross Burton
c75016dcf3 python3: add dependency on -compression to -core
importlib.metadata is part of -core, but that will import zipfile which
is part of -compression.

Obviously this shows that our packaging of the Python modules is not
optimal.  I plan to follow up with a redesign of the splitting which
focuses on simply pulling out the larger or esoteric modules and
having a more featureful core.

(From OE-Core rev: 05166eafb99cf8c7adb6879277069ab384a2f8df)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-12-23 05:46:32 -08:00
Khem Raj
a56d901283 python3: Drop empty patch
The fix brought by this patch is already part of python 3.12.3
therefore drop it.

(From OE-Core rev: 555623d2378138fdcfae95c04e06ba384cebab5b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-12-23 05:46:32 -08:00
Peter Marko
d7249c50ec python3: Upgrade 3.12.5 -> 3.12.6
Includes security fixes for CVE-2024-7592, CVE-2024-8088, CVE-2024-6232,
CVE-2023-27043 and other bug fixes.

Removed below patches, as the fix is included in 3.12.6 upgrade:
1. CVE-2024-7592.patch
2. CVE-2024-8088.patch

Release Notes:
https://www.python.org/downloads/release/python-3126/

(From OE-Core rev: aa492b1fd5973c37b8fa2cd17d28199eba46afcc)

(From OE-Core rev: 6688a8ff2e1cbf6ad8ebd1b89ec6c929caf6a161)

Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-25 05:07:47 -07:00
Trevor Gamblin
b9a2619bc8 python3: skip readline limited history tests
Python 3.12.5 is failing a newer ptest for reading/writing limited
history when editline (default) is set in PACKAGECONFIG. Skip it for now
until a proper fix (if any) is determined.

A bug has been opened upstream: https://github.com/python/cpython/issues/123018

(From OE-Core rev: de569ddffd5ea36b70c56df21dec9c892e5dee7d)

(From OE-Core rev: 98b3a3e3f79a3edaa4cf2cfbf58eb84553d65e1e)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-25 05:07:47 -07:00
Soumya Sambu
31ea437bf7 python3: Fix CVE-2024-8088
There is a HIGH severity vulnerability affecting the CPython "zipfile"
module. When iterating over names of entries in a zip archive (for example,
methodsof "zipfile.ZipFile" like "namelist()", "iterdir()", "extractall()",
etc) the process can be put into an infinite loop with a maliciously crafted
zip archive. This defect applies when reading only metadata or extracting
the contents of the zip archive. Programs that are not handling
user-controlled zip archives are not affected.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-8088

Upstream-Patch:
7ae310c56a

(From OE-Core rev: 2d98276ba70ed6c44afecd42a7352f1b3030438f)

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-09 06:08:10 -07:00
Soumya Sambu
9541ad9650 python3: Fix CVE-2024-7592
There is a LOW severity vulnerability affecting CPython, specifically the
'http.cookies' standard library module. When parsing cookies that contained
backslashes for quoted characters in the cookie value, the parser would use
an algorithm with quadratic complexity, resulting in excess CPU resources
being used while parsing the value.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-7592

Upstream-Patch:
dcc3eaef98

(From OE-Core rev: 3bb9684eef5227e7b1280ee9051884310b0d0b7f)

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-09 06:08:10 -07:00
Alexander Kanavin
64ac9fa408 python3: submit deterministic_imports.patch upstream as a ticket
(From OE-Core rev: eb3868d99ef2d5fa9fafc9cf947209d81ab5f11f)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d77511cc9add70857e4a9d7237b23d7d6ae14e98)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-08-01 06:08:09 -07:00
Trevor Gamblin
754724ec73 python3: skip test_multiprocessing/test_active_children test
This test is causing problems on the Autobuilder, so disable it for now.

(From OE-Core rev: 9eafd0c56b279a7c3025b0dcd00745baead15bb6)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ac000b00ec615b3e51dda8d819015d5e7110ed88)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-08-01 06:08:09 -07:00
Trevor Gamblin
a28f4c97b3 python3: skip test_concurrent_futures/test_deadlock
These tests are causing hangs on the Autobuilder, so disable them for
now.

(From OE-Core rev: 141c348ce83552beae88e115d9c4db5802c6e0f4)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 291f37808f1a2b2fdc8190696867f974994457c0)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-08-01 06:08:09 -07:00
Khem Raj
8a203e0f2a python3: Treat UID/GID overflow as failure
This fixes ptest failures on 32bit architectures

AssertionError:
Failed ptests:
{'python3': ['test_extractall_none_gid',
             'test_extractall_none_gname',
             'test_extractall_none_mode',
             'test_extractall_none_mtime',
             'test_extractall_none_uid',
             'test_extractall_none_uname',
             'setUpClass',
             'python3']}

(From OE-Core rev: 371124fa4bf1a255a4fc646b028398db8c9f3681)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 43104b547cb79693c83df0882773ae8dd74b1d35)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-08-01 06:08:09 -07:00
Trevor Gamblin
c4a4246f79 python3: skip test_concurrent_futures/test_shutdown
These tests are causing hangs on the Autobuilder, so disable them for
now.

(From OE-Core rev: e3b4a05f19e3ba8f84b5d892b787e67bef565e48)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-05-09 04:45:06 -07:00
Trevor Gamblin
6cbe62a0ce python3: upgrade 3.12.2 -> 3.12.3
Remove the following patch:

0001-gh-115133-Fix-tests-for-XMLPullParser-with-Expat-2.6.patch

Which a different fix was submitted for in:

c4fa79b924 [3.12] gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164) (GH-115288)
See: https://github.com/python/cpython/pull/115288
(related to CVE-2023-52425)

Changelog: https://docs.python.org/3/whatsnew/changelog.html#python-3-12-3-final

(From OE-Core rev: 4122d8f6ecf6957de7a34fc51beffcd8e808911f)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-14 06:28:02 +01:00
Alejandro Hernandez Samaniego
ab02ac1b27 python3-manifest: Sync RDEPENDS with latest version
bitbake python3 -c create_manifest revealed several changes that were missing.

This commit contains a manual cherry-picked version of those, making sure that
new RDEPENDS are reflected since the last time this was updated.

In this case its taking out unnecessary dependencies to python3-profile and
python3-shell.

(From OE-Core rev: 692013b9aa5106561afb4c6506661bab41d88461)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-22 16:25:08 +00:00
Wang Mingyu
2aa2b6b987 python3: upgrade 3.12.1 -> 3.12.2
0001-Avoid-shebang-overflow-on-python-config.py.patch
0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
0001-gh-114492-Initialize-struct-termios-before-calling-t.patch
0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
0001-skip-no_stdout_fileno-test-due-to-load-variability.patch
0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch
0020-configure.ac-setup.py-do-not-add-a-c
refreshed for 3.12.2

Changelog:
 https://docs.python.org/3.12/whatsnew/3.12.html

(From OE-Core rev: 288bdc342035f18451509b6c27e3b88b546dc984)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01 09:28:52 +00:00
Ross Burton
54f660a5f6 python3: move dataclasses to python3-core
For some reason dataclasses was being packaged in the -profile subpackage,
which doesn't make sense as this is a core piece of the runtime support.

(From OE-Core rev: bc17d33b30a6d5d970f390becf726e852fd0cc16)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15 09:18:09 +00:00
Khem Raj
277e65c3c8 python3: Fix ptests with expat 2.6+
(From OE-Core rev: a19af24fc910bbfc39c863e3252770aa9975de5b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 23:14:51 +00:00
Khem Raj
cda5907daf python3: Initialize struct termios before calling tcgetattr()
Fixes ptest failures on python 3.12

    Failed ptests:
    {'python3': ['test_tcgetattr',
                 'test_cfmakeraw',
                 'test_setcbreak',
                 'test_setraw',
                 'python3']}

(From OE-Core rev: 515e7cf61c4ce5f6d572562ec851f01dade5cca0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 08:20:03 +00:00
Alexander Kanavin
78e30d940d python: update 3.11.5 -> 3.12.1
Drop distutils and smtpd modules from packaging, as both are gone in 3.12.

Rebase:
0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
(drop setup.py chunk as the file is gone)

Drop patches:
0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
(setup.py gone, lib/termcap not mentioned anywhere else)

0001-Don-t-search-system-for-headers-libraries.patch
(setup.py gone, usr/lib64 not mentioned anywhere else)

0001-Makefile-do-not-compile-.pyc-in-parallel.patch
(replaced with COMPILEALL_OPTS= in EXTRA_OEMAKE)

0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch
(setup.py gone, add_multiarch_paths not mentioned anywhere else)

0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
(has been superseded by Setup.local tweak in do_configure:prepend)

12-distutils-prefix-is-inside-staging-area.patch
(distutils has been removed upstream, so this old, unplesant hack can be finally dropped)

avoid_warning_about_tkinter.patch
(setup.py gone, tkinter detection logic performed in configure.ac)

(From OE-Core rev: 716d82352545d3667a658b69d65d6127678dd150)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-19 12:21:22 +00:00
Trevor Gamblin
eea4746ef5 python3-ptest: skip test_storlines
[YOCTO #14933]

test_storlines is yet another Python ptest that fails intermittently on
the Yocto AB, so disable it during ptests for now.

(From OE-Core rev: d7b9f8157e6214a83b5495e8a32e11540ae65ff8)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-30 08:43:04 +00:00
Alexandre Belloni
857c2468b9 python3: fix SoB on patch
(From OE-Core rev: 03a90095f5c1977a78f1a4ce568b793ebabfb281)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-28 12:37:46 +01:00
Trevor Gamblin
bcc187a900 python3-ptest: skip test_input_no_stdout_fileno
[YOCTO #15210]

test_input_no_stdout_fileno has been seen failing on AB workers under
heavy load. Skip it while leaving the rest of the test_builtin suite
alone.

(From OE-Core rev: cf8927737690bf21dd3fb57474e09b71078e354c)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 08:57:26 +01:00
Khem Raj
13be32f883 python3: Fix ptests on musl
Adjust locale dependencies to help run tests sadly, tr-tr is not
available yet in musl-locale so keep that specific to glibc

Add an exclusion list for tests and populate it for musl for the failing
tests

(From OE-Core rev: db76ac9968ceddc01e48069dbacc212eb4f88574)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-04 20:14:14 +01:00
Trevor Gamblin
e56b895866 python3: add additional timing-related test skips
The following tests have been seen failing intermittently on the
autobuilder:

test.test_multiprocessing_forkserver.WithManagerTestBarrier.test_timeout
test.test_time.TimeTestCase.test_thread_time

Since these could be affected by AB systems under heavy load, disable
them. New test outputs:

test_timeout (test.test_multiprocessing_fork.WithProcessesTestBarrier.test_timeout)
SKIP: Test wait(timeout) 'timing related test, dependent on load'
...
SKIP: test_thread_time (test.test_time.TimeTestCase.test_thread_time) 'timing related test, dependent on load'

[YOCTO # 15131]
[YOCTO # 15177]

(From OE-Core rev: 4da3b653e0fad52e7af97328b49e40d5179ddfe5)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-10 09:18:53 +01:00
Trevor Gamblin
e7183e5099 python3: ensure ptest regression capture
Add a conditional echo statement to make sure that there is a
FAIL emitted when python3 ptests regress in a way sed doesn't
catch.

(From OE-Core rev: 2100c588863b9da64ea8f2eb6be4ff445e26b5f0)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-21 11:52:26 +01:00
Trevor Gamblin
3937a63cbb python3: parallelize ptests, add test_cppext dependencies
This is based on a previous patch from Alex Kanavin (thanks Alex),
but it retains our use of sed to parse the test output into a usable
form. The intent was to use the test module's --junit-xml feature and
parse the resulting log instead of using sed, but various errors were
encountered when testing this method, so that will need further
investigation before we can consider adopting it. Two missing ptest
dependencies on python3-cgitb and python3-zipapp were already merged
in a previous patch, so only gcc, g++, and binutils were left to add
as ptest RDEPENDS.

ptest output and runtime with this change:

== Tests result: SUCCESS ==

405 tests OK.

29 tests skipped:
    test_asdl_parser test_check_c_globals test_clinic test_curses
    test_devpoll test_gdb test_idle test_ioctl test_kqueue
    test_launcher test_msilib test_ossaudiodev test_readline
    test_smtpnet test_socketserver test_startfile test_tcl test_tix
    test_tk test_ttk_guionly test_ttk_textonly test_turtle
    test_urllib2net test_urllibnet test_winconsoleio test_winreg
    test_winsound test_xmlrpc_net test_zipfile64

Total duration: 5 min 3 sec

[YOCTO #13298]

(From OE-Core rev: 50a719d3002a4119e8b2be43aec8fe01aa0c2a40)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:05 +01:00
Ross Burton
f622013d3f python3: fix missing comma in get_module_deps3.py
Wes Tarro <wes.tarro@azuresummit.com> noticed a missing comma in a
preplace() call, add it.

That said, calling replace() with one argument results in a TypeError,
so this is obviously dead code.

(From OE-Core rev: 9b2e2c8d809e7ca34451ec9702b029a00dfb410b)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Alexander Kanavin
a9c96819fb python3: update 3.11.3 -> 3.11.4
(From OE-Core rev: f7f163ebe8c53de4314d04595c1fbcc7af2deccc)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-27 16:23:40 +01:00
Alexander Kanavin
4823710cbd python3: upgrade 3.11.2 -> 3.11.3
(From OE-Core rev: 7d5bb3a4690ef61a1fee21773b4717e829789e32)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-16 15:40:11 +01:00
Bartosz Golaszewski
70f38fa6a7 python3-manifest: turtle: new package
Extend the manifest with definitions for the turtle package from the
Python standard library. Currently this package cannot be imported at
run-time because python3-misc doesn't pull the required dependencies.

(From OE-Core rev: 09476b2be0c8a155dc6494442cc3caca97782595)

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-22 10:53:49 +01:00
Bartosz Golaszewski
7640c4b578 python3-manifest: zipapp: new package
Extend the manifest with definitions for the zipapp package from the
Python standard library. Currently this package cannot be imported at
run-time because python3-misc doesn't pull the required dependencies.

(From OE-Core rev: 30186af3a3c46d9349940d952a0d8d1826b0dd4a)

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-22 10:53:49 +01:00
Bartosz Golaszewski
ed4ddd6619 python3-manifest: cgitb: new package
Extend the manifest with definitions for the cgitb package from the
Python standard library. Currently this package cannot be imported at
run-time because python3-misc doesn't pull the required dependencies.

(From OE-Core rev: b9428ccad6238e33dc7bb344e06f4f8cf73b2ef8)

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-22 10:53:49 +01:00
Bartosz Golaszewski
a3ff0f2d4b python3-manifest: add ensurepip
Add the pip bootstrapping module from the standard library to the
manifest. This module is a run-time requirement of python3-build.

(From OE-Core rev: 7013ddda8f249377c00bc4efb40c34dd5fcfe15a)

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-14 16:44:24 +01:00
Bartosz Golaszewski
28b08e55b3 python3-manifest: add tomllib
Add the TOML parsing module from the standard library to the manifest.

(From OE-Core rev: b6f2ca4713447710f5ce29261d1009c3574af721)

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-14 16:44:24 +01:00
Wentao Zhang
66f7944f9e python3: Fix failing sysconfig.py test on x86(64 bit) using lib64 as baselib by updating test_sysconfig for posix_user purelib
Steps to trigger the failed test:
Edit local.conf to add something as follows:
    BASELIB = "lib64"
    IMAGE_INSTALL:append = " python3-tests".
bitbake core-image-sato
runqemu qemux86-64 nographic slirp
Reproducer:
    $python3 -m test test_sysconfig

sysconfig.py use platlibdir for purelib. Update
test_sysconfig.test_user_similar() for the posix_user
scheme: "purelib" doesn't use sys.platlibdir.

(From OE-Core rev: 755321362e994a6a37a0f554b1aea56823de924e)

Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-03 11:39:59 +01:00
Ross Burton
7c171f9493 python3: add missing -modules dependencies
The python3-modules package should depend on zoneinfo, and gdbm if it
was enabled.

(From OE-Core rev: 0e0a5a635f44931dd490ae6a99548f05bd5205a8)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-21 22:42:04 +00:00
Alexander Kanavin
61be0742be python3: upgrade 3.11.1 -> 3.11.2
License-Update: copyright years

(From OE-Core rev: fc04712bb3fd0a7bbb8d7102a2ffe686e448d6bb)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-20 15:18:30 +00:00
Alexander Kanavin
bbb4d65500 Revert "python3-native: further tweak to sysconfig.py to find python includes correctly"
Unfortunately, sysconfig is used by:
- setuptools to find out where to install new headers
- autoconf-archive to find where Python.h is

In the first case we want the target location, in the second case we want
the sysroot location. The second case is not yet used in the wild
(as projects such as gpgpme are using outdated distutils-based m4 macros),
but it will become a problem once python 3.12 is out, and
said projects are forced to migrate to sysconfig. Let's deal with it
then in a more careful manner, and hopefully convince upstream that
there is a general problem too.

(From OE-Core rev: 499b152bf63749be18fc252978a6cc632254b325)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-28 23:59:56 +00:00
Alexander Kanavin
715a25b1f1 python3: update 3.11.0 -> 3.11.1
Drop 0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch:
the patch has been rejected upstream (see the bug), and does quite a
bit more than just fix the mips softfloat problem. If the problem
still exists, then the fix needs to be re-done, and re-submitted.

The other two patches have been merged upstream.

License-Update: http->https

(From OE-Core rev: 9b6e8c173162798428cf8627b596ca81cd8ab855)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-28 23:59:55 +00:00
Alexander Kanavin
9ff39e1db8 python3-native: further tweak to sysconfig.py to find python includes correctly
Without this, sysconfig would report the target location, which is not
what we want in cross-builds. This is used in particular by
latest autoconf-archive m4 macros, which have migrated from
(removed in py 3.12) distutils to setuptools.

(From OE-Core rev: df8303ab2f0ca4b694b845016c8d7e0279a48fe7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-26 18:49:07 +00:00
Alexander Kanavin
af4284d39d python3targetconfig.bbclass: use PYTHONPATH to point to the target config
There is no need to patch native python so that it looks in the target
sysroot; the same can be achieved with just an environment variable.

(From OE-Core rev: c9617c03bceee54dc540318cada392799b137bd5)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-07 14:56:54 +00:00
Alexander Kanavin
990af746c2 python3: use the standard shell version of python3-config
There is really no reason why we can't: it only needs to be available
in two versions (native/target), and the correct one can be picked
via PATH priority order.

This eliminates two un-upstreamable patches, one of which relies
on soon to be removed distutils.

(From OE-Core rev: d0145ead0f80ba4bde8e24617a8725f38eda8339)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-07 14:56:54 +00:00
Alexander Kanavin
b0351d6172 python3: fix tests on x86 (32 bit)
(From OE-Core rev: 8de9d28a57cae405dd76aa2bca7a81507718817d)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-05 22:28:13 +00:00