| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
(cherry picked from commit c450c8c9ed6e420025f39d0e4850a79f8160cdcd)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a shell code injection vulnerability in the
get-remote-certificate.py example script. The script no longer uses a
shell to run "openssl" commands. Issue reported and initial fix by
Caleb Shortt.
Remove the Windows code path to send "quit" on stdin to the "openssl
s_client" command: use DEVNULL on all platforms instead.
Co-authored-by: Caleb Shortt <caleb@rgauge.com>
(cherry picked from commit 83a0f44ffd8b398673ae56c310cf5768d359c341)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(GH-32196) (GH-95711)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
|
|
|
|
| |
(GH-31885) (GH-94122)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit d36954b7ead06daead3dcf9b0dd9f8002eab508f)
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 457e6a6e96b5afad403a0bc892508a77beef4d33)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
|
|
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
| |
Like GH-28744 but for the Tools directory.
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 682aecfdeba481c876bfc9f3796c635bd5b5df50)
Co-authored-by: Christian Clauss <cclauss@me.com>
|
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 4338aeeb9e07607f17bbada8ebfd97e7cc7a203c)
Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
Automerge-Triggered-By: GH:Fidget-Spinner
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove struct _node from the stable ABI list
This struct was removed along with the old parser in Python 3.9 (PEP 617)
* Stable ABI list: Use the public name "PyFrameObject" rather than "_frame"
* Ensure limited API doesn't contain private names
Names prefixed by an underscore are private by definition.
* Add a blurb
(cherry picked from commit 7cad9cb51bdae2144cbab330f13a607ba3471742)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- Reformat the C API and ABI Versioning page (and extend/clarify a bit)
- Rewrite the stable ABI docs into a general text on C API Compatibility
- Add a list of Limited API contents, and notes for the individual items.
- Replace `Include/README.rst` with a link to a devguide page with the same info
(cherry picked from commit b05955d6f5f149523b5855a335444b7c6324bdb7)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
|
|
| |
The patch from [bpo-44074]() does not account for a possibly non-English locale and blindly greps for "HEAD branch" in a possibly localized text.
Automerge-Triggered-By: GH:pitrou
(cherry picked from commit 1aa3530314d339725519f4ad95b7dea4b00b657e)
Co-authored-by: Antoine Pitrou <antoine@python.org>
|
|
|
|
|
| |
(cherry picked from commit 21fbbb98bac8bfe56f8b931258c36750e84f9285)
Co-authored-by: Leonardo Lai <leonardo.lai@live.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The stable_abi.py script no longer parse macros. Macro targets can be
static inline functions which are not part of the stable ABI, only
part of the limited C API.
Run "make regen-limited-abi" to exclude PyType_HasFeature from
Doc/data/stable_abi.dat.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename Include/symtable.h to to Include/internal/pycore_symtable.h,
don't export symbols anymore (replace PyAPI_FUNC and PyAPI_DATA with
extern) and rename functions:
* PyST_GetScope() to _PyST_GetScope()
* PySymtable_BuildObject() to _PySymtable_Build()
* PySymtable_Free() to _PySymtable_Free()
Remove PySymtable_Build(), Py_SymtableString() and
Py_SymtableStringObject() functions.
The Py_SymtableString() function was part the stable ABI by mistake
but it could not be used, since the symtable.h header file was
excluded from the limited C API.
The Python symtable module remains available and is unchanged.
|
| |
|
|
|
|
|
|
| |
Add frozen modules to sys.stdlib_module_names. For example, add
"_frozen_importlib" and "_frozen_importlib_external" names.
Add "list_frozen" command to Programs/_testembed.
|
|
|
|
|
|
| |
Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h}
into Include/cpython/.
Parser: peg_api: include Python.h instead of parser_interface.h.
|
|
|
|
| |
Move non-limited C API headers pyarena.h and pyctype.h
into Include/cpython/ directory.
|
|
|
|
|
|
|
|
| |
Add a new configure --without-static-libpython option to not build
the libpythonMAJOR.MINOR.a static library and not install the
python.o object file.
Fix smelly.py and stable_abi.py tools when libpython3.10.a is
missing.
|
| |
|
|
|
|
| |
* Rename _Py_module_names to _Py_stdlib_module_names.
* Rename Python/module_names.h to Python/stdlib_module_names.h.
|
|
|
|
| |
Add sys.module_names, containing the list of the standard library
module names.
|
|
|
|
|
|
|
|
|
|
| |
Add a private list of all stdlib modules: _Py_module_names.
* Add Tools/scripts/generate_module_names.py script.
* Makefile: Add "make regen-module-names" command.
* setup.py: Add --list-module-names option.
* GitHub Action and Travis CI also runs "make regen-module-names",
not ony "make regen-all", to ensure that the module names remains
up to date.
|
|
|
|
| |
(GH-23783)
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The smelly.py script now also checks the Python dynamic library and
extension modules, not only the Python static library. Make also the
script more verbose: explain what it does.
The GitHub Action job now builds Python with the libpython dynamic
library.
|
|
|
|
|
| |
duplicating it in 'compile.c' (GH-21714)
Generate information about jumps from 'opcode.py' rather than duplicate it in 'compile.c'
|
|
|
| |
Replace obj->ob_type with Py_TYPE(obj).
|
|
|
| |
Remove some remaining files and Makefile targets for the old parser
|
|
|
| |
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
| |
This is one of the few files that has intimate knowledge of the pyc file
format. Since it lacks tests it tends to become outdated fairly quickly.
At present it has been broken since the introduction of PEP 552.
|
|
|
|
| |
Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-19521)
When there is a SyntaxError after reading the last input character from
the tokenizer and if no newline follows it, the error message used to be
`unexpected EOF while parsing`, which is wrong.
|
|
|
|
| |
It now uses os.waitstatus_to_exitcode() to convert os.system() exit
status into an exit code.
|
|
|
|
|
|
|
|
| |
Break up COMPARE_OP into four logically distinct opcodes:
* COMPARE_OP for rich comparisons
* IS_OP for 'is' and 'is not' tests
* CONTAINS_OP for 'in' and 'is not' tests
* JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
|
|
|
| |
pathfix.py: Assume all files that end on '.py' are Python scripts when working recursively.
|
|
|
| |
Add option -a to Tools/Scripts/pathfix.py script: add flags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the converse of GH-15353 -- in addition to plenty of
scripts in the tree that are marked with the executable bit
(and so can be directly executed), there are a few that have
a leading `#!` which could let them be executed, but it doesn't
do anything because they don't have the executable bit set.
Here's a command which finds such files and marks them. The
first line finds files in the tree with a `#!` line *anywhere*;
the next-to-last step checks that the *first* line is actually of
that form. In between we filter out files that already have the
bit set, and some files that are meant as fragments to be
consumed by one or another kind of preprocessor.
$ git grep -l '^#!' \
| grep -vxFf <( \
git ls-files --stage \
| perl -lane 'print $F[3] if (!/^100644/)' \
) \
| grep -ve '\.in$' -e '^Doc/includes/' \
| while read f; do
head -c2 "$f" | grep -qxF '#!' \
&& chmod a+x "$f"; \
done
|
|
|
| |
Add flag -k to pathscript.py script: preserve shebang flags.
|
|
|
| |
Use cffi to access a C API in Python.
|
| |
|
|
|
|
| |
Use literalinclude markup to include Tools/scripts/serve.py code.
Tools/scripts/serve.py first argument on the command line is now optional.
|
| |
|
| |
|
|
|
|
| |
var_access_benchmark.py (GH-11905)
|