| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
exists when checking for a package.
Before there was an isdir check and then various isfile checks for
possible __init__ files when looking for a package.
This change drops the isdir check by leaning
on the assumption that a directory will not contain something named
after the module being imported which is not a directory. If the module
is a package then it saves a stat call. If there is nothing in the
directory with the potential package name it also saves a stat call.
Only if there is something in the directory named the same thing as
the potential package will the number of stat calls increase
(due to more wasteful __init__ checks).
Semantically there is no change as the isdir check moved
down so that namespace packages continue to have no chance of
accidentally collecting non-existent directories.
|
| | | |
| | |
| | |
| | | |
now that self.path is no longer forced to '.'.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
and stop importlib.machinery.FileFinder treating '' as '.'.
Previous PathFinder transformed '' into '.' which led to __file__ for
modules imported from the cwd to always be relative paths. This meant
the values of the attribute were wrong as soon as the cwd changed.
This change now means that as long as the site module is run (which
makes all entries in sys.path absolute) then all values for __file__
will also be absolute unless it's for __main__ when specified by file
path in a relative way (modules imported by runpy will have an
absolute path).
Now that PathFinder is no longer treating '' as '.' it only makes
sense for FileFinder to stop doing so as well. Now no transformation
is performed for the directory given to the __init__ method.
Thanks to Madison May for the initial patch.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- don't call PyErr_NoMemory with interpreter is not initialised
- note that it's OK to call _PyMem_RawStrDup here
- don't include this in the limited API
- capitalise "IO"
- be explicit that a non-zero return indicates an error
- include versionadded marker in docs
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.
Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.
(Initial patch by Bastien Montagne)
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| |/ /
| | |
| | | |
raise an exception.
|
| | | |
| | |
| | |
| | | |
raise an exception.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
is pre-initialized to that value. Test show a 5% speedup as a bonus.
|
| | | |
| | |
| | |
| | | |
CID 486239: Uninitialized pointer read (UNINIT)
|
| | | | |
|
| | | |
| | |
| | |
| | | |
("make smelly" now clean)
|
| | | | |
|
| | | |
| | |
| | |
| | | |
10%) smaller.
|
| | | | |
|
| |\ \ \
| |/ /
| | |
| | | |
least one place so as to avoid regressions.
|
| | | |
| | |
| | |
| | | |
least one place so as to avoid regressions.
|
| |\ \ \
| |/ / |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
reflect 2-tuples.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
reflect 2-tuples.
|
| |\ \ \
| |/ / |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
destroyed before returning.
This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running.
|
| | | |
| | |
| | |
| | | |
Patch written by Vajrasky Kok.
|
| |\ \ \
| |/ / |
|
| | | | |
|
| |\ \ \
| |/ /
| | |
| | |
| | | |
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
|
| | | |
| | |
| | |
| | |
| | | |
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
descriptor, so as to avoid using many file descriptors when run in parallel from multiple threads.
|
| | | |
| | |
| | |
| | | |
PATH_MAX is not available on "MIPS IRIX 6.5.30 [SB] 3.x" buildbot
|
| | | |
| | |
| | |
| | |
| | | |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
| |\ \ \
| |/ /
| | |
| | | |
error messages and comments.
|
| | | |
| | |
| | |
| | | |
error messages and comments.
|
| | | |
| | |
| | |
| | | |
filenames anymore on Windows.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Catch PyFile_WriteString() and PyFile_WriteObject() errors
* Clear the current exception on _PyObject_GetAttrId() failure
* Use PyUnicode_CompareWithASCIIString() and PyFile_WriteObject() instead of
_PyUnicode_AsString() and strcmp() to avoid Unicode encoding error. stderr
has a more tolerant error handler than utf-8/strict.
|
| |\ \ \
| |/ / |
|
| | | |
| | |
| | |
| | | |
as exit status.
|
| | | |
| | |
| | |
| | | |
sub-interpreter is shutdown (it would previously dump a fatal error).
|
| | | |
| | |
| | |
| | |
| | | |
Do we need a fallback implementation of getcwd() from 1991 that claims to
support "really old Unix systems"? I don't think so.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
PEP 11:
Name: Systems using --with-pth (GNU pth threads)
Unsupported in: Python 3.2
Code removed in: Python 3.3
|