| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
extension modules (GH-26025) (#26028)
|
| |
|
|
| |
objects from file locations (GH-25121)
|
| |
|
|
|
|
|
|
|
|
| |
(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-15840) (#15861)
https://gitlab.com/python-devs/importlib_metadata/-/tags/0.21.
(cherry picked from commit 17499d82702432955d8e442a1871ff276ca64bc5)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-15320) (GH-15456)
Fix compilation of "break" and "continue" in the
"finally" block when the corresponding "try" block
contains "return" with a non-constant value.
(cherry picked from commit ef61c524ddeeb56da3858b86e349e7288d68178e)
|
| |
|
|
|
|
|
|
|
|
| |
* bpo-37697: Sync with importlib_metadata 0.19
* Run make regen-importlib
* ππ€ Added by blurb_it.
(cherry picked from commit 049460da9c7b5f51732e2966195c44713af9dc4c)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
| |
(cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1)
Co-authored-by: Min ho Kim <minho42@gmail.com>
|
| |
|
|
|
|
|
|
| |
ast.parameters nodes (GH-14778)
https://bugs.python.org/issue37593
(cherry picked from commit cd6e83b4810549c308ab2d7315dbab526e35ccf6)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
| |
modification (GH-14320)
(cherry picked from commit b3ca7972c8d8c6479b6542ce28e0f7a6ebd5b8fe)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 663131a6e2c6c8b83e9f982d8c6ca38fc7c238b4)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
| |
Add importlib.metadata module as forward port of the standalone importlib_metadata.
|
| |
|
| |
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit contains the implementation of PEP570: Python positional-only parameters.
* Update Grammar/Grammar with new typedarglist and varargslist
* Regenerate grammar files
* Update and regenerate AST related files
* Update code object
* Update marshal.c
* Update compiler and symtable
* Regenerate importlib files
* Update callable objects
* Implement positional-only args logic in ceval.c
* Regenerate frozen data
* Update standard library to account for positional-only args
* Add test file for positional-only args
* Update other test files to account for positional-only args
* Add News entry
* Update inspect module and related tests
|
| | |
|
| |
|
|
|
|
|
|
|
| |
writing '.pyc' (GH-9998)
Since `SourceFileLoader.set_data()` catches exceptions raised by `_write_atomic()` and logs an informative message consequently, always logging successful outcome in 'SourceLoader.get_code()' seems redundant.
https://bugs.python.org/issue35024
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-6834)
In some development setups it is inconvenient or impossible to write bytecode
caches to the code tree, but the bytecode caches are still useful. The
PYTHONPYCACHEPREFIX environment variable allows specifying an alternate
location for cached bytecode files, within which a directory tree mirroring the code
tree will be created. This cache tree is then used (for both reading and writing)
instead of the local `__pycache__` subdirectory within each source directory.
Exposed at runtime as sys.pycache_prefix (defaulting to None), and can
be set from the CLI as "-X pycache_prefix=path".
Patch by Carl Meyer.
|
| | |
|
| |
|
|
|
| |
invalidating caches (GH-6402)
An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
|
| |
|
|
|
|
|
|
| |
* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.
|
| |
|
|
|
|
|
|
|
| |
to compiler. (GH-5006)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Antoine Pitrou <antoine@python.org>
|
| | |
|
| |
|
|
|
|
|
| |
* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.
https://bugs.python.org/issue32303
https://bugs.python.org/issue32305
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python now supports checking bytecode cache up-to-dateness with a hash of the
source contents rather than volatile source metadata. See the PEP for details.
While a fairly straightforward idea, quite a lot of code had to be modified due
to the pervasiveness of pyc implementation details in the codebase. Changes in
this commit include:
- The core changes to importlib to understand how to read, validate, and
regenerate hash-based pycs.
- Support for generating hash-based pycs in py_compile and compileall.
- Modifications to our siphash implementation to support passing a custom
key. We then expose it to importlib through _imp.
- Updates to all places in the interpreter, standard library, and tests that
manually generate or parse pyc files to grok the new format.
- Support in the interpreter command line code for long options like
--check-hash-based-pycs.
- Tests and documentation for all of the above.
|
| | |
|
| |
|
|
|
|
| |
* Trivial cleanups following bpo-31370
* Also cleanup the "importlib._bootstrap_external" module
|
| | |
|
| |
|
|
|
|
|
| |
Special thanks to INADA Naoki for pushing the patch through
the last mile, Serhiy Storchaka for reviewing the code, and to
Victor Stinner for suggesting the idea (originally implemented
in the PyPy project).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling zero-argument super() in __init_subclass__ and
__set_name__ involved moving __class__ initialisation to
type.__new__. This requires cooperation from custom
metaclasses to ensure that the new __classcell__ entry
is passed along appropriately.
The initial implementation of that change resulted in abruptly
broken zero-argument super() support in metaclasses that didn't
adhere to the new requirements (such as Django's metaclass for
Model definitions).
The updated approach adopted here instead emits a deprecation
warning for those cases, and makes them work the same way they
did in Python 3.5.
This patch also improves the related class machinery documentation
to cover these details and to include more reader-friendly
cross-references and index entries.
|
| |
|
|
| |
a var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
|
| |
|
|
|
|
|
|
|
| |
The __class__ cell used by zero-argument super() is now initialized
from type.__new__ rather than __build_class__, so class methods
relying on that will now work correctly when called from metaclass
methods during class creation.
Patch by Martin Teichmann.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #27213: Rework CALL_FUNCTION* opcodes to produce shorter and more
efficient bytecode:
* CALL_FUNCTION now only accepts position arguments
* CALL_FUNCTION_KW accepts position arguments and keyword arguments, but keys
of keyword arguments are packed into a constant tuple.
* CALL_FUNCTION_EX is the most generic, it expects a tuple and a dict for
positional and keyword arguments.
CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW opcodes have been removed.
2 tests of test_traceback are currently broken: skip test, the issue #28050 was
created to track the issue.
Patch by Demur Rumed, design by Serhiy Storchaka, reviewed by Serhiy Storchaka
and Victor Stinner.
|
| |
|
|
| |
Patch by Ivan Levkivskyi.
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Windows.
Originally only b'PYTHONCASEOK' was being checked for in os.environ,
but that won't work under Windows where all environment variables are
strings (on OS X they are bytes).
Thanks to Eryk Sun for the bug report.
|
| | |
| |
| |
| | |
Thanks to Oren Milman for the patch.
|
| | |
| |
| |
| | |
Patch by Demur Rumed.
|
| | | |
|
| |\ \
| |/
| |
| |
| | |
function with generalized unpacking (PEP 448) and conflicting keyword names
could cause undefined behavior.
|
| | |
| |
| |
| |
| | |
function with generalized unpacking (PEP 448) and conflicting keyword names
could cause undefined behavior.
|
| | | |
|