gh-109395: Remove skipped coverage job from Azure Pipelines (GH-109412)
(cherry picked from commit fa493900fb)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-109219: propagate free vars through type param scopes (GH-109377)
(cherry picked from commit 909adb5092)
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423)
Use a longer key: FIPS mode requires at least of at least 112 bits.
The previous key was only 32 bits.
(cherry picked from commit e091b9f20f)
Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-60283: Check for redefined test names in CI (GH-109161)
(cherry picked from commit 3cb9a8edca)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Update exclude list for 3.12
* Explicitly exclude files which failed to lint/parse
* Sort to avoid future merge conflicts
---------
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Fix variable name in dis documentation example (GH-109343)
BINARY_SUBSCR example erroneously uses two different names `key` and `index` to refer to the same variable. STORE_SUBSCR and DELETE_SUBSCR use only `key` in the same context. Changing `index` to `key` for consistency.
(cherry picked from commit a0c06a4f93)
Co-authored-by: Oleksandr Kravets <73752159+olekskrav@users.noreply.github.com>
gh-105189: fix importlib.resources.abc deprecation docs (GH-105232)
(cherry picked from commit 6c0ddca409)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360)
Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex:
Fedora 38). Search patterns in gdb "bt" command output to detect
when gdb fails to retrieve the traceback. For example, skip a test if
"Backtrace stopped: frame did not save the PC" is found.
(cherry picked from commit 44d9a71ea2)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-109357: Fix test_monitoring.test_gh108976() (GH-109358)
The test now calls free_tool_id() so it can be run multiple times in
the same process. For example, the following command no longer fails:
python -m test test_monitoring -R 3:3
(cherry picked from commit 388d91cd47)
Co-authored-by: Victor Stinner <vstinner@python.org>
Update workflow permissions in require-pr-label Action (GH-109342)
Change the permission from `read` to `write`.
(cherry picked from commit 44c8699196)
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
GH-104395: Add a link in 'Meta Information' to the docs download page (GH-104443)
(cherry picked from commit 90cf345ed4)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Fix iter_index() to work with lists which do not support stop=None. (gh-109306)
(cherry picked from commit f2a55fecd0)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
gh-109295: Fix test_os.test_access_denied() for TEMP=cwd (GH-109299)
Fix test_os.test_access_denied() when the TEMP environment variable
is equal to the current working directory. Run the test using a
different filename, since self.fname already exists in this case.
(cherry picked from commit 7dedfd36dc)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-109295: Clean up multiprocessing in test_asyncio and test_compileall (GH-109298)
test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
(cherry picked from commit 09ea4b8706)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-109292: add symtable impact of PEP 709 to What's New (GH-109293)
(cherry picked from commit 2b1e2f1cd1)
Co-authored-by: Carl Meyer <carl@oddbird.net>
gh-109195: fix source location for super load before LOAD_SUPER_ATTR (GH-109289)
(cherry picked from commit ceeb4173ae)
Co-authored-by: Carl Meyer <carl@oddbird.net>
gh-90805: Make sure test_functools works with and without _functoolsmodule (GH-108644)
(cherry picked from commit baa6dc8e38)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
gh-109190: What's New in 3.12: Add subheadings to removals for easy linking (GH-109159)
(cherry picked from commit 57b6205523)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-109230: test_pyexpat no longer depends on the current directory (GH-109233)
Fix test_pyexpat.test_exception(): it can now be run from a directory
different than Python source code directory. Before, the test failed
in this case.
Skip the test if Modules/pyexpat.c source is not available. Skip also
the test on Python implementations other than CPython.
(cherry picked from commit e55aab9578)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-109237: Fix test_site for non-ASCII working directory (GH-109238)
Fix test_site.test_underpth_basic() when the working directory
contains at least one non-ASCII character: encode the "._pth" file to
UTF-8 and enable the UTF-8 Mode to use UTF-8 for the child process
stdout.
(cherry picked from commit cbb3a6f8ad)
Co-authored-by: Victor Stinner <vstinner@python.org>
Improve the sieve() recipe in the itertools docs (gh-109199)
Lazier sieve
(cherry picked from commit d3ed9921cd)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Fix an ironic typo in a code comment. (gh-109186)
(cherry picked from commit 75cd86599b)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* gh-109118: Fix runtime crash when NameError happens in PEP 695 function (#109123)
(cherry picked from commit 17f994174d)
* [3.12] gh-109118: Fix runtime crash when NameError happens in PEP 695 function (GH-109123).
(cherry picked from commit 17f994174d)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
GH-109067: fix randomly failing `test_async_gen_asyncio_gc_aclose_09` test (GH-109142)
Use `asyncio.sleep(0)` instead of short sleeps.
(cherry picked from commit ccd48623d4)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
gh-109022: [Enum] require `names=()` to create empty enum type (GH-109048)
add guard so that ``Enum('bar')`` raises a TypeError instead of
creating a new enum class called `bar`. To create the new but
empty class, use:
huh = Enum('bar', names=())
(cherry picked from commit c74e440168)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Add version directives to ast docs (GH-108788)
(cherry picked from commit 74fc96bc60)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
gh-68403: Fix test_coverage in test_trace (GH-108910)
Its behavior no longer affected by test running options such as -m.
(cherry picked from commit 7e1a7abb98)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-75743: Restore test_timeout.testConnectTimeout() (GH-109087)
This un-skips this test now that pythontest.net implements appropriate firewall
rules for it.
(cherry picked from commit 1829a3c9a3)
Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
gh-107924: re-order os.sendfile() flag documentation (GH-107926)
(cherry picked from commit 403ab1306a)
Co-authored-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-102823: Document return type of floor division on floats (GH-102824)
(cherry picked from commit b72251de93)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
socket documentation fix - rename triple to 3-tuple (GH-24722)
(cherry picked from commit 6b15ff5235)
Co-authored-by: Ori Hoch <ori@uumpa.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-71770: Add more details on behavior of configparser's default_section (GH-31562)
(cherry picked from commit 891236f482)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
bpo-38157: Add example about per file output for mock_open. (GH-16090)
(cherry picked from commit e183a71eef)
Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-103186: Suppress and assert expected RuntimeWarnings in test_sys_settrace (GH-103244)
Caused as a result of frame manipulation where locals are never assigned / initialised.
(cherry picked from commit 3e53ac9903)
Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>