Phillip J. Eby
521cbc37af
Fix for SF bug #1029475 : reload() doesn't work with PEP 302 loaders.
...
(Backport to 2.3 maintenance branch.)
2004-09-23 05:19:27 +00:00
Thomas Heller
a67ea98b99
Fix a refcount bug in an obscure code corner.
2004-06-07 14:59:59 +00:00
Martin v. Löwis
886756f35a
Decref all if ensure_fromlist fails. Fixes #876533 .
2004-03-23 16:28:45 +00:00
Walter Dörwald
4958f2741a
Backport checkin:
...
Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751 )
2003-10-20 14:34:48 +00:00
Fred Drake
1e5fc55c4d
- fix typo
...
- there's a weird variable name here (zimpimport), but I'll leave that
for someone that's familiar with the ZIP import support
2003-07-11 15:01:02 +00:00
Neil Schemenauer
00b0966f20
Don't use the module object setattr when importing submodules. Instead,
...
operate on the module dictionary directly. This prevents spurious
depreciation warnings from being raised if a submodule name shadows
a builtin name.
2003-06-16 21:03:07 +00:00
Neal Norwitz
a11e4c13b1
SF patch #708201 , unchecked return value in import.c by Jason Harper
...
Will backport.
2003-03-23 14:31:01 +00:00
Neal Norwitz
08ea61ad45
Remove PyArg_ParseTuple() for methods which take no args,
...
use METH_NOARGS instead
2003-02-17 18:18:00 +00:00
Neal Norwitz
2294c0d4ec
Cleanup from patch #683257 :
...
Add missing INCREFs and re-indent returns to be consistent.
Add \n\ for lines in docstring
Add a pathetic test
Add docs
2003-02-12 23:02:21 +00:00
Guido van Rossum
c4f4ca91e1
Provide access to the import lock, fixing SF bug #580952 . This is
...
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.
2003-02-12 21:46:11 +00:00
Jack Jansen
9363dca3f8
MacPython-OS9 specific fix: If there are non-string items on sys.path don't 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.
2003-01-24 16:15:45 +00:00
Just van Rossum
52e14d640b
PEP 302 + zipimport:
...
- 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.
2002-12-30 22:08:05 +00:00
Just van Rossum
8982595870
Backing out patch #642578 in anticipation of final acceptance of PEP 302.
2002-12-25 23:13:34 +00:00
Jack Jansen
72f3b7a5de
Added missing casts.
2002-12-13 15:23:10 +00:00
Martin v. Löwis
79acb9edfa
Patch #614055 : Support OpenVMS.
2002-12-06 12:48:53 +00:00
Just van Rossum
3eb166b49b
Slightly improved version of patch #642578 : "Expose PyImport_FrozenModules
...
in imp". This adds two functions to the imp module: get_frozenmodules()
and set_frozenmodules().
2002-11-29 20:47:40 +00:00
Guido van Rossum
f689492070
Because MWH changed the bytecode again, moved the magic number *back*
...
to 62011. This should get the snake-farm to throw away its old .pyc
files, amongst others.
2002-08-31 15:16:14 +00:00
Michael W. Hudson
dd32a91cc0
This is my patch
...
[ 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.
2002-08-15 14:59:02 +00:00
Martin v. Löwis
6238d2b024
Patch #569753 : Remove support for WIN16.
...
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
2002-06-30 15:26:10 +00:00
Walter Dörwald
3430d70e03
Apply diff2.txt from SF patch http://www.python.org/sf/566999
...
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.
2002-06-17 10:43:59 +00:00
Neal Norwitz
7fdcb41131
Fix SF bug # 561858 Assertion with very long lists
...
Write 4 bytes for co_stacksize, etc. to prevent writing out
bad .pyc files which can cause a crash when read back in.
2002-06-14 01:07:39 +00:00
Martin v. Löwis
14f8b4cfcb
Patch #568124 : Add doc string macros.
2002-06-13 20:33:02 +00:00
Guido van Rossum
5e2c5fa1bd
imp_load_module(): correct and comment the sense of the test for '+'
...
in the mode (it's forbidden).
2002-05-30 17:33:07 +00:00
Jeremy Hylton
4ae6faed9f
Cover a few corners in the 'U' mode integration to make imp work.
...
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.
2002-05-30 17:15:25 +00:00
Jack Jansen
c88da1faa5
File modes in filedescr entries are also passed to Python, so we now put "U"
...
in there, and convert it to "rb" (or "r" for non-universal-newline builds)
before passing it to fopen().
Fixes #561326 .
2002-05-28 10:58:19 +00:00