| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
garbage-collected at shutdown.
|
|\
| |
| |
| | |
(thanks Arfrever for reporting).
|
| |
| |
| |
| | |
(thanks Arfrever for reporting).
|
| | |
|
|\ \
| |/
| |
| | |
the interpreter is shutdown and then started again.
|
| |
| |
| |
| | |
the interpreter is shutdown and then started again.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
attributes to None.
The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.
This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
Also, make the private function static.
|
| |
| |
| |
| | |
by default. It can be re-enabled with the `-X showrefcount` option.
|
|/
|
|
|
|
| |
number of memory blocks currently allocated.
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
|
|\
| |
| |
| | |
Patch by Victor Stinner.
|
| |
| |
| |
| | |
Patch by Victor Stinner.
|
| |
| |
| |
| | |
sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
|
| |
| |
| |
| | |
Patch by Serhiy Storchaka.
|
| |
| |
| |
| | |
when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup of the fp. I've changed the code to use another FILE ptr for pyc files and moved the fclose() to PyRun_SimpleFileExFlags() to make it more obvious what's happening.
|
| |
| |
| |
| | |
filename points to a pyc/pyo file and closeit is false.
|
| |
| |
| |
| | |
sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
|
| |
| |
| |
| |
| |
| |
| | |
faulthandler requires the importlib if "-X faulthandler" option is present on
the command line, so initialize faulthandler after importlib.
Add also an unit test.
|
| | |
|
| | |
|
| |
| |
| |
| | |
corresponding type objects
|
| |
| |
| |
| | |
by basing pkgutil explicitly on importlib, deprecating its internal import emulation and setting __main__.__loader__ correctly so that runpy still works (Affects #15343, #15314, #15357)
|
|\ \
| |/
| |
| | |
python3 under Unix, not python.
|
| |
| |
| |
| | |
"python3" under Unix, not "python".
|
| |
| |
| |
| | |
allocation issues
|
| |
| |
| |
| | |
(Modules/_freeze_importlib) to build Python/importlib.h.
|
| |
| |
| |
| |
| |
| | |
attribute
This replaces the original PEP 409 implementation. See #14133.
|
| |
| |
| |
| | |
Thanks to Eric Snow for the patch.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
be implicit.
Added a warning for when sys.path_hooks is found to be empty. Also
changed the meaning of None in sys.path_importer_cache to represent
trying sys.path_hooks again (an interpretation of previous semantics).
Also added a warning for when None was found.
The long-term goal is for None in sys.path_importer_cache to represent
the same as imp.NullImporter: no finder found for that sys.path entry.
|
| |
| |
| |
| |
| |
| |
| | |
rewriting functionality in pure Python.
To start, imp.new_module() has been rewritten in pure Python, put into
importlib (privately) and then publicly exposed in imp.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
|
|\ \
| |/ |
|
| | |
|
| | |
|
|\ \
| |/
| |
| | |
earliest point.
|
| |
| |
| |
| | |
earliest point.
|
|\ \
| |/ |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
|
| | |
| | |
| | |
| | | |
interactive statement
|
|\ \ \
| |/ / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
code, to avoid timestamp collisions (especially on filesystems with a low
timestamp resolution) when checking for freshness of the bytecode.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
It was already the case with Python 2. However, the corresponding
sys module entries are now set to None (instead of an unusable file object).
|
| | |
| | |
| | |
| | |
| | | |
It was already the case with Python 2. However, the corresponding
sys module entries are now set to None (instead of an unusable file object).
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
to flush it at shutdown and print an error.
This also adds a test for issue #5319, whose resolution introduced the issue.
|