Victor Stinner
3a1dde8f29
gh-99300: Use Py_NewRef() in Objects/ directory ( #99354 )
...
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.
2022-11-10 23:58:07 +01:00
Victor Stinner
1960eb005e
gh-99300: Use Py_NewRef() in Objects/ directory ( #99351 )
...
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.
2022-11-10 23:40:31 +01:00
Victor Stinner
584e55bd34
gh-99300: Use Py_NewRef() in Objects/ directory ( #99335 )
...
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.
2022-11-10 22:22:02 +01:00
Raymond Hettinger
2f4af2d99c
GH-99183: Document behavior of count() for empty substrings (GH-99339)
2022-11-10 15:20:01 -06:00
Victor Stinner
dbf8613a2e
gh-99300: Use Py_NewRef() in Objects/listobject.c ( #99336 )
...
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Objects/listobject.c.
2022-11-10 22:09:18 +01:00
Guido van Rossum
694cdb24a6
GH-98831: Remove all remaining DISPATCH() calls from bytecodes.c ( #99271 )
...
Also mark those opcodes that have no stack effect as such.
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2022-11-10 10:50:57 -08:00
Brandt Bucher
00ee6d506e
GH-99298: Don't perform jumps before error handling (GH-99299)
2022-11-10 08:46:56 -08:00
Vincent Fazio
c41b13d39c
gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)
...
Check to see if `base_executable` exists. If it does not, attempt
to use known alternative names of the python binary to find an
executable in the path specified by `home`.
If no alternative is found, previous behavior is preserved.
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
2022-11-10 16:26:42 +00:00
Carlo
f1680c3fbf
gh-99277: remove older version of `get_write_buffer_limits` ( #99280 )
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-11-10 08:07:17 -08:00
Eric Snow
73679b13ca
gh-90110: Update the C-analyzer Tool (gh-99307)
2022-11-10 09:03:57 -07:00
Victor Stinner
6dedf42527
gh-99300: Use Py_NewRef() in Objects/dictobject.c ( #99333 )
...
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in Objects/dictobject.c.
2022-11-10 16:27:53 +01:00
Victor Stinner
c0feb99187
gh-99300: Use Py_NewRef() in Objects/ directory ( #99332 )
...
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in C files of the Objects/ directory.
2022-11-10 16:27:32 +01:00
Victor Stinner
4ce2a202c7
gh-99300: Use Py_NewRef() in Parser/ directory ( #99330 )
...
Replace Py_INCREF() with Py_NewRef() in C files of the Parser/
directory and in the PEG generator.
2022-11-10 15:30:05 +01:00
Mark Shannon
1e197e63e2
GH-96421: Insert shim frame on entry to interpreter (GH-96319)
...
* Adds EXIT_INTERPRETER instruction to exit PyEval_EvalDefault()
* Simplifies RETURN_VALUE, YIELD_VALUE and RETURN_GENERATOR instructions as they no longer need to check for entry frames.
2022-11-10 12:34:57 +00:00
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