| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
name (#104200)
|
| |
|
|
|
|
| |
(#104152)
|
|
|
|
|
| |
Clinic (#104065)
Add all internally used variable names to CLINIC_PREFIXED_ARGS.
|
|
|
|
| |
The code that manipulated 'second_pass_replacements' was removed in 2015
with commit 0759f84 (gh-67688, bpo-23500).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(#100190)
|
| |
|
|
|
|
|
|
|
|
| |
code (GH-99241)
Fix double-free bug mentioned at https://github.com/python/cpython/issues/99240,
by moving memory clean up out of "exit" label.
Automerge-Triggered-By: GH:erlend-aasland
|
|
|
|
| |
clinic (#99233)
|
|
|
|
|
|
|
| |
(GH-98051)
Tests should pass with -O (assertions off).
Automerge-Triggered-By: GH:iritkatriel
|
|
|
|
|
|
|
| |
converter (GH-97729)
It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-95860)
We only statically initialize for core code and builtin modules. Extension modules still create
the tuple at runtime. We'll solve that part of interpreter isolation separately.
This change includes generated code. The non-generated changes are in:
* Tools/clinic/clinic.py
* Python/getargs.c
* Include/cpython/modsupport.h
* Makefile.pre.in (re-generate global strings after running clinic)
* very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c
All other changes are generated code (clinic, global strings).
|
|
|
|
|
| |
It has confusing semantic which does not provide any benefit (the
only difference is that you should write "return Py_None" instead
of "Py_RETURN_NONE"), it is not currently used, and it is broken.
|
|
|
|
| |
Argument Clinic (#94431)
|
| |
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
| |
Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).
|
|
|
|
|
| |
Argument Clinic now generates the same efficient code as before
adding the defining_class parameter.
|
|
|
|
| |
Thanks to the new pytypedefs.h, it becomes to use type names like
PyObject rather like structure names like "struct _object".
|
| |
|
|
|
|
|
|
|
|
| |
classes (GH-26456)
* Constructors of subclasses of some buitin classes (e.g. tuple, list,
frozenset) no longer accept arbitrary keyword arguments.
* Subclass of set can now define a __new__() method with additional
keyword parameters without overriding also __init__().
|
| |
|
| |
|
|
|
|
| |
(GH-27886)
|
|
|
| |
Implement support for `*args` in AC, and port `print()` to use it.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a race condition in "make regen-all" when make -jN option is used
to run jobs in parallel. The clinic.py script now only use atomic
write to write files. Moveover, generated files are now left
unchanged if the content does not change, to not change the file
modification time.
The "make regen-all" command runs "make clinic" and "make
regen-importlib" targets:
* "make regen-importlib" builds object files (ex: Modules/_weakref.o)
from source files (ex: Modules/_weakref.c) and clinic files (ex:
Modules/clinic/_weakref.c.h)
* "make clinic" always rewrites all clinic files
(ex: Modules/clinic/_weakref.c.h)
Since there is no dependency between "clinic" and "regen-importlib"
Makefile targets, these two targets can be run in parallel. Moreover,
half of clinic.py file writes are not atomic and so there is a race
condition when "make regen-all" runs jobs in parallel using make -jN
option (which can be passed in MAKEFLAGS environment variable).
Fix clinic.py to make all file writes atomic:
* Add write_file() function to ensure that all file writes are
atomic: write into a temporary file and then use os.replace().
* Moreover, write_file() doesn't recreate or modify the file if the
content does not change to avoid modifying the file modification
file.
* Update test_clinic to verify these assertions with a functional
test.
* Remove Clinic.force attribute which was no longer used, whereas
Clinic.verify remains useful.
|
|
|
|
| |
"fildes". (GH-22620)
|
|
|
| |
Automerge-Triggered-By: @tiran
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20443)
Previously, the result could have been an instance of a subclass of int.
Also revert bpo-26202 and make attributes start, stop and step of the range
object having exact type int.
Add private function _PyNumber_Index() which preserves the old behavior
of PyNumber_Index() for performance to use it in the conversion functions
like PyLong_AsLong().
|
|
|
|
| |
Only __index__ should be used to make integer conversions lossless.
|
|
|
|
|
|
|
| |
Don't hardcode defining_class parameter name to "cls":
* Define CConverter.set_template_dict(): do nothing by default
* CLanguage.render_function() now calls set_template_dict() on all
converters.
|
|
|
|
|
|
|
|
|
| |
(GH-19936)
Module C state is now accessible from C-defined heap type methods (PEP 573).
Patch by Marcel Plch and Petr Viktorin.
Co-authored-by: Marcel Plch <mplch@redhat.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
| |
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
(GH-13933)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values
(like in the optional third parameter of getattr). "None" should be used if None is accepted
as argument and passing None has the same effect as not passing the argument at all.
|
|
|
|
| |
Argument Clinic. (GH-13593)
|