Nikita Sobolev
80f30cf51b
gh-102029: Deprecate passing arguments to `_PyRLock` in `threading` ( #102071 )
2023-08-17 09:19:07 -07:00
Irit Katriel
0b243c2f66
gh-105481: opcode.h is no longer generated during the build ( #108080 )
2023-08-17 17:07:58 +01:00
Erlend E. Aasland
1344cfac43
gh-105539: Explict resource management for connection objects in sqlite3 tests ( #108017 )
...
- Use memory_database() helper
- Move test utility functions to util.py
- Add convenience memory database mixin
- Add check() helper for closed connection tests
2023-08-17 08:45:48 +02:00
Guido van Rossum
dc8fdf5fd5
gh-106581: Split `CALL_PY_EXACT_ARGS` into uops ( #107760 )
...
* Split `CALL_PY_EXACT_ARGS` into uops
This is only the first step for doing `CALL` in Tier 2.
The next step involves tracing into the called code object and back.
After that we'll have to do the remaining `CALL` specialization.
Finally we'll have to deal with `KW_NAMES`.
Note: this moves setting `frame->return_offset` directly in front of
`DISPATCH_INLINED()`, to make it easier to move it into `_PUSH_FRAME`.
2023-08-16 16:26:43 -07:00
Irit Katriel
665a4391e1
gh-105481: generate op IDs from bytecode.c instead of hard coding them in opcode.py ( #107971 )
2023-08-16 22:25:18 +00:00
Serhiy Storchaka
882cb79afa
gh-56166: Deprecate passing confusing positional arguments in re functions ( #107778 )
...
Deprecate passing optional arguments maxsplit, count and flags in
module-level functions re.split(), re.sub() and re.subn() as positional.
They should only be passed by keyword.
2023-08-16 13:35:35 -07:00
Nikita Sobolev
199438b7cc
gh-105522: [Enum] Correctly handle possible exceptions during testing (GH-105523)
2023-08-16 12:17:28 -07:00
Carl Meyer
fce93c80ae
gh-91051: fix type watcher test to be robust to existing watcher ( #107989 )
2023-08-16 13:13:32 -06:00
Erlend E. Aasland
42429d3b9a
gh-104683: Argument Clinic: Extract parse function name helper ( #107964 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-16 13:47:15 +00:00
Nikita Sobolev
b61f5995ae
gh-107909: Test explicit `object` base in PEP695 generic classes ( #108001 )
2023-08-16 06:30:03 -07:00
Nikita Sobolev
a8d440b383
gh-108000: Test that `lambda` also has `__type_params__` ( #108002 )
2023-08-16 06:22:18 -07:00
Erlend E. Aasland
57a20b0960
gh-106368: Argument Clinic: Test that keyword params are disallowed in groups ( #107985 )
2023-08-16 12:39:56 +02:00
Nikita Sobolev
bdd8ddfda1
gh-105724: Add location information to `assert` errors (GH-105935)
2023-08-16 11:35:38 +01:00
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