summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* gh-95065: Add Argument Clinic support for deprecating positional use of ↵Erlend E. Aasland2023-08-072-1/+905
| | | | | | | | | | parameters (#95151) It is now possible to deprecate passing parameters positionally with Argument Clinic, using the new '* [from X.Y]' syntax. (To be read as "keyword-only from Python version X.Y") Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)Serhiy Storchaka2023-08-077-39/+30
| | | In future Tcl and Tk versions can be desynchronized.
* gh-85160: improve performance of `functools.singledispatchmethod` (#107148)Pieter Eendebak2023-08-062-2/+87
| | | | Co-authored-by: mental <m3nta1@yahoo.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104683: Improve consistency and test coverage of argument-clinic ↵Alex Waygood2023-08-051-3/+91
| | | | `__repr__` functions (#107667)
* GH-106684: raise `ResourceWarning` when `asyncio.StreamWriter` is not closed ↵Kumar Aditya2023-08-052-0/+29
| | | | (#107650)
* GH-70303: Emit FutureWarning when pathlib glob pattern ends with `**` ↵Barney Gale2023-08-042-3/+21
| | | | | | (GH-105413) In a future Python release, patterns with this ending will match both files and directories. Users may add a trailing slash to remove the warning.
* gh-106368: Argument clinic: improve coverage for `self.valid_line()` calls ↵Alex Waygood2023-08-041-0/+32
| | | | (#107641)
* gh-106812: Refactor cases_generator to allow uops with array stack effects ↵Guido van Rossum2023-08-041-77/+81
| | | | | (#107564) Introducing a new file, stacking.py, that takes over several responsibilities related to symbolic evaluation of push/pop operations, with more generality.
* gh-107614: Normalise Argument Clinic error messages (#107615)Erlend E. Aasland2023-08-041-46/+71
| | | | | | | | - always wrap the offending line, token, or name in quotes - in most cases, put the entire error message on one line Added tests for uncovered branches that were touched by this PR. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-107263: Increase C stack limit for most functions, except ↵Mark Shannon2023-08-0410-28/+32
| | | | | | `_PyEval_EvalFrameDefault()` (GH-107535) * Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2.
* gh-106368: Increase Argument Clinic test coverage (#107611)Erlend E. Aasland2023-08-041-0/+296
| | | Add tests for directives and destinations
* gh-107609: Fix duplicate module check in Argument Clinic (#107610)Erlend E. Aasland2023-08-041-0/+10
| | | Also remove duplicate module def from _testcapi.
* gh-106368: Argument clinic tests: improve error message when ↵Alex Waygood2023-08-031-1/+2
| | | | `expect_success()` fails (#107606)
* gh-107446: Fix test_inspect.test_class_with_method_from_other_module when ↵Tian Gao2023-08-031-0/+3
| | | | | ran multiple times (#107451) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-107576: Ensure `__orig_bases__` are our own in `get_original_bases` (#107584)James Hilton-Balfe2023-08-032-7/+17
| | | | Co-authored-by: Chris Bouchard <chris@upliftinglemma.net> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-106368: Increase Argument Clinic test coverage (#107582)Erlend E. Aasland2023-08-032-2/+394
| | | Add tests for DSL parser state machine and docstring formatting
* GH-107458: fix test_tools refleak (#107577)Kumar Aditya2023-08-031-11/+5
|
* gh-107455: ctypes: Improve error messages when converting to an incompatible ↵Tomas R2023-08-031-2/+50
| | | | type (#107456)
* gh-104683: Rework Argument Clinic error handling (#107551)Erlend E. Aasland2023-08-031-272/+227
| | | | | | | | | | | | Introduce ClinicError, and use it in fail(). The CLI runs main(), catches ClinicError, formats the error message, prints to stderr and exits with an error. As a side effect, this refactor greatly improves the accuracy of reported line numbers in case of error. Also, adapt the test suite to work with ClinicError. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-107471: Fix Refleaks in test_import (gh-107569)Eric Snow2023-08-021-1/+2
| | | | | | | gh-107184 introduced a refleak in test_import.SubinterpImportTests (specifically test_singlephase_check_with_setting_and_override and test_single_init_extension_compat). We fix it here by making sure _testsinglephase is removed from sys.modules whenever we clear the runtime's internal state for the module. The underlying problem is strictly contained in the internal function _PyImport_ClearExtension() (AKA _testinternalcapi.clear_extension()), which is only used in tests. (This also fixes an intermittent segfault introduced in the same place, in test_disallowed_reimport.)
* Fix test_capi.test_misc when run with -R:: (#107566)Guido van Rossum2023-08-021-30/+34
| | | | | | | Should fix the buildbot failures. This creates a new function each time that test is run, like Victor did for other tests.
* gh-105481: simplify definition of pseudo ops in Lib/opcode.py (#107561)Irit Katriel2023-08-021-29/+15
|
* gh-106368: Increase test coverage for Argument Clinic (#107514)Erlend E. Aasland2023-08-022-15/+350
| | | As per this commit, we've got approx. ~91% test coverage for clinic.py.
* gh-107559: Argument Clinic: complain about non-ASCII chars in param ↵Erlend E. Aasland2023-08-021-0/+19
| | | | | | | | docstrings (#107560) Previously, only function docstrings were checked for non-ASCII characters. Also, improve the warn() message. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104683: Argument Clinic: Refactor and simplify 'add docstring' states ↵Erlend E. Aasland2023-08-011-0/+22
| | | | | | | | | (#107550) Introduce docstring_append() helper, and use it for both parameter and function docstrings. Remove docstring fixup from do_post_block_processing_cleanup(); instead, make sure no fixup is needed. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104683: Argument clinic: remove the `LandMine` class (#107541)Alex Waygood2023-08-011-2/+1
|
* gh-105481: the ENABLE_SPECIALIZATION flag does not need to be generated by ↵Irit Katriel2023-08-012-5/+2
| | | | the build script, or exposed in opcode.py (#107534)
* gh-107467: Restructure Argument Clinic command-line interface (#107469)Erlend E. Aasland2023-08-011-41/+33
| | | | | | | - Use ArgumentParser.error() to handle CLI errors - Put the entire CLI in main() - Rework ClinicExternalTest to call main() instead of using subprocesses Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
* gh-87799: Improve the textual representation of IPv4-mapped IPv6 addresses ↵opavliuk2023-07-312-1/+44
| | | | | | | | | | | | | | | (#29345) Represent IPv4-mapped IPv6 address as x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values of the six high-order 16-bit pieces of the address, and the 'd's are the decimal values of the four low-order 8-bit pieces of the address (standard IPv4 representation). --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* gh-105751: Remove obsolete `object` base class in some ctypes tests (#107460)Tomas R2023-07-314-11/+11
|
* gh-106368: Add test for Argument Clinic misbehaving custom converter_init() ↵Erlend E. Aasland2023-07-311-0/+20
| | | | (#107496)
* gh-104280: Add test cases for DTrace probes (#107125)Furkan Onder2023-07-311-0/+82
|
* gh-46376: Return existing pointer when possible in ctypes (#107131)Konstantin2023-07-311-0/+27
|
* gh-106263: Fix segfault in `signaldict_repr` in `_decimal` module (#106270)Charlie Zhao2023-07-301-0/+30
| | | Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
* gh-107369: optimize textwrap.indent() (#107374)Inada Naoki2023-07-291-7/+13
|
* gh-107089: Improve Shelf.clear method performance (gh-107090)James Cave2023-07-291-0/+7
|
* gh-106368: Argument clinic: Fix minor bug in `state_modulename_name` (#107387)Alex Waygood2023-07-281-0/+17
|
* Fix typo in comment (gh-107389)Tom Niget2023-07-281-1/+1
|
* gh-106723: forward -Xfrozen_modules option to spawned process interpreters ↵Felipe A. Hernandez2023-07-281-1/+1
| | | | | | (#106724) Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-106368: Argument clinic tests: improve failure message when tests in ↵Alex Waygood2023-07-271-1/+1
| | | | `ClinicExternalTests` fail (#107364)
* gh-104683: Argument clinic: cleanup `state_modulename_name()` (#107340)Alex Waygood2023-07-271-0/+26
|
* gh-106931: Fix the WASM Buildbots (gh-107362)Eric Snow2023-07-271-1/+12
| | | Skip subinterpreter tests when not supported.
* gh-104621: Check for Incompatible Extensions in import_find_extension() ↵Eric Snow2023-07-272-6/+38
| | | | | (gh-107184) This fixes a bug where incompatible modules could still be imported if attempted multiple times.
* gh-106931: Intern Statically Allocated Strings Globally (gh-107272)Eric Snow2023-07-271-0/+30
| | | | | We tried this before with a dict and for all interned strings. That ran into problems due to interpreter isolation. However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning. Here we circle back to using a global cache, but only for statically allocated strings. We also use a more-basic _Py_hashtable_t for that global cache instead of a dict. Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter. Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter.
* gh-105699: Disable the Interpreters Stress Tests (gh-107354)Eric Snow2023-07-271-0/+1
| | | | The two tests are crashing periodically in CI and on buildbots. I suspect the problem is in the _xxsubinterpreters module. Regardless, I'm disabling the tests temporarily, to reduce the noise as we approach 3.12rc1. I'll be investigating the crashes separately.
* GH-106898: Add the exception as an argument to the `PY_UNWIND` event ↵Mark Shannon2023-07-271-3/+3
| | | | callback function. (GH-107347)
* GH-106895: Raise a `ValueError` when attempting to disable events that ↵Mark Shannon2023-07-271-1/+51
| | | | cannot be disabled. (GH-107337)
* gh-105481: remove dependency of _inline_cache_entries on opname (#107339)Irit Katriel2023-07-273-9/+12
|
* GH-106897: Add `RERAISE` event to `sys.monitoring`. (GH-107291)Mark Shannon2023-07-271-37/+193
| | | * Ensures that exception handling events are balanced. Each [re]raise event has a matching unwind/handled event.
* gh-105002: [pathlib] Fix relative_to with walk_up=True using ".." (#107014)János Kukovecz2023-07-262-2/+16
| | | | It makes sense to raise an Error because ".." can not be resolved and the current working directory is unknown.