Nikita Sobolev
fd9d70a94d
gh-106300: Improve errors testing in test_unittest.test_runner (GH-106737)
...
Use a custom exception to prevent unintentional silence of actual errors.
2023-08-16 12:20:42 +03:00
SKO
abd9cc52d9
gh-100061: Proper fix of the bug in the matching of possessive quantifiers (GH-102612)
...
Restore the global Input Stream pointer after trying to match a sub-pattern.
Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
2023-08-16 10:43:45 +03:00
6t8k
a86df298df
gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802)
...
Restore following CPython <= 3.10.5 behavior of shutil.make_archive()
that went away as part of gh-93160:
Do not create an empty archive if root_dir is not a directory, and, in
that case, raise FileNotFoundError or NotADirectoryError regardless
of format choice. Beyond the brought-back behavior, the function may
now also raise these exceptions in dry_run mode.
2023-08-16 10:00:03 +03:00
Yuxin Wu
a794ebeb02
More actionable error message when spawn is incorrectly used. ( #102203 )
...
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-08-15 18:03:45 -07:00
Erlend E. Aasland
bb456a08a3
gh-106368: Argument Clinic: Add tests for cloned functions with custom C base names ( #107977 )
2023-08-15 14:45:53 -06:00
Finn Womack
0932272431
gh-106242: Fix path truncation in os.path.normpath (GH-106816)
2023-08-15 16:33:00 +01:00
Erlend E. Aasland
607f18c894
gh-107972: Argument Clinic: Ensure a C basename is provided after 'as' ( #107973 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-15 14:41:40 +00:00
Erlend E. Aasland
e90036c9bd
gh-107880: Argument Clinic: Fix regression in gh-107885 ( #107974 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-15 14:00:52 +00:00
Dong-hee Na
6515ec3d3d
gh-107963: Fix set_forkserver_preload to check the type of given list ( #107965 )
...
gh-107963: Fix set_forkserver_preload to check the type of given list
2023-08-15 15:58:12 +02:00
Lysandros Nikolaou
d66bc9e8a7
gh-107967: Fix infinite recursion on invalid escape sequence warning ( #107968 )
2023-08-15 11:26:42 +00:00
Erlend E. Aasland
13c36dc9ae
gh-93057: Deprecate positional use of optional sqlite3.connect() params ( #107948 )
2023-08-15 08:09:56 +00:00
Romuald Brunet
a482e5bf00
gh-76913: Add "merge extras" feature to LoggerAdapter (GH-107292)
2023-08-15 08:23:54 +01:00
Joon Hwan 김준환
c3887b57a7
gh-107910: Remove not needing newline in error message (GH-107928)
2023-08-14 12:26:18 +03:00
Erlend E. Aasland
9b75ada6e4
gh-107880: Teach Argument Clinic to clone __init__ and __new__ methods ( #107885 )
2023-08-13 12:13:11 +02:00
Erlend E. Aasland
ee40b3e20d
gh-107883: Argument Clinic: Handle full module/class path in Function.fulldisplayname ( #107884 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-12 23:46:00 +00:00
Nikita Sobolev
d93b4ac2ff
gh-101162: Forbid using issubclass() with GenericAlias as the 1st arg (GH-103369)
2023-08-11 22:12:11 +03:00
Carl Meyer
66e4edd734
gh-91051: fix segfault when using all 8 type watchers ( #107853 )
2023-08-11 12:42:26 -06:00
Serhiy Storchaka
04cc01453d
gh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832)
...
* Strings with length from 2**31-1 to 2**32-2 always caused MemoryError,
it doesn't matter how much memory is available.
* Strings with length exactly 2**32-1 caused OSError.
* Strings longer than 2**32-1 characters were truncated due to integer overflow bug.
* Strings containing the null character were truncated at the first null character.
Now strings longer than 2**31-1 characters caused OverflowError and the null character is allowed.
2023-08-11 21:13:46 +03:00
Serhiy Storchaka
a39f0a3506
gh-107782: Pydoc: fall back to __text_signature__ if inspect.signature() fails (GH-107786)
...
It allows to show signatures which are not representable in Python,
e.g. for getattr and dict.pop.
2023-08-11 20:51:36 +03:00
Andrew Geng
5f7d4ecf30
gh-106558: break ref cycles through exceptions in multiprocessing manager ( #106559 )
2023-08-11 17:44:18 +00:00
Raymond Hettinger
52e0797f8e
Extend _sqrtprod() to cover the full range of inputs. Add tests. (GH-107855)
2023-08-11 11:19:19 -05:00
Serhiy Storchaka
3901c991e1
gh-84805: Autogenerate signature for METH_NOARGS and METH_O extension functions (GH-107794)
2023-08-11 18:08:38 +03:00
Marc Mueller
16dcce2176
gh-107810: Improve DeprecationWarning for metaclasses with custom tp_new (GH-107834)
...
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2023-08-10 15:55:47 +00:00
Eric V. Smith
e4275f4df3
gh-107838: In dataclasses, improve error message when a non-default field follows a default field. (gh-107842)
...
Add the name of the previous default argument field in an error message.
2023-08-10 10:39:13 -04:00
Mark Shannon
1d976b2da2
GH-106485: Handle dict subclasses correctly when dematerializing __dict__ (GH-107837)
2023-08-10 13:34:00 +01:00
Mark Shannon
494e3d4436
GH-107774: Add missing audit event for PEP 669 (GH-107775)
2023-08-10 12:29:06 +01:00
Erlend E. Aasland
39ef93edb9
gh-95065: Argument Clinic: Add functional tests of deprecated positionals ( #107768 )
...
Move the "deprecated positinal" tests from clinic.test.c to
_testclinic.c. Mock PY_VERSION_HEX in order to prevent generated
compiler warnings/errors to trigger. Put clinic code for deprecated
positionals in Modules/clinic/_testclinic_depr_star.c.h for easy
inspection of the generated code.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-10 07:19:05 +00:00
denballakh
4845b9712f
gh-107409: set __wrapped__ attribute in reprlib.recursive_repr ( #107410 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-10 06:55:49 +00:00
Brandt Bucher
326f0ba1c5
GH-106485: Dematerialize instance dictionaries when possible (GH-106539)
2023-08-09 19:14:50 +00:00
Brandt Bucher
a9caf9cf90
GH-105848: Simplify the arrangement of CALL's stack (GH-107788)
2023-08-09 18:19:39 +00:00
Erlend E. Aasland
0a7f48b9a8
gh-95065: Produce nicer deprecation messages in Argument Clinic ( #107808 )
2023-08-09 13:28:18 +00:00
Erlend E. Aasland
1b3f5f24af
gh-104683: Argument Clinic: Params now render their own docstrings ( #107790 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-09 12:44:26 +00:00
Alex Waygood
65ce3652fa
gh-104683: Remove unused variables from Tools/clinic and tests for Tools/clinic ( #107771 )
2023-08-09 11:24:05 +01:00
Mark Shannon
52fbcf61b5
GH-107724: Fix the signature of PY_THROW callback functions. (GH-107725)
2023-08-09 09:30:50 +01:00
Raymond Hettinger
2fb484e625
Future-proof helper function with zero handling. (GH-107798)
2023-08-09 08:44:43 +01:00
Serhiy Storchaka
7b6e34e5ba
gh-106052: Fix bug in the matching of possessive quantifiers (gh-106515)
...
It did not work in the case of a subpattern containing backtracking.
Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups.
2023-08-09 08:47:57 +03:00
Erlend E. Aasland
0be3743f54
gh-104683: Add --exclude option to Argument Clinic CLI ( #107770 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-08 20:50:54 +00:00
Brandt Bucher
ea72c6fe3b
GH-107596: Specialize str[int] (GH-107597)
2023-08-08 13:42:43 -07:00
Raymond Hettinger
d4ac094cf9
Minor accuracy improvement for statistics.correlation() (GH-107781)
2023-08-08 17:12:52 +01:00
Eric Snow
f9e3ff1ea4
gh-105699: Re-enable the Multiple-Interpreters Stress Tests (gh-107572)
...
We had disabled them due to crashes they exposed, which have since been fixed.
2023-08-08 09:52:13 -06:00
Alex Waygood
7c5153de5a
gh-106368: Argument clinic: add tests for more failure paths ( #107731 )
2023-08-08 12:12:49 +00:00
Erlend E. Aasland
5df8b0d5c7
gh-95065: Argument Clinic: Add comment to preprocessor warning code ( #107766 )
2023-08-08 08:43:41 +00:00
Erlend E. Aasland
0db043dd5a
gh-95065: Make Argument Clinic append deprecation warnings to docstrings ( #107745 )
2023-08-08 08:41:09 +02:00
Eric Snow
707018cc75
gh-107630: Fix Remaining Subinterpreters Crashes on Py_TRACE_REFS Builds (gh-107750)
...
This is a follow-up to gh-107567 and gh-107733.
We skip test_basic_multiple_interpreters_deleted_no_reset on tracerefs builds. The test breaks interpreter isolation a little, which doesn't work well with Py_TRACE_REFS builds, so I feel fine about skipping the test.
2023-08-07 17:10:57 -06:00
Serhiy Storchaka
0191af97a6
gh-107735: Move just added C API tests to better place (GH-107743)
2023-08-07 21:04:11 +00:00
Serhiy Storchaka
bea5f93196
gh-107735: Add C API tests for PySys_GetObject() and PySys_SetObject() (GH-107736)
2023-08-07 22:29:01 +03:00
Serhiy Storchaka
16c9415fba
gh-107178: Add the C API tests for the Abstract Objects Layer (GH-107179)
...
Cover all the Mapping Protocol, almost all the Sequence Protocol
(except PySequence_Fast) and a part of the Object Protocol.
Move existing tests to Lib/test/test_capi/test_abstract.py and
Modules/_testcapi/abstract.c.
Add also tests for PyDict C API.
2023-08-07 18:51:43 +03:00
Gertjan van Zwieten
8579327879
gh-107715: Escape class name in regular expression (GH-107716)
...
This patch escapes the class name before embedding it in the regular expression
for `pat` in `doctest.DocTestFinder._find_lineno`. While class names do not
ordinarily contain special characters, it is possible to encounter these when a
class is created dynamically. Escaping the name will correctly return `None` in
this scenario, rather than potentially matching a different class or raising
`re.error` depending on the symbols used.
2023-08-07 18:24:02 +03:00
Serhiy Storchaka
ed64204716
gh-106566: Optimize (?!) in regular expressions (GH-106567)
2023-08-07 18:09:56 +03:00
Serhiy Storchaka
50e3cc9748
gh-100814: Fix exception for invalid callable value of Tkinter image option (GH-107692)
...
Passing a callable object as an option value to a Tkinter image now raises
the expected TclError instead of an AttributeError.
2023-08-07 17:38:55 +03:00