summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.12] gh-105077: Fix test_tkinter refleak checking (GH-105078) (GH-105079)Miss Islington (bot)2023-05-301-5/+10
| | | | | Use specific symbols from `test.support` to avoid having `support` overwritten by `test_tkinter`'s own `support` submodule. (cherry picked from commit 5454db4ace66018179f034fbffcea8d791d66a98)
* [3.12] GH-89455: Add missing attributes (added in 3.11) to traceback module ↵Miss Islington (bot)2023-05-291-0/+2
| | | | | | | | docs (GH-105044) (#105066) GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044) (cherry picked from commit 39f6a0489fcc815a578d27dfee2feea003c896f8) Co-authored-by: Jakub Kuczys <me@jacken.men>
* gh-104803: Implement ntpath.isdevdrive for checking whether a path is on a ↵Miss Islington (bot)2023-05-292-0/+36
| | | | | | | Windows Dev Drive (GH-104805) (cherry picked from commit bfd20d257e4ad16a25f4bac0ea4dbb719cdf6bc7) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-105017: Include CRLF lines in strings and column numbers ↵Miss Islington (bot)2023-05-281-8/+36
| | | | | | | | | (GH-105030) (#105041) gh-105017: Include CRLF lines in strings and column numbers (GH-105030) (cherry picked from commit 96fff35325e519cc76ffacf22e57e4c393d4446f) Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.12] gh-105013: Fix inspect.getsource with parenthesized multiline lambdas ↵Miss Islington (bot)2023-05-283-0/+41
| | | | | | | | (GH-105021) (#105032) gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (GH-105021) (cherry picked from commit 3a5be878be6f89ee98d0ef9a1274e6a9d9ccbc37) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028)Miss Islington (bot)2023-05-271-1/+4
| | | | | | | | | | For test_widgets.MenuTest.test_configure_type, the options in the error message change to alphabetical order. --------- (cherry picked from commit 897e716d03d559a10dd5015ecb501ceb98955f3a) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-105017: Fix including additional NL token when using CRLF ↵Miss Islington (bot)2023-05-271-0/+8
| | | | | | | (GH-105022) (#105023) Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005) (#105006)Miss Islington (bot)2023-05-271-9/+8
| | | | | | | | | | gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005) Pass any ASAN_OPTIONS environment variable through to the child process so that leak sanitizer being disabled on our CI and buildbots stays true in the children. (cherry picked from commit a17f160376955d369c8d332e1b1a90a6e18c852a) Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* [3.12] gh-104976: Ensure trailing dedent tokens are emitted as the previous ↵Miss Islington (bot)2023-05-262-12/+8
| | | | tokenizer (GH-104980) (#105000)
* [3.12] GH-101588: Deprecate pickle/copy/deepcopy support in itertools ↵Miss Islington (bot)2023-05-261-2/+47
| | | | (GH-104965) (GH-104997)
* [3.12] GH-103631: Fix `PurePosixPath(PureWindowsPath(...))` separator ↵Miss Islington (bot)2023-05-262-0/+9
| | | | | | | | | | | | handling (GH-104949) (GH-104991) For backwards compatibility, accept backslashes as path separators in `PurePosixPath` if an instance of `PureWindowsPath` is supplied. This restores behaviour from Python 3.11. (cherry picked from commit 328422ce6162eb18735a2c0de12f8a696be97d0c) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.12] GH-104947: Make pathlib.PureWindowsPath comparisons consistent across ↵Miss Islington (bot)2023-05-262-1/+5
| | | | | | | | | | | platforms (GH-104948) (GH-104990) Use `str.lower()` rather than `ntpath.normcase()` to normalize case of Windows paths. This restores behaviour from Python 3.11. (cherry picked from commit ad0be361c9922a918c7c3eaf83e1d8f2b019279c) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.12] gh-104972: Ensure that line attributes in tokens in the tokenize ↵Miss Islington (bot)2023-05-262-4/+15
| | | | | | | | module are correct (GH-104975) (#104982) gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975) (cherry picked from commit 3fdb55c48291a459fb1e33edb5140ec0383222df) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] Remove raw asserts in test_typing.py (GH-104951) (#104978)Miss Islington (bot)2023-05-261-22/+30
| | | | | | Remove raw asserts in test_typing.py (GH-104951) (cherry picked from commit 2cb445635e99d4401949cabebd373288cfdd0138) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-104955: Fix __release_buffer__ signature (GH-104956) (#104973)Miss Islington (bot)2023-05-261-0/+5
| | | | | | (cherry picked from commit 6e1eccdcce5ea3bf1ef9d326d20ef9df21262c6b) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.12] gh-104924: Fix `read()able` in `http.client` log messages (gh-104926) ↵Miss Islington (bot)2023-05-261-2/+2
| | | | | | | | (gh-104970) gh-104924: Fix `read()able` in `http.client` log messages (gh-104926) (cherry picked from commit 6c81d7572edbe3a5800b1128e55a2dcef03cc13c) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* [3.12] gh-104943: Remove mentions of old Python versions (GH-104945) (#104963)Miss Islington (bot)2023-05-261-4/+1
| | | | | (cherry picked from commit 46857d0b2a2ac6aeb6dcce2bf2c92ddf4abe7496) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.12] gh-102024: Reduced _idle_semaphore.release calls (GH-102025) (#104959)Miss Islington (bot)2023-05-261-8/+11
| | | | | | | | | | | | | | gh-102024: Reduced _idle_semaphore.release calls (GH-102025) Reduced _idle_semaphore.release calls in concurrent.futures.thread._worker _idle_semaphore.release() is now only called if only work_queue is empty. --------- (cherry picked from commit 0242e9a57aa87ed0b5cac526f65631c654a39054) Co-authored-by: Andrii Kuzmin <jack.cvr@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* [3.12] gh-104935: typing: Fix interactions between `@runtime_checkable` and ↵Miss Islington (bot)2023-05-252-3/+45
| | | | | | | | | | | | `Generic` (GH-104939) (#104941) gh-104935: typing: Fix interactions between `@runtime_checkable` and `Generic` (GH-104939) --------- (cherry picked from commit 2b7027d0b2ee2e102a24a0da27d01b8221f9351c) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] Fix test_importlib.test_side_effect_import() (GH-104840) (#104842)Miss Islington (bot)2023-05-251-1/+2
| | | | | | | | | | | Fix test_importlib.test_side_effect_import() (GH-104840) Wait until the thread spawn by the import completes to avoid dangling threads. With this fix, the following command no longer fails: ./python -m test --fail-env-changed test_importlib -m test_side_effect_import -F -j20 (cherry picked from commit 426950993f6a39cdf3f6a3333ac8b518833c7e61) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-104879: Fix TypeAliasType.__module__ in exec() (GH-104881) (#104890)Miss Islington (bot)2023-05-242-0/+43
| | | | | (cherry picked from commit fe77a99fc8b549a8bf9ccbc5485fe5ea9bcf47b9) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Improve test coverage for is_typeddict (GH-104884) (#104889)Miss Islington (bot)2023-05-241-3/+22
| | | | | | | | | Improve test coverage for is_typeddict (GH-104884) In particular, it's important to test that is_typeddict(TypedDict) returns False. (cherry picked from commit 1497607a8e99f1103c40368dd5f9057f0146a520) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-104866: Tokenize should emit NEWLINE after exiting block with ↵Miss Islington (bot)2023-05-241-0/+17
| | | | | | | | | comment (GH-104870) (#104872) gh-104866: Tokenize should emit NEWLINE after exiting block with comment (GH-104870) (cherry picked from commit c90a862cdcf55dc1753c6466e5fa4a467a13ae24) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.12] gh-104825: add omitted idlelib text fix (#104880)Terry Jan Reedy2023-05-241-2/+2
| | | | | | | | | | | | | Order of events: Terry merged new idlelib test into main. Ms. I. made a 3.12 backport; tests passed. Pablo merged the tokenize change with idlelib test fix into main. Pablo merged a 3.12 backport without the idle test fix as the backport of the latter had not yet been been merged. Terry merged the idlelib test backport. The new test failed on at least 4 3.12 buildbots because of the tokenize change. This PR backports the now needed idlelib test fix. (cherry picked from commit c8cf9b4)
* [3.12] gh-104719: IDLE - test existence of all tokenize references. ↵Miss Islington (bot)2023-05-244-12/+52
| | | | | | | | | | | | | (GH-104767) (#104844) gh-104719: IDLE - test existence of all tokenize references. (GH-104767) Class editor.IndentSearcher contains all editor references to tokenize module. Module io tokenize reference cover those other modules. (cherry picked from commit e561c09975bf67ad8bb67c56a81e30a9165bcc84) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-104825: Remove implicit newline in the line attribute in tokens ↵Pablo Galindo Salgado2023-05-242-6/+6
| | | | | emitted in the tokenize module (GH-104846). (#104850) (cherry picked from commit c8cf9b42eb2bfbd4c3e708ec28d32430248a1d7a)
* [3.12] gh-104797: Allow Protocols to inherit from collections.abc.Buffer ↵Miss Islington (bot)2023-05-242-1/+17
| | | | | | | | (GH-104827) (#104841) gh-104797: Allow Protocols to inherit from collections.abc.Buffer (GH-104827) (cherry picked from commit c0ab7d401c736c37bf4462eef7c7d69fef8fab93) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279)Itamar Ostricher2023-05-232-2/+5
| | | gh-104271: Fix auto() fallback in case of mixed type Enum
* Python 3.12.0b1v3.12.0b1Thomas Wouters2023-05-221-87/+252
|
* gh-104741: Add line number attribute to indentation error exception (#104743)Marta Gómez Macías2023-05-222-2/+11
|
* gh-102856: Allow comments inside multi-line f-string expresions (#104006)Cristián Maureira-Fredes2023-05-221-3/+38
|
* gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)Serhiy Storchaka2023-05-222-1/+7
| | | | | It now accepts not only "x1, y1, x2, y2, ..." and "[x1, y1, x2, y2, ...]", but also "(x1, y1), (x2, y2), ..." and "[(x1, y1), (x2, y2), ...]".
* gh-104656: Rename typeparams AST node to type_params (#104657)Jelle Zijlstra2023-05-221-6/+6
|
* gh-104536: Improve `multiprocessing.process._cleanup` logic (#104537)Luccccifer2023-05-221-1/+1
| | | | | | | | | | Fix a race condition in the internal `multiprocessing.process` cleanup logic that could manifest as an unintended `AttributeError` when calling `BaseProcess.close()`. --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-102856: Tokenize performance improvement (#104731)Marta Gómez Macías2023-05-221-12/+1
|
* gh-104686: Fix tracing for decorated classes (#104708)Jelle Zijlstra2023-05-211-0/+46
|
* gh-104683: `clinic.py`: Improve coverage for the `parse_converter` method ↵Alex Waygood2023-05-211-0/+39
| | | | (#104729)
* gh-98836: Extend PyUnicode_FromFormat() (GH-98838)Serhiy Storchaka2023-05-211-58/+159
| | | | | | | | | * Support for conversion specifiers o (octal) and X (uppercase hexadecimal). * Support for length modifiers j (intmax_t) and t (ptrdiff_t). * Length modifiers are now applied to all integer conversions. * Support for wchar_t C strings (%ls and %lV). * Support for variable width and precision (*). * Support for flag - (left alignment).
* gh-104719: IDLE - delete useless monkeypatch of tokenize (#104726)Terry Jan Reedy2023-05-211-12/+6
|
* gh-104719: Restore Tokenize module constants (#104722)Marta Gómez Macías2023-05-211-0/+101
|
* GH-101291: Add low level, unstable API for pylong (GH-101685)Mark Shannon2023-05-211-0/+39
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-86275: improve Hypothesis configuration for CI and local runs (#104468)Zac Hatfield-Dodds2023-05-211-0/+31
|
* gh-103295: expose API for writing perf map files (#103546)gsallam2023-05-211-0/+19
| | | | | Co-authored-by: Aniket Panse <aniketpanse@fb.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-104469: Convert _testcapi/exceptions to use AC (gh-104502)Dong-hee Na2023-05-212-2/+2
|
* gh-74690: Make a typing test more resilient (#104691)Alex Waygood2023-05-211-4/+3
|
* gh-102856: Python tokenizer implementation for PEP 701 (#104323)Marta Gómez Macías2023-05-216-343/+203
| | | | | | | | | | | This commit replaces the Python implementation of the tokenize module with an implementation that reuses the real C tokenizer via a private extension module. The tokenize module now implements a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward compatibility. As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation. Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* gh-61460: Stronger HMAC in multiprocessing (#20380)Christian Heimes2023-05-202-41/+198
| | | | | | | | | | | | | | | | | | | | | | bpo-17258: `multiprocessing` now supports stronger HMAC algorithms for inter-process connection authentication rather than only HMAC-MD5. Signed-off-by: Christian Heimes <christian@python.org> gpshead: I Reworked to be more robust while keeping the idea. The protocol modification idea remains, but we now take advantage of the message length as an indicator of legacy vs modern protocol version. No more regular expression usage. We now default to HMAC-SHA256, but do so in a way that will be compatible when communicating with older clients or older servers. No protocol transition period is needed. More integration tests to verify these claims remain true are required. I'm unaware of anyone depending on multiprocessing connections between different Python versions. --------- Signed-off-by: Christian Heimes <christian@python.org> Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* gh-103606: raise RuntimeError if config file is invalid or empty (#104701)Prince Roshan2023-05-202-4/+4
| | | (this adjusts new code) raise RuntimeError if provided config file is invalid or empty, not ValueError.
* gh-56276: Add tests to test_compare (#3199)Cheryl Sabella2023-05-201-17/+409
| | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-104658: Fix location of unclosed quote error for multiline f-strings ↵Pablo Galindo Salgado2023-05-201-1/+15
| | | | (#104660)