| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
(GH-18131) (GH-18133)
https://bugs.python.org/issue39427
Automerge-Triggered-By: @pablogsal
(cherry picked from commit 41f0ef6abbd304409c55612a08788cdd59fbc8a3)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
*. (GH-18511)
(cherry picked from commit 7386a70746cf9aaf2d95db75d9201fb124f085df)
Co-authored-by: Andy Lester <andy@petdance.com>
|
|
|
|
|
| |
(cherry picked from commit 6e619c48b8e804ece9521453fc8da0640a04d5b1)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:
Adding the const to the type cast, as in:
- return _PyUnicode_FromUCS1((unsigned char*)s, size);
+ return _PyUnicode_FromUCS1((const unsigned char*)s, size);
or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:
- PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+ PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
These changes will not change code, but they will make it much easier to check for errors in consts
(cherry picked from commit e6be9b59a911626d6597fe148c32f0342bd2bd24)
Co-authored-by: Andy Lester <andy@petdance.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-18405) (GH-18408)
(cherry picked from commit d2e1098641f98594702ef29049c3c4a3f394786f)
https://bugs.python.org/issue39579
Automerge-Triggered-By: @gvanrossum
|
|
|
|
|
|
|
|
|
|
|
| |
Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be811fa7d
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d39303feb1d3b4194c6a8275b1fc63b2153b2)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-17588) (GH-17642)
Fix `NameError` in `zipimport` during hash validation and add a regression test.
(cherry picked from commit 79f02fee1a542c440fd906fd54154c73fc0f8235)
https://bugs.python.org/issue39033
|
|
|
|
|
|
|
|
| |
The fix changes copy_location() to require an extra node from which to extract the end location, and fixing all 5 call sites.
https://bugs.python.org/issue39235
(cherry picked from commit a796d8ef9dd1af65f7e4d7a857b56f35b7cb6e78)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
| |
(cherry picked from commit 7b79dc9200a19ecbac667111dffd58e314be02a8)
Co-authored-by: Anthony Wee <awee@box.com>
|
|
|
|
|
| |
(cherry picked from commit b121a4a45ff4bab8812a9b26ceffe5ad642f5d5a)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
|
|
|
|
|
|
| |
argument (GH-17826)
(cherry picked from commit ec007cb43faf5f33d06efbc28152c7fdcb2edb9c)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
|
|
|
|
| |
(cherry picked from commit 946b29ea0b3b386ed05e87e60b8617c9dc19cd53)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 37143a8e3b2e9245d52f4ddebbdd1c6121c96884)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
| |
(cherry picked from commit d0c92e81aa2171228a23cb2bed36f7dab975257d)
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-17645) (GH-17649)
…
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 50d4f12958bf806a4e1a1021d70cfd5d448c5cba)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
https://bugs.python.org/issue39080
|
|
|
|
|
|
| |
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit b08d3f71beab59653edfbbcf7b92a7bc8050d6b8)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
|
|
| |
(GH-17600)
(cherry picked from commit 5936a4ce914d42af97b9238e5090dedc8d5b0bd2)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
| |
Co-Authored-By: Victor Stinner <vstinner@python.org>
(cherry picked from commit 95826c773a9004fc5b3c89de55f800504685ab21)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
if_stmt (GH-17582) (GH-17589)
When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.
https://bugs.python.org/issue39031
Automerge-Triggered-By: @pablogsal
(cherry picked from commit 025a602af7ee284d8db6955c26016f3f27d35536)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
| |
deprecation warning (GH-17540)
(cherry picked from commit b8cbe74c3498c617f0e73fd0cdc5c07f2c532092)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
|
|
| |
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None.
https://bugs.python.org/issue38979
Automerge-Triggered-By: @asvetlov
(cherry picked from commit 28c91631c24e53713ad0e8a2bbae716373f5e53d)
Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
|
|
|
|
|
| |
are invoked (GH-17392)
Also fixes some potential segfaults in unraisable hook handling.
|
|
|
|
|
| |
(cherry picked from commit 33b671e72450bf4b5a946ce0dde6b7fe21150108)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
|
|
|
|
|
|
| |
in ``pythonrun.h``. (GH-17056)
(cherry picked from commit 62161ce989d7d4fe2b0e6899a54da20feeddc798)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
| |
(cherry picked from commit 6c3e66a34b95fff07df0ad5086104dd637a091ce)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
decorators. (GH-16861)
(cherry picked from commit 26ae9f6d3d755734c9f371b9356325afe5764813)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
numbers's -> number's
(cherry picked from commit 7320ec05f72fc27b25789fe76f8297644e7e7e0a)
Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 5bc6a7c06eda20ba131ecba6752be0506d310181)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 2798b60c55619d8981288b69c20ba4a09efc7b0b)
Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-16755) (#16760)
The symbol table handing of PEP572's assignment expressions is not resolving correctly the scope of some variables in presence of global/nonlocal keywords in conjunction with comprehensions.
(cherry picked from commit fd5c414880b2e05720b9cf14ab0b0d7ae2b7d925)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit e3babbd03cd2bcb3c85deabae3bc6976aa95a3c3)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit a8e0d3141e271b3c0fbb7399a911f0c3aa567e30)
Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit a05fcd3c7adf6e3a0944da8cf80a3346882e9b3b)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 01171ebd966b0cd6352057799ad876dd1e07942e)
Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 5dfbb4d50333e7a91fc0cd8c03a2f2f2cf56dbd9)
Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
|
|
|
|
|
|
|
| |
PyConfig_InitPythonConfig() and PyConfig_InitIsolatedConfig() no
longer return PyStatus: they cannot fail anymore.
(cherry picked from commit 8462a4936b3a551dc546a6adea04a70b0a07ca67)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
For now, we'll rely on the fact that the config structures aren't covered by the stable ABI.
We may revisit this in the future if we further explore the idea of offering a stable embedding API.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings options priority: PyConfig.warnoptions has the highest
priority, as stated in the PEP 587.
* Document options order in PyConfig.warnoptions documentation.
* Make PyWideStringList_INIT macro private: replace "Py" prefix
with "_Py".
* test_embed: add test_init_warnoptions().
(cherry picked from commit fb4ae152a9930f0e00cae8b2807f534058cf341a)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new struct_size field to PyPreConfig and PyConfig structures to
allow to modify these structures in the future without breaking the
backward compatibility.
* Replace private _config_version field with public struct_size field
in PyPreConfig and PyConfig.
* Public PyPreConfig_InitIsolatedConfig() and
PyPreConfig_InitPythonConfig()
return type becomes PyStatus, instead of void.
* Internal _PyConfig_InitCompatConfig(),
_PyPreConfig_InitCompatConfig(), _PyPreConfig_InitFromConfig(),
_PyPreConfig_InitFromPreConfig() return type becomes PyStatus,
instead of void.
* Remove _Py_CONFIG_VERSION
* Update the Initialization Configuration documentation.
(cherry picked from commit 441b10cf2855955c86565f8d59e72c2efc0f0a57)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-38234: Py_SetPath() uses the program full path (GH-16357)
Py_SetPath() now sets sys.executable to the program full path
(Py_GetProgramFullPath()), rather than to the program name
(Py_GetProgramName()).
Fix also memory leaks in pathconfig_set_from_config().
(cherry picked from commit 1ce152a42eaa917d7763bce93f1e1ca72530d7ca)
* bpo-38234: Add tests for Python init path config (GH-16358)
(cherry picked from commit bb6bf7d342b4503a6227fd209fac934905b6a1aa)
* bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)
Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed
to test pyvenv.cfg and pybuilddir.txt configuration files.
Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8
encoding, not ASCII.
(cherry picked from commit 52ad33abbfb6637d74932617c7013bae0ccf6e32)
* bpo-38234: Cleanup getpath.c (GH-16367)
* search_for_prefix() directly calls reduce() if found is greater
than 0.
* Add calculate_pybuilddir() subfunction.
* search_for_prefix(): add path string buffer for readability.
* Fix some error handling code paths: release resources on error.
* calculate_read_pyenv(): rename tmpbuffer to filename.
* test.pythoninfo now also logs windows.dll_path
(cherry picked from commit 221fd84703c545408bbb4a6e0b58459651331f5c)
* bpo-38234: Fix test_embed pathconfig tests (GH-16390)
bpo-38234: On macOS and FreeBSD, the temporary directory can be
symbolic link. For example, /tmp can be a symbolic link to /var/tmp.
Call realpath() to resolve all symbolic links.
(cherry picked from commit 00508a7407d7d300b487532e2271534b20e378a7)
* bpo-38234: Add test_init_setpath_config() to test_embed (GH-16402)
* Add test_embed.test_init_setpath_config(): test Py_SetPath()
with PyConfig.
* test_init_setpath() and test_init_setpythonhome() no longer call
Py_SetProgramName(), but use the default program name.
* _PyPathConfig: isolated, site_import and base_executable
fields are now only available on Windows.
* If executable is set explicitly in the configuration, ignore
calculated base_executable: _PyConfig_InitPathConfig() copies
executable to base_executable.
* Complete path config documentation.
(cherry picked from commit 8bf39b606ef7b02c0279a80789f3c4824b0da5e9)
* bpo-38234: Complete init config documentation (GH-16404)
(cherry picked from commit 88feaecd46a8f427e30ef7ad8cfcddfe392a2402)
* bpo-38234: Fix test_embed.test_init_setpath_config() on FreeBSD (GH-16406)
Explicitly preinitializes with a Python preconfiguration to avoid
Py_SetPath() implicit preinitialization with a compat
preconfiguration.
Fix also test_init_setpath() and test_init_setpythonhome() on macOS:
use self.test_exe as the executable (and base_executable), rather
than shutil.which('python3').
(cherry picked from commit 49d99f01e6e51acec5ca57a02e857f0796bc418b)
* bpo-38234: Py_Initialize() sets global path configuration (GH-16421)
* Py_InitializeFromConfig() now writes PyConfig path configuration to
the global path configuration (_Py_path_config).
* Add test_embed.test_get_pathconfig().
* Fix typo in _PyWideStringList_Join().
(cherry picked from commit 12f2f177fc483723406d7917194e7f655a20631b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* _PyConfig_InitPathConfig() now starts by copying the global path
configuration, and then override values set in PyConfig.
* _PyPathConfig_Calculate() implementations no longer override
_PyPathConfig fields which are already computed. For example,
if _PyPathConfig.prefix is not NULL, leave it unchanged.
* If Py_SetPath() has been called, _PyConfig_InitPathConfig() doesn't
call _PyPathConfig_Calculate() anymore.
* _PyPathConfig_Calculate() no longer uses PyConfig,
except to initialize PyCalculatePath structure.
* pathconfig_calculate(): remove useless temporary
"_PyPathConfig new_config" variable.
* calculate_module_search_path(): remove hack to workaround memory
allocation failure, call Py_FatalError() instead.
* Fix get_program_full_path(): handle memory allocation failure.
(cherry picked from commit 9c42f8cda552694f3b47d6388d4ae84d61731872)
|
|
|
|
|
|
| |
Python now dumps path configuration if it fails to import the Python
codecs of the filesystem and stdio encodings.
(cherry picked from commit fcdb027234566c4d506d6d753c7d5638490fb088)
|
|
|
|
|
| |
(cherry picked from commit b104ecbbafc14f9ca0c8371963c45dca893f6b75)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
| |
Backported with release manager approval
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-16313)
* bpo-38234: Remove _PyPathConfig.dll_path (GH-16307)
The DLL path is not computed from any user configuration and cannot
be configured by PyConfig. Instead, add a new _Py_dll_path global variable.
Remove _PyConfig_SetPathConfig(): replaced with _PyPathConfig_Init().
Py_Initialize() now longer sets the "global path configuration",
but only initialize _Py_dll_path.
(cherry picked from commit c422167749f92d4170203e996a2c619c818335ea)
* bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298)
* If Py_SetPath() has been called, _PyConfig_InitPathConfig() now
uses its value.
* Py_Initialize() now longer copies path configuration from PyConfig
to the global path configuration (_Py_path_config).
(cherry picked from commit e267793aa4101b2771ed0e66aaff5743d23f59af)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-38070: _Py_DumpTraceback() writes <no Python frame> (GH-16244)
When a Python thread has no frame, _Py_DumpTraceback() and
_Py_DumpTracebackThreads() now write "<no Python frame>", rather than
writing nothing.
(cherry picked from commit 8fa3e1740b3f03ea65ddb68411c2238c5f98eec2)
* bpo-38070: Enhance _PyObject_Dump() (GH-16243)
_PyObject_Dump() now dumps the object address for freed objects and
objects with ob_type=NULL.
(cherry picked from commit b39afb78768418d9405c4b528c80fa968ccc974d)
* bpo-38070: Add _PyRuntimeState.preinitializing (GH-16245)
Add _PyRuntimeState.preinitializing field: set to 1 while
Py_PreInitialize() is running.
_PyRuntimeState: rename also pre_initialized field to preinitialized.
(cherry picked from commit d3b904144e86e2442961de6a7dccecbe133d5c6d)
* bpo-38070: Py_FatalError() logs runtime state (GH-16246)
(cherry picked from commit 1ce16fb0977283ae42a9f8917bbca5f44aa69324)
|
|
|
|
|
|
|
|
|
|
| |
None. (GH-13933) (GH-16141)
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.
(cherry picked from commit 279f44678c8b84a183f9eeb85e0b086228154497)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-16064)
* bpo-38121: Sync importlib.metadata with 0.22 backport
* 📜🤖 Added by blurb_it..
(cherry picked from commit 8ed6503eca4e3ea4949479d8d7fd9ffd54f81038)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
| |
(GH-15961)
|
|
|
|
|
|
|
|
| |
The >=, checking whether a module index was in already in the module-by-index list, needed to be strict.
Also, fold nested ifs into one and fix some bad spacing.
(cherry picked from commit 39de95b746c990e6a2fe9af5fad01747f58b2e5f)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|