Commit graph

111443 commits

Author SHA1 Message Date
Filipe Laíns 8ce20bbdd6
bpo-45516: add protocol description to the TraversableResources documentation (#29173)
Signed-off-by: Filipe Laíns <lains@riseup.net>
2021-10-23 11:47:55 -04:00
Eric Snow 17c61045c5
bpo-45506: Normalize _PyPathConfig.stdlib_dir when calculated. (#29040)
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
2021-10-22 17:20:03 -06:00
Irit Katriel f30ad65dbf
bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes (GH-28569) 2021-10-23 00:13:46 +01:00
Nikita Sobolev 4bc5473a42
bpo-45574: fix warning about print_escape being unused (GH-29172)
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`: f6e8b80d20/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
2021-10-22 14:57:24 -07:00
Dennis Sweeney 423fa1c181
bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048)
* Use Py_EnterRecursiveCall() in issubclass()

Reviewed-by: Gregory P. Smith <greg@krypto.org> [Google]
2021-10-22 14:24:08 -07:00
Christian Heimes f6e8b80d20
bpo-45571: use PY_CFLAGS_NODIST for shared Modules/Setup (GH-29161) 2021-10-22 20:02:54 +02:00
Christian Heimes ec93721e00
bpo-45570: Simplify setup macros for pyexpat (GH-29159)
* ``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>
2021-10-22 09:28:23 -07:00
Serhiy Storchaka b781cc3bfc
bpo-45502: Fix test_shelve (GH-29003)
Run test_shelve with all underlying dbm implementations and pickle protocols.
Also make test_shelve discoverable.
2021-10-22 16:14:58 +02:00
Christian Heimes 03e9f5dc75
bpo-43974: Move Py_BUILD_CORE_MODULE into module code (GH-29157)
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>
2021-10-22 15:36:28 +02:00
Pablo Galindo Salgado 86dfb55d2e
bpo-45562: Only show debug output from the parser in debug builds (GH-29140) 2021-10-22 01:52:24 -07:00
Petr Viktorin 276468dddb
bpo-43795: Add a test for Stable ABI symbol availability using ctypes (GH-26354)
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.
2021-10-22 10:12:06 +02:00
Gregory P. Smith 843b890334
bpo-43592: Raise RLIMIT_NOFILE in test.libregrtest (GH-29127)
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
2021-10-21 18:22:25 -07:00
Brett Cannon 01cf4fb9c1
bpo-45548: Make Modules/Setup easier to read (GH-29143) 2021-10-21 17:07:26 -07:00
Zachary Ware 098a33f6a6
bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141) 2021-10-21 19:02:12 -05:00
Dong-hee Na 83f202a802
bpo-43706: Use PEP 590 vectorcall to speed up enumerate() (GH-25154) 2021-10-22 08:20:43 +09:00
Dong-hee Na 37fad7d3b7
bpo-44019: Add test_all_exported_names for operator module (GH-29124) 2021-10-22 07:58:04 +09:00
Mark Dickinson d1b24775b4
bpo-44547: Make Fractions objects instances of typing.SupportsInt (GH-27851)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-22 00:09:47 +02:00
andrei kulakov 51375388be
bpo-41983: add availability info to socket docs (GH-27519)
* add availability info to AF_PACKET section

* add availability for AF_QIPCRTR as well
2021-10-21 23:13:37 +02:00
Neil Schemenauer 0224b7180b
bpo-45526: obmalloc radix use 64 addr bits (GH-29062)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-21 23:05:46 +02:00
Mark Dickinson 887a55705b
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-21 22:57:49 +02:00
Eric V. Smith 087f089e5e
bpo-45557: Fix underscore_numbers in pprint.pprint(). (GH-29129) 2021-10-21 16:42:55 -04:00
Ryan Mast 3754f55b36
Add workflow_dispatch trigger to GHA workflows (GH-27873) 2021-10-21 22:34:18 +02:00
E-Paine add46f8476
bpo-45160: Ttk optionmenu only set variable once (GH-28291) 2021-10-21 22:25:52 +02:00
Nikita Sobolev 0c4c2e6213
Move several typing tests to a proper class, refs GH-28563 (GH-29126) 2021-10-21 22:16:50 +02:00
Neil Schemenauer 311910b31a
bpo-45521: Fix a bug in the obmalloc radix tree code. (GH-29051)
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.
2021-10-21 06:38:36 -07:00
Christian Heimes 9942f42a93
bpo-45522: Allow to disable freelists on build time (GH-29056)
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>
2021-10-21 06:12:20 -07:00
Thomas 5a14f71fe8
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) 2021-10-21 12:19:20 +02:00
Kreus Amredes a53456e587
bpo-44019: Add operator.call() to __all__ for the operator module (GH-29110) 2021-10-21 19:05:36 +09:00
Petr Viktorin 8a310dd5f4
bpo-45315: PyType_FromSpec: Copy spec->name and have the type own the memory for its name (GH-29103) 2021-10-21 11:46:20 +02:00
Ken Jin 2cbf50e812
bpo-44220: Export PyStructSequence_UnnamedField in the limited API (GH-26331) 2021-10-21 10:46:48 +02:00
Ethan Furman 7c4d96103c
bpo-44174: [Enum] add reference to name mangling (GH-29116) 2021-10-20 20:32:11 -07:00
Brett Cannon dd86f63b55
bpo-45548: add some missing entries to Modules/Setup (GH-29115)
Also remove a duplicate entry for `_weakref`.
2021-10-20 17:34:49 -07:00
Barry Warsaw 876fc7fcec
bpo-35673: Add a public alias for namespace package __loader__ attribute (#29049)
Rename namespace package __loader__ class to be public.

Make the old name, i.e. _NamespaceLoader, an alias for the public name, for backward compatibility.
2021-10-20 14:05:29 -07:00
Kyungmin Lee 6270d3eeaf
bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as str (GH-28323)
An object implementing the os.PathLike protocol can represent a file
system path as a str or bytes object.
Therefore, _infer_return_type function should infer os.PathLike[str]
object as str type and os.PathLike[bytes] object as bytes type.
2021-10-20 21:54:41 +02:00
Mark Shannon bc85eb7a4f
bpo-45527: Don't count cache hits, just misses. (GH-29092) 2021-10-20 20:53:48 +02:00
Hugo van Kemenade d89fb9a5a6
bpo-45320: Remove long-deprecated inspect methods (GH-28618) 2021-10-20 20:48:55 +02:00
Zackery Spytz d8e1819251
bpo-41374: Remove obsolete exclusion of netinet/tcp.h on Cygwin (GH-21649) 2021-10-20 18:14:59 +01:00
Jeong YunWon d2cd5eef0c
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100) 2021-10-21 02:09:03 +09:00
Łukasz Langa dff0b71343
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-10-20 18:54:31 +02:00
Gregory P. Smith 1dfac27dff
Cleanup a couple of comments left on PR 28775 post-merge. (GH-29079) 2021-10-20 09:17:52 -07:00
Christian Heimes 81520fe677
bpo-45536: Check OpenSSL APIs in configure (GH-29088) 2021-10-20 17:18:34 +02:00
Alex Waygood d9e1dae35a
Add PEPs 593 & 647 to list of PEPs at top of typing docs (GH-29097) 2021-10-20 23:15:59 +08:00
Barry Warsaw 6ef4507c74
Add a comment about how to fix bogus test_host_resolution_bad_address failures (#29085) 2021-10-20 08:08:57 -07:00
Mark Shannon 8863a0fcc5
bpo-44525: Specialize simple Python calls. (GH-29033) 2021-10-20 16:08:28 +01:00
Serhiy Storchaka 8d6740f489
bpo-45229: Make doctest tests discoverable (GH-28986) 2021-10-20 16:36:27 +02:00
Thomas Grainger a774285e7d
bpo-25625: [doc] fix async/aync typo (GH-29091) 2021-10-20 15:51:07 +02:00
Petr Viktorin 98fa3b53e2
bpo-45474: Exclude all of marshal.h if Py_LIMITED_API is defined (GH-29061)
Also, reword the What's New messages: this doesn't change the limited API, it only brings the Py_LIMITED_API macro closer to the ideal of only allowing the limited API.

Automerge-Triggered-By: GH:encukou
2021-10-20 02:32:14 -07:00
Zachary Ware 085ccb0f17
bpo-38371: Remove remaining use of tk.split from bigmem tcl test (GH-29082) 2021-10-19 22:34:23 -05:00
Zachary Ware 4fe454c6f5
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077)
Since v8.6.11, a few configuration options seem to accept an empty value
where they did not previously; particularly the `type` of a `Menu`
widget, and the `compound` of any ttk widget with a label.  Providing an
explicit expected error message to `checkEnumParam` bypasses the check
of an empty value, which no longer raises `TclError`.
2021-10-19 21:54:19 -05:00
Ken Jin 3163e68c34
bpo-44525: Specialize `CALL_FUNCTION` for C function calls (GH-26934) 2021-10-20 00:16:36 +01:00