Commit Graph

115194 Commits

Author SHA1 Message Date
Anton Ryzhov dbf2faf579
gh-74044: inspect.signature for wrappers around decorated bound methods (GH-736) 2022-11-10 12:32:01 +00:00
Brandt Bucher 9d69284169
GH-99257: Check the owner's type when specializing slots (GH-99258) 2022-11-10 11:50:34 +00:00
Nikita Sobolev 26726c7649
gh-99320: remove tests for old-style class from `test_complex` (#99321) 2022-11-10 10:51:22 +00:00
Nikita Sobolev d6f2767997
gh-99281: [csv] remove try/except, `complex` always exists (#99282) 2022-11-10 10:37:57 +00:00
Victor Stinner 2e343fc465
gh-99300: Use Py_NewRef() in Python/ceval.c (#99318)
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Python/ceval.c and related files.
2022-11-10 11:25:33 +01:00
Victor Stinner 231d83b724
gh-99300: Use Py_NewRef() in Python/ directory (#99317)
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Python/ directory.

Update Parser/asdl_c.py to regenerate Python/Python-ast.c.
2022-11-10 11:23:36 +01:00
Victor Stinner d8f239d86e
gh-99300: Use Py_NewRef() in Python/ directory (#99302)
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Python/ directory.
2022-11-10 09:03:39 +01:00
Serhiy Storchaka f883b7f8ee
bpo-34272: Reorganize C API tests. (GH-8551)
Move some C API tests into Lib/test/test_capi/.
2022-11-10 08:54:37 +02:00
Nikita Sobolev 87f5180cd7
gh-98832: Change wording in docstring of `pathlib.Path.iterdir` (GH-98833)
Found while working on https://github.com/python/cpython/issues/98829

Automerge-Triggered-By: GH:AlexWaygood
2022-11-09 14:05:07 -08:00
Brandt Bucher 283ab0e1c0
GH-99205: Mark new interpreters and threads as non-static (GH-99268) 2022-11-09 13:55:20 -08:00
jmcb 58ee5d8677
Update reference to the size of PyPI (#99076)
Update reference to the size of PyPI

Last changed in 2008 (528576031d).
2022-11-09 11:26:46 -08:00
Brandt Bucher c7f5708714
GH-98686: Get rid of "adaptive" and "quick" instructions (GH-99182) 2022-11-09 10:50:09 -08:00
Kumar Aditya 6e3cc72afe
GH-90699: disallow `_Py_IDENTIFIER` in core code (GH-99210) 2022-11-09 08:53:21 -08:00
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