Raymond Hettinger
3b63556d4a
Beef-up tests for dict literals
2007-12-19 00:21:06 +00:00
Raymond Hettinger
85dfcf3530
Users demand iterable input for named tuples. The author capitulates.
2007-12-18 23:51:15 +00:00
Christian Heimes
0a8143f646
Applied patch #1635 : Float patch for inf and nan on Windows (and other platforms).
...
The patch unifies float("inf") and repr(float("inf")) on all platforms.
2007-12-18 23:22:54 +00:00
Raymond Hettinger
88880b2dd6
Add more namedtuple() test cases. Neaten the code and comments.
2007-12-18 00:13:45 +00:00
Christian Heimes
17b52afda6
Fixed #1624 : Remove output comparison for test_pep277
...
I had to modify Brett's patch slightly.
2007-12-15 05:38:35 +00:00
Raymond Hettinger
42da874cdd
Cleaner method naming convention
2007-12-14 02:49:47 +00:00
Christian Heimes
90e10e79ea
Fixed bug #1620 : New @spam.getter property syntax modifies the property in place.
...
I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property().
2007-12-14 02:35:23 +00:00
Alexandre Vassalotti
2f9ca29d10
Fix issue #1313119 : urlparse "caches" parses regardless of encoding
2007-12-13 17:58:23 +00:00
Raymond Hettinger
adf9ffdfbe
Fix bug 1604. deque.__init__() did not clear existing contents like list.__init__. Not a backport candidate.
2007-12-13 00:08:37 +00:00
Christian Heimes
f15c66e143
The new float repr causes too much trouble and pain. I'm disabling the feature until we have sorted out the issues on all machines. 64bit machines seem to have issues and Guido has reported even worse.
...
Guido: It's pretty bad actually -- repr(1e5) comes out as '1.0'... Ditto for
repr(1eN) for most N... Both in 2.6 and in 3.0...
2007-12-11 00:54:34 +00:00
Christian Heimes
284d927625
Backport of r59456:59458 from py3k to trunk
...
Issue #1580 : New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'.
Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files.
2007-12-10 22:28:56 +00:00
Georg Brandl
e6daafb449
Add DocXMLRPCServer test from GHOP task #136 , written by Jeff Wheeler.
2007-12-09 22:39:12 +00:00
Skip Montanaro
546624609e
correct email address
2007-12-08 15:26:16 +00:00
Armin Rigo
66d41b2fae
This is probably what was meant here.
2007-12-07 19:19:55 +00:00
Georg Brandl
5d1b4d44aa
Increase unit test coverage of SimpleXMLRPCServer.
...
Written for GHOP by Turkay Eren.
2007-12-07 09:07:10 +00:00
Raymond Hettinger
4e2f714031
Fix Issue 1045.
...
Factor-out common calling code by simplifying the length_hint API.
Speed-up the function by caching the PyObject_String for the attribute lookup.
2007-12-06 00:56:53 +00:00
Raymond Hettinger
2e1af256d4
Error checking was too aggressive (reported by Chris Tismer)
2007-12-05 18:11:08 +00:00
Christian Heimes
8f1fea5061
Fixed error in regrtest. I must have missed the spot.
2007-12-05 12:45:11 +00:00
Christian Heimes
44eeaec173
Patch #1537 from Chad Austin
...
Change GeneratorExit's base class from Exception to BaseException
(This time I'm applying the patch to the correct sandbox.)
2007-12-03 20:01:02 +00:00
Martin v. Löwis
6b449f4f2b
Issue #1727780 : Support loading pickles of random.Random objects created
...
on 32-bit systems on 64-bit systems, and vice versa. As a consequence
of the change, Random pickles created by Python 2.6 cannot be loaded
in Python 2.5.
2007-12-03 19:20:02 +00:00
Nick Coghlan
ef01d822aa
Implement PEP 366
2007-12-03 12:55:17 +00:00
Georg Brandl
e4317fade8
Add test suite for cmd module.
...
Written by Michael Schneider for GHOP.
2007-12-01 22:38:48 +00:00
Lars Gustäbel
77b2d63b40
Issue #1531 : Read fileobj from the current offset, do not seek to
...
the start.
(will backport to 2.5)
2007-12-01 21:02:12 +00:00
Christian Heimes
dfdfaab1c5
Feature #1534
...
Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API.
Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
2007-12-01 11:20:10 +00:00
Christian Heimes
6b29dd05c8
Backport of -r59242:59246 from py3k
...
Fixed problem with regrtest caused by the additional of objects to _abcoll.
2007-11-30 22:36:10 +00:00
Amaury Forgeot d'Arc
dafd32b730
Issue #1521 : on 64bit platforms, str.decode fails on very long strings.
...
The t# and w# formats were not correctly handled.
Will backport.
2007-11-30 20:51:40 +00:00
Amaury Forgeot d'Arc
025c347d61
Issue #1402 : PyInterpreterState_Clear() may still invoke user code
...
(in deallocation of running threads, for example), so the PyGILState_Release()
function must still be functional.
On the other hand, _PyGILState_Fini() only frees memory, and can be called later.
Backport candidate, but only after some experts comment on it.
2007-11-29 23:35:25 +00:00
Christian Heimes
636afc52c0
I forgot to fix one occurence of new in test_descr
2007-11-27 23:53:14 +00:00
Guido van Rossum
715ec1818d
Patch # 1507 by Mark Dickinson. Make complex(x, -0) retain the sign of
...
the imaginary part (as long as it's not complex).
Backport candidate?
2007-11-27 22:38:36 +00:00
Christian Heimes
c756d00cf2
Replaced import of the 'new' module with 'types' module and added a deprecation warning to the 'new' module.
2007-11-27 21:34:01 +00:00
Amaury Forgeot d'Arc
ce7d10ccc4
Issue #1445 : Fix a SystemError when accessing the ``cell_contents``
...
attribute of an empty cell object. Now a ValueError is raised.
2007-11-24 13:44:17 +00:00
Facundo Batista
9401cbe0e9
Test cases from Cowlishaw, v2.57. All are pased cleanly.
2007-11-23 18:14:50 +00:00
Facundo Batista
72bc54faed
Major change in the internal structure of the Decimal
...
number: now it does not store the mantissa as a tuple
of numbers, but as a string.
This avoids a lot of conversions, and achieves a
speedup of 40%. The API remains intact.
Thanks Mark Dickinson.
2007-11-23 17:59:00 +00:00
Brett Cannon
eaa2c980ee
Fix a bug in the test for using __loader__.get_data().
2007-11-23 00:06:51 +00:00
Guido van Rossum
64c06e327d
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
...
With some changes of my own thrown in (e.g. backport of r58107).
2007-11-22 00:55:51 +00:00
Brett Cannon
9db1d5a379
Add a missing check before deleting a package's __loader__.
2007-11-21 00:58:03 +00:00
Brett Cannon
43e53f85b6
doctest assumed that a package's __loader__.get_data() method used universal
...
newlines; it doesn't. To rectify this the string returned replaces all
instances of os.linesep with '\n' to fake universal newline support.
Backport candidate.
2007-11-21 00:47:36 +00:00
Brett Cannon
0e5edf5afd
Remove a unneeded line that had typos.
2007-11-21 00:16:20 +00:00
Amaury Forgeot d'Arc
5087980c1e
The incremental decoder for utf-7 must preserve its state between calls.
...
Solves issue1460.
Might not be a backport candidate: a new API function was added,
and some code may rely on details in utf-7.py.
2007-11-20 23:31:27 +00:00
Christian Heimes
547867e13a
Another fix for test_shutil. Martin pointed out that it breaks some build bots
2007-11-20 03:21:02 +00:00
Christian Heimes
044d709111
Fixed bug #1470
2007-11-20 01:48:48 +00:00
Guido van Rossum
4673e19d8b
Fix the OSX failures in this test -- they were due to /tmp being a symlink
...
to /private/tmp. Adding a call to os.path.realpath() to temp_dir() fixed it.
2007-11-19 17:50:22 +00:00
Guido van Rossum
089816ba0b
Make this work stand-alone, too.
2007-11-19 17:35:24 +00:00
Nick Coghlan
8f6793b540
Enable some test_cmd_line_script debugging output to investigate failure on Mac OSX buildbot
2007-11-19 13:56:27 +00:00
Walter Dörwald
183744d6b9
Fix for #1444 : utf_8_sig.StreamReader was (indirectly through decode())
...
calling codecs.utf_8_decode() with final==True, which falled with incomplete
byte sequences. Fix and test by James G. Sack.
2007-11-19 12:41:10 +00:00
Walter Dörwald
fc7e72d1c6
Fix typo in comment.
2007-11-19 12:14:05 +00:00
Nick Coghlan
327a39b047
Patch #1739468 : Directories and zipfiles containing __main__.py are now executable
2007-11-18 11:56:28 +00:00
Facundo Batista
57d5669f4b
Now in find, rfind, index, and rindex, you can use None as defaults,
...
as usual with slicing (both with str and unicode strings). This
fixes issue 1259.
For str only the stringobject.c file was modified. But for unicode,
I needed to repeat in the four functions a lot of code, so created
a new function that does part of the job for them (and placed it in
find.h, following a suggestion of Barry).
Also added tests for this behaviour.
2007-11-16 18:04:14 +00:00
Bill Janssen
414c2b0819
add the certificate for the Python SVN repository for testing SSL
2007-11-15 23:03:03 +00:00
Raymond Hettinger
eeeb9c4445
Accept Issac Morland's suggestion for __replace__ to allow multiple replacements
...
(suprisingly, this simplifies the signature, improves clarity, and is comparably fast).
Update the docs to reflect a previous change to the function name.
Add an example to the docs showing how to override the default __repr__ method.
2007-11-15 02:44:53 +00:00