Commit Graph

5652 Commits

Author SHA1 Message Date
Barry Warsaw
5516c7b319 _handle_multipart(): Fixes for SF bug #531966. Specifically two
situations are handled now: a multipart/* containing no payload
(i.e. never set), and a multipart/* containing a scalar payload
(i.e. Message.add_payload() having been called exactly once, not
passing in a sequence object).

_make_boundary(): Fixed bogus cut-n-paste error (self as first arg).

I will merge these changes into the standalone email package and
Python 2.3 separately.
2002-03-22 16:21:56 +00:00
Barry Warsaw
25cf603523 test_no_parts_in_a_multipart(): A test for the layout of a
multipart/mixed message with no attachments.

test_one_part_in_a_multipart(): A test for the layout of a
multipart/mixed message with a single attachment.

test_seq_parts_in_a_multipart(): A test for the layout of a
multipart/mixed message with a single attachment that happens to be a
sequence of length one.

These tests ensure no regressions on the fix for SF bug #531966.

I will merge these into the standalone email package and Python 2.3
trunk separately.
2002-03-22 16:19:30 +00:00
Andrew M. Kuchling
84b5f1ab80 To make 'urllib.py -t' run again, change FTP URL to a file that actually
exists.
2002-03-18 22:19:24 +00:00
Michael W. Hudson
d11f1fac66 Make StringIO work in non-unicode builds.
Lots of tests fail in non-unicode builds, but I think most of these are
"bugs" in the tests.  I hope so, anyway.
2002-03-18 13:31:31 +00:00
Michael W. Hudson
fca4ed6a09 backport jackjansen's checkin of
revision 1.2 of ERRNO.py
    revision 1.2 of FILE.py
    revision 1.2 of IN.py

Regenerated for Irix 6.5.
2002-03-18 13:10:41 +00:00
Michael W. Hudson
c981082410 backport jackjansen's checkin of
revision 1.3 of regen

Patch by Michael Pruett: make regen work on Irix 6.0 and 6.5.
2002-03-18 13:10:13 +00:00
Michael W. Hudson
1c136f35dd amk's fix attached to
[ 516299 ] urlparse can get fragments wrong
2002-03-18 13:03:40 +00:00
Michael W. Hudson
724374d162 doerwalter's failing examples from
[ 529104 ] broken error handling in unicode-escape
2002-03-18 12:54:51 +00:00
Guido van Rossum
09f2187704 Fix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfault
The proper fix is not quite what was submitted; it's really better to
take the class of the object passed rather than calling PyMethod_New
with NULL pointer args, because that can then cause other core dumps
later.

I also added a testcase for the fix to classmethods() in test_descr.py.

I'll apply this to 2.3 too.
2002-03-18 03:05:36 +00:00
Michael W. Hudson
18f69f8e27 Backport a checkin of jvr's:
on MacOSX/Darwin, use ranlib when building static libs.

I hope this belongs on the branch...
2002-03-17 19:47:39 +00:00
Michael W. Hudson
2b92139064 Backport nnorwitz's checkin of revision 1.119:
Fix typo
2002-03-17 19:31:28 +00:00
Michael W. Hudson
3c9dbe200c Backport a little test from Skip. 2002-03-17 18:59:32 +00:00
Tim Peters
4d761f2443 SF patch 530070: pydoc regression, from Martin and Guido.
Change the way __doc__ is handled, to avoid blowing up on non-string
__doc__ values.
2002-03-17 18:57:07 +00:00
Michael W. Hudson
bf69e0c3ab Backport Tim's checkin of revision 1.5:
This test left a new set of 3 junk files behind each time it was run.
2002-03-17 18:05:03 +00:00
Michael W. Hudson
2de0ec6c1e Stop using not-exposed-in-22x os.O_ constants. 2002-03-17 18:02:51 +00:00
Michael W. Hudson
3ffb948c18 So there is some merit in slogging through ~4800 lines of cvs log.
Bring tempfile.py up to date from the trunk.  There have been three
checkins (all by Tim):

SF bug #509805 tempfile.gettempdir not threadsafe
This is an ancient race when multiple threads call gettempdir() (or
anything relying on it) for the first time.

Fixed x-platform via the Big Hammer of rearranging the code to serialize
the first calls.  Subsequent calls are as fast as before.

Note that the Python test suite can't provoke this bug:  it requires
setting up multiple threads making the very first calls into tempfile,
but the test suite uses tempfile several times before getting to
test_threadedtempfile.

Bugfix candidate.

[and]

New TemporaryFile implementation for Windows:  this doesn't need a
TemproraryFileWrapper wrapper anymore, and should be immune from the
problem that a temp file inherited by a spawned process caused an
attempt to close the temp file in the spawning process to blow
up (the unlink in TemporaryFileWrapper.close() blew up with a
"Permission denied" error because, despite that the temp file got
closed in the spawning process, the spawned process still had it open
by virtue of C-level file descriptor inheritance).  In context,
that bug took days to figure out <wink/sigh>.

[and]

Thanks to Detlef Lannert for pointing out a typo in the code that
uses _DummyMutex on platforms without threads.

The first and third of these are pretty clearly bugfixes; I think the
second is too.
2002-03-17 17:54:32 +00:00
Michael W. Hudson
98305a0d34 Take Tim's work on file.truncate out of 2.2.1 again. 2002-03-17 15:55:50 +00:00
Michael W. Hudson
eae11ba4d2 Merge jackjansen's checking of revision 1.5. 2002-03-16 18:33:31 +00:00
Michael W. Hudson
fe69139f7e Backport Tim's work on getting file.truncate working better on Win32.
"cvs diff | patch" managed to stick the NEWS item in the 2.2 final
section!  I wonder which silly man wrote patch <wink>.
2002-03-16 18:19:33 +00:00
Michael W. Hudson
09a5bd8c48 backport my checkin of
revision 1.54 of os.py

Fix

[ 530236 ] os.py assumes existence of statvfs_resul

This was pretty dense of me.  Sorry.

2.2.1 candidate.
2002-03-16 18:02:20 +00:00
Michael W. Hudson
2e6cc334aa This checkin backport two checkins by Skip.
backport montanaro's checkin of
    revision 1.24 of calendar.py

make _localized_name instances work more like the tuples they replaced.  In
particular, negative indexes work and they are limited by the actual length
of the names they represent (weekday and month names).  This closes bug
#503202.

[and then]

Corrected _localized_name.__getitem__ based on code in patch 503202 (which I
thought was just a bug report, so didn't notice - doh!).  This handles
slicing, which v 1.23 didn't.
2002-03-16 18:01:05 +00:00
Michael W. Hudson
bf05f2aaa6 backport gvanrossum's checkin of
revision 1.121 of test_descr.py

"Fix" for SF bug #520644: __slots__ are not pickled.

As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.

Bugfix candidate (also the checkin to typeobject.c, of course).
2002-03-16 17:57:26 +00:00
Michael W. Hudson
7de1f39c53 Naughty Fred forgot to mark this as a bugfix candidate.
backport fdrake's checkin of
    revision 1.5 of log.py

Set/update self.cwd properly.
2002-03-16 17:53:51 +00:00
Fred Drake
93cd54005f Wrap a couple of long lines. 2002-03-15 14:37:44 +00:00
Martin v. Löwis
9afa5738cc Patch #527427: minidom fails to use NodeList sometimes. 2002-03-15 13:53:20 +00:00