]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
23 years agoFix up unescaped tilde; reported by several people.
Fred Drake [Mon, 18 Mar 2002 16:47:35 +0000 (16:47 +0000)] 
Fix up unescaped tilde; reported by several people.

23 years agoRemove extra verb; reported by Detlef Lannert.
Fred Drake [Mon, 18 Mar 2002 16:44:46 +0000 (16:44 +0000)] 
Remove extra verb; reported by Detlef Lannert.

23 years agoBackport of _CFmodule.c 1.11 and _Winmodule 1.8:
Jack Jansen [Mon, 18 Mar 2002 15:54:29 +0000 (15:54 +0000)] 
Backport of _CFmodule.c 1.11 and _Winmodule 1.8:
Lurking bug found by patch for 531291: FSSpecs should be passed to
Py_BuildValue by address, not by value.

23 years agoBackport of _Resmodule.c 1.10 and ressupport.py 1.20:
Jack Jansen [Mon, 18 Mar 2002 15:38:24 +0000 (15:38 +0000)] 
Backport of _Resmodule.c 1.10 and ressupport.py 1.20:
Some of the newer routines return an OSErr, like most toolbox calls,
in stead of depending on ResError(). Second half of fix for #531291.

23 years agoMake StringIO work in non-unicode builds.
Michael W. Hudson [Mon, 18 Mar 2002 13:31:31 +0000 (13:31 +0000)] 
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.

23 years agobackport jackjansen's checkin of
Michael W. Hudson [Mon, 18 Mar 2002 13:10:41 +0000 (13:10 +0000)] 
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.

23 years agobackport jackjansen's checkin of
Michael W. Hudson [Mon, 18 Mar 2002 13:10:13 +0000 (13:10 +0000)] 
backport jackjansen's checkin of
    revision 1.3 of regen

Patch by Michael Pruett: make regen work on Irix 6.0 and 6.5.

23 years agoamk's fix attached to
Michael W. Hudson [Mon, 18 Mar 2002 13:03:40 +0000 (13:03 +0000)] 
amk's fix attached to

[ 516299 ] urlparse can get fragments wrong

23 years agoRemove extraneous #define as per effbot's instructions in:
Michael W. Hudson [Mon, 18 Mar 2002 12:59:38 +0000 (12:59 +0000)] 
Remove extraneous #define as per effbot's instructions in:

[ 530285 ] redefining SRE_CODE in Modules/sre.h

Another one for the trunk, later.

23 years agodoerwalter's failing examples from
Michael W. Hudson [Mon, 18 Mar 2002 12:54:51 +0000 (12:54 +0000)] 
doerwalter's failing examples from

[ 529104 ] broken error handling in unicode-escape

23 years agoMartin's fix for
Michael W. Hudson [Mon, 18 Mar 2002 12:47:52 +0000 (12:47 +0000)] 
Martin's fix for

[ 529104 ] broken error handling in unicode-escape

I presume this will need to be fixed on the trunk, too.

Later.

23 years agoFix
Michael W. Hudson [Mon, 18 Mar 2002 12:43:33 +0000 (12:43 +0000)] 
Fix

[ 531306 ] ucs4 build horked.

Classic C mistake, I think.

Also squashed a couple of warnings in the ucs4 build.

23 years agoFinished 2.2.1 release notes.
Jack Jansen [Mon, 18 Mar 2002 10:44:49 +0000 (10:44 +0000)] 
Finished 2.2.1 release notes.

23 years agoFix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfault
Guido van Rossum [Mon, 18 Mar 2002 03:05:36 +0000 (03:05 +0000)] 
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.

23 years agoA first cut at NEWS for 2.2.1c1.
Michael W. Hudson [Sun, 17 Mar 2002 20:47:11 +0000 (20:47 +0000)] 
A first cut at NEWS for 2.2.1c1.

Please comment!  You can find logs at

http://starship.python.net/crew/mwh/cvslog3.txt

on the assumption that you don't want to fight cvs yourself.

In particular, I need a better explanation of the bugs that have
been fixed in the email package.

23 years agoBackport a checkin of jvr's:
Michael W. Hudson [Sun, 17 Mar 2002 19:47:39 +0000 (19:47 +0000)] 
Backport a checkin of jvr's:

on MacOSX/Darwin, use ranlib when building static libs.

I hope this belongs on the branch...

23 years agoBackport a checkin of lemburg's:
Michael W. Hudson [Sun, 17 Mar 2002 19:42:18 +0000 (19:42 +0000)] 
Backport a checkin of lemburg's:

Remove mentioning of -U option in "python -h" output.

23 years agoAnother Guido backport:
Michael W. Hudson [Sun, 17 Mar 2002 19:39:24 +0000 (19:39 +0000)] 
Another Guido backport:

Quick build: clarify that you have to do "make install" as root; OS
info: add info about Red Hat's python and python2.

23 years agoBackport a checkin of Guido's:
Michael W. Hudson [Sun, 17 Mar 2002 19:36:48 +0000 (19:36 +0000)] 
Backport a checkin of Guido's:

Remove stub for unicode.txt.  Resort README in dictionary order.

23 years agoBackport nnorwitz's checkin of revision 1.119:
Michael W. Hudson [Sun, 17 Mar 2002 19:31:28 +0000 (19:31 +0000)] 
Backport nnorwitz's checkin of revision 1.119:

Fix typo

23 years agoBackport montanero's checkin of revision 1.7:
Michael W. Hudson [Sun, 17 Mar 2002 19:05:18 +0000 (19:05 +0000)] 
Backport montanero's checkin of revision 1.7:

update text to refer to ServerProxy class in preference to Server, which is
only retained for backward compatibility with older versions of the library.

23 years agoBackport my fix from a whiles back:
Michael W. Hudson [Sun, 17 Mar 2002 19:02:10 +0000 (19:02 +0000)] 
Backport my fix from a whiles back:

Fix for

[ #504284 ] Last build problems on AIX

I'm ignoring the suggestion that this should be an autoconf test in the
interests of having a fix today.  Feel free to quibble.

23 years agoBackport a little test from Skip.
Michael W. Hudson [Sun, 17 Mar 2002 18:59:32 +0000 (18:59 +0000)] 
Backport a little test from Skip.

23 years agoSF patch 530070: pydoc regression, from Martin and Guido.
Tim Peters [Sun, 17 Mar 2002 18:57:07 +0000 (18:57 +0000)] 
SF patch 530070: pydoc regression, from Martin and Guido.
Change the way __doc__ is handled, to avoid blowing up on non-string
__doc__ values.

23 years agoBackport Tim's checkin of revision 1.5:
Michael W. Hudson [Sun, 17 Mar 2002 18:05:03 +0000 (18:05 +0000)] 
Backport Tim's checkin of revision 1.5:

This test left a new set of 3 junk files behind each time it was run.

23 years agoStop using not-exposed-in-22x os.O_ constants.
Michael W. Hudson [Sun, 17 Mar 2002 18:02:51 +0000 (18:02 +0000)] 
Stop using not-exposed-in-22x os.O_ constants.

23 years agoSo there is some merit in slogging through ~4800 lines of cvs log.
Michael W. Hudson [Sun, 17 Mar 2002 17:54:32 +0000 (17:54 +0000)] 
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.

23 years agoTake Tim's work on file.truncate out of 2.2.1 again.
Michael W. Hudson [Sun, 17 Mar 2002 15:55:50 +0000 (15:55 +0000)] 
Take Tim's work on file.truncate out of 2.2.1 again.

23 years agoMerge jackjansen's checking of revision 1.5.
Michael W. Hudson [Sat, 16 Mar 2002 18:33:31 +0000 (18:33 +0000)] 
Merge jackjansen's checking of revision 1.5.

23 years agoBackport Tim's work on getting file.truncate working better on Win32.
Michael W. Hudson [Sat, 16 Mar 2002 18:19:33 +0000 (18:19 +0000)] 
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>.

23 years agobackport bwarsaw's checkin of
Michael W. Hudson [Sat, 16 Mar 2002 18:03:42 +0000 (18:03 +0000)] 
backport bwarsaw's checkin of
    revision 4.7 of python-mode.el

(py-honor-comment-indentation, py-compute-indentation): Fix the
implementation to match the documentation for
py-honor-comment-indentation w.r.t. not nil or t value.  In that case
it should still ignore ## for indentation purposes.  Closes SF bug
#523825, w/ patch provided by Christian Stork (mod'd by Barry).

Python 2.2.1 candidate.

23 years agobackport my checkin of
Michael W. Hudson [Sat, 16 Mar 2002 18:02:20 +0000 (18:02 +0000)] 
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.

23 years agoThis checkin backport two checkins by Skip.
Michael W. Hudson [Sat, 16 Mar 2002 18:01:05 +0000 (18:01 +0000)] 
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.

23 years agobackport loewis' checkin of
Michael W. Hudson [Sat, 16 Mar 2002 17:58:21 +0000 (17:58 +0000)] 
backport loewis' checkin of
    revision 2.23 of pypcre.c

Include Python.h first. Fixes #530159.

23 years agobackport gvanrossum's checkin of
Michael W. Hudson [Sat, 16 Mar 2002 17:57:26 +0000 (17:57 +0000)] 
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).

23 years agobackport gvanrossum's checkin of
Michael W. Hudson [Sat, 16 Mar 2002 17:56:51 +0000 (17:56 +0000)] 
backport gvanrossum's checkin of
    revision 2.129 of typeobject.c

"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.

23 years agobackport loewis' checkin of
Michael W. Hudson [Sat, 16 Mar 2002 17:54:20 +0000 (17:54 +0000)] 
backport loewis' checkin of
    revision 2.26 of _localemodule.c

Verify arguments for nl_langinfo. Fixes #528879.

23 years agoNaughty Fred forgot to mark this as a bugfix candidate.
Michael W. Hudson [Sat, 16 Mar 2002 17:53:51 +0000 (17:53 +0000)] 
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.

23 years agoFix stupid typo in example.
Fred Drake [Sat, 16 Mar 2002 13:53:23 +0000 (13:53 +0000)] 
Fix stupid typo in example.

23 years agoMarkup error: braces not properly marked in dictionary display
Fred Drake [Sat, 16 Mar 2002 06:35:01 +0000 (06:35 +0000)] 
Markup error: braces not properly marked in dictionary display
grammer productions.
Fixes SF bug #520959.

23 years agoClarify the descriptions of the positive and negative lookbehind assertions.
Fred Drake [Sat, 16 Mar 2002 05:10:22 +0000 (05:10 +0000)] 
Clarify the descriptions of the positive and negative lookbehind assertions.
Added examples of positive lookbehind assertions.
This closes SF bug #529708.

23 years agopdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake [Sat, 16 Mar 2002 04:52:55 +0000 (04:52 +0000)] 
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
change the installed version on either of the machines I use to format the
docs.  Instead, use a compatibility hack to support both versions.  This is
also better for external users of the Python styles.

23 years agoRevise the markup related to the grammar productions to increase the
Fred Drake [Fri, 15 Mar 2002 23:18:05 +0000 (23:18 +0000)] 
Revise the markup related to the grammar productions to increase the
level of predictability.  This is not really "good" markup, but is arguably
better than we had before.
This closes SF bug #523117.

23 years agoMake the release status obvious in the title area.
Fred Drake [Fri, 15 Mar 2002 22:36:55 +0000 (22:36 +0000)] 
Make the release status obvious in the title area.

23 years agoUpdate to reflect changes in the extending & embedding doc.
Fred Drake [Fri, 15 Mar 2002 22:36:01 +0000 (22:36 +0000)] 
Update to reflect changes in the extending & embedding doc.

23 years agoWrap a couple of long lines.
Fred Drake [Fri, 15 Mar 2002 14:37:44 +0000 (14:37 +0000)] 
Wrap a couple of long lines.

23 years agoPatch #527427: minidom fails to use NodeList sometimes.
Martin v. Löwis [Fri, 15 Mar 2002 13:53:20 +0000 (13:53 +0000)] 
Patch #527427: minidom fails to use NodeList sometimes.

23 years agobackport gvanrossum's checkin of
Michael W. Hudson [Fri, 15 Mar 2002 10:35:55 +0000 (10:35 +0000)] 
backport gvanrossum's checkin of
    revision 1.120 of test_descr.py

Test for the fix I just checked in to moduleobject.c.

Bugfix candidate.

23 years agobackport gvanrossum's checkin of
Michael W. Hudson [Fri, 15 Mar 2002 10:35:36 +0000 (10:35 +0000)] 
backport gvanrossum's checkin of
    revision 2.41 of moduleobject.c

Fix for SF bug #529050 - ModuleType.__new__ crash.

There were several places that assumed the md_dict field was always
set, but it needn't be.  Fixed these to be more careful.

I changed PyModule_GetDict() to initialize md_dict to a new dictionary
if it's NULL.

Bugfix candidate.

23 years agobackport akuchling's checkin of
Michael W. Hudson [Fri, 15 Mar 2002 10:32:07 +0000 (10:32 +0000)] 
backport akuchling's checkin of
    revision 1.29 of asyncore.py

[Bug #517554] When a signal happens during the select call in
asyncore.poll, the select fails with EINTR, which the
code catches. However, the code fails to clear the
r/w/e arrays (like poll3 does), which means it acts as
if every descriptor had received all possible events.

Bug report and patch by Cesar Eduardo Barros

23 years agoBackport loewis' checkin of
Michael W. Hudson [Fri, 15 Mar 2002 10:29:08 +0000 (10:29 +0000)] 
Backport loewis' checkin of
    revision 1.104 of ext.tex
    revision 1.4 of windows.tex
    revision 1.1 of building.tex
    removal of unix.tex

Patch #500136: Update Update ext build documentation. 2.2.1 candidate.

23 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Fri, 15 Mar 2002 10:29:08 +0000 (10:29 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release22-maint'.

23 years agobackport akuchling's checkin of
Michael W. Hudson [Fri, 15 Mar 2002 10:25:12 +0000 (10:25 +0000)] 
backport akuchling's checkin of
    revision 1.10 of test_cfgparser.py

As part of fixing bug #523301, add a simple test of ConfigParser.write()

23 years agobackport akuchling's checkin of
Michael W. Hudson [Fri, 15 Mar 2002 10:24:42 +0000 (10:24 +0000)] 
backport akuchling's checkin of
    revision 1.6 of test_cfgparser

As part of fixing bug #523301, add a simple test of ConfigParser.write()

23 years agoI presume this should go here.
Michael W. Hudson [Fri, 15 Mar 2002 10:24:14 +0000 (10:24 +0000)] 
I presume this should go here.

backport akuchling's checkin of
    revision 1.39 of ConfigParser.py

[Bug #523301] ConfigParser.write() produces broken output for values that
   were originally rfc822-like line continuations.
   Modified version of a patch from Matthias Ralfs.

23 years agobackport jhylton's checkin of
Michael W. Hudson [Fri, 15 Mar 2002 10:23:11 +0000 (10:23 +0000)] 
backport jhylton's checkin of
    revision 2.2 of cellobject.h

Cells are not VAR objects.

Noted by Jason Orendorff, SF #520768.

Bug fix candidate for 2.1 & 2.2.

23 years agoRemove duplicate "import os"
Neal Norwitz [Fri, 15 Mar 2002 01:35:19 +0000 (01:35 +0000)] 
Remove duplicate "import os"

23 years agoUpdate version number prior to release candidate.
Fred Drake [Thu, 14 Mar 2002 22:56:04 +0000 (22:56 +0000)] 
Update version number prior to release candidate.

23 years agoFiddle Windows installer to call this "2.2.1 release candidate 1".
Tim Peters [Thu, 14 Mar 2002 22:46:55 +0000 (22:46 +0000)] 
Fiddle Windows installer to call this "2.2.1 release candidate 1".

23 years agoRename this build 2.2.1c1.
Tim Peters [Thu, 14 Mar 2002 22:43:45 +0000 (22:43 +0000)] 
Rename this build 2.2.1c1.

23 years agoFiddle Windows build number description.
Tim Peters [Thu, 14 Mar 2002 21:11:51 +0000 (21:11 +0000)] 
Fiddle Windows build number description.

23 years agozlib-1.1.4 news.
Tim Peters [Thu, 14 Mar 2002 19:07:20 +0000 (19:07 +0000)] 
zlib-1.1.4 news.

23 years agobackport gvanrossum's checkin of
Michael W. Hudson [Thu, 14 Mar 2002 17:16:27 +0000 (17:16 +0000)] 
backport gvanrossum's checkin of
    revision 1.118 of test_descr.py

Add a check that SF bug 516727 is really fixed.

23 years agoI don't understand it either...
Michael W. Hudson [Thu, 14 Mar 2002 17:06:55 +0000 (17:06 +0000)] 
I don't understand it either...

backport jhylton's checkin of
    revision 1.7 of test_pyclbr.py

Fix pyclbr test of httplib without really understanding pyclbr.

It seems that the new class HTTP11 in httplib.test() isn't
discoverable by pyclbr, which causes this test to fail.

23 years agoMove to zlib 1.1.4 on Windows (the new version that squashes the "double
Tim Peters [Wed, 13 Mar 2002 23:56:48 +0000 (23:56 +0000)] 
Move to zlib 1.1.4 on Windows (the new version that squashes the "double
free" glitch).

unicodeobject.c:  squash compiler warnings.

Noting that test_pyclbr currently fails in 2.2.1:

    test_others (__main__.PyclbrTest) ... ??? HTTP11
    FAIL

23 years agoDescribe how to support the iterator protocol in extension types.
Fred Drake [Wed, 13 Mar 2002 03:56:54 +0000 (03:56 +0000)] 
Describe how to support the iterator protocol in extension types.
This closes SF bug #420851.

23 years agoSF #515015, raise exception if code not found in findsource()
Neal Norwitz [Wed, 13 Mar 2002 03:19:18 +0000 (03:19 +0000)] 
SF #515015, raise exception if code not found in findsource()

23 years agoChange the way \textasciitilde is implemented so it works more consistently
Fred Drake [Wed, 13 Mar 2002 02:45:58 +0000 (02:45 +0000)] 
Change the way \textasciitilde is implemented so it works more consistently
(dropping tildes into data that still goes through LaTeX-like processing is
a bad idea).

23 years agoUpdate docstrings to use te attribute names of the new structures returned
Fred Drake [Tue, 12 Mar 2002 21:38:31 +0000 (21:38 +0000)] 
Update docstrings to use te attribute names of the new structures returned
by stat and time functions.
This closes SF patch #523271.

23 years agoAdd a note that Py_None needs the same reference count treatment as any
Fred Drake [Tue, 12 Mar 2002 20:18:01 +0000 (20:18 +0000)] 
Add a note that Py_None needs the same reference count treatment as any
other PyObject *.
This closes SF bug #494007.

23 years ago"level" keyword argument in example should be "stacklevel".
Fred Drake [Tue, 12 Mar 2002 19:51:16 +0000 (19:51 +0000)] 
"level" keyword argument in example should be "stacklevel".
This closes SF bug #517684.

23 years agoBackport of 1.14:
Jack Jansen [Tue, 12 Mar 2002 15:05:11 +0000 (15:05 +0000)] 
Backport of 1.14:
mkalias() now also works for folders. Fixes bug #515830.

23 years agoDocumentation for PyObject_GetIter(), contributed by Greg Chapman
Fred Drake [Mon, 11 Mar 2002 19:01:58 +0000 (19:01 +0000)] 
Documentation for PyObject_GetIter(), contributed by Greg Chapman
(with only minor changes by Fred).
This closes SF bug #498607.

23 years agobackport loewis' checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:20:36 +0000 (10:20 +0000)] 
backport loewis' checkin of
    revision 1.66 of ftplib.py

Access the exception argument to see whether it starts with '500'.
Fixes #527855.

23 years agobackport gvanrossum's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:20:04 +0000 (10:20 +0000)] 
backport gvanrossum's checkin of
    revision 1.117 of test_descr.py

Bugfix candidate.
Adapter from SF patch 528038; fixes SF bug 527816.

The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.

23 years agobackport gvanrossum's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:19:48 +0000 (10:19 +0000)] 
backport gvanrossum's checkin of
    revision 2.128 of typeobject.c

Bugfix candidate.
Adapter from SF patch 528038; fixes SF bug 527816.

The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.

23 years agoI *think* this should go in. May be wrong -- please howl in protest
Michael W. Hudson [Mon, 11 Mar 2002 10:19:16 +0000 (10:19 +0000)] 
I *think* this should go in.  May be wrong -- please howl in protest
if so.

backport jhylton's checkin of
    revision 1.46 of httplib.py

Fix SF bug 525520.

Don't automatically add a Host: header if the headers passed to
request() already has a Host key.

23 years agobackport tim_one's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:17:17 +0000 (10:17 +0000)] 
backport tim_one's checkin of
    revision 2.111 of floatobject.c

SF bug 525705:  [2.2] underflow raise OverflowException.
Another year in the quest to out-guess random C behavior.

Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y).  The latter
is useful for functions with complex results.  Two corrections to errno-
after-libm-call are attempted:

1. If the platform set errno to ERANGE due to underflow, clear errno.
   Some unknown subset of libm versions and link options do this.  It's
   allowed by C89, but I never figured anyone would do it.

2. If the platform did not set errno but overflow occurred, force
   errno to ERANGE.  C89 required setting errno to ERANGE, but C99
   doesn't.  Some unknown subset of libm versions and link options do
   it the C99 way now.

Bugfix candidate, but hold off until some Linux people actually try it,
with and without -lieee.  I'll send a help plea to Python-Dev.

23 years agobackport tim_one's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:16:47 +0000 (10:16 +0000)] 
backport tim_one's checkin of
    revision 2.28 of cmathmodule.c

SF bug 525705:  [2.2] underflow raise OverflowException.
Another year in the quest to out-guess random C behavior.

Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y).  The latter
is useful for functions with complex results.  Two corrections to errno-
after-libm-call are attempted:

1. If the platform set errno to ERANGE due to underflow, clear errno.
   Some unknown subset of libm versions and link options do this.  It's
   allowed by C89, but I never figured anyone would do it.

2. If the platform did not set errno but overflow occurred, force
   errno to ERANGE.  C89 required setting errno to ERANGE, but C99
   doesn't.  Some unknown subset of libm versions and link options do
   it the C99 way now.

Bugfix candidate, but hold off until some Linux people actually try it,
with and without -lieee.  I'll send a help plea to Python-Dev.

23 years agoThis has been declared to work.
Michael W. Hudson [Mon, 11 Mar 2002 10:16:23 +0000 (10:16 +0000)] 
This has been declared to work.

backport tim_one's checkin of
    revision 2.45 of pyport.h

SF bug 525705:  [2.2] underflow raise OverflowException.
Another year in the quest to out-guess random C behavior.

Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y).  The latter
is useful for functions with complex results.  Two corrections to errno-
after-libm-call are attempted:

1. If the platform set errno to ERANGE due to underflow, clear errno.
   Some unknown subset of libm versions and link options do this.  It's
   allowed by C89, but I never figured anyone would do it.

2. If the platform did not set errno but overflow occurred, force
   errno to ERANGE.  C89 required setting errno to ERANGE, but C99
   doesn't.  Some unknown subset of libm versions and link options do
   it the C99 way now.

Bugfix candidate, but hold off until some Linux people actually try it,
with and without -lieee.  I'll send a help plea to Python-Dev.

23 years agobackport tim_one's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:15:00 +0000 (10:15 +0000)] 
backport tim_one's checkin of
    revision 2.248 of bltinmodule.c

Docstring for filter():  Someone on the Tutor list reasonably complained
that it didn't tell enough of the truth.
Bugfix candidate (I guess -- it helps and it's harmless).

23 years agobackport jhylton's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:14:23 +0000 (10:14 +0000)] 
backport jhylton's checkin of
    revision 1.295 of configure.in

Add fix for AIX as reported by srubben in SF bug #477487.

Untested, of course.

23 years agoProbably should have merged the two checkins to this file (oh well).
Michael W. Hudson [Mon, 11 Mar 2002 10:12:58 +0000 (10:12 +0000)] 
Probably should have merged the two checkins to this file (oh well).

backport jhylton's checkin of
    revision 2.98 of abstract.c

Fix leak of NotImplemented in previous checkin to PyNumber_Add().

If result == Py_NotImplemented, always DECREF it before assigning a
new value to result.

23 years agobackport jhylton's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:11:46 +0000 (10:11 +0000)] 
backport jhylton's checkin of
    revision 2.97 of abstract.c

Fix for SF bug 516727: MyInt(2) + "3" -> NotImplemented

PyNumber_Add() tries the nb_add slot first, then falls back to
sq_concat.  However, it didn't check the return value of sq_concat.
If sq_concat returns NotImplemented, raise the standard TypeError.

23 years agobackport jhylton's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:06:36 +0000 (10:06 +0000)] 
backport jhylton's checkin of
    revision 1.45 of httplib.py

SF bug report #405939: wrong Host header with proxy

In August, Greg said this looked good, so I'm going ahead with it.

The fix is different from the one in the bug report.  Instead of using
a regular expression to extract the host from the url, I use
urlparse.urlsplit.

Martin commented that the patch doesn't address URLs that have basic
authentication username and password in the header.  I don't see any
code anywhere in httplib that supports this feature, so I'm not going
to address it for this fix.

Bug fix candidate.

23 years agobackport akuchling's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:05:07 +0000 (10:05 +0000)] 
backport akuchling's checkin of
    revision 1.6 of libxmlrpclib.tex

[Bug #486527] Note that the caller has to ensure there are no control
    characters in strings being passed via XML-RPC.
Fix some typos.

2.2.1 bugfix candidate.

23 years agoI presume most of the fixes currently hitting the tree should go into
Michael W. Hudson [Mon, 11 Mar 2002 10:04:07 +0000 (10:04 +0000)] 
I presume most of the fixes currently hitting the tree should go into
2.2.1, but it would be nice if people remembered to comment on their
fixes' applicability!

backport akuchling's checkin of
    revision 1.26 of webchecker.py

[Bug #512799] urllib.splittype() returns a 2-tuple.  (Reported by seb bacon)

23 years agobackport jhylton's checkin of
Michael W. Hudson [Mon, 11 Mar 2002 10:02:18 +0000 (10:02 +0000)] 
backport jhylton's checkin of
    revision 2.33 of cStringIO.c

Fix SF bug #526518

The doc string for cStringIO suggested that str() of a StringIO object
was equivalent to getvalue().  This was never true, so repair the doc
string.  (doctest would have helped here.)

Bug fix candidate for any past versions.

23 years agoBackport of 1.22:
Jack Jansen [Sun, 10 Mar 2002 21:33:19 +0000 (21:33 +0000)] 
Backport of 1.22:
Use waste included with CW in stead of separate package.

(But a truer log message would have been "updated to current version of waste",
as in MachoPython we use a normal standalone separate Waste distribution).

23 years agoBackport of 1.9 (missed last time around):
Jack Jansen [Sun, 10 Mar 2002 21:29:55 +0000 (21:29 +0000)] 
Backport of 1.9 (missed last time around):

Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.

23 years agoAdd more explanation of how data_files is used (esp. where the files end up
Fred Drake [Fri, 8 Mar 2002 22:02:17 +0000 (22:02 +0000)] 
Add more explanation of how data_files is used (esp. where the files end up
in the installation and how that location is determined).

23 years agobackport jackjansen's checkin of
Michael W. Hudson [Fri, 8 Mar 2002 14:11:35 +0000 (14:11 +0000)] 
backport jackjansen's checkin of
    revision 1.294 of configure.in
    revision 1.285 of configure

When testing for availability of pthreads without special compiler options
or libraries also look for thread_detach. SGI has thread_create in libc
but complete pthread support only in -lpthread. Fixes #522393.

2.2.1 candidate.Killed by signal 2.

23 years agobackport montanaro's checkin of
Michael W. Hudson [Fri, 8 Mar 2002 13:41:09 +0000 (13:41 +0000)] 
backport montanaro's checkin of
    revision 1.18 of BaseHTTPServer.py

add Content-Type header to error responses
this closes patch 502080

23 years agobackport montanaro's checkin of
Michael W. Hudson [Fri, 8 Mar 2002 13:40:46 +0000 (13:40 +0000)] 
backport montanaro's checkin of
    revision 1.58 of pydoc.py

add repr_str as alias for repr_string in both HTMLRepr and TextRepr classes
- reflects the change in type("").__name__ between 2.1 and 2.2.  The
__name__ field is used to find a method to call for particular types.

23 years agobackport tim_one's checkin of
Michael W. Hudson [Fri, 8 Mar 2002 13:40:07 +0000 (13:40 +0000)] 
backport tim_one's checkin of
    revision 2.38 of mmapmodule.c

SF bug 515943:  searching for data with \0 in mmap.
mmap_find_method():  this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.

Someone please run on Linux too (the extended test_mmap works on Windows).

Bugfix candidate.

23 years agobackport tim_one's checkin of
Michael W. Hudson [Fri, 8 Mar 2002 13:39:25 +0000 (13:39 +0000)] 
backport tim_one's checkin of
    revision 1.20 of test_mmap.py

SF bug 515943:  searching for data with \0 in mmap.
mmap_find_method():  this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.

Someone please run on Linux too (the extended test_mmap works on Windows).

Bugfix candidate.

23 years ago"Shortcut" should be "short-circuit".
Fred Drake [Fri, 8 Mar 2002 01:01:23 +0000 (01:01 +0000)] 
"Shortcut" should be "short-circuit".
This closes SF bug #526277.

23 years agobackport my checkin of
Michael W. Hudson [Thu, 7 Mar 2002 15:16:07 +0000 (15:16 +0000)] 
backport my checkin of
    revision 1.6 of structseq.c

Guido pointed out that I was missing a couple decrefs.

23 years agoAfter some thinking, I decided to move all of this across onto
Michael W. Hudson [Thu, 7 Mar 2002 10:16:43 +0000 (10:16 +0000)] 
After some thinking, I decided to move all of this across onto
the branch.  I don't think it can break code, so the only risk
is introducing new bugs.  In that vein, can I ask -checkins readers
who have time to carefully look this over, check my refcounts &c?
TIA.

backport my checkin of
    revision 1.5 of structseq.c

Apply (my) patch:

[ 526072 ] pickling os.stat results round II

structseq's constructors can now take "invisible" fields in a dict.
Gave the constructors better error messages.
their __reduce__ method puts these fields in a dict.

(this is all in aid of getting os.stat_result's to pickle portably)

Also fixes

[ 526039 ] devious code can crash structseqs

Thought needed about how much of this counts as a bugfix.  Certainly
#526039 needs to be fixed.

23 years agobackport my checkin of
Michael W. Hudson [Thu, 7 Mar 2002 10:12:38 +0000 (10:12 +0000)] 
backport my checkin of
    revision 1.14 of pickletester.py

Special support for pickling os.stat and os.stat_vfs results portably
(the types come from different modules on different platforms).

Added tests for pickling these types.

May be a bugfix candidate.