Commit Graph

120150 Commits

Author SHA1 Message Date
Ronald Oussoren bee627c1e2
gh-113384: Skip test_freeze for framework builds on macOS (#113390) 2023-12-22 11:35:54 +01:00
Irit Katriel c31943af16
gh-113297: Fix segfault in compiler for with statement with 19 context managers (#113327) 2023-12-22 01:50:26 +00:00
Sam Gross 9afb0e1606
gh-112027: Don't print mimalloc warning after mmap() call (gh-113372)
gh-112027: Don't print mimalloc warning after mmap

This changes the warning to a "verbose"-level message in prim.c. The
address passed to mmap is only a hint -- it's normal for mmap() to
sometimes not respect the hint and return a different address.
2023-12-22 09:38:27 +09:00
Alex Waygood 7de9855410
Bump mypy to 1.8.0 (#113385) 2023-12-21 23:14:24 +00:00
Raymond Hettinger d058eaeed4
gh-113157 gh-89519: Fix method descriptors (gh-113233)
Restore behaviors before classmethod descriptor chaining was introduced.
2023-12-21 16:08:35 -06:00
Raymond Hettinger 6a5b4736e5
gh-113313: Note that slice support is not required for all sequences. (gh-113377) 2023-12-21 15:54:59 -06:00
Sam Gross 31d8757b60
gh-113370: Add missing obmalloc.o dependencies on mimalloc (#113371) 2023-12-21 22:44:55 +01:00
Shantanu 61e8184095
gh-95754: Better AttributeError on partially initialised module (#112577)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-21 13:24:10 -08:00
Jason R. Coombs 2d91409c69
gh-113174: Sync with importlib_metadata 7.0 (#113175)
* Sync with importlib_metadata 7.0.0

* Add blurb

* Update docs to reflect changes.

* Link datamodel docs for object.__getitem__

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Add what's new for removed __getattr__

* Link datamodel docs for object.__getitem__

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Add exclamation point, as that seems to be used for other classes.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-21 15:04:05 -05:00
Namhyung Kim 6b70c3dc5a
gh-113343: Fix error check on mmap(2) (#113342)
Fix error check on mmap(2)

It should check MAP_FAILED instead of NULL for error.

On mmap(2) man page:

  RETURN VALUE
       On success, mmap() returns a pointer to the mapped area.
       On error, the value MAP_FAILED (that is, (void *) -1) is
       returned, and errno is set to indicate the error.
2023-12-21 19:28:55 +00:00
Serhiy Storchaka 5f7a80fd02
gh-113325: Remove a debugging print accidentally left in test_symtable (GH-113368) 2023-12-21 20:12:07 +02:00
Ronald Oussoren df1eec3dae
gh-65701: document that freeze doesn't work with framework builds on macOS (#113352)
* gh-65701: document that freeze doesn't work with framework builds on macOS

The framework install is inherently incompatible with freeze. Document
that that freeze doesn't work with framework builds and bail out
early when trying to run freeze anyway.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-12-21 16:28:00 +01:00
Erlend E. Aasland 526d0a9b6e
gh-110383: Improve accuracy of str.split() and str.rsplit() docstrings (#113355)
Clarify split direction in the docstring body,
instead of in the 'maxsplit' param docstring.
2023-12-21 15:22:39 +01:00
Ronald Oussoren ca8b1d0958
gh-87277: Don't look for X11 browsers on macOS in webbrowser (#24480)
The installation of XQuartz on macOS will unconditionally
set the $DISPLAY variable. The X11 server will be launched
when a program tries to access the display.  This results
in launching the X11 server when using the webbrowser module,
even though X11 browsers won't be used in practice.
2023-12-21 14:43:38 +01:00
Mark Shannon 723f4d6698
GH-111485: Delete the old generator code. (GH-113321) 2023-12-21 12:46:28 +00:00
Erlend E. Aasland fae096cd4b
gh-113336: Remove the 'version' directive from Argument Clinic (#113341)
The 'version' directive was introduced with gh-63929 in Nov 2013. It has
not been in use in the CPython code base, and the 'version' variable has
never been bumped.
2023-12-21 13:10:41 +01:00
Erlend E. Aasland 4b90b5d857
Docs: update URL in Argument Clinic CLI help text (#113351)
The Argument Clinic docs was moved to the devguide earlier in 2023.
2023-12-21 09:28:43 +00:00
Jan Brasna 24f8ff28a3
Docs: OpenSSL wording ambiguity (#113296) 2023-12-21 00:50:25 -07:00
Gregory P. Smith 103c4ea274
gh-112305: Fix check-clean-src to detect frozen_modules .h files. (#113344)
A typo left this check broken so many of us who do out-of-tree builds
were seeing strange failures due to bad `Python/frozen_modules/*.h`
files being picked up from the source tree and used at build time from
different Python versions leading to errors like:

`Fatal Python error: _PyImport_InitCore: failed to initialize importlib`

Or similar once our build got to an "invoke the interpreter"
bootstrapping step due to incorrect bytecode being embedded.
2023-12-20 23:32:13 -08:00
Carey Metcalfe a2dd0e7038
gh-111375: Use `NULL` rather than `None` in the exception stack to indicate that an exception was handled (#113302) 2023-12-21 01:46:41 +00:00
Martijn Pieters 1ff0238594
GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (#113334)
When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object.

This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).
2023-12-20 15:09:01 -08:00
Sam Gross a3e8afe0a3
gh-113330: Fix mimalloc headers reference (#113331)
The `MIMALLOC_HEADERS` variable is defined in the Makefile.pre.in, not
the configure script, so we should use the `$(MIMALLOC_HEADERS)` syntax
instead of the `@MIMALLOC_HEADERS@` syntax.
2023-12-20 22:07:17 +01:00
Guido van Rossum 713e42822f
GH-111485: Fix DEFAULT_OUTPUT in opcode_metadata_generator.py (#113324) 2023-12-20 10:05:48 -08:00
Seth Michael Larson b221e03010
gh-113257: Automatically generate pip SBOM metadata from wheel (#113295)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-20 17:28:20 +00:00
Kir 11ee912327
gh-113255: Clarify docs for `typing.reveal_type` (#113286)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-12-20 17:21:23 +00:00
Mark Shannon de8a4e52a5
GH-111485: Generate `TARGET` table for computed goto dispatch. (GH-113319) 2023-12-20 15:09:12 +00:00
Mark Shannon e96f26083b
GH-111485: Generate instruction and uop metadata (GH-113287) 2023-12-20 14:27:25 +00:00
Christopher Chavez a545a86ec6
gh-111178: Make slot functions in typeobject.c have compatible types (GH-112752) 2023-12-20 15:13:44 +01:00
Donghee Na 57b7e52790
gh-112205: Support docstring for `@getter` (#113160)
---------

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-12-20 21:52:12 +09:00
Rodrigo Girão Serrão 5a7cc667f8
Fix typo in datamodel docs (#113314)
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-12-20 11:58:38 +00:00
David Greaves 22b8945d76
Fix typo in collections.abc docs example (#113310)
Calling the instance reference arg for the __next__ method, "next", seems misleading as it would normally just be "self"
2023-12-20 09:51:16 +00:00
Ethan Furman 4afa7be32d
add Ujan to ACKS for work on enum docs (GH-113301) 2023-12-19 17:55:24 -08:00
Erlend E. Aasland 14d4c7742a
gh-111973: Update Windows installer to use SQLite 3.44.2 (#113281) 2023-12-19 23:31:52 +01:00
Marat Idrisov e1117cb886
gh-87264: Convert tarinfo type to stat type (GH-113230)
Co-authored-by: val-shkolnikov <val@nvsoft.net>
2023-12-19 11:04:43 -08:00
Erlend E. Aasland 6a1d5a4c0f
gh-111973: Update macOS installer to use SQLite 3.44.2 (GH-113279) 2023-12-19 13:23:52 -05:00
Hugo van Kemenade 76bef3832b
gh-101100: Fix Sphinx warnings in `library/ast.rst` (#113289)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-19 15:44:57 +00:00
Erlend E. Aasland 6a69b80d1b
gh-112205: Require @getter and @setter to be methods (#113278)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-19 12:32:28 +01:00
Irit Katriel e51b400945
gh-113054: Compiler no longer replaces a redundant jump with no line number by a NOP (#113139) 2023-12-19 11:04:44 +00:00
ryan-duve 76d757b38b
gh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236) 2023-12-19 11:29:55 +01:00
Unique-Usman d71fcdee0f
gh-113208: Mention namespace packages don't require __init__.py (#113209)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-12-19 10:39:57 +02:00
Seth Michael Larson 4658464e9c
gh-113257: Fix SBOM metadata for pip 23.3.2 (#113262)
Fix SBOM metadata for pip 23.3.2
2023-12-19 08:34:53 +02:00
Terry Jan Reedy fa9ba02353
gh-113269: IDLE - Fix test_editor hang (macOS) (#113271)
Hangs on installed 3.13.0a2 on macOS Catalina.
Behavior on installed 3.12.1 and 3.11.7 is unknown.
2023-12-19 05:26:11 +00:00
Gregory P. Smith c895403de0
gh-113119: Fix the macOS framework installer build (#113268)
`--enable-framework` builds were failing.  we apparently do not have good CI & buildbot coverage here.
2023-12-18 21:18:30 -08:00
Ronald Oussoren 893c9ccf48
gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942)
Change _osx_support.get_platform_osx() to make sure that the
version number in the result includes at least a major and
minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is
set to just a major version (e.g. 14).

This matches the versions expected by pip when selecting
appropriate wheels for installation.
2023-12-18 18:51:58 -05:00
Ronald Oussoren 4cfce3a4da
gh-108269: Add CFBundleAllowMixedLocalizations to Info.plist on macOS (GH-113213)
Adding this key with a value of true enables detecting the
users prefered language in libraries accessing system APIs
for this.
2023-12-18 18:41:41 -05:00
Illia Volochii 41336a72b9
gh-113199: Make read1() and readline() of HTTPResponse close IO after reading all data (GH-113200) 2023-12-18 22:17:16 +02:00
Itamar Oren 2feec0fc7f
gh-113039: Avoid using leading dots in the include path for frozen getpath.py (GH-113022) 2023-12-18 17:04:40 +00:00
Donghee Na d00dbf5415
gh-112535: Implement fallback implementation of _Py_ThreadId() (gh-113185)
---------

Co-authored-by: Sam Gross <colesbury@gmail.com>
2023-12-18 16:54:49 +00:00
dreamflow 59f0766ae5
gh-108113: [docs] mention PyCF_OPTIMIZED_AST in ast Compiler Flags (#113241) 2023-12-18 16:14:15 +00:00
Mark Shannon 70d378cdaa
GH-111485: Break up instructions with unused cache entries into component micro-ops (GH-113169) 2023-12-18 13:16:45 +00:00