| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Export explicitly the Py_GetArgcArgv() function to the C API and
document the function. Previously, it was exported implicitly which
no longer works since Python is built with -fvisibility=hidden.
* Add PyConfig._orig_argv member.
* Py_InitializeFromConfig() no longer calls _PyConfig_Write() twice.
* PyConfig_Read() no longer initializes Py_GetArgcArgv(): it is now
_PyConfig_Write() responsibility.
* _PyConfig_Write() result type becomes PyStatus instead of void.
* Write an unit test on Py_GetArgcArgv().
|
|
|
|
| |
(GH-20605)
|
|
|
|
|
|
| |
* Rename pycore_byteswap.h to pycore_bitutils.h.
* Move popcount_digit() to pycore_bitutils.h as _Py_popcount32().
* _Py_popcount32() uses GCC and clang builtin function if available.
* Add unit tests to _Py_popcount32().
|
|
|
|
| |
Looks like the merging of bpo-33187 and bpo-20928 was racy, resulting in
this change going undocumented.
|
|
|
|
|
|
|
|
|
|
| |
build-installer now looks in its directory of source tarballs
for a suitable html tarball of the same version. If so, it
will unpack and use it rather than rebuilding the html format
documentation set from the source repo. This is intended as
a speedup for test builds of the installer. Files names must
be in the same format as produced by the docs build for download,
for example, `python-3.9.0b1-docs-html.tar.bz2`.
|
| |
|
|
|
|
|
| |
Also added an example in shutil in order to make more clear how they are to be used.
Initially reported by Weinan Li on bpo.
|
| |
|
|
|
|
|
| |
(GH-20697)
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Provide native .files support on SourceFileLoader.
* Add native importlib.resources.files() support to zipimporter. Remove fallback support.
* make regen-all
* 📜🤖 Added by blurb_it.
* Move 'files' into the ResourceReader so it can carry the relevant module name context.
* Create 'importlib.readers' module and add FileReader to it.
* Add zip reader and rely on it for a TraversableResources object on zipimporter.
* Remove TraversableAdapter, no longer needed.
* Update blurb.
* Replace backslashes with forward slashes.
* Incorporate changes from importlib_metadata 2.0, finalizing the interface for extension via get_resource_reader.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
| |
statements with no value (GH-20701)
|
|
|
|
|
|
| |
In debug mode, ensure that free lists are no longer used after being
finalized. Set numfree to -1 in finalization functions
(eg. _PyList_Fini()), and then check that numfree is not equal to -1
before using a free list (e.g list_dealloc()).
|
|
|
| |
Use Py_SET_REFCNT() in unicode_release_interned().
|
|
|
|
| |
Reorganize code to ensure that free lists are cleared in the right
order. Call _PyWarnings_Fini() before _PyList_Fini().
|
|
|
|
| |
(skipping tests in that case). (#20681)
|
| |
|
|
|
|
| |
(GH-20685)
|
| |
|
|
|
| |
This is not part of the limited API but makes the buffer slots available for type specs.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-40880: Fix invalid read in newline_in_string in pegen.c
* Update Parser/pegen/pegen.c
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* Add NEWS entry
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
| |
|
|
|
|
| |
argparse.BooleanOptionalAction (GH-20623)
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Refresh importlib.metadata from importlib_metadata 1.6.1.
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
|
|
| |
Automerge-Triggered-By: @brettcannon
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Each interpreter now has its own context free list:
* Move context free list into PyInterpreterState.
* Add _Py_context_state structure.
* Add tstate parameter to _PyContext_ClearFreeList()
and _PyContext_Fini().
* Pass tstate to clear_freelists().
|
|
|
|
|
|
|
|
|
| |
Each interpreter now has its own asynchronous generator free lists:
* Move async gen free lists into PyInterpreterState.
* Move _PyAsyncGen_MAXFREELIST define to pycore_interp.h
* Add _Py_async_gen_state structure.
* Add tstate parameter to _PyAsyncGen_ClearFreeLists
and _PyAsyncGen_Fini().
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each interpreter now has its own list free list:
* Move list numfree and free_list into PyInterpreterState.
* Add _Py_list_state structure.
* Add tstate parameter to _PyList_ClearFreeList()
and _PyList_Fini().
* Remove "#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS".
* _PyGC_Fini() clears gcstate->garbage list which can be stored in
the list free list. Call _PyGC_Fini() before _PyList_Fini() to
prevent leaking this list.
|
|
|
|
|
|
|
|
|
| |
* bpo-40807: Show warnings once from codeop._maybe_compile
* Move catch_warnings
* news
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
| |
Each interpreter now has its own frame free list:
* Move frame free list into PyInterpreterState.
* Add _Py_frame_state structure.
* Add tstate parameter to _PyFrame_ClearFreeList()
and _PyFrame_Fini().
* Remove "#if PyFrame_MAXFREELIST > 0".
* Remove "#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS".
|
|
|
|
|
|
| |
Each interpreter now has its own slice cache:
* Move slice cache into PyInterpreterState.
* Add tstate parameter to _PySlice_Fini().
|
|
|
|
|
|
|
|
| |
Each interpreter now has its own float free list:
* Move tuple numfree and free_list into PyInterpreterState.
* Add _Py_float_state structure.
* Add tstate parameter to _PyFloat_ClearFreeList()
and _PyFloat_Fini().
|
|
|
|
|
|
|
|
|
|
| |
Each interpreter now has its own tuple free lists:
* Move tuple numfree and free_list arrays into PyInterpreterState.
* Define PyTuple_MAXSAVESIZE and PyTuple_MAXFREELIST macros in
pycore_interp.h.
* Add _Py_tuple_state structure. Pass it explicitly to tuple_alloc().
* Add tstate parameter to _PyTuple_ClearFreeList()
* Each interpreter now has its own empty tuple singleton.
|
|
|
|
|
| |
In What's New in Python 3.10, propose Py_SET_SIZE(), Py_SET_REFCNT()
and Py_SET_TYPE() macros for backward compatibility with Python 3.9
and older.
|
|
|
| |
Automerge-Triggered-By: @tiran
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before
```
content.txt is 42 bytes in size and isa regular file.
folder is 420 bytes in size and isa directory.
magic is 4200 bytes in size and issomething else.
```
After:
```
content.txt is 42 bytes in size and is a regular file.
folder is 420 bytes in size and is a directory.
magic is 4200 bytes in size and is something else.
```
Automerge-Triggered-By: @orsenthil
|
|
|
|
|
|
|
|
|
|
| |
If name is NULL, name is now set to co->co_name.
If qualname is NULL, qualname is now set to name.
qualname must not be NULL: it is used to build error messages.
Cleanup also the code: declare variables where they are initialized.
Rename "name" local variables to "varname" to avoid overriding "name"
parameter.
|
|
|
|
|
| |
Skip some :mod:`multiprocessing` tests when MD5 hash digest is blocked.
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
| |
|
| |
|
|
|
| |
Inline with the rest of the file, updated error message to use f-string.
|
|
|
|
|
| |
Just a brief grammar fix.
See also <>.
|