summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-100809: Fix handling of drive-relative paths in pathlib.Path.absolute() ↵Barney Gale2023-02-174-1/+64
| | | | | (GH-100812) Resolving the drive independently uses the OS API, which ensures it starts from the current directory on that drive.
* gh-101360: Fix anchor matching in pathlib.PureWindowsPath.match() (GH-101363)Barney Gale2023-02-174-8/+13
| | | | Use `fnmatch` to match path and pattern anchors, just as we do for other path parts. This allows patterns such as `'*:/Users/*'` to be matched.
* gh-101766: Fix refleak for _BlockingOnManager resources (gh-101942)Dong-hee Na2023-02-171-0/+5
|
* Docs: fix typos in PyFunction_WatchCallback docs and in 3.12 NEWS (GH-101980)Yeojin Kim2023-02-172-2/+2
| | | | - possitibility => possibility - disaallowed => disallowed
* gh-101973: Fix parameter reference for PyModule_FromDefAndSpec (#101976)Oleg Iarygin2023-02-171-2/+2
|
* gh-101758: Fix Refleak-Related Failures in test_singlephase_variants (gh-101969)Eric Snow2023-02-171-1/+13
| | | | | gh-101891 is causing failures under `$> ./python -m test test_imp -R 3:3`. Furthermore, with that fixed, "test_singlephase_variants" is leaking references. This change addresses the first part, but skips the leaking tests until we can follow up with a fix. https://github.com/python/cpython/issues/101758
* gh-101758: Add _PyState_AddModule() Back for the Stable ABI (gh-101956)Eric Snow2023-02-165-0/+31
| | | | | | | We're adding the function back, only for the stable ABI symbol and not as any form of API. I had removed it yesterday. This undocumented "private" function was added with the implementation for PEP 3121 (3.0, 2007) for internal use and later moved out of the limited API (3.6, 2016) and then into the internal API (3.9, 2019). I removed it completely yesterday, including from the stable ABI manifest (where it was added because the symbol happened to be exported). It's unlikely that anyone is using _PyState_AddModule(), especially any stable ABI extensions built against 3.2-3.5, but we're playing it safe. https://github.com/python/cpython/issues/101758
* GH-96764: rewrite `asyncio.wait_for` to use `asyncio.timeout` (#98518)Kumar Aditya2023-02-164-79/+133
| | | Changes `asyncio.wait_for` to use `asyncio.timeout` as its underlying implementation.
* gh-99942: correct the pkg-config/python-config flags for cygwin/androidEli Schwartz2023-02-163-2/+4
|
* gh-101952: Fix possible segfault in `BUILD_SET` opcode (#101958)Eclips42023-02-163-0/+5
|
* gh-93573: Replace wrong example domains in configparser doc (GH-93574)sblondon2023-02-161-23/+23
| | | | | | | | * Replace bitbucket.org domain by forge.example * Update example to python.org * Use explicitly invalid domain topsecret.server.com domain is not controled by PSF. It's replaced by invalid topsecret.server.example domain. It follows RFC 2606, which advise .example as TLD for documentation.
* gh-101881: Support (non-)blocking read/write functions on Windows pipes ↵Rayyan Ansari2023-02-168-25/+107
| | | | | | | | | | | | (GH-101882) * fileutils: handle non-blocking pipe IO on Windows Handle erroring operations on non-blocking pipes by reading the _doserrno code. Limit writes on non-blocking pipes that are too large. * Support blocking functions on Windows Use the GetNamedPipeHandleState and SetNamedPipeHandleState Win32 API functions to add support for os.get_blocking and os.set_blocking.
* gh-101951: use textwrap.dedent in compiler tests to make them more readable ↵Irit Katriel2023-02-161-143/+145
| | | | | | | (GH-101950) Fixes #101951. Automerge-Triggered-By: GH:iritkatriel
* gh-101928: fix crash in compiler on multi-line lambda in function call (#101933)penguin_wwy2023-02-162-2/+13
|
* gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)Gregory P. Smith2023-02-1618-1493/+1310
| | | | | | | | | This merges their code. They're backed by the same single HACL* static library, having them be a single module simplifies maintenance. This should unbreak the wasm enscripten builds that currently fail due to linking in --whole-archive mode and the HACL* library appearing twice. Long unnoticed error fixed: _sha512.SHA384Type was doubly assigned and was actually SHA512Type. Nobody depends on those internal names. Also rename LIBHACL_ make vars to LIBHACL_SHA2_ in preperation for other future HACL things.
* gh-98627: Add an Optional Check for Extension Module Subinterpreter ↵Eric Snow2023-02-1615-19/+557
| | | | | | | | | | | | | | | Compatibility (gh-99040) Enforcing (optionally) the restriction set by PEP 489 makes sense. Furthermore, this sets the stage for a potential restriction related to a per-interpreter GIL. This change includes the following: * add tests for extension module subinterpreter compatibility * add _PyInterpreterConfig.check_multi_interp_extensions * add Py_RTFLAGS_MULTI_INTERP_EXTENSIONS * add _PyImport_CheckSubinterpIncompatibleExtensionAllowed() * fail iff the module does not implement multi-phase init and the current interpreter is configured to check https://github.com/python/cpython/issues/98627
* gh-101758: Fix the wasm Buildbots (gh-101943)Eric Snow2023-02-162-1/+15
| | | | | They were broken by gh-101920. https://github.com/python/cpython/issues/101758
* gh-101758: Add a Test For Single-Phase Init Modules in Multiple Interpreters ↵Eric Snow2023-02-155-4/+212
| | | | | | | (gh-101920) The test verifies the behavior of single-phase init modules when loaded in multiple interpreters. https://github.com/python/cpython/issues/101758
* gh-101758: Clean Up Uses of Import State (gh-101919)Eric Snow2023-02-1520-1072/+1476
| | | | | | | | | | | | | | | This change is almost entirely moving code around and hiding import state behind internal API. We introduce no changes to behavior, nor to non-internal API. (Since there was already going to be a lot of churn, I took this as an opportunity to re-organize import.c into topically-grouped sections of code.) The motivation is to simplify a number of upcoming changes. Specific changes: * move existing import-related code to import.c, wherever possible * add internal API for interacting with import state (both global and per-interpreter) * use only API outside of import.c (to limit churn there when changing the location, etc.) * consolidate the import-related state of PyInterpreterState into a single struct field (this changes layout slightly) * add macros for import state in import.c (to simplify changing the location) * group code in import.c into sections *remove _PyState_AddModule() https://github.com/python/cpython/issues/101758
* gh-99138: Isolate _zoneinfo (#99218)Erlend E. Aasland2023-02-156-213/+539
| | | | * Convert zone info type to heap type and add it to module state * Add global variables to module state
* gh-101819: Remove _PyWindowsConsoleIO_Type from the Windows DLL (GH-101904)Erlend E. Aasland2023-02-158-14/+29
| | | Automerge-Triggered-By: GH:erlend-aasland
* GH-87849: Fix refleak in SEND instruction. (GH-101908)Mark Shannon2023-02-152-0/+2
| | | Fix refleak in SEND instruction.
* gh-101819: Remove _testcapi dependencies on specific _io symbols (#101918)Erlend E. Aasland2023-02-152-12/+8
|
* gh-101693: In sqlite3, deprecate using named placeholders with parameters ↵Erlend E. Aasland2023-02-155-1/+59
| | | | supplied as a sequence (#101698)
* gh-99108: Build the hashlib HACL* code as a static library. (#101917)Gregory P. Smith2023-02-143-4/+34
| | | | | | This builds HACL* as a library in one place. A followup to #101707 which broke some WASM builds. This fixes 2/4 of them, but the enscripten toolchain in the others don't deduplicate linker arguments and error out. A follow-on PR will address those.
* gh-101758: Add a Test For Single-Phase Init Module Variants (gh-101891)Eric Snow2023-02-143-38/+660
| | | | | The new test exercises the most important variants for single-phase init extension modules. We also add some explanation about those variants to import.c. https://github.com/python/cpython/issues/101758
* gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)Irit Katriel2023-02-1413-73/+107
|
* GH-101898: Fix missing term references for hashable definition (#101899)Furkan Onder2023-02-1416-22/+22
| | | Fix missing term references for hashable definition
* gh-99108: Import SHA2-384/512 from HACL* (#101707)Jonathan Protzenko2023-02-1416-434/+1259
| | | | | | Replace the builtin hashlib implementations of SHA2-384 and SHA2-512 originally from LibTomCrypt with formally verified, side-channel resistant code from the [HACL*](https://github.com/hacl-star/hacl-star/) project. The builtins remain a fallback only used when OpenSSL does not provide them.
* gh-101857: Allow xattr detection on musl libc (#101858)Sam James2023-02-142-1/+3
| | | | | | | | | | Previously, we checked exclusively for `__GLIBC__` (AND'd with some other conditions). Checking for `__linux__` instead should be fine. This fixes using e.g. `os.listxattr()` on systems using musl libc. Bug: https://bugs.gentoo.org/894130 Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-74895: getaddrinfo no longer raises OverflowError (#2435)Radek Smejkal2023-02-145-6/+68
| | | `socket.getaddrinfo()` no longer raises `OverflowError` based on the **port** argument. Error reporting (or not) for its value is left up to the underlying C library `getaddrinfo()` implementation.
* gh-101849: Add upgrade codes for old versions of launcher that ended up with ↵Steve Dower2023-02-133-1/+23
| | | | later version numbers (GH-101877)
* gh-101810: Remove duplicated st_ino calculation (GH-101811)James Lee2023-02-131-2/+0
|
* gh-92547: Purge sqlite3_enable_shared_cache() detection from configure (#101873)Erlend E. Aasland2023-02-132-52/+0
|
* GH-100987: Refactor `_PyInterpreterFrame` a bit, to assist generator ↵Mark Shannon2023-02-131-4/+2
| | | | | improvement. (GH-100988) Refactor _PyInterpreterFrame a bit, to assist generator improvement.
* GH-87849: Simplify stack effect of SEND and specialize it for generators and ↵Mark Shannon2023-02-1315-99/+185
| | | | coroutines. (GH-101788)
* Correct trivial grammar in reset_mock docs (#101861)Steve Kowalik2023-02-131-3/+3
|
* gh-101845: pyspecific: Fix i18n for availability directive (GH-101846)Jean Abou-Samra2023-02-121-9/+11
| | | | | | | | | | pyspecific: Fix i18n for availability directive If the directive has content, the previous code would nest paragraph nodes from that content inside a general paragraph node, which confuses Sphinx and leads it to drop the content when translating. Instead, use a container node for the body. Also use set_source_info so that any warnings have location info.
* gh-89792: Limit test_tools freeze test build parallelism based on the number ↵Gregory P. Smith2023-02-122-6/+16
| | | | | of cores (#101841) unhardcode freeze test build parallelism. base it on the number of cpus, don't use more than max(2, os.cpu_count()/3).
* gh-85984: Utilize new "winsize" functions from termios in pty tests. (#101831)Soumendra Ganguly2023-02-122-69/+28
| | | | | | Utilize new functions termios.tcgetwinsize() and termios.tcsetwinsize in test_pty.py. Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-89792: Prevent test_tools from copying 1000M of "source" in freeze test ↵Gregory P. Smith2023-02-122-1/+16
| | | | | | | | | (#101837) Prevent test_tools from copying 1000M of "source" It doesn't need a git repo, just the checkout. We skip .git metadata, Doc/build, Doc/venv, and `__pycache__` subdirs, that developers often have in their clients to reduce the size of the source tree copy ten-fold. This should significantly reduce IO and presumably time on buildbots during this long test.
* Fix typo in test_fstring.py (#101823)mjoerg2023-02-111-1/+1
|
* GH-101797: allocate `PyExpat_CAPI` capsule on heap (#101798)Kumar Aditya2023-02-111-27/+45
|
* gh-101390: Fix docs for `imporlib.util.LazyLoader.factory` to properly call ↵busywhitespace2023-02-101-1/+1
| | | | it a class method (GH-101391)
* Docs: Fix getstatus() -> getcode() typos (#101296)Hugo van Kemenade2023-02-102-2/+2
|
* Docs: use parameter list for sqlite3.Cursor.execute* (#101782)Erlend E. Aasland2023-02-101-12/+33
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-101763: Update bundled copy of libffi to 3.4.4 on Windows (GH-101784)Steve Dower2023-02-103-3/+4
|
* gh-101517: make bdb avoid looking up in linecache with lineno=None (#101787)Irit Katriel2023-02-103-3/+11
|
* gh-101759: Update Windows installer to SQLite 3.40.1 (#101762)Erlend E. Aasland2023-02-104-3/+4
|
* gh-101277: Finalise isolating itertools (GH-101305)Erlend E. Aasland2023-02-104-344/+220
| | | | | Add repeat, islice, chain, tee, teedataobject, and batched types to module state. Automerge-Triggered-By: GH:erlend-aasland