| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(Contributed by Nick Coghlan.)
|
| |
|
|
|
|
|
|
|
|
| |
Example:
>>> import dis
>>> dis.dis(compile('1,2,3', '', 'eval'))
0 0 LOAD_CONST 3 ((1, 2, 3))
3 RETURN_VALUE
|
|
|
|
|
|
|
|
|
| |
* Make a pass to eliminate NOPs. Produce code that is more readable,
more compact, and a tiny bit faster. Makes the peepholer more flexible
in the scope of allowable transformations.
* With Guido's okay, bumped up the magic number so that this patch gets
widely exercised before the alpha goes out.
|
|
|
|
|
|
|
|
| |
PyImport_ReloadModule(): restore the module to sys.modules in error cases.
load_package(): semantic-neutral refactoring from an earlier stab at
this patch; giving it a common error exit made the code
easier to follow, so retaining that part.
_RemoveModule(): new little utility to delete a key from sys.modules.
|
|
|
|
| |
already correct, so not changed here.
|
| |
|
| |
|
|
|
|
| |
Already backported.
|
| |
|
|
|
|
|
| |
Revise the long comment that explained details of the magic number
in gory detail.
|
| |
|
| |
|
|
|
|
| |
Backported to 2.3.
|
| |
|
| |
|
|
|
|
| |
(From SF patch #810751)
|
|
|
|
|
|
| |
The embed2.diff patch solves the user's problem by exporting the missing
symbols from the Python core so Python can be embedded in another Cygwin
application (well, at lest vim).
|
|
|
|
|
| |
- there's a weird variable name here (zimpimport), but I'll leave that
for someone that's familiar with the ZIP import support
|
|
|
|
|
|
| |
operate on the module dictionary directly. This prevents spurious
depreciation warnings from being raised if a submodule name shadows
a builtin name.
|
|
|
|
| |
Will backport.
|
|
|
|
| |
use METH_NOARGS instead
|
|
|
|
|
|
|
| |
Add missing INCREFs and re-indent returns to be consistent.
Add \n\ for lines in docstring
Add a pathetic test
Add docs
|
|
|
|
|
|
|
|
| |
mostly from SF patch #683257, but I had to change unlock_import() to
return an error value to avoid fatal error.
Should this be backported? The patch requested this, but it's a new
feature.
|
|
|
|
| |
try to intern them. This has the theoretical problem that resource filenames on sys.path cannot be unicode objects, but in practice that shouldn't matter.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- new import hooks in import.c, exposed in the sys module
- new module called 'zipimport'
- various changes to allow bootstrapping from zip files
I hope I didn't break the Windows build (or anything else for that
matter), but then again, it's been sitting on sf long enough...
Regarding the latest discussions on python-dev: zipimport sets
pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as
/path/to/Archive.zip/subdir/ are supported again.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
in imp". This adds two functions to the imp module: get_frozenmodules()
and set_frozenmodules().
|
|
|
|
|
| |
to 62011. This should get the snake-farm to throw away its old .pyc
files, amongst others.
|
|
|
|
|
|
|
|
| |
[ 587993 ] SET_LINENO killer
Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab.
Many sundry changes to document and adapt to this change.
|
|
|
|
| |
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
|
|
|
|
|
|
|
|
| |
This patch enhances Python/import.c/find_module() so
that unicode objects found in sys.path will be treated
as legal directory names (The current code ignores
anything that is not a str). The unicode name is
converted to str using Py_FileSystemDefaultEncoding.
|
|
|
|
|
| |
Write 4 bytes for co_stacksize, etc. to prevent writing out
bad .pyc files which can cause a crash when read back in.
|
| |
|
|
|
|
| |
in the mode (it's forbidden).
|
|
|
|
|
|
|
|
|
| |
get_file() must convert 'U' to "r" PY_STDIOTEXTMODE before calling
fopen().
imp_load_module() must accept 'r' or 'U' or something with '+'.
Also reflow some long lines.
|
|
|
|
|
|
|
| |
in there, and convert it to "rb" (or "r" for non-universal-newline builds)
before passing it to fopen().
Fixes #561326.
|
|
|
|
|
|
|
|
| |
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.
See PEP278 for details.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Python/
dynload_shlib.c // EMX port emulates dlopen() etc. for DL extensions
import.c // changes to support 8.3 DLL name limit (VACPP+EMX)
// and case sensitive import semantics
importdl.h
thread_os2.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for the UTF-8 decoder: it will now accept isolated surrogates
(previously it raised an exception which causes round-trips to
fail).
Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for
marshalling Unicode objects, so we better make sure it works for
all Unicode code points, including isolated surrogates).
Bumped the PYC magic in a non-standard way -- please review. This
was needed because the old PYC format used illegal UTF-8 sequences
for isolated high surrogates which now raise an exception.
|
| |
|
|
|
|
| |
what it is more carefully and point out some of the subtleties.
|
|
|
|
| |
submodule imports: the frozen import goes through a different mechanism.
|