Guido van Rossum [Tue, 15 Jan 2002 21:14:38 +0000 (21:14 +0000)]
Backport revision 2.69.
SF patch #471839: Bug when extensions import extensions (Shane Hathaway)
When an extension imports another extension in its
initXXX() function, the variable _Py_PackageContext is
prematurely reset to NULL. If the outer extension then
calls Py_InitModule(), the extension is installed in
sys.modules without its package name. The
manifestation of this bug is a "SystemError:
_PyImport_FixupExtension: module <package>.<extension>
not loaded".
To fix this, importdl.c just needs to retain the old
value of _Py_PackageContext and restore it after the
initXXX() method is called. The attached patch does this.
This patch applies to Python 2.1.1 and the current CVS.
Tim Peters [Fri, 11 Jan 2002 04:21:11 +0000 (04:21 +0000)]
Add blurb about 32-bit Windows installer -- this made the SF release notes,
but apparently didn't get backstitched into NEWS before the release.
Trimmed trailing whitespace.
Tim Peters [Fri, 11 Jan 2002 00:28:56 +0000 (00:28 +0000)]
Remove remaining 2.2-isms:
+ Lib/site-packages wasn't created on Windows in 2.1.
+ The compiler package lived in Tools instead of in Lib.
After this, a directory compare of an installed 2.1.1 and an installation
created by this installer "are close". The remaining differences have to
do with files that the old installer mistakenly never knew existed (like
the distutils README, and pynche's color-name files). All such cases in
2.1.1 were bugs, now repaired in 2.1.2.
Tim Peters [Thu, 10 Jan 2002 23:05:10 +0000 (23:05 +0000)]
Mostly removing stuff the installer does in 2.2 that can't be done in
2.1 (e.g., there was no Lib/test/data directory then, hotshot didn't exist,
ditto the Lib/email package, etc). Also restored the now-obsolete expat
setup.
Fred Drake [Thu, 10 Jan 2002 22:37:18 +0000 (22:37 +0000)]
Adjust the instructions for building large file support so that it works
more cleanly (I think this supports more Linux systems; not sure).
Barry Warsaw & Martin von Loewis actually agree on this!
This closes SF patch #502023.
Anthony Baxter [Thu, 10 Jan 2002 15:51:52 +0000 (15:51 +0000)]
backport 1.14:
Fix the second reincarnation of SF #456395 -- failure on IRIX. This
time use .replace() to change all \r\n into \n, not just the last one.
Anthony Baxter [Thu, 10 Jan 2002 11:12:20 +0000 (11:12 +0000)]
cosmetic change to add a commit message for the last commit, accidently
sent with empty message.
sheesh. Lucky I decided it was worth doing last minute complete compile
tests. cvs merge stupid on my part fixed that made solaris builds totally
fail.
Anthony Baxter [Thu, 10 Jan 2002 09:54:01 +0000 (09:54 +0000)]
Backport gvanrossum's checkin of revision 1.20:
Thread.__bootstrap(): ignore exceptions in the self.__delete() call in
the finally clause. An exception here could happen when a daemon
thread exits after the threading module has already been trashed by
the import finalization, and there's not much of a point in trying to
insist doing the cleanup in that stage.
This should fix SF bug ##497111: active_limbo_lock error at program
exit.
Anthony Baxter [Mon, 7 Jan 2002 06:42:37 +0000 (06:42 +0000)]
MvL's patch to fix up large file support. You still need to enable it
manually with, e.g.:
CC='gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure
Jack Jansen [Thu, 27 Dec 2001 21:55:46 +0000 (21:55 +0000)]
A slightly different version of patch 489388 which addresses two MacOSX issues:
- Use -flat-namespace linker option to allow building on 10.1 and later.
- Allows it to build on 10.1.1 and later (which use a different version
numbering scheme for "uname").
Fred Drake [Wed, 26 Dec 2001 22:03:14 +0000 (22:03 +0000)]
Fix wrongly-named formal parameters in three places: begin_y was used twice
instead of begin_y and begin_x for derwin(), subpad(), and subwin().
Reported for derwin() by Eric Huss.
Added class annotations for the window methods so they would be properly
described in the index.
Anthony Baxter [Sun, 23 Dec 2001 01:47:10 +0000 (01:47 +0000)]
The Grande 'sendall()' patch. I believe that I've picked up everything
in the std lib that should be using sendall(), rather than send() - I've
tried to check each of the patches.
Replaces calls to socket.send() (which isn't guaranteed to send all data)
with the new socket.sendall() method.
Anthony Baxter [Fri, 21 Dec 2001 04:46:19 +0000 (04:46 +0000)]
d'oh! could have _sworn_ I checked this in last weekend.
Make dumbdbm merely "dumb", rather than "terminally broken". Without this
patch, it's almost impossible to use dumbdbm _without_ causing horrible
datalossage. With this patch, dumbdbm passes my own horrible torture test,
as well as the roundup test suite.
dumbdbm really could do with a smidgin of a rewrite or two, but that's not
suitable for the release21-maint branch.
Anthony Baxter [Fri, 21 Dec 2001 03:49:31 +0000 (03:49 +0000)]
backport 2.35:
SF bug 485175: buffer overflow in
traceback.c. Bugfix candidate. tb_displayline(): the sprintf
format was choking off the file name, but used plain %s for the
function name (which can be arbitrarily long). Limit both to 500
chars max.
Anthony Baxter [Fri, 21 Dec 2001 03:45:15 +0000 (03:45 +0000)]
backport 2.9:
PySymtableEntry_New(): I'm not sure what this
routine is doing, but it was obviously leaking an int object when
whatever the heck it's looking for was found. Repaired that. This
accounts for why entering function and class definitions at an
interactive prompt leaked a reference to the integer 1 each time.
Anthony Baxter [Fri, 21 Dec 2001 03:29:12 +0000 (03:29 +0000)]
backport 2.144:
Py_Initialize(): Apply patch by Jürgen Hermann to call
_PyImport_FixupExtension() on the exceptions module. Now
reload(exceptions) acts just like reload(sys) instead of raising
an ImportError.
Guido van Rossum [Tue, 18 Dec 2001 14:17:02 +0000 (14:17 +0000)]
Backport patch 1.57 to 2.1.2. Apparently ftp servers that send 227
responses that the original parse227() routine can't handle are
becoming more common.
"""
Change the 227 response parser to use a more liberal regular
expression. This is needed for certain servers that (in violation of
the standard) don't return the parentheses in the response.
This fixes SF bug #441712 by Henrik Weber (not exactly using his
patch).
"""
Jeremy Hylton [Tue, 18 Dec 2001 00:06:03 +0000 (00:06 +0000)]
Backport bugfixes since rev 1.39 from the trunk.
Add is_constant_false(), rev 1.41.
Fixed print handling, rev. 1.41.
Handle private names, 1.42.
Make sure JUMP_ABS and POP_BLOCK blocks are contiguous, rev. 1.44.
Make sure class object has no co_varnames, rev. 1.45.
Fix typo in visitDict(), rev. 1.46.
Generate correct code for continue in try/except, rev. 1.47.
Jeremy Hylton [Tue, 18 Dec 2001 00:00:15 +0000 (00:00 +0000)]
Backport bugfixes since rev 1.5 from the trunk.
Fix for sibling nodes that define the same free variable, rev. 1.6.
Handle private names, rev. 1.7.
Fix bug in handling of statements like "l[x:y] = 2", reb. 1.8.
Fix symbol problem with slice assignment, rev. 1.9.
Fred Drake [Fri, 7 Dec 2001 21:37:38 +0000 (21:37 +0000)]
Describe the behavior of the read() method when the list of filenames
includes files that do not exist, explain the intended use of the interface,
and show how to ensure an expected file really exists.
This closes SF bug #490399.
Anthony Baxter [Wed, 5 Dec 2001 06:57:31 +0000 (06:57 +0000)]
backport unixccompiler.py 1.36, ccompiler.py 1.40
support for dylib - allow zlib included in OS to be
used rather than have to compile and install in /usr/local
Anthony Baxter [Wed, 5 Dec 2001 06:46:16 +0000 (06:46 +0000)]
backport 1.15
Make sure path names inserted into ZIP files are normalized to use "/" as
the directory separator, as required by the format specification.
This closes SF bug #440693.
Anthony Baxter [Wed, 5 Dec 2001 06:34:34 +0000 (06:34 +0000)]
backport 1.17:
Fix SF bug [ #447370 ] typo in urllib2.py
Also fix another bug caught by pychecker-- HTTPError() raised when
redirect limit exceed did not pass an fp object. Had to change method
to keep fp object around until it's certain that the error won't be
raised.
Remove useless line in do_proxy().
Anthony Baxter [Wed, 5 Dec 2001 06:30:21 +0000 (06:30 +0000)]
backport 1.8, 1.9
--
patch 418489 from Andrew Dalke for string format bug
--
Merged in bugfix from PyUnit CVS for problem reported by Gary Todd.
If 'unittest.py' was run from the command line with the name of a test
case class as a parameter, it failed with an ugly error. (Which was a
shame, because the documentation says you can do that.)
--
Anthony Baxter [Wed, 5 Dec 2001 06:11:26 +0000 (06:11 +0000)]
backport half of 1.11:
__getaddr(): Watch out for empty addresses that can happen when
something like "MAIL FROM:<CR>" is received. This avoids the
IndexError and rightly returns an SMTP syntax error.
Anthony Baxter [Wed, 5 Dec 2001 06:05:09 +0000 (06:05 +0000)]
backport 1.33:
Be more permissive in what is accepted as an attribute name; this makes
this module slightly more resiliant in the face of XHTML input, or just
colons in attribute names.
Anthony Baxter [Wed, 5 Dec 2001 05:56:02 +0000 (05:56 +0000)]
backport 1.23:
SF bug #473525 pyclbr broken
As the comments in the module implied, pyclbr was easily confused by
"strange stuff" inside single- (but not triple-) quoted strings. It
isn't anymore. Its behavior remains flaky in the presence of nested
functions and classes, though.
Anthony Baxter [Wed, 5 Dec 2001 05:19:51 +0000 (05:19 +0000)]
backport of 1.21
SF bug [#473864] doctest expects spurios space.
Repair unlikely surprise due to magical softspace attr and the use of
print with a trailing comma in doctest examples.
Anthony Baxter [Wed, 5 Dec 2001 05:10:28 +0000 (05:10 +0000)]
backport of 1.64, 1.65, 1.68:
1.64: Solve SF bug #231249: cgi.py opens too many (temporary) files.
1.65: Fix a denial-of-service attack, SF bug #443120.
1.68: "ib" should be "boundary"; reported by Neal Norwitz.
Anthony Baxter [Wed, 5 Dec 2001 04:39:41 +0000 (04:39 +0000)]
backport 1.18, 1.19, 1.20:
--
Apply two small changes to the Windows code, according to SF bug
#427345. These are supposed to support binary data and avoid
buffering problems on Windows.
--
SF patch #467430.
- replace some log_error() calls with log_message()
- flush self.rfile before forking too (hope this works on Windows)
--
Fix two typos, one noted by Noah Spurrier in SF bug #475166, the
second noted after a second's thought about what the next line should
do. :-(
Anthony Baxter [Wed, 5 Dec 2001 04:34:13 +0000 (04:34 +0000)]
backport of 1.12
check in for patch #430846
use faster code for base64.encodestring (courtesy of Mr. Tim Peters)
and for base64.decodestring (courtesy of Anthony Baxter)
Anthony Baxter [Wed, 21 Nov 2001 06:21:18 +0000 (06:21 +0000)]
backport of jeremy's 2.227:
Fix for SF bug [ #471928 ] global made w/nested list comprehensions
. Initially I was going to just rip out the bits of this that fixed this
bug, but the rest of the code looks (after a fair amount of staring at
it) like it's ok - variable renames, that sort of thing.
flames and "hey, no way!" to me, or to python-dev.
It felt safer to just go with the full patch, rather than butchering
it.
Anthony Baxter [Wed, 21 Nov 2001 05:41:03 +0000 (05:41 +0000)]
backport of tim's 2.66:
. SF bug [#467265] Compile errors on SuSe Linux on IBM/s390.
- errors.c, PyErr_Format: add a va_end() to balance the va_start().
Anthony Baxter [Wed, 21 Nov 2001 05:37:32 +0000 (05:37 +0000)]
backport of 2.8, after checking with MarkH
. Always pass a full path name to LoadLibraryEx(). Fixes some Windows 9x
problems. As discussed on python-dev
Anthony Baxter [Wed, 21 Nov 2001 05:01:44 +0000 (05:01 +0000)]
backport of patches 2.10, 2.11, 2.12, by MvL.
. Patch #455231: Support ELF properly on OpenBSD.
. Patch to bug #472202: Correctly recognize NetBSD before 199712.
. Move dlfcn.h block out of NetBSD block, assuming that NetBSD before
199712 didn't have dlfcn.h, or that it wouldn't conflict with the other
stuff defined.
Anthony Baxter [Wed, 21 Nov 2001 04:58:37 +0000 (04:58 +0000)]
backport of 2.8 by jack:
Patch by Jonathan Wight (slightly reformatted) to forestall loading the
same module twice, which apparently crashes Python. I could not test the
error condition, but in normal life it seems to have no adverse effects.
Also removed an unsued variable, and corrected 2 glaring errors (missing
'case' in front of a label).