0
0
mirror of https://github.com/python/cpython.git synced 2024-12-18 14:24:33 +08:00
Commit Graph

49155 Commits

Author SHA1 Message Date
Cyker Way
68c46ae68b
gh-97545: Make Semaphore run faster. () 2022-09-26 16:38:00 -07:00
Michael Curran
d79dd929ac
bpo-38748: Add ctypes test for stack corruption due to misaligned arguments (GH-26204) 2022-09-26 17:27:44 +01:00
Victor Stinner
41351662bc
gh-96848: Fix -X int_max_str_digits option parsing ()
Fix command line parsing: reject "-X int_max_str_digits" option with
no value (invalid) when the PYTHONINTMAXSTRDIGITS environment
variable is set to a valid limit.
2022-09-26 17:20:08 +02:00
Dennis Sweeney
05c92759b6
Reject invalid opcode names in assertInBytecode (GH-97548) 2022-09-25 20:55:53 +01:00
Kumar Aditya
c8c0afc713
GH-78724: Initialize struct.Struct in __new__ (GH-94532)
Closes https://github.com/python/cpython/issues/75960
Closes https://github.com/python/cpython/issues/78724
2022-09-25 14:32:48 +01:00
Terry Jan Reedy
9704f8da33
gh-97527: IDLE: protect macosx Tk() call when no GUI ()
Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
2022-09-24 17:38:58 -04:00
Serhiy Storchaka
db39050396
gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961) 2022-09-24 14:38:53 +03:00
Michael Droettboom
f00383ec9b
gh-94808: Coverage: Test uppercase string literal prefixes (GH-95925) 2022-09-24 13:43:16 +03:00
Steve Dower
a4ac14faa5
gh-77171: Fixes SubFormat check to compare the entire value. Add docs (GH-97509) 2022-09-23 16:08:21 +01:00
Kumar Aditya
282edd7b2a
GH-85760: Fix race in calling process_exited callback too early () 2022-09-22 09:43:47 -07:00
Cyker Way
24e0379624
gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee ()
The main problem was that an unluckily timed task cancellation could cause
the semaphore to be stuck. There were also doubts about strict FIFO ordering
of tasks allowed to pass.

The Semaphore implementation was rewritten to be more similar to Lock.
Many tests for edge cases (including cancellation) were added.
2022-09-22 09:34:45 -07:00
Brandt Bucher
8fd2c3b75b
GH-96975: Skip incomplete frames in PyEval_GetFrame (GH-97003) 2022-09-22 09:16:52 -07:00
Batuhan Taskaya
5a32eeced2
gh-96954: Add tests for unicodedata.name/lookup ()
They were undertested, and since  might involve a
rewrite of this part of the code we want to ensure that
there won't be any behavioral change.

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2022-09-21 14:52:40 +02:00
Nikita Sobolev
57463d43dc
gh-90808: add more examples to test_sched.test_priority () 2022-09-20 18:34:13 -07:00
wim glenn
58882640d6
[Enum] fix typos (GH-96285) 2022-09-20 16:31:05 -07:00
Nikita Sobolev
9b58eaf98c
gh-95591: [Enum] use _FlagTests base class (GH-96475) 2022-09-20 16:08:39 -07:00
Brandt Bucher
dfc73b5724
GH-95921: Fix positions for some chained comparisons (GH-96968) 2022-09-20 12:22:24 -07:00
serge-sans-paille
fc05107af9
gh-96711: Enhance SystemError message upon Invalid opcode ()
Raise verbose SystemError instead of printing debug information
upon Invalid opcode.

Fix 
2022-09-20 12:00:34 +02:00
Gregory P. Smith
e61ca22431
gh-95865: Further reduce quote_from_bytes memory consumption ()
on large input values.  Based on Dennis Sweeney's chunking idea.
2022-09-19 16:06:25 -07:00
Brandt Bucher
c10e33ac11
GH-96864: Check for error between line and opcode events (GH-96880) 2022-09-19 14:02:24 -07:00
Terry Jan Reedy
aa671b48d6
gh-87179: Fix more IDLE class headers ()
Remove unneeded '(object)' and '()'.
2022-09-17 17:53:23 -04:00
Guido van Rossum
487135a396
Revert "gh-87079: Warn on unintended signal wakeup fd override in asyncio ()" ()
This reverts commit 0587810698.
Reason: This broke buildbots (some warnings added by that commit are turned to errors in the SSL buildbot).
Repro:  ./python Lib/test/ssltests.py
2022-09-17 14:12:45 -07:00
Lysandros Nikolaou
7e36abbb78
gh-91210: Improve error message when non-default param follows default (GH-95933)
- Improve error message when parameter without a default follows one with a default
- Show same error message when positional-only params precede the default/non-default sequence
2022-09-17 10:09:28 -07:00
Michel Hidalgo
0587810698
gh-87079: Warn on unintended signal wakeup fd override in asyncio ()
Warn on loop initialization, when setting the wakeup fd disturbs a previously set wakeup fd, and on loop closing, when upon resetting the wakeup fd, we find it has been changed by someone else.
2022-09-17 08:07:54 -07:00
Vinay Sajip
2cd70ffb3f
gh-96861: Check for unset sys.executable during venv creation. (GH-96887) 2022-09-17 12:58:31 +01:00
Serhiy Storchaka
426d72e7dd
gh-96052: codeop: fix handling compiler warnings in incomplete input (GH-96132)
Previously codeop.compile_command() emitted compiler warnings (SyntaxWarning or
DeprecationWarning) and raised a SyntaxError for incomplete input containing
a potentially incorrect code. Now it always returns None for incomplete input
without emitting any warnings.
2022-09-16 17:37:30 +03:00
Dennis Sweeney
303bd88047
Fix ResourceWarning in test.test_frame (GH-96831) 2022-09-15 18:31:45 +01:00
adphrost
a41ed975e8
GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)
Co-authored-by: Andrew Frost <adfrost@fb.com>
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
2022-09-15 16:42:37 +01:00
Nikita Sobolev
e37ac5fbb6
gh-96751: Remove dead code from CALL_FUNCTION_EX opcode (GH-96752) 2022-09-15 10:33:13 +01:00
Ruan Comelli
8e9a37dde4
Fix type annotation of pstats.FunctionProfile.ncalls ()
* fix: annotate `pstats.FunctionProfile.ncalls` as `str`

This change aligns the type annotation of `pstats.FunctionProfile.ncalls` with its runtime type.
2022-09-14 18:33:43 -07:00
Yusuke Kadowaki
92338f8f19
gh-77171 Support WAVE_FORMAT_EXTENSIBLE in the wave module (GH-96777)
The test file, a modified version of Lib/test/audiodata/pluck-pcm24.wav, was provided by Andrea Celletti on the bug tracker.

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-09-14 14:34:40 +01:00
Nikita Sobolev
f2d749a2c2
gh-96784: Cover more typing special forms in get_args() () 2022-09-13 19:35:52 -07:00
Nikita Sobolev
9b3d2d008a
gh-96769: Cover more typing special forms to be unsubclassable () 2022-09-13 19:35:16 -07:00
Benjamin Peterson
fd1e477f53
closes gh-96734: Update to Unicode 15.0.0. (GH-96809) 2022-09-13 15:45:12 -07:00
Dennis Sweeney
69d9a08099
gh-94808: improve comments and coverage of fastsearch.h (GH-96760) 2022-09-13 14:25:10 -04:00
Irit Katriel
6d7a0e0dd7
gh-87092: reduce redundancy and repetition in compiler's optimization stage (GH-96713) 2022-09-13 13:03:41 +01:00
Christian Heimes
1fc8bd3710
gh-95853: Multiple ops and debug for wasm_build.py () 2022-09-11 09:51:23 +02:00
Dong-hee Na
8d75a13fde
gh-90751: memoryview now supports half-float ()
Co-authored-by: Antoine Pitrou <antoine@python.org>
2022-09-10 22:44:10 +02:00
Hendrik Makait
6281affee6
gh-94972: document that shield users need to keep a reference to their task ()
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2022-09-10 07:34:14 -07:00
Gregory P. Smith
11e3548fd1
gh-96710: Make the test timing more lenient for the int/str DoS regression test. ()
A regression would still absolutely fail and even a flaky pass isn't
harmful as it'd fail most of the time across our N system test runs.

Windows has a low resolution timer and CI systems are prone to odd
timing so this just gives more leeway to avoid flakiness.
2022-09-09 12:51:34 -07:00
Dennis Sweeney
569ca27293
gh-96624: Fix test_dotted_but_module_not_loaded in testpatch.py (GH-96691)
* Update test_dotted_but_module_not_loaded to reflect the move of unittest.test to test.test_unittest.
2022-09-08 23:46:13 -04:00
Guido van Rossum
df50938f58
GH-46412: More efficient bool() for ndbm/_gdbmmodule () 2022-09-08 19:32:40 -07:00
Steve Dower
95d6330a3e
gh-96684: Silently suppress COM security errors in _wmi module (GH-96690) 2022-09-08 22:02:04 +01:00
Zachary Ware
9c8f379433
gh-96465: Clear fractions hash lru_cache under refleak testing (GH-96689)
Automerge-Triggered-By: GH:zware
2022-09-08 11:52:07 -07:00
finefoot
c06c001b30
gh-92734: Add indentation feature to reprlib.Repr (GH-92735) 2022-09-08 13:51:44 -05:00
Mark Shannon
aa3b4cf779
GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2022-09-08 17:16:48 +01:00
philg314
b9634ac776
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict () 2022-09-08 12:12:14 +01:00
Michael Droettboom
8bc356a7dd
gh-96268: Fix loading invalid UTF-8 ()
This makes tokenizer.c:valid_utf8 match stringlib/codecs.h:decode_utf8.

It also fixes an off-by-one error introduced in 3.10 for the line number when the tokenizer reports bad UTF8.
2022-09-07 14:23:54 -07:00
Steve Dower
de33df27aa
gh-89545: Updates platform module to use new internal _wmi module on Windows to directly query OS properties (GH-96289) 2022-09-07 21:09:20 +01:00
Raymond Hettinger
3eaf70d836
GH-96465: Cache hashes for Fraction instances (GH-96483) 2022-09-07 10:31:50 -05:00