summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-105927: Avoid calling PyWeakref_GET_OBJECT() (#105997)Victor Stinner2023-06-223-7/+21
| | | | | | | * Replace PyWeakref_GET_OBJECT() with _PyWeakref_GET_REF(). * _sqlite/blob.c now holds a strong reference to the blob object while calling close_blob(). * _xidregistry_find_type() now holds a strong reference to registered while using it.
* gh-105927: Add _PyWeakref_IS_DEAD() function (#105992)Victor Stinner2023-06-223-14/+30
| | | | | | | | * Add _PyWeakref_IS_DEAD() internal function. * Modify is_dead_weakref() of Modules/_weakref.c and _pysqlite_drop_unused_cursor_references() to replace PyWeakref_GET_OBJECT() with _PyWeakref_IS_DEAD(). * Replace "int i" with "Py_ssize_t i" to iterate on cursors in _pysqlite_drop_unused_cursor_references().
* gh-101538: Add experimental wasi-threads build (#101537)YAMAMOTO Takashi2023-06-225-3/+53
| | | | Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-98931: Add custom error messages to invalid import/from with multiple ↵Pablo Galindo Salgado2023-06-224-597/+738
| | | | | | targets (#105985) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)Barney Gale2023-06-225-13/+91
| | | | | | | This new exception type is raised instead of `NotImplementedError` when a path operation is not supported. It can be raised from `Path.readlink()`, `symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future version of pathlib, it will be raised by `AbstractPath` for these methods and others, such as `AbstractPath.mkdir()` and `unlink()`.
* GH-91095: Specialize calls to normal Python classes. (GH-99331)Mark Shannon2023-06-2220-189/+511
|
* gh-105481: refactor instr flag related code into a new InstructionFlags ↵Irit Katriel2023-06-211-36/+78
| | | | class (#105950)
* gh-104212: Explain how to port imp.load_source() (#105978)Victor Stinner2023-06-211-1/+15
| | | | Explain how to port removed imp.load_source() to importlib in What's New in Python 3.12.
* gh-84436: update docs on Py_None/Py_True/Py_False/Py_Ellipsis becoming ↵Irit Katriel2023-06-213-19/+25
| | | | immortal (#105195)
* gh-105927: finalize_modules_clear_weaklist() uses _PyWeakref_GET_REF() (#105971)Victor Stinner2023-06-213-6/+7
| | | | | finalize_modules_clear_weaklist() now holds a strong reference to the module longer than before: replace PyWeakref_GET_OBJECT() with _PyWeakref_GET_REF().
* gh-105927: type_from_ref() uses _PyWeakref_GET_REF() (#105963)Victor Stinner2023-06-211-13/+24
| | | | | type_from_ref() now returns a strong reference to the type, instead of a borrowed reference: replace PyWeakref_GET_OBJECT() with _PyWeakref_GET_REF().
* gh-105927: Fix test_weakref_capi() refleak (#105966)Victor Stinner2023-06-211-16/+32
| | | Test PyWeakref_GetRef(NULL) and PyWeakref_GetObject(NULL).
* gh-105927: _ctypes use PyWeakref_GetRef() (#105964)Victor Stinner2023-06-211-18/+26
| | | | | | Rename PyDict_GetItemProxy() to _PyDict_GetItemProxy() and mark it as static. _PyDict_GetItemProxy() now returns a strong reference, instead of a borrowed reference: replace PyWeakref_GET_OBJECT() with _PyWeakref_GET_REF().
* gh-105927: _ssl uses _PyWeakref_GET_REF() (#105965)Victor Stinner2023-06-212-18/+29
|
* stdtypes.rst: remove a period (#105959)Mathieu Dupuy2023-06-211-1/+1
|
* gh-105927: _abc and _thread use PyWeakref_GetRef() (#105961)Victor Stinner2023-06-212-21/+20
| | | | | | | | Hold a strong reference on the object, rather than using a borrowed reference: replace PyWeakref_GET_OBJECT() with PyWeakref_GetRef() and _PyWeakref_GET_REF(). Remove assert(PyWeakref_CheckRef(localweakref)) since it's already tested by _PyWeakref_GET_REF().
* Use CSV-separated outputs @ get-changed-files @ CI (#105151)Sviatoslav Sydorenko2023-06-213-21/+32
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-105927: Add PyWeakref_GetRef() function (#105932)Victor Stinner2023-06-2111-8/+133
| | | | Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
* Add Py_TYPE() to Doc/data/refcounts.dat (#105949)Victor Stinner2023-06-201-0/+3
|
* gh-105915: Fix SyntaxWarning becoming a SyntaxError with -We in test_fstring ↵Lysandros Nikolaou2023-06-201-3/+3
| | | | (#105943)
* gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring (#105940)Lysandros Nikolaou2023-06-201-1/+1
| | | Co-authored-by: @sunmy2019
* gh-105938: Emit a SyntaxWarning for escaped braces in an f-string (#105939)Lysandros Nikolaou2023-06-203-6/+18
|
* make regen-stdlib-module-names rejects test modules (#105921)Victor Stinner2023-06-201-2/+17
| | | Make sure that sys.stdlib_module_names doesn't contain test modules.
* gh-105927: Add _PyWeakref_GET_REF() internal function (#105929)Victor Stinner2023-06-205-49/+88
| | | Add new pycore_weakref.h internal header file.
* gh-105922: Add PyImport_AddModuleRef() function (#105923)Victor Stinner2023-06-2013-24/+149
| | | | | | * Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and PyImport_AddModuleObject(). * pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with PyImport_AddModuleRef(name).
* gh-105927: Refactor weakrefobject.c (#105928)Victor Stinner2023-06-191-60/+56
| | | | | | * Rename proxy_checkref() to proxy_check_ref(). * proxy_check_ref() now checks the object, not the proxy. * Most functions take PyObject* instead of PyWeakReference*. * Remove redundant calls to PyWeakref_GET_OBJECT().
* gh-105922: Refactor PyRun_InteractiveOneObjectEx() (#105925)Victor Stinner2023-06-191-74/+108
| | | | | | | | | | | Refactor PyRun_InteractiveOneObjectEx(), _PyRun_SimpleFileObject() and PyRun_SimpleStringFlags(): * Keep a strong reference to the __main__ module while using its dictionary (PyModule_GetDict()). Use PyImport_AddModule() with Py_XNewRef(). * Declare variables closer to where they are defined. * Rename variables to use name longer than 1 character. * Add pyrun_one_parse_ast() sub-function.
* gh-105481: generate _specializations and _specialized_instructions from ↵Irit Katriel2023-06-1912-277/+345
| | | | bytecodes.c (#105913)
* gh-105908: fix `barry_as_FLUFL` future import (#105909)Crowthebird2023-06-193-6/+19
|
* GH-105808: Fix a regression introduced in GH-101251 (#105910)T. Wouters2023-06-193-1/+52
| | | | Fix a regression introduced in pythonGH-101251, causing GzipFile.flush() to not flush the compressor (nor pass along the zip_mode argument).
* gh-104212: Explain how to port imp code to importlib (#105905)Victor Stinner2023-06-191-1/+32
|
* gh-71299: Fix __all__ in tokenize (#105907)Lysandros Nikolaou2023-06-192-135/+137
| | | Co-authored-by: Unit03
* GH-104584: Assorted fixes for the optimizer API. (GH-105683)Mark Shannon2023-06-196-203/+297
| | | | | | * Add test for long loops * Clear ENTER_EXECUTOR when deopting code objects.
* typing docs: Improve the intro to each section (#105901)Alex Waygood2023-06-181-36/+40
|
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-1813-202/+61
| | | SQLite 3.15.2 was released 2016-11-28.
* Docs: move sphinx-lint to pre-commit (#105750)Hugo van Kemenade2023-06-185-14/+11
|
* gh-105844: Use devguide terminology to denote versions (#105882)Erlend E. Aasland2023-06-181-3/+3
|
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-1712-138/+38
| | | | replace by their new versions (#105865)
* CI: Bump macOS build to use OpenSSL v3.0 (#105538)Erlend E. Aasland2023-06-161-2/+2
|
* GH-105840: Fix assertion failures when specializing calls with too many ↵Brandt Bucher2023-06-163-2/+33
| | | | __defaults__ (GH-105847)
* gh-105678: document SET_FUNCTION_ATTRIBUTE (#105843)Carl Meyer2023-06-161-9/+20
|
* gh-104799: PEP 695 backward compatibility for ast.unparse (#105846)Jelle Zijlstra2023-06-163-3/+80
|
* gh-105834: Add tests for calling `issubclass()` between two protocols (#105835)Alex Waygood2023-06-161-0/+74
| | | Some parts of the implementation of `typing.Protocol` had poor test coverage
* CI: Remove docs build from Azure Pipelines (#105823)Hugo van Kemenade2023-06-164-85/+0
|
* gh-105844: Consistently use 'minor version' for X.Y versions (#105851)Erlend E. Aasland2023-06-162-3/+3
|
* Fix inaccuracies in "Assorted Topics" section of "Defining Extension Types" ↵chgnrdv2023-06-161-5/+5
| | | | tutorial (#104969)
* gh-105433: Add `pickle` tests for PEP695 (#105443)Nikita Sobolev2023-06-162-4/+131
|
* bpo-44530: Document the change in MAKE_FUNCTION behavior (#93189)Alex Doe2023-06-161-2/+5
| | | | | * bpo-44530: Document the change in MAKE_FUNCTION behavior Fixes dis module documentation for MAKE_FUNCTION due to https://github.com/python/cpython/commit/2f180ce2cb6e6a7e3c517495e0f4873d6aaf5f2f (bpo-44530, released as part of 3.11) removes the qualified name at TOS
* GH-103124: Multiline statement support for pdb (GH-103125)Tian Gao2023-06-153-4/+56
|
* GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)Brandt Bucher2023-06-154-0/+37
|