summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped ↵Michael Felt2024-02-291-0/+4
| | | | (GH-18312)
* Make the iter_except() recipe more compact. (gh-116132)Raymond Hettinger2024-02-291-20/+1
| | | Only one example is needed
* GH-115802: JIT "small" code for Windows (GH-115964)Brandt Bucher2024-02-2926-93/+126
|
* gh-112844: Add SBOM for external dependencies (#115789)Seth Michael Larson2024-02-293-17/+266
|
* gh-116100: Add `test` arg to `ast.If` and `op` arg to `ast.BoolOp` calls ↵Kirill Podoprigora2024-02-291-2/+2
| | | | (#116101)
* gh-115881: Document feature_version limitations (#115980)Shantanu2024-02-291-6/+9
|
* gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error ↵Petr Viktorin2024-02-291-0/+4
| | | | | (GH-116105) gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error
* gh-115937: Remove implementation details from inspect.signature() docs (#116086)Erlend E. Aasland2024-02-291-3/+7
| | | | | Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-115816: Generate calls to sym_new_const() etc. without _Py_uop prefix ↵Guido van Rossum2024-02-293-104/+104
| | | | | | | | | (#116077) This was left behind by GH-115987. Basically a lot of diffs like this: ``` - res = _Py_uop_sym_new_unknown(ctx); + res = sym_new_unknown(ctx); ```
* gh-115859: Fix test_type_inconsistency() when run multiple times (#116079)Guido van Rossum2024-02-281-3/+7
| | | | | This should fix the refleaks bots. (See https://github.com/python/cpython/pull/116062#issuecomment-1970038174 .)
* gh-115821: [Enum] better error message for calling super().__new__() (GH-116063)Ethan Furman2024-02-284-1/+22
| | | | docs now state to not call super().__new__ if super().__new__ is called, a better error message is now used
* gh-116075: Skip test_external_inspection on qemu in JIT CI (#116076)Erlend E. Aasland2024-02-281-2/+2
|
* Update an out-of-date example in the itertools recipe intro (gh-116082)Raymond Hettinger2024-02-281-1/+1
|
* gh-76785: Update test.support.interpreters to Align With PEP 734 (gh-115566)Eric Snow2024-02-2811-157/+624
| | | | | This brings the code under test.support.interpreters, and the corresponding extension modules, in line with recent updates to PEP 734. (Note: PEP 734 has not been accepted at this time. However, we are using an internal copy of the implementation in the test suite to exercise the existing subinterpreters feature.)
* Improve all_equal() recipe (gh-116081)Raymond Hettinger2024-02-281-3/+4
| | | Replace conjuction of next() calls with simpler len()/take() logic. Add key function.
* gh-112075: Use relaxed stores for places where we may race with when reading ↵Dino Viehland2024-02-281-18/+25
| | | | lock-free (#115786)
* gh-115859: Re-enable T2 optimizer pass by default (#116062)Guido van Rossum2024-02-287-28/+96
| | | | | | | | | | | | | This undoes the *temporary* default disabling of the T2 optimizer pass in gh-115860. - Add a new test that reproduces Brandt's example from gh-115859; it indeed crashes before gh-116028 with PYTHONUOPSOPTIMIZE=1 - Re-enable the optimizer pass in T2, stop checking PYTHONUOPSOPTIMIZE - Rename the env var to disable T2 entirely to PYTHON_UOPS_OPTIMIZE (must be explicitly set to 0 to disable) - Fix skipIf conditions on tests in test_opt.py accordingly - Export sym_is_bottom() (for debugging) - Fix various things in the `_BINARY_OP_` specializations in the abstract interpreter: - DECREF(temp) - out-of-space check after sym_new_const() - add sym_matches_type() checks, so even if we somehow reach a binary op with symbolic constants of the wrong type on the stack we won't trigger the type assert
* gh-115891: Fix debug byte filling in free-threaded build (#116018)Sam Gross2024-02-281-4/+13
| | | | | | The previous code had two bugs. First, the debug offset in the mimalloc heap includes the two pymalloc debug words, but the pointer passed to fill_mem_debug does not include them. Second, the current object heap is correct source for allocations, but not deallocations.
* gh-112529: Simplify PyObject_GC_IsTracked and PyObject_GC_IsFinalized (#114732)Sam Gross2024-02-283-28/+51
|
* gh-115197: Stop resolving host in urllib.request proxy bypass (GH-115210)Weii Wang2024-02-283-44/+64
| | | Use of a proxy is intended to defer DNS for the hosts to the proxy itself, rather than a potential for information leak of the host doing DNS resolution itself for any reason. Proxy bypass lists are strictly name based. Most implementations of proxy support agree.
* GH-115986 Reorder pprint docs and amend some references (#116019)Kerim Kabirov2024-02-281-89/+92
| | | | | | | | | Introduce a new subsubsection, 'Functions', for module level functions, and place it before the PrettyPrinter class reference. Also: - Fix pprint.pprint() references so they properly link to the module level function. - Add links to sys.stdout.
* gh-115816: Improve internal symbols API in optimizer (#116028)Guido van Rossum2024-02-284-67/+191
| | | | | | | - Any `sym_set_...` call that attempts to set conflicting information cause the symbol to become `bottom` (contradiction). - All `sym_is...` and similar calls return false or NULL for `bottom`. - Everything's tested. - The tests still pass with `PYTHONUOPSOPTIMIZE=1`.
* gh-112075: Remove compiler warning from apple clang (gh-115855)Donghee Na2024-02-281-2/+2
|
* gh-107674: Improve performance of `sys.settrace` (GH-114986)Tian Gao2024-02-287-53/+64
|
* gh-116012: Preserve GetLastError() across calls to TlsGetValue on Windows ↵Steve Dower2024-02-283-10/+7
| | | | (GH-116014)
* doc: Use super() in subclassed JSONEncoder examples (GH-115565)Jan Max Meyer2024-02-282-3/+3
| | | | Replace calls to `json.JSONEncoder.default(self, obj)` by `super().default(obj)` within the examples of the documentation.
* gh-115765: Don't use deprecated AC_EGREP_* macros in configure.ac (#116016)Erlend E. Aasland2024-02-284-171/+363
| | | Rewrite using AX_CHECK_DEFINE and AC_CHECK_TYPES.
* gh-78612: Mark up eval() using param list (#115212)Erlend E. Aasland2024-02-281-5/+15
| | | Also mention that the 'expression' parameter can be a string.
* gh-114911: Add CPUStopwatch test helper (GH-114912)Petr Viktorin2024-02-283-42/+75
| | | | | | A few of our tests measure the time of CPU-bound operation, mainly to avoid quadratic or worse behaviour. Add a helper to ignore GC and time spent in other processes.
* gh-116030: test_unparse: Add ``ctx`` argument to ``ast.Name`` calls (#116031)Kirill Podoprigora2024-02-281-3/+3
|
* gh-115773: Add tests to exercise the _Py_DebugOffsets structure (#115774)Pablo Galindo Salgado2024-02-2810-36/+818
|
* gh-105858: Expose some union-related objects as internal APIs (GH-116025)Jelle Zijlstra2024-02-281-2/+4
| | | | | We now use these in the AST parsing code after gh-105880. A few comparable types (e.g., NoneType) are already exposed as internal APIs.
* gh-115961: Improve tests for compressed file-like objects (GH-115963)Serhiy Storchaka2024-02-285-45/+476
| | | | | | | | | | | * Increase coverage for compressed file-like objects initialized with a file name, an open file object, a file object opened by file descriptor, and a file-like object without name and mode attributes (io.BytesIO) * Increase coverage for name, fileno(), mode, readable(), writable(), seekable() in different modes and states * No longer skip tests with bytes names * Test objects implementing the path protocol, not just pathlib.Path.
* gh-116026: Try disabling rebuilds of dependents in Homebrew (#116027)Jelle Zijlstra2024-02-281-0/+1
|
* gh-105858: Improve AST node constructors (#105880)Jelle Zijlstra2024-02-2810-50/+4676
| | | | | | | | | | | | | | | | | Demonstration: >>> ast.FunctionDef.__annotations__ {'name': <class 'str'>, 'args': <class 'ast.arguments'>, 'body': list[ast.stmt], 'decorator_list': list[ast.expr], 'returns': ast.expr | None, 'type_comment': str | None, 'type_params': list[ast.type_param]} >>> ast.FunctionDef() <stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'name'. This will become an error in Python 3.15. <stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'args'. This will become an error in Python 3.15. <ast.FunctionDef object at 0x101959460> >>> node = ast.FunctionDef(name="foo", args=ast.arguments()) >>> node.decorator_list [] >>> ast.FunctionDef(whatever="you want", name="x", args=ast.arguments()) <stdin>:1: DeprecationWarning: FunctionDef.__init__ got an unexpected keyword argument 'whatever'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15. <ast.FunctionDef object at 0x1019581f0>
* gh-112997: Don't log arguments in asyncio unless debugging (#115667)Pierre Ossman (ThinLinc team)2024-02-284-12/+42
| | | | | | Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.
* gh-114914: Avoid keeping dead StreamWriter alive (#115661)Pierre Ossman (ThinLinc team)2024-02-283-10/+31
| | | | | | | | | | In some cases we might cause a StreamWriter to stay alive even when the application has dropped all references to it. This prevents us from doing automatical cleanup, and complaining that the StreamWriter wasn't properly closed. Fortunately, the extra reference was never actually used for anything so we can just drop it.
* bpo-43952: Fix multiprocessing Listener authkey bug (GH-25845)Miguel Brito2024-02-273-1/+23
| | | | Listener.accept() no longer hangs when authkey is an empty bytes object.
* gh-115315: Update time.rst to include microseconds field (%f) in chart (#115316)Tahoma Software2024-02-271-6/+16
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* GH-115816: Assorted naming and formatting changes to improve ↵Mark Shannon2024-02-278-476/+498
| | | | | | | maintainability. (GH-115987) * Rename _Py_UOpsAbstractInterpContext to _Py_UOpsContext and _Py_UOpsSymType to _Py_UopsSymbol. * #define shortened form of _Py_uop_... names for improved readability.
* GH-115816: Make tier2 optimizer symbols testable, and add a few tests. ↵Mark Shannon2024-02-2715-607/+720
| | | | (GH-115953)
* gh-115720: Show number of leaks in huntrleaks progress reports (GH-115726)Petr Viktorin2024-02-273-14/+39
| | | | | | | | | | | | | | | | | Instead of showing a dot for each iteration, show: - '.' for zero (on negative) leaks - number of leaks for 1-9 - 'X' if there are more leaks This allows more rapid iteration: when bisecting, I don't need to wait for the final report to see if the test still leaks. Also, show the full result if there are any non-zero entries. This shows negative entries, for the unfortunate cases where a reference is created and cleaned up in different runs. Test *failure* is still determined by the existing heuristic.
* bpo-44865: Fix yet one missing translations in argparse (GH-27668)Jérémie Detrey2024-02-262-1/+3
|
* bpo-45101: Add consistency in usage message IO between 2 versions of ↵Kien Dang2024-02-263-2/+9
| | | | | | python-config (GH-28162) On --help output to stdout. On error output to stderr.
* gh-77956: Add the words 'default' and 'version' help text localizable ↵Emmanuel Arias2024-02-262-2/+5
| | | | | | | (GH-12711) Co-authored-by: paul.j3 Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
* gh-115582: Make default PC/pyconfig.h work for free-threaded builds with ↵Steve Dower2024-02-263-2/+10
| | | | manual /DPy_GIL_DISABLED (GH-115850)
* gh-113942: Show functions implemented as builtin methods (GH-115306)Serhiy Storchaka2024-02-264-6/+24
| | | | Pydoc no longer skips global functions implemented as builtin methods, such as MethodDescriptorType and WrapperDescriptorType.
* gh-112006: Fix inspect.unwrap() for types where __wrapped__ is a data ↵Serhiy Storchaka2024-02-263-13/+32
| | | | | | descriptor (GH-115540) This also fixes inspect.Signature.from_callable() for builtins classmethod() and staticmethod().
* gh-115168: Add pystats counter for invalidated executors (GH-115169)Michael Droettboom2024-02-2611-14/+31
|
* gh-115882: Reference Unknwn.h for ctypes on Windows (GH-115350)Yuriy Chernyshov2024-02-262-0/+5
| | | This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled