Victor Stinner
c03e05c2e7
gh-98724: Fix Py_CLEAR() macro side effects ( #99100 )
...
The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate
their argument once. If an argument has side effects, these side
effects are no longer duplicated.
Add test_py_clear() and test_py_setref() unit tests to _testcapi.
2022-11-09 14:06:36 +01:00
Victor Stinner
0124b5dd28
gh-90868: Add _PyStaticObject_CheckRefcnt() function ( #99261 )
...
Add _PyStaticObject_CheckRefcnt() function to make
_PyStaticObjects_CheckRefcnt() shorter. Use
_PyObject_ASSERT_FAILED_MSG() to log the object causing the fatal
error.
2022-11-09 08:40:40 +01:00
Filipe Laíns
f7a82cde59
CODEOWNERS: add myself to sysconfig and importlib.resources ( #98851 )
2022-11-09 03:27:13 +00:00
Bruno Neyra
b3bd69c1bf
[Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265)
2022-11-08 16:39:56 -08:00
Gregory P. Smith
2eee9d9cd7
gh-99238: clarify the type of the env dict. ( #99253 )
2022-11-08 13:00:31 -08:00
Carl Meyer
027bc7e6bb
gh-94445: add compiler test for another case of excessive stack use (GH-99237)
2022-11-08 20:39:32 +00:00
Ethan Furman
0b4ffb08cc
gh-99248: [Enum] fix negative number infinite loop (GH-99256)
...
[Enum] fix negative number infinite loop
- _iter_bits_lsb() now raises a ValueError if a negative number
is passed in
- verify() now skips checking negative numbers for named flags
2022-11-08 12:00:19 -08:00
Eric Snow
52f91c642b
gh-90868: Adjust the Generated Objects (gh-99223)
...
We do the following:
* move the generated _PyUnicode_InitStaticStrings() to its own file
* move the generated _PyStaticObjects_CheckRefcnt() to its own file
* include pycore_global_objects.h in extension modules instead of pycore_runtime_init.h
These changes help us avoid including things that aren't needed.
https://github.com/python/cpython/issues/90868
2022-11-08 10:03:03 -07:00
Eric Snow
d45cc80452
gh-98627: Add the _testsinglephase Module (gh-99039)
...
This makes it more clear that a given test is definitely testing against a single-phase init (legacy) extension module. The new module is a companion to _testmultiphase.
https://github.com/python/cpython/issues/98627
2022-11-08 09:58:11 -07:00
Victor Stinner
4d5fcca273
gh-91248: Add PyFrame_GetVar() function ( #95712 )
...
Add PyFrame_GetVar() and PyFrame_GetVarString() functions to get a
frame variable by its name.
Move PyFrameObject C API tests from test_capi to test_frame.
2022-11-08 17:40:27 +01:00
Mikael Koli
acf4d5d5bd
Fix broken link in `asyncio-subprocesses` doc (GH-99214)
...
# Fix broken link in Doc/library/asyncio-subprocess.rst
This is a trivial fix in documentation to fix a broken link.
There is a broken link in [Doc/library/asyncio-subprocess.rst](https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process ) for the function ``wait_for``:
![image](https://user-images.githubusercontent.com/37690409/200388894-fb6b7c42-b2cc-49ec-a239-e3472890db1f.png )
I suppose this refers to the function ``asyncio.wait_for`` which is not clear in the docs.
This PR fixes the link and the result looks like the following:
![image](https://user-images.githubusercontent.com/37690409/200389483-b4a92105-7d2c-4285-b0fc-78a6dc0be39c.png )
Automerge-Triggered-By: GH:AlexWaygood
2022-11-08 08:26:06 -08:00
Guido van Rossum
f1a654648b
GH-98831: Simple input-output stack effects for bytecodes.c ( #99120 )
2022-11-08 08:22:56 -08:00
Brandt Bucher
c7065ce019
GH-93143: Don't turn LOAD_FAST into LOAD_FAST_CHECK (GH-99075)
2022-11-08 07:50:46 -08:00
Nikita Sobolev
e56e33d271
gh-72719: Remove asyncore and asynchat modules ( #96580 )
...
Remove modules asyncore and asynchat, which were deprecated by PEP 594.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-11-08 16:48:58 +01:00
Irit Katriel
c43714fbcd
gh-99181: fix except* on unhashable exceptions (GH-99192)
2022-11-08 09:32:20 +00:00
Kumar Aditya
a751bf565c
GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)
2022-11-08 15:50:07 +09:00
Kamil Turek
b9dedfe61d
gh-92119: ctypes: Print exception class name instead of its representation ( #98302 )
2022-11-07 20:53:59 -08:00
Nikita Sobolev
a309ad9f76
gh-98513: Test abstract methods of some `collections` types ( #98516 )
2022-11-07 17:48:23 -08:00
Nikita Sobolev
c32bc1bffd
gh-99124: use concrete exception types in `test_builtin` ( #99125 )
2022-11-07 17:47:32 -08:00
Gregory P. Smith
d315722564
gh-98433: Fix quadratic time idna decoding. ( #99092 )
...
There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.
This also adds an early length check in IDNA decoding to outright reject
huge inputs early on given the ultimate result is defined to be 63 or fewer
characters.
2022-11-07 16:54:41 -08:00
Hugo van Kemenade
9430d27355
gh-98817: Remove PCbuild/lib.pyproj (GH-98818)
2022-11-07 20:23:35 +00:00
Kumar Aditya
be0d5008b3
GH-90699: Remove remaining `_Py_IDENTIFIER` stdlib usage (GH-99067)
2022-11-07 12:06:23 -08:00
Petr Viktorin
1438b77997
gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002)
...
The flag is not inherited, but its effect -- a NULL tp_new -- is.
Drop hints for people who come here wanting to “disallow instantiation”.
2022-11-07 19:45:50 +01:00
Mark Shannon
4a1c58d504
GH-96793: Specialize FOR_ITER for generators. (GH-98772)
2022-11-07 14:49:51 +00:00
Noam Cohen
80c08d1cd6
gh-95389: expose popular ETHERTYPE_* constants in the socket module ( #95390 )
...
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-11-07 15:27:37 +01:00
Pablo Galindo Salgado
6168e714be
gh-98254: Add what's new entry for the improvement in commit bb56dead33
( #99197 )
2022-11-07 13:37:14 +00:00
Pablo Galindo Salgado
be31ecf8b3
gh-91058: Add what's new entry for the improvement in commit 7cfbb49fcd
( #99198 )
2022-11-07 13:36:48 +00:00
Erlend E. Aasland
e02f1e2df9
Docs: add argument spec to sqlite3 CLI docs ( #99200 )
2022-11-07 14:18:36 +01:00
Zackery Spytz
5ff81da6d3
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
2022-11-07 11:45:16 +00:00
Harshil
cfec5b18bf
remove new line in pickle exception message (GH-31782)
2022-11-07 07:43:39 +00:00
andrei kulakov
c6325b1c9f
gh-91803: Mock - fix error when using autospec methods with seal ( #92213 )
...
Fixes https://github.com/python/cpython/issues/91803 .
Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-11-07 07:24:46 +00:00
jmcb
728e42fcf5
doc: Formatting and typo fixes ( #98974 )
2022-11-06 20:55:55 -08:00
Nikita Sobolev
d7a00f1e8e
GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156)
2022-11-06 21:02:13 -06:00
Nikita Sobolev
bef9efabc3
GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH99156)
2022-11-06 20:56:41 -06:00
Dong-hee Na
f626b7b504
gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)
2022-11-07 10:19:25 +09:00
Wenzel Jakob
57a405213c
gh-98586: Add What's New entry and update docs ( #99056 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-11-06 23:54:55 +01:00
Anh71me
bd221c01dd
gh-98139: enhance namespace package repr
2022-11-06 22:13:40 +00:00
Nouran Ali
2db55e0c00
gh-94286 Fix documentation of print default param (GH-94297)
2022-11-06 20:14:58 +00:00
Terry Jan Reedy
5eff82fdde
bpo-33964: IDLE macosx - removed unused local dict. (GH-7926)
2022-11-06 20:10:22 +00:00
Ethan Furman
a71b117c3d
[Enum] add built-in property to test_test_simple_enum (GH-98453)
2022-11-06 12:03:42 -08:00
Nikita Sobolev
8463cb55da
gh-99051: remove duplicated test from `test_weakref` (GH-99052)
2022-11-06 19:28:44 +00:00
Guido van Rossum
7dcd28eb41
GH-98831: Implement super-instruction generation ( #99084 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-11-06 09:40:47 -08:00
jonasdlindner
ede6cb2615
Correct some typos in comments (GH-98194)
...
Automerge-Triggered-By: GH:AlexWaygood
2022-11-06 08:54:44 -08:00
Irit Katriel
61b6c40b64
gh-99153: set location on SyntaxError for try with both except and except* (GH-99160)
2022-11-06 15:36:19 +00:00
Shantanu
d3b82b4463
gh-83004: Clean up refleak in _pickle initialisation ( #98841 )
2022-11-06 06:05:13 -08:00
Shantanu
31f2f6568d
gh-83004: Clean up refleak in _zoneinfo initialisation ( #98842 )
2022-11-06 06:04:36 -08:00
Pablo Galindo Salgado
99e2e60cb2
gh-99139: Improve NameError error suggestion for instances ( #99140 )
2022-11-06 13:52:06 +00:00
Nikita Sobolev
a0bc75e2fd
`test_typing`: use all pickle protocols ( #99154 )
2022-11-06 11:53:57 +00:00
Ethan Furman
8feb7ab77c
gh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)
...
* fix auto() failure during multiple assignment
i.e. `ONE = auto(), 'text'` will now have `ONE' with the value of `(1,
'text')`. Before it would have been `(<an auto instance>, 'text')`
2022-11-05 18:01:08 -07:00
Doj
586b07e1f9
[doc] fix typo (GH-99143)
2022-11-05 21:03:29 +00:00