Staging
v0.5.1
v0.5.1
swh:1:snp:635f4099902912592851108bcac178ff574f7c5f
Revision 58f56804629e177e3d05c45542cd793c3177de40 authored by Brett Cannon on 18 October 2013, 17:24:13 UTC, committed by Brett Cannon on 18 October 2013, 17:24:13 UTC
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.
1 parent 2546a17
Tip revision: 550e4673be538d98b6ddf5550b3922539cf5c4b2 authored by Victor Stinner on 08 December 2020, 23:32:54 UTC
bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)
bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)
Tip revision: 550e467
File | Mode | Size |
---|---|---|
Doc | ||
Grammar | ||
Include | ||
Lib | ||
Mac | ||
Misc | ||
Modules | ||
Objects | ||
PC | ||
PCbuild | ||
Parser | ||
Python | ||
Tools | ||
.bzrignore | -rw-r--r-- | 584 bytes |
.gitignore | -rw-r--r-- | 960 bytes |
.hgeol | -rw-r--r-- | 755 bytes |
.hgignore | -rw-r--r-- | 1.2 KB |
.hgtags | -rw-r--r-- | 5.7 KB |
.hgtouch | -rw-r--r-- | 1.2 KB |
LICENSE | -rw-r--r-- | 12.5 KB |
Makefile.pre.in | -rw-r--r-- | 50.7 KB |
README | -rw-r--r-- | 6.6 KB |
config.guess | -rwxr-xr-x | 43.8 KB |
config.sub | -rwxr-xr-x | 34.8 KB |
configure | -rwxr-xr-x | 431.8 KB |
configure.ac | -rw-r--r-- | 133.9 KB |
install-sh | -rwxr-xr-x | 7.0 KB |
pyconfig.h.in | -rw-r--r-- | 39.5 KB |
setup.py | -rw-r--r-- | 94.4 KB |
Computing file changes ...