Georg Brandl [Sat, 31 Mar 2007 18:56:11 +0000 (18:56 +0000)]
Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.
Georg Brandl [Thu, 29 Mar 2007 12:42:07 +0000 (12:42 +0000)]
In Windows' time.clock(), when QueryPerformanceFrequency() fails,
the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC
as for the POSIX implementation (thanks to #pypy).
Collin Winter [Wed, 28 Mar 2007 23:34:06 +0000 (23:34 +0000)]
Consolidate patches #1690164, 1683397, and 1690169, all of which refactor XML-related test suites. The patches are applied together because they use a common output/xmltests file.
Thanks to Jerry Seutter for all three patches.
Facundo Batista [Mon, 26 Mar 2007 20:18:31 +0000 (20:18 +0000)]
Added an optional timeout to FTP class. Also I started a test_ftplib.py
file to test the ftp lib (right now I included a basic test, the timeout
one, and nothing else).
Žiga Seilnacht [Sat, 24 Mar 2007 14:24:26 +0000 (14:24 +0000)]
Patch #1489771: update syntax rules in Python Reference Manual.
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output. Will backport.
Facundo Batista [Fri, 23 Mar 2007 20:23:08 +0000 (20:23 +0000)]
Surrounded with try/finally to socket's default timeout setting
changes in the tests, so failing one test won't produce strange
results in others. Also relaxed the timeout settings in the test
(where actually the value didn't mean anything).
Facundo Batista [Fri, 23 Mar 2007 18:54:07 +0000 (18:54 +0000)]
Added a 'create_connect()' function to socket.py, which creates a
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.
Guido van Rossum [Fri, 23 Mar 2007 18:53:03 +0000 (18:53 +0000)]
Add a type.__init__() method that enforces the same signature as
type.__new__(), and then calls object.__init__(cls), just to be anal.
This allows us to restore the code in string.py's _TemplateMetaclass
that called super(...).__init__(name, bases, dct), which I commented
out yesterday since it broke due to the stricter argument checking
added to object.__init__().
Guido van Rossum [Fri, 23 Mar 2007 04:58:42 +0000 (04:58 +0000)]
- Bug #1683368: The object.__init__() and object.__new__() methods are
now stricter in rejecting excess arguments. The only time when
either allows excess arguments is when it is not overridden and the
other one is. For backwards compatibility, when both are
overridden, it is a deprecation warning (for now; maybe a Py3k
warning later).
When merging this into 3.0, the warnings should become errors.
Note: without the change to string.py, lots of spurious warnings happen.
What's going on there?
Neal Norwitz [Tue, 20 Mar 2007 08:14:57 +0000 (08:14 +0000)]
Try to get test_urllib to pass on Windows by closing the file.
I'm guessing that's the problem. h.getfile() must be called *after*
h.getreply() and the fp can be None.
I'm not entirely convinced this is the best fix (or even correct).
The buildbots will tell us if things improve or not. I don't
know if this needs to be backported (assuming it actually works).
Neal Norwitz [Tue, 20 Mar 2007 06:53:17 +0000 (06:53 +0000)]
Try to be a little more resilient to errors. This might help the test
pass, but my guess is that it won't. I'm guessing that some other
test is leaving this file open which means it can't be removed
under Windows AFAIK.
Neal Norwitz [Tue, 20 Mar 2007 06:16:26 +0000 (06:16 +0000)]
Try to make this test more resistant to dropping from previous runs (ie, files that may exist but cause the test to fail). Should be backported (assuming it works :-)
Neal Norwitz [Tue, 20 Mar 2007 06:13:25 +0000 (06:13 +0000)]
Try to make this test more resistant to dropping from previous runs (ie, files that may exist but cause the test to fail). Should be backported (assuming it works :-)
Neal Norwitz [Tue, 20 Mar 2007 05:23:09 +0000 (05:23 +0000)]
Try backing out 54407 to see if it corrects the problems on the Windows
buildbots. This rev was backported, so we will need to keep both branches
in sync, pending the outcome of the test after this checkin.
Georg Brandl [Sat, 17 Mar 2007 16:08:45 +0000 (16:08 +0000)]
Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
to complex using its __complex__() method before falling back to the
__float__() method. Therefore, the functions in the cmath module now
can operate on objects that define a __complex__() method.
(backport)
Jeremy Hylton [Fri, 16 Mar 2007 15:59:47 +0000 (15:59 +0000)]
Clean up formatting of this file.
The file should now follow PEP 7, except that it uses 4 space indents
(in the style of Py3k). This particular code would be really hard to
read with the regular tab idents.
Other changes:
- reflow long lines
- change multi-line conditionals to have test at end of line
Žiga Seilnacht [Fri, 16 Mar 2007 11:59:38 +0000 (11:59 +0000)]
Patch #1623563: allow __class__ assignment for classes with __slots__.
The old and the new class are still required to have the same slot
names, but the order in which they are specified is not relevant.
Georg Brandl [Fri, 16 Mar 2007 07:55:09 +0000 (07:55 +0000)]
Bug #1681228: the webbrowser module now correctly uses the default
GNOME or KDE browser, depending on whether there is a session of one
of those present. Also, it tries the Windows default browser before
trying Mozilla variants.
(backport)
Žiga Seilnacht [Thu, 15 Mar 2007 11:44:55 +0000 (11:44 +0000)]
Patch #1462488: prevent a segfault in object_reduce_ex() by splitting
the implementation for __reduce__ and __reduce_ex__ into two separate
functions. Fixes bug #931877. Will backport.
Žiga Seilnacht [Wed, 14 Mar 2007 12:24:09 +0000 (12:24 +0000)]
Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
name. Remove a reference leak that happened if the name could not be
converted to string. Will backport.
Georg Brandl [Wed, 14 Mar 2007 08:27:52 +0000 (08:27 +0000)]
Bug #767111: fix long-standing bug in urllib which caused an
AttributeError instead of an IOError when the server's response didn't
contain a valid HTTP status line.
Gregory P. Smith [Wed, 14 Mar 2007 07:19:50 +0000 (07:19 +0000)]
Its time to stop listing (Unix, Windows) when we really mean "everything but Mac OS 9"
now that nobody is likely to use Python on Mac OS 9 and most of the (Mac) platform
items are all OS X special API specific since OS X is unixy enough for these modules
to be available out of the box.