Georg Brandl
d297f1ad78
#3117 : backport r55087, fixes segfault with lambda (None,): None.
2008-06-15 19:53:12 +00:00
Gregory P. Smith
26660401c0
Backport r62724 from trunk. Fixes issue 2791. subprocess.Popen.communicate
...
now closes its stdout and stderr fds as soon as it is finished with them.
2008-06-01 23:44:46 +00:00
Martin v. Löwis
5212da1b96
Patch #2111 : Avoid mmap segfault when modifying a PROT_READ block.
2008-05-23 14:30:44 +00:00
Amaury Forgeot d'Arc
8d904c3981
Issue #2670 : urllib2.build_opener() failed when two handlers
...
derive the same default base class.
Backport of r62463.
2008-04-22 21:17:18 +00:00
Gregory P. Smith
f623467759
Merge r62235 from trunk.
...
Fix zlib crash from zlib.decompressobj().flush(val) when val was not positive.
It tried to allocate negative or zero memory. That fails.
2008-04-09 00:26:44 +00:00
Amaury Forgeot d'Arc
8432d86b9f
Fix a reference leak found by Georg, when compiling a class nested in another class.
...
Test is run with "regrtest.py -R:: test_compile"
Backport of r62015
2008-03-28 20:45:42 +00:00
Amaury Forgeot d'Arc
198e353735
Issue2495: tokenize.untokenize did not insert space between two consecutive string literals:
...
"" "" becomes """", which is invalid code.
Backport of r61979.
2008-03-27 23:41:59 +00:00
Mark Dickinson
bfdbfd4d91
Issue #2482 : Make sure that the coefficient of a Decimal instance
...
is stored as a str instance rather than a unicode instance.
Backported from Python 2.6 (see r61904).
2008-03-25 18:58:13 +00:00
Mark Dickinson
26c25d9f64
Decimal.sqrt(0) failed when the context was not
...
explicitly supplied.
2008-03-25 14:35:25 +00:00
Amaury Forgeot d'Arc
a79e05097b
#1477 : ur'\U0010FFFF' used to raise in narrow unicode builds.
...
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in
this case, like the unicode-escape codec does.
Backport of r61793 and r61853
2008-03-24 21:16:28 +00:00
Georg Brandl
d9b9d680d5
Issue #2432 : give DictReader the dialect and line_num attributes
...
advertised in the docs.
(backport from r61712)
2008-03-21 20:01:55 +00:00
Sean Reifscheider
4af861cb4e
Back-port of rev 61240 for issue #2238 , fixing: Some syntax errors in *args
...
and **kwargs expressions could give bogus error messages.
2008-03-20 17:39:31 +00:00
Gregory P. Smith
631df7550f
Backport r61450 from trunk:
...
Fix chown on 64-bit linux. It needed to take a long (64-bit on 64bit linux) as
uid and gid input to accept values >=2**31 as valid while still accepting
negative numbers to pass -1 to chown for "no change".
Fixes issue1747858.
2008-03-18 19:21:40 +00:00
Trent Nelson
549171e1ab
The behaviour of winsound.Beep() seems to differ between different versions of Windows when there's either:
...
a) no sound card entirely
b) legacy beep driver has been disabled
c) the legacy beep driver has been uninstalled
Sometimes RuntimeErrors are raised, sometimes they're not. If _have_soundcard() returns False, don't expect winsound.Beep() to raise a RuntimeError, as this clearly isn't the case, as demonstrated by the various Win32 XP buildbots.
2008-03-18 07:32:47 +00:00
Trent Nelson
a6f5bf2387
Ensure this test passes even if there are no soundcards in the system. Backport from trunk r61242.
2008-03-18 03:52:22 +00:00
Raymond Hettinger
3662c9090d
Backport r61286 adding GC to the grouper for itertools.groupby() fixing Issue 2246.
2008-03-06 22:58:42 +00:00
Martin v. Löwis
bc89897e5f
Patch #2232 : os.tmpfile might fail on Windows if the user has no
...
permission to create files in the root directory.
2008-03-06 06:57:02 +00:00
Andrew M. Kuchling
f1fdda67e6
Remove old expected output for test_resource
2008-02-23 23:29:26 +00:00
Andrew M. Kuchling
310bad077b
#1291 : copy test_resource.py from the 2.6 trunk, to fix a test failure.
...
The 2.6 version also converts to unittest, but it seems to work fine under 2.5.
2008-02-23 21:32:06 +00:00
Andrew M. Kuchling
05a19a507d
#1433694 : minidom's .normalize() failed to set .nextSibling for last element.
...
Fix by Malte Helmert
2008-02-23 17:21:44 +00:00
Martin v. Löwis
328c643bcb
Bug #2137 : Remove test_struct.test_crasher, which was meaningful
...
only on 32-bit systems.
2008-02-18 17:46:27 +00:00
Martin v. Löwis
42e4124304
Revert 60793 for test_array; on a 64-bit system,
...
MemoryError was not guaranteed.
2008-02-15 19:52:38 +00:00
Martin v. Löwis
73c01d4101
Added checks for integer overflows, contributed by Google. Some are
...
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
2008-02-14 11:26:18 +00:00
Lars Gustäbel
08303dbd72
Backport the nts() function from the trunk. This fixes problems with
...
the xstar format that puts extra fields inside the space that POSIX
has reserved for the prefix field.
2008-02-11 18:36:07 +00:00
Nick Coghlan
5ca1cba252
Backport relevant part of issue 2021 fix (r60695): Support with statement properly in tempfile.NamedTemporaryFile
2008-02-11 12:53:42 +00:00
Nick Coghlan
0b5c17a9c3
Backport test_resource fix from trunk to stop it crashing on Ubuntu
2008-02-11 11:31:24 +00:00
Amaury Forgeot d'Arc
3e5f8a6975
issue 2045: Infinite recursion when printing a subclass of defaultdict,
...
if default_factory is set to a bound method.
Backport of r60663.
2008-02-08 01:05:21 +00:00
Amaury Forgeot d'Arc
bc212104e4
No need to emit co_lnotab item when both offsets are zeros.
...
r60579 broke a test test_compile, which seems to test an "implementation detail" IMO.
Also test that this correction does not impact the debugger.
2008-02-04 23:51:55 +00:00
Amaury Forgeot d'Arc
316f8a8d3c
backport of r60575 (issue #1750076 ): Debugger did not step on every iteration of a while statement.
...
The mapping between bytecode offsets and source lines (lnotab) did not contain
an entry for the beginning of the loop.
Now it does, and the lnotab can be a bit larger:
in particular, several statements on the same line generate several entries.
However, this does not bother the settrace function, which will trigger only
one 'line' event.
The lnotab seems to be exactly the same as with python2.4.
2008-02-04 22:34:57 +00:00
Neal Norwitz
249cbe794e
Try harder to provoke the exception since the ia64 buildbot still
...
doesn't reliably produce an exception.
2008-01-28 01:33:23 +00:00
Neal Norwitz
209ea39d31
Sync up with trunk. Try to flush repeatedly to ensure the exception is raised.
2008-01-27 20:08:04 +00:00
Neal Norwitz
6179234803
Backport 60342:
...
Try to prevent this test from being flaky. We might need a sleep in here
which isn't as bad as it sounds. The close() *should* raise an exception,
so if it didn't we should give more time to sync and really raise it.
2008-01-27 05:02:56 +00:00
Neal Norwitz
ab577c1b32
Backport r58453:
...
Let the O/S supply a port if none of the default ports can be used.
This should make the tests more robust at the expense of allowing
tests to be sloppier by not requiring them to cleanup after themselves.
(It will legitamitely help when running two test suites simultaneously
or if another process is already using one of the predefined ports.)
This will hopefully fix test_asynchat.
2008-01-27 01:24:44 +00:00
Neal Norwitz
b03528ca20
Backport 60334:
...
On some systems (e.g., Ubuntu on hppa) the flush()
doesn't (always) cause the exception, but the close() does.
2008-01-27 01:23:50 +00:00
Amaury Forgeot d'Arc
f1a7178cd5
#1920 : when considering a block starting by "while 0", the compiler optimized the
...
whole construct away, even when an 'else' clause is present::
while 0:
print("no")
else:
print("yes")
did not generate any code at all.
Now the compiler emits the 'else' block, like it already does for 'if' statements.
Backport of r60265.
2008-01-24 23:42:08 +00:00
Andrew M. Kuchling
61c2c9536f
Fix failing test_mailbox on Cygwin
2008-01-24 14:08:00 +00:00
Guido van Rossum
2c63442586
Backport r60208, skip some tests for huge passwd/group files.
2008-01-23 01:20:26 +00:00
Gregory P. Smith
8f034d9af2
Backport of r60190:
...
- Fix Issue #1703448 : A joined thread could show up in the
threading.enumerate() list after the join() for a brief period until
it actually exited.
2008-01-22 01:29:11 +00:00
Mark Dickinson
9f26fcce04
Remove extra test that was accidentally backported from the trunk
2008-01-21 23:35:11 +00:00
Mark Dickinson
2bebadfe51
Issue 1678380: fix a bug identifying -0.0 and 0.0
2008-01-21 21:54:47 +00:00
Georg Brandl
7bdff2c8e5
Issue #1882 : when compiling code from a string, encoding cookies in the
...
second line of code were not always recognized correctly.
(backport from rev. 60168)
2008-01-21 18:35:52 +00:00
Andrew M. Kuchling
ea72dcb05c
Bug 1277: make Maildir use the user-provided factory instead of hard-wiring MaildirMessage.
2008-01-19 20:14:40 +00:00
Guido van Rossum
5f4fc831ad
This got fixed in r60056.
2008-01-18 23:06:49 +00:00
Guido van Rossum
03706d2db0
Backport r55080:
...
Fix for #1303614 and #1174712 :
- __dict__ descriptor abuse for subclasses of built-in types
- subclassing from both ModuleType and another built-in types
2008-01-18 21:31:32 +00:00
Mark Dickinson
d77fedc745
Fix Decimal hash in Python 2.5 maintenance branch so that hash(x) == hash(int(x))
...
for any integral Decimal instance x.
2008-01-08 21:42:03 +00:00
Facundo Batista
5dfc48060b
Decimal module and test cases were updated to their state of
...
the art. It now complies latest specification and tests.
The only difference of this version with the one in the trunk
is that a small subset that hash tests were removed, because
they rely on modifications to core hash() function (see
issue 1182 for further details).
2008-01-08 16:20:31 +00:00
Guido van Rossum
81728cf4c9
Backport r59758.
...
Patch #1637 : fix urlparse for URLs like 'http://x.com?arg=/foo '.
Fix by John Nagle.
2008-01-05 23:34:38 +00:00
Lars Gustäbel
e5f9e588c6
Issue #1735 : TarFile.extractall() now correctly sets directory
...
permissions and times.
(backport from r59712)
2008-01-04 14:44:23 +00:00
Guido van Rossum
6df9a82bd3
Issue #1700 , reported by Nguyen Quan Son, fix by Fredruk Lundh:
...
Regular Expression inline flags not handled correctly for some unicode
characters.
2008-01-03 19:08:15 +00:00
Alexandre Vassalotti
483704508d
Backport r59480.
...
Fix issue #1313119 .
2007-12-13 18:18:47 +00:00