Commit Graph

116201 Commits

Author SHA1 Message Date
JosephSBoyle b097925858
gh-102507 Remove invisible pagebreak characters (#102531)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-03-08 13:58:14 +00:00
Alex Waygood 401d7a7f00
gh-102515: Remove unused imports in the `Lib/` directory (#102516) 2023-03-08 11:45:38 +00:00
sblondon 7d801f245e
Remove or update bitbucket links (GH-101963)
Since Mercurial removal from bitbucket.org, some links are broken.
They are replaced by github.com or webarchive.org links if available. Otherwise, they are removed.

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-03-08 11:24:39 +01:00
Nikita Sobolev 1f557f94c2
gh-101100: Fix sphinx warnings in `zipapp` and `zipfile` modules (#102526) 2023-03-08 08:19:05 +00:00
Kumar Aditya 1a84cc007e
GH-102397: Fix segfault from race condition in signal handling (#102399)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-03-08 13:29:39 +05:30
Marcin Wieczorek 061325e0d2
Fix style in argparse.rst (#101733) 2023-03-07 23:25:28 -08:00
Thomas Wouters 8fd55dd78e Merge in the release of Python 3.12.0a6. 2023-03-08 05:05:16 +01:00
Thomas Wouters 02b9a921cb Post 3.12.0a6 2023-03-08 05:04:38 +01:00
Kumar Aditya e499680100
fix typo in async generator code field name `ag_code` (#102448) 2023-03-08 09:09:50 +05:30
Carl Meyer 1e703a4733
gh-102381: don't call watcher callback with dead object (#102382)
Co-authored-by: T. Wouters <thomas@python.org>
2023-03-07 17:10:58 -07:00
Thomas Wouters f9774e57d8 Python 3.12.0a6 2023-03-07 22:48:18 +01:00
Irit Katriel a33ca2ad1f
gh-102493: fix normalization in PyErr_SetObject (#102502)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-07 13:27:46 -08:00
Irit Katriel 54060ae91d
gh-87092: compiler's CFG construction moved to after codegen stage (#102320) 2023-03-07 18:16:32 +00:00
C.A.M. Gerlach 4a3ea1fdd8
gh-95913: Consolidate build requirements changes in 3.11 WhatsNew (GH-98781)
Apply suggestion to combine build requirements changes in 3.11 WhatsNew

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-07 15:38:31 +01:00
Kumar Aditya d8485d6c8b
Remove redundant `_ensure_future` in favor of `ensure_future` in `asyncio` (#102398) 2023-03-07 08:44:55 +05:30
C.A.M. Gerlach 80b19a30c0
gh-95913: Edit Faster CPython section in 3.11 WhatsNew (GH-98429)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-07 10:45:52 +08:00
Eric Snow 8606697f49
gh-90110: Fix the c-analyzer Tool (#102483)
Some incompatible changes had gone in, and the "ignore" lists weren't properly undated. This change fixes that. It's necessary prior to enabling test_check_c_globals, which I hope to do soon.

Note that this does include moving last_resort_memory_error to PyInterpreterState.

https://github.com/python/cpython/issues/90110
2023-03-06 19:40:09 -07:00
Ned Deily f9cdeb7b99
gh-101759: Update macOS installer SQLite 3.40.1 checksum (gh-102485) 2023-03-06 20:02:24 -05:00
JosephSBoyle c84e6f32df
Remove unused import of `warnings` from `unittest.loader` (#102479) 2023-03-06 22:02:19 +00:00
Rémi Lapeyre d959bcd4a0
Add gettext support to tools/extensions/c_annotations.py (#101989) 2023-03-06 23:20:52 +02:00
Irit Katriel f105fe4f0a
gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives in sub interpreters module (#102472) 2023-03-06 17:49:31 +00:00
Hyunkyun Moon d3ca042c99
gh-95672: Fix versionadded indentation of get_pagesize in test.rst (gh-102455) 2023-03-06 22:56:19 +09:00
Pablo Galindo Salgado f533f216e6
gh-102416: Do not memoize incorrectly loop rules in the parser (#102467) 2023-03-06 14:41:53 +01:00
Barney Gale 6716254e71
GH-101362: Optimise PurePath(PurePath(...)) (GH-101667)
The previous `_parse_args()` method pulled the `_parts` out of any supplied `PurePath` objects; these were subsequently joined in `_from_parts()` using `os.path.join()`. This is actually a slower form of joining than calling `fspath()` on the path object, because it doesn't take advantage of the fact that the contents of `_parts` is normalized!

This reduces the time taken to run `PurePath("foo", "bar")` by ~20%, and the time taken to run `PurePath(p, "cheese")`, where `p = PurePath("/foo", "bar", "baz")`, by ~40%.

Automerge-Triggered-By: GH:AlexWaygood
2023-03-05 15:50:21 -08:00
Barney Gale 3e60e0213e
GH-101362: Check pathlib.Path flavour compatibility at import time (GH-101664)
This saves a comparison in `pathlib.Path.__new__()` and reduces the time taken to run `Path()` by ~5%.

Automerge-Triggered-By: GH:AlexWaygood
2023-03-05 14:46:45 -08:00
Barney Gale 3572c861d8
GH-101362: Call join() only when >1 argument supplied to pathlib.PurePath() (#101665)
GH-101362: Call join() only when >1 argument supplied to pathlib.PurePath

This reduces the time taken to run `PurePath("foo")` by ~15%
2023-03-05 22:00:56 +00:00
Alex Waygood 96e1022929
gh-102444: Fix minor bugs in `test_typing` highlighted by pyflakes (#102445) 2023-03-05 21:37:29 +00:00
Partha P. Mukherjee 32220543e2
GH-102341: Improve the test function for pow (#102342)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-03-05 12:31:26 -05:00
JosephSBoyle 7894bbe94b
Fix unused classes in a typing test (GH-102437)
As part of investigation issue https://github.com/python/cpython/issues/102433, I discovered what I believe to be an error where two classes `CI` and `DI` are not being used. The assertions beneath them act on `C` and `D`, duplicating existing assertions in this test.

Automerge-Triggered-By: GH:AlexWaygood
2023-03-05 07:07:44 -08:00
Yeojin Kim 9a478be1a4
gh-101979: argparse: fix a bug where parentheses in metavar argument of add_argument() were dropped (#102318) 2023-03-05 06:54:33 -08:00
Marta Gómez Macías 66aa78cbe6
gh-102356: Add thrashcan macros to filter object dealloc (#102426)
Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
2023-03-05 12:00:41 +01:00
Sergey B Kirpichev 5da379ca7d
Move around example in to_bytes() to avoid confusion (#101595)
Moves an example to be closer to the sentence that refers to it.
2023-03-05 09:31:56 +00:00
Kumar Aditya a74cd3ba5d
GH-97546: fix flaky asyncio `test_wait_for_race_condition` test (#102421) 2023-03-05 12:15:22 +05:30
Matthias Görgens eff9f43924
gh-96821: Add config option `--with-strict-overflow` (#96823)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <hauntsaninja@gmail.com>
2023-03-04 13:39:52 -08:00
Dustin Rodrigues e4609cbe4c
gh-101992: update pstlib module documentation (#102133) 2023-03-04 13:35:25 -08:00
Jaysinh Shukla 81763341ed
gh-63301: Set exit code when tabnanny CLI exits on error (#7699)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-03-04 13:32:13 -08:00
Byeongmin Choi 77a3196b7c
gh-101863: Fix wrong comments in EUC-KR codec (gh-102417) 2023-03-05 01:01:54 +09:00
Gouvernathor 90801e48fd
gh-102302 Micro-optimize `inspect.Parameter.__hash__` (#102303) 2023-03-04 15:08:57 +00:00
Alexey Izbyshev c2bd55d26f
gh-102179: Fix `os.dup2` error reporting for negative fds (#102180) 2023-03-04 19:54:08 +05:30
Raj 705487c655
gh-101892: Fix `SystemError` when a callable iterator call exhausts the iterator (#101896)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-03-04 19:51:29 +05:30
Mark Dickinson b022250e67
Remove unused internal macros (#102415)
Since #101826 was merged, the internal macro `_Py_InIntegralTypeRange` is unused, as are its supporting macros `_Py_IntegralTypeMax` and `_Py_IntegralTypeMin`. This PR removes them.

Note that `_Py_InIntegralTypeRange` doesn't actually work as advertised - it's not a safe way to avoid undefined behaviour in an integer to double conversion.
2023-03-04 12:20:14 +00:00
Jacob Bower 8de59c1bb9
gh-102021 : Allow multiple input files for interpreter loop generator (#102022)
The input files no longer use `-i`.
2023-03-03 20:59:21 -08:00
Wagner Alberto cb944d0be8
Add import of `unittest.mock.Mock` in documentation (#102346) 2023-03-03 22:55:31 +05:30
Nikita Sobolev 7b9132057d
gh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObject *` (#102390) 2023-03-03 22:46:50 +05:30
Owain Davies 4e7c0cbf59
gh-101754: Document that Windows converts keys in `os.environ` to uppercase (GH-101840) 2023-03-03 10:51:32 +00:00
Nikita Sobolev 12011dd8ba
gh-102324: Improve tests of `typing.override` (#102325)
Fixes #101564
2023-03-02 19:59:05 -08:00
Irit Katriel 71db5dbcd7
gh-102371: move _Py_Mangle from compile.c to symtable.c (#102372) 2023-03-02 18:38:22 +00:00
Michael K 73250000ac
Fix typos in documentation and comments (GH-102374)
Found some duplicate `to`s in the documentation and some code comments and fixed them.


[Misc/NEWS.d/3.12.0a1.rst](ed55c69ebd/Misc/NEWS.d/3.12.0a1.rst) also contains two duplicate `to`s, but I wasn't sure if it's ok to touch that file.  Looks auto generated.  I'm happy to amend the PR if requested. :)

Automerge-Triggered-By: GH:AlexWaygood
2023-03-02 07:26:49 -08:00
Dong-hee Na ed55c69ebd
gh-101101: Fix test_code_extra to reset value for refleak test (gh-102350) 2023-03-02 20:32:05 +09:00
Hyunkyun Moon 60597439ef
gh-95672: Update memory_watchdog to use test.support.get_pagesize (gh-102365) 2023-03-02 20:10:08 +09:00