diff --git a/dev-lang/python/patches/python3.10-3.10.17.patchset b/dev-lang/python/patches/python3.10-3.10.18.patchset similarity index 100% rename from dev-lang/python/patches/python3.10-3.10.17.patchset rename to dev-lang/python/patches/python3.10-3.10.18.patchset diff --git a/dev-lang/python/python3.10-3.10.17.recipe b/dev-lang/python/python3.10-3.10.18.recipe similarity index 93% rename from dev-lang/python/python3.10-3.10.17.recipe rename to dev-lang/python/python3.10-3.10.18.recipe index 2bce7f0c9..a23afdf0b 100644 --- a/dev-lang/python/python3.10-3.10.17.recipe +++ b/dev-lang/python/python3.10-3.10.18.recipe @@ -7,13 +7,20 @@ Python runs on Windows, Linux/Unix, Mac OS X, and has been ported to the Java \ and .NET virtual machines. Python is free to use, even for commercial products, because of its \ -OSI-approved open source license." +OSI-approved open source license. + +Note: to install \"pip\" for this Python version, use the following commands: + +> python3.10 -m ensurepip --default-pip +> python3.10 -m pip install --upgrade pip + +And then you should be able to use \"pip\" or \"pip3\" normally." HOMEPAGE="https://www.python.org" LICENSE="Python" -COPYRIGHT="1990-2024 Python Software Foundation" +COPYRIGHT="1990-2025 Python Software Foundation" REVISION="1" SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz" -CHECKSUM_SHA256="4c68050f049d1b4ac5aadd0df5f27941c0350d2a9e7ab0907ee5eb5225d9d6b0" +CHECKSUM_SHA256="ae665bc678abd9ab6a6e1573d2481625a53719bc517e9a634ed2b9fefae3817f" SOURCE_DIR="Python-$portVersion" pyShortVer="${portVersion%.*}" @@ -59,6 +66,9 @@ buildWithDebugInfo=true # Run all tests by default. Set to "true" to make "hp --test" only run then known failing tests. runOnlyKnownFailingTests=false +# Run only the tests that are generally excluded. Expect LOTS of hangs/crashes/etc. +runOnlyExcludedTests=false + # <<<[RECIPE OPTIONS] PROVIDES=" @@ -258,7 +268,7 @@ BUILD() --with-ensurepip=no \ --with-readline=editline \ --with-system-expat \ - --with-tzpath=$dataDir/zoneinfo + --with-tzpath=$(findpaths -c : B_FIND_PATH_DATA_DIRECTORY zoneinfo) # --with-lto # this one is too CPU/RAM intensive. # Uncomment when doing repeated builds (for testing different flags/options). @@ -361,6 +371,7 @@ TEST() local test_options=( # Use this to get same test order on different runs (actual value not important). + -r --randseed 7858065 # Print the names of the 10 slowest tests. @@ -393,21 +404,17 @@ TEST() # Many of the tests hang/stall. We have two options: # # 1- Manually remove the problematic test-cases. - # 2- Set a TIMEOUT. + # 2- Set a TIMEOUT (eg: --timeout=300). # # Option 1: Works, but requires manual identification/mainteinance. # # Option 2: Doesn't requires maintaining a list of stalling tests, but: - # - Causes errors at the end of the run: - # "unmounting failed: Device/File/Resource Busy" - # - Leaves dangling threads running when the tests timeout: - # "Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 2)" - # - The time it takes to run the full suite goes from 14 to 30+ minutes, + # at the end of the test run it causes: + # - "unmounting failed: Device/File/Resource Busy" errors, as there are + # dangling threads running when the tests timeout (requiring `killall python`) + # - The time it takes to run the full suite largely increases. # - # For Option 2, use: export EXTRATESTOPTS="--timeout=300" - # before calling "make $jobArgs test". - # - # Let's use Option 1, for now at least: + # Let's use Option 1, for now at least. # These hang reliably. -x test__xxsubinterpreters @@ -483,7 +490,9 @@ TEST() local -x LOGNAME=buildbot # this skips tests_tools/test_freeze, copied from Gentoo's ebuild - if $runOnlyKnownFailingTests; then + if $runOnlyExcludedTests; then + make $jobArgs test EXTRATESTOPTS="${test_options[*]} ${tests_to_exclude[*]}" + elif $runOnlyKnownFailingTests; then make $jobArgs test EXTRATESTOPTS="${test_options[*]} ${tests_that_fail[*]}" else # Runs the full test suite (minus the tests that we explicitly exclude). @@ -494,6 +503,6 @@ TEST() # Even the help for that function says to NOT use it, but some tests still do. # # If you find some strange "æ" suffix on temp dirnames, ej: - # "cwd: /sources/Python-3.10.12/build/test_python_10324æ" + # "cwd: /sources/Python-3.nn.nn/build/test_python_10324æ" # That's due to usages of os_helper.FS_NONASCII. }