Commit Graph

117838 Commits

Author SHA1 Message Date
Sviatoslav Sydorenko e7cd55753b
Introduce a gate/check GHA job (#97533)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-06 18:06:18 +03:00
Alex Waygood d0c6ba956f
gh-104683: clinic.py: Don't needlessly reimplement `contextlib.redirect_stdout` (#106478)
clinic.py: Don't needlessly reimplement `contextlib.redirect_stdout`
2023-07-06 14:23:02 +01:00
Ariel Eizenberg 99b00efd5e
gh-106238: Handle KeyboardInterrupt during logging._acquireLock() (GH-106239)
Co-authored-by: Ariel Eizenberg <ariel.eizenberg@pagaya.com>
2023-07-06 08:02:22 +01:00
C.A.M. Gerlach 38aa89a52e
Doc: Add missing ref labels to exception groups/notes sections (#106465) 2023-07-05 23:41:04 -06:00
Carl Meyer 13aefd175e
gh-105256: What's New note for comprehension over locals() (#106378) 2023-07-05 18:12:21 -06:00
Carl Meyer 104d7b760f
gh-105340: include hidden fast-locals in locals() (#105715)
* gh-105340: include hidden fast-locals in locals()
2023-07-05 17:05:02 -06:00
Carl Meyer 838406b4fc
gh-106292: restore checking __dict__ in cached_property.__get__ (#106380)
* gh-106292: restore checking __dict__ in cached_property.__get__

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2023-07-05 17:01:35 -06:00
Dong-hee Na 217f47d6e5
gh-96844: Improve error message of list.remove (gh-106455) 2023-07-06 07:19:49 +09:00
Jelle Zijlstra c16ea94abc
shlex docs: remove outdated note (#106463)
As the versionchanged notice says, this note is no longer true on 3.12+.
2023-07-05 13:38:53 -07:00
JosephSBoyle 70e2a42647
gh-102542 Remove unused bytes object and bytes slicing (#106433)
Remove unused bytes object and bytes slicing

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-07-05 09:17:37 -07:00
Kristján Valur Jónsson 12a9813808
Clarify state of CancelledError in doc (#106453)
This change makes it explicit that asyncio.CancelledError is not a subclass of Exception.
2023-07-05 08:07:02 -07:00
Erlend E. Aasland 9d1d4f9c73
gh-64595: Fix regression in file write logic in Argument Clinic (#106449)
Revert the two commits that introduced the regressions:

 - gh-104152
 - gh-104507
2023-07-05 13:23:22 +02:00
Erlend E. Aasland a941bd6c53
gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (#106443) 2023-07-05 08:33:05 +00:00
Jelle Zijlstra ad075682ba
tp_flags docs: fix indentation (#106420) 2023-07-05 05:08:25 +00:00
Erlend E. Aasland 7bb9fa5ae4
gh-104050: Partially annotate Argument Clinic CLanguage class (#106437)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-04 23:07:57 +00:00
Erlend E. Aasland 2fb9480c83
gh-106368: Add tests for formatting helpers in Argument Clinic (#106415)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-04 22:35:57 +00:00
Erlend E. Aasland 22087516bc
gh-104050: Annotate Argument Clinic parameter permutation helpers (#106431)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-04 22:15:10 +00:00
Erlend E. Aasland 110b97c94c
gh-104050: Annotate toplevel functions in clinic.py (#106435)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-04 22:13:30 +00:00
Guido van Rossum 17af98227f
gh-106320: Fix specialize.c compilation by including pycore_pylifecycle.h (#106434)
Compilation of Python/specialize.c was broken on macOS for me by gh-106400.
2023-07-04 21:42:12 +00:00
Alex Waygood eeb5c63179
Add some codeowners for `Tools/clinic/` (#106430)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-07-04 19:45:32 +00:00
Nikita Sobolev c5dacc8fa0
gh-106217: Truncate the issue body size of `new-bugs-announce-notifier` (#106423) 2023-07-04 21:20:00 +03:00
Mario Corchero 2dfc7fae78
gh-61215: Rename `wait_until_any_call` to `wait_until_any_call_with` (#106414)
mock: Rename `wait_until_any_call` to `wait_until_any_call_with`

Rename the method to be more explicit that it expects the args and
kwargs to wait for.
2023-07-04 18:34:43 +01:00
Inada Naoki 8a4bba8b97
gh-106162: array: suppress warning in test_array (#106404)
array: suppress warning in test_array
2023-07-05 02:02:49 +09:00
Victor Stinner aa85c93792
gh-106320: Remove _PyInterpreterState_HasFeature() (#106425)
Remove the _PyInterpreterState_HasFeature() function from the C API:
move it to the internal C API (pycore_interp.h). No longer export
the function.
2023-07-04 16:55:45 +00:00
Mark Shannon 318ea2c72e
GH-106360: Support very basic superblock introspection (#106422)
* Add len() and indexing support to uop superblocks.
2023-07-04 17:23:00 +01:00
Nikita Sobolev 80f1c6c49b
gh-106406: Fix _Py_IsInterpreterFinalizing() in _winapi.c (#106408) 2023-07-04 16:19:20 +02:00
Lysandros Nikolaou dfe4de2038
gh-106396: Special-case empty format spec to gen empty JoinedStr node (#106401) 2023-07-04 14:19:08 +02:00
Erlend E. Aasland 8f6df5e9cb
gh-106368: Add tests for permutation helpers in Argument Clinic (#106407)
Added new test class PermutationTests()
2023-07-04 11:36:40 +00:00
Brandt Bucher e4ba71fe4b
GH-106008: Fix refleak when peepholing `None` comparisons (#106367) 2023-07-04 11:03:57 +01:00
Victor Stinner c9ce983ae1
gh-106320: Remove private pylifecycle.h functions (#106400)
Remove private pylifecycle.h functions: move them to the internal C
API ( pycore_atexit.h, pycore_pylifecycle.h and pycore_signal.h). No
longer export most of these functions.

Move _testcapi.test_atexit() to _testinternalcapi.
2023-07-04 09:41:43 +00:00
Victor Stinner 8a73b57b9b
gh-106320: Remove _PyUnicode_TransformDecimalAndSpaceToASCII() (#106398)
Remove private _PyUnicode_TransformDecimalAndSpaceToASCII() and other
private _PyUnicode C API functions: move them to the internal C API
(pycore_unicodeobject.h). No longer most of these functions.

Replace _testcapi.unicode_transformdecimalandspacetoascii() with
_testinternal._PyUnicode_TransformDecimalAndSpaceToASCII().
2023-07-04 08:59:09 +00:00
Victor Stinner ec931fc394
gh-106320: Remove _PyBytesWriter C API (#106399)
Remove the _PyBytesWriter C API: move it to the internal C API
(pycore_bytesobject.h).
2023-07-04 08:27:23 +00:00
Victor Stinner d8c5d76da2
gh-106320: Remove private _PyUnicode codecs C API functions (#106385)
Remove private _PyUnicode codecs C API functions: move them to the
internal C API (pycore_unicodeobject.h). No longer export most of
these functions.
2023-07-04 07:29:52 +00:00
Erlend E. Aasland 3406f8cce5
gh-106368: Increase Argument Clinic test coverage (#106389)
Add:

- test_disallowed_gropuing__no_matching_bracket
- test_double_slash
2023-07-03 23:58:27 +00:00
Victor Stinner b425613580
gh-106320: Fix _PyImport_GetModuleAttr() declaration (#106386)
Replace PyAPI_DATA() with PyAPI_FUNC().
2023-07-03 23:37:48 +00:00
Erlend E. Aasland 648688c137
gh-106368: Harden Argument Clinic parser tests (#106384) 2023-07-03 23:10:47 +00:00
Victor Stinner 2e92edbf6d
gh-106320: Remove private _PyImport C API functions (#106383)
* Remove private _PyImport C API functions: move them to the internal
  C API (pycore_import.h).
* No longer export most of these private functions.
* _testcapi avoids private _PyImport_GetModuleAttrString().
2023-07-03 23:02:07 +00:00
Victor Stinner f6d2bb18ab
gh-86085: Remove _PyCodec_Forget() declaration (#106377)
The code was already removed by:
commit c9f696cb96.
2023-07-04 00:52:27 +02:00
Victor Stinner 506cfdf141
gh-106320: Remove more private _PyUnicode C API functions (#106382)
Remove more private _PyUnicode C API functions:
move them to the internal C API (pycore_unicodeobject.h).

No longer export most pycore_unicodeobject.h functions.
2023-07-03 22:35:46 +00:00
Erlend E. Aasland b24479dcba
gh-104050: Annotate more Argument Clinic DSLParser state methods (#106376)
Annotate the following methods:

- state_parameter()
- state_parameter_docstring_start()

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-03 22:10:46 +00:00
Erlend E. Aasland 3ee8dac7a1
gh-106368: Clean up Argument Clinic tests (#106373) 2023-07-03 21:57:20 +00:00
Erlend E. Aasland 71b40443fe
gh-104683: Modernise Argument Clinic parameter state machine (#106362)
Use enums and pattern matching to make the code more readable.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-03 21:16:21 +00:00
Raymond Hettinger 7709037095
Small speed-up for the convolve() recipe. (GH-106371) 2023-07-03 15:38:38 -05:00
Barney Gale b4efdf8cda
GH-106330: Fix matching of empty path in `pathlib.PurePath.match()` (GH-106331)
We match paths using the `_lines` attribute, which is derived from the
path's string representation. The bug arises because an empty path's string
representation is `'.'` (not `''`), which is matched by the `'*'` wildcard.
2023-07-03 21:29:44 +01:00
Mark Shannon e5862113dd
GH-104584: Fix ENTER_EXECUTOR (GH-106141)
* Check eval-breaker in ENTER_EXECUTOR.

* Make sure that frame->prev_instr is set before entering executor.
2023-07-03 21:28:27 +01:00
Erlend E. Aasland 7f4c8121db
gh-106368: Increase Argument Clinic test coverage (#106369)
Add tests for 'self' and 'defining_class' converter requirements.
2023-07-03 20:16:50 +00:00
Charlie Zhao bf06c6825c
gh-106078: Move `context template` to decimal module global state (#106346) 2023-07-04 01:40:01 +05:30
Guido van Rossum 2028a4f6d9
gh-106290: Fix edge cases around uops (#106319)
- Tweak uops debugging output
- Fix the bug from gh-106290
- Rename `SET_IP` to `SAVE_IP` (per https://github.com/faster-cpython/ideas/issues/558)
- Add a `SAVE_IP` uop at the start of the trace (ditto)
- Allow `unbound_local_error`; this gives us uops for `LOAD_FAST_CHECK`, `LOAD_CLOSURE`, and `DELETE_FAST`
- Longer traces
- Support `STORE_FAST_LOAD_FAST`, `STORE_FAST_STORE_FAST`
- Add deps on pycore_uops.h to Makefile(.pre.in)
2023-07-03 20:05:11 +00:00
Carl Meyer 58906213cc
gh-91053: make func watcher tests resilient to other func watchers (#106286) 2023-07-03 08:25:22 -06:00
Erlend E. Aasland 2e2daac2f1
gh-104050: Add more type hints to Argument Clinic DSLParser() (#106354)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-03 14:03:31 +00:00