summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-44904: Fix classmethod property bug in doctest module (GH-28838)Alex Waygood2021-10-284-4/+21
| | | | | | | | The doctest module raised an error if a docstring contained an example that attempted to access a classmethod property. (Stacking '@classmethod' on top of `@property` has been supported since Python 3.9; see https://docs.python.org/3/howto/descriptor.html#class-methods.) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45438: format of inspect.Signature with generic builtins (#29212)Martin Rueckl2021-10-273-0/+14
| | | | | | | Use types.GenericAlias in inspect.formatannotation to correctly add type arguments of builtin types to the string representation of Signatures. Co-authored-by: Martin Rückl <martin.rueckl@codecentric.de>
* bpo-45562: Print tokenizer debug messages to stderr (GH-29250)Pablo Galindo Salgado2021-10-271-4/+4
|
* bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)Sam Gross2021-10-273-9/+33
| | | | | Objects that support garbage collection ("container" objects) should call PyObject_GC_UnTrack() from their destructors before clearing any fields which may point to other "container" objects.
* Don't make a call at the C level when calling bound-methods from Python ↵Mark Shannon2021-10-271-1/+14
| | | | code. (GH-29238)
* bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 ↵m-aciek2021-10-271-0/+4
| | | | | | (GH-29230) Co-authored-by: Maciej Olko <maciej.olko@yougov.com> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-42064: Convert `sqlite3` global state to module state (GH-29073)Erlend Egeberg Aasland2021-10-278-55/+36
|
* bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)Brandt Bucher2021-10-2710-116/+130
| | | | | | | * Refactor mapping patterns and speed up class patterns. * Simplify MATCH_KEYS and MATCH_CLASS. * Add COPY opcode.
* Remove unused variables. (GH-29231)Benjamin Peterson2021-10-261-5/+1
|
* bpo-40915: Fix mmap resize bugs on Windows (GH-29213)Tim Golden2021-10-263-35/+178
| | | | | | | | | | | (original patch by eryksun) Correctly hand various failure modes when resizing an mmap on Windows: * Resizing a pagefile-backed mmap now creates a new mmap and copies data * Attempting to resize when another mapping is held on the same file raises an OSError * Attempting to resize a nametagged mmap raises an OSError if another mapping is held with the same nametag
* bpo-45548: makesetup improvements (GH-29225)Christian Heimes2021-10-262-4/+14
| | | | | | | * record which modules are build as shared extensions * put object files in same directory as source files * remove dependency on deleted _math.c Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45020: Add tests for the -X "frozen_modules" option. (gh-28997)Eric Snow2021-10-253-0/+78
| | | | | We hadn't explicitly added any tests for this, so here they are. https://bugs.python.org/issue45020
* bpo-45548: FreeBSD doesn't like auto vars in makesetup (GH-29216)Christian Heimes2021-10-251-2/+2
|
* bpo-45548: Add missing extensions to Modules/Setup (GH-29199)Christian Heimes2021-10-251-33/+33
| | | | | | | | | | Adds _ctypes, _decimal, _multiprocessing, _posixshmem, _scproxy, _sqlite3, and _uuid. Use Makefile variables to build OpenSSL and TCL/TK modules. Drop ``-lm`` from math lines. Extensions are always linked against libm. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45595: Make extensions depend on header files (GH-29198)Christian Heimes2021-10-254-3/+34
| | | | | | ``setup.py`` and ``makesetup`` now track build dependencies on all Python header files and module specific header files. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45548: Remove checks for finite and gamma (GH-29206)Christian Heimes2021-10-253-14/+2
|
* bpo-45548: Remove _math.c workarounds for pre-C99 libm (GH-29179)Christian Heimes2021-10-2512-346/+51
| | | | | | | | | | | | | The :mod:`math` and :mod:`cmath` implementation now require a C99 compatible ``libm`` and no longer ship with workarounds for missing acosh, asinh, expm1, and log1p functions. The changeset also removes ``_math.c`` and moves the last remaining workaround into ``_math.h``. This simplifies static builds with ``Modules/Setup`` and resolves symbol conflicts. Co-authored-by: Mark Dickinson <mdickinson@enthought.com> Co-authored-by: Brett Cannon <brett@python.org> Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45530: speed listobject.c's unsafe_tuple_compare() (GH-29076)Tim Peters2021-10-254-13/+81
| | | | | | | | Keep track of whether unsafe_tuple_compare() calls are resolved by the very first tuple elements, and adjust strategy accordingly. This can significantly cut the number of calls made to the full-blown PyObject_RichCompareBool(), and especially when duplicates are rare. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45566: `test_frozen_pickle` checks all `pickle` protocols (GH-29150)Nikita Sobolev2021-10-242-4/+18
| | | | | Refs https://github.com/python/cpython/pull/29147 Automerge-Triggered-By: GH:ericvsmith
* Expand about soft keywords in the docs for keyword.py (GH-29139)William Andrea2021-10-231-3/+3
| | | | | Add link at the top and fix the existing links to point to the "[soft keywords](https://docs.python.org/3.10/reference/lexical_analysis.html#soft-keywords)" section created in the Python 3.10 docs. Changes should be backported to 3.10 as well.
* bpo-45516: add protocol description to the TraversableResources ↵Filipe Laíns2021-10-232-0/+7
| | | | | documentation (#29173) Signed-off-by: Filipe Laíns <lains@riseup.net>
* bpo-45506: Normalize _PyPathConfig.stdlib_dir when calculated. (#29040)Eric Snow2021-10-226-24/+236
| | | | | The recently added PyConfig.stdlib_dir was being set with ".." entries. When __file__ was added for from modules this caused a problem on out-of-tree builds. This PR fixes that by normalizing "stdlib_dir" when it is calculated in getpath.c. https://bugs.python.org/issue45506
* bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes ↵Irit Katriel2021-10-2216-4/+1366
| | | | (GH-28569)
* bpo-45574: fix warning about `print_escape` being unused (GH-29172)Nikita Sobolev2021-10-222-0/+3
| | | | | | | | | | | It used to be like this: <img width="1232" alt="Снимок экрана 2021-10-22 в 23 07 40" src="https://user-images.githubusercontent.com/4660275/138516608-fef6ec01-a96a-40f4-81ef-52265b0f536b.png"> Quick `grep` tells that it is just used in one place under `Py_DEBUG`: https://github.com/python/cpython/blame/f6e8b80d20159596cf641305bad3a833bedd2f4f/Parser/tokenizer.c#L1047-L1051 <img width="752" alt="Снимок экрана 2021-10-22 в 23 08 09" src="https://user-images.githubusercontent.com/4660275/138516684-ea503136-1e92-48a5-95bb-419e190d5866.png"> I am not sure, but it also looks like a private thing, it should not affect other users. Automerge-Triggered-By: GH:pablogsal
* bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048)Dennis Sweeney2021-10-223-6/+45
| | | | | * Use Py_EnterRecursiveCall() in issubclass() Reviewed-by: Gregory P. Smith <greg@krypto.org> [Google]
* bpo-45571: use PY_CFLAGS_NODIST for shared Modules/Setup (GH-29161)Christian Heimes2021-10-222-1/+3
|
* bpo-45570: Simplify setup macros for pyexpat (GH-29159)Christian Heimes2021-10-226-14/+9
| | | | | | | | * ``HAVE_EXPAT_CONFIG_H`` is not used by our code and not used by system-wide expat header files * ``USE_PYEXPAT_CAPI`` is no longer used by our code * ``XML_POOR_ENTROPY`` should be defined in expat_config.h Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45502: Fix test_shelve (GH-29003)Serhiy Storchaka2021-10-221-58/+46
| | | | Run test_shelve with all underlying dbm implementations and pickle protocols. Also make test_shelve discoverable.
* bpo-43974: Move Py_BUILD_CORE_MODULE into module code (GH-29157)Christian Heimes2021-10-2240-86/+182
| | | | | | | | | | | | | | setup.py no longer defines Py_BUILD_CORE_MODULE. Instead every module defines the macro before #include "Python.h" unless Py_BUILD_CORE_BUILTIN is already defined. Py_BUILD_CORE_BUILTIN is defined for every module that is built by Modules/Setup. The PR also simplifies Modules/Setup. Makefile and makesetup already define Py_BUILD_CORE_BUILTIN and include Modules/internal for us. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-45562: Only show debug output from the parser in debug builds (GH-29140)Pablo Galindo Salgado2021-10-221-0/+2
|
* bpo-43795: Add a test for Stable ABI symbol availability using ctypes (GH-26354)Petr Viktorin2021-10-222-0/+881
| | | | | | | | | This is a cross-platform check that the symbols are actually exported in the ABI, not e.g. hidden in a macro. Caveat: PyModule_Create2 & PyModule_FromDefAndSpec2 are skipped. These aren't exported on some of our buildbots. This is a bug (bpo-44133). This test now makes sure all the others don't regress.
* bpo-43592: Raise RLIMIT_NOFILE in test.libregrtest (GH-29127)Gregory P. Smith2021-10-222-0/+27
| | | | | | | Raise RLIMIT_NOFILE in test.libregrtest. On macOS the default is often too low for our testsuite to succeed. Co-authored by reviewer: Victor Stinner
* bpo-45548: Make `Modules/Setup` easier to read (GH-29143)Brett Cannon2021-10-221-196/+115
|
* bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)Zachary Ware2021-10-221-8/+3
|
* bpo-43706: Use PEP 590 vectorcall to speed up enumerate() (GH-25154)Dong-hee Na2021-10-212-0/+42
|
* bpo-44019: Add test_all_exported_names for operator module (GH-29124)Dong-hee Na2021-10-211-0/+12
|
* bpo-44547: Make Fractions objects instances of typing.SupportsInt (GH-27851)Mark Dickinson2021-10-215-3/+62
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-41983: add availability info to socket docs (GH-27519)andrei kulakov2021-10-211-0/+4
| | | | | * add availability info to AF_PACKET section * add availability for AF_QIPCRTR as well
* bpo-45526: obmalloc radix use 64 addr bits (GH-29062)Neil Schemenauer2021-10-212-20/+38
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44344: Document that pow can return a complex number for non-complex ↵Mark Dickinson2021-10-211-1/+4
| | | | | inputs. (GH-27853) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45557: Fix underscore_numbers in pprint.pprint(). (GH-29129)Eric V. Smith2021-10-212-1/+4
|
* Add workflow_dispatch trigger to GHA workflows (GH-27873)Ryan Mast2021-10-213-0/+3
|
* bpo-45160: Ttk optionmenu only set variable once (GH-28291)E-Paine2021-10-213-1/+18
|
* Move several typing tests to a proper class, refs GH-28563 (GH-29126)Nikita Sobolev2021-10-211-16/+16
|
* bpo-45521: Fix a bug in the obmalloc radix tree code. (GH-29051)Neil Schemenauer2021-10-212-1/+4
| | | | | MAP_BOT_LENGTH was incorrectly used to compute MAP_TOP_MASK instead of MAP_TOP_LENGTH. On 64-bit machines, the error causes the tree to hold 46-bits of virtual addresses, rather than the intended 48-bits.
* bpo-45522: Allow to disable freelists on build time (GH-29056)Christian Heimes2021-10-2115-35/+218
| | | | | | | | Freelists for object structs can now be disabled. A new ``configure`` option ``--without-freelists`` can be used to disable all freelists except empty tuple singleton. Internal Py*_MAXFREELIST macros can now be defined as 0 without causing compiler warnings and segfaults. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105)Thomas2021-10-211-0/+7
|
* bpo-44019: Add operator.call() to __all__ for the operator module (GH-29110)Kreus Amredes2021-10-212-1/+2
|
* bpo-45315: PyType_FromSpec: Copy spec->name and have the type own the memory ↵Petr Viktorin2021-10-215-16/+162
| | | | for its name (GH-29103)
* bpo-44220: Export PyStructSequence_UnnamedField in the limited API (GH-26331)Ken Jin2021-10-215-1/+6
|