Jeremy Hylton
37075c5ace
Fix long-standing bug in name mangling for package imports
...
Reported by Mike Verdone.
2007-02-27 01:01:59 +00:00
Neal Norwitz
88516a6039
When printing an unraisable error, don't print exceptions. before the name.
...
This duplicates the behavior whening normally printing exceptions.
2007-02-26 22:41:45 +00:00
Jeremy Hylton
759410b372
Do not copy free variables to locals in class namespaces.
...
Fixes bug 1569356, but at the cost of a minor incompatibility in
locals(). Add test that verifies that the class namespace is not
polluted. Also clarify the behavior in the library docs.
Along the way, cleaned up the dict_to_map and map_to_dict
implementations and added some comments that explain what they do.
2007-02-26 18:41:18 +00:00
Thomas Wouters
110054c053
Backported r51621 from p3yk:
...
Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).
Should be backported to 2.5.
2007-02-25 22:12:31 +00:00
Brett Cannon
6fbb96e69a
Refactor PEP 352 tests to make it easier in the future to make sure certain
...
things cannot be raised or caught.
2007-02-23 14:28:25 +00:00
Neal Norwitz
764cf7ed82
Fix typo in comment
2007-02-23 00:22:39 +00:00
Raymond Hettinger
d36862cf78
Add itertools.izip_longest().
2007-02-21 05:20:38 +00:00
Martin v. Löwis
382abeff0f
Patch #1490190 : posixmodule now includes os.chflags() and os.lchflags()
...
functions on platforms where the underlying system calls are available.
2007-02-19 10:55:19 +00:00
Raymond Hettinger
01b9881062
Add test for merge stability
2007-02-19 07:30:21 +00:00
Raymond Hettinger
00166c5532
Add merge() function to heapq.
2007-02-19 04:08:43 +00:00
Raymond Hettinger
d6fc72a5ae
Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash().
2007-02-19 02:03:19 +00:00
Lars Gustäbel
d0b6040ced
A missing binary mode in AppendTest caused failures in Windows
...
Buildbot.
2007-02-14 14:45:12 +00:00
Lars Gustäbel
5b1a785702
Patch #1647484 : Renamed GzipFile's filename attribute to name. The
...
filename attribute is still accessible as a property that emits a
DeprecationWarning.
2007-02-13 16:09:24 +00:00
Martin v. Löwis
84f6de9d7e
Patch #1517891 : Make 'a' create the file if it doesn't exist.
...
Fixes #1514451 .
2007-02-13 10:10:39 +00:00
Martin v. Löwis
c6d626ed9f
Patch #698833 : Support file decryption in zipfile.
2007-02-13 09:49:38 +00:00
Armin Rigo
b8d6d73121
Fix the line to what is my guess at the original author's meaning.
...
(The line has no effect anyway, but is present because it's
customary call the base class __init__).
2007-02-12 16:23:24 +00:00
Martin v. Löwis
2bad58f5a4
Patch 1463026: Support default namespace in XMLGenerator.
...
Fixes #847665 . Will backport.
2007-02-12 12:21:10 +00:00
Martin v. Löwis
4c11a92625
Bug #1653736 : Complain about keyword arguments to time.isoformat.
...
Will backport to 2.5.
2007-02-08 09:13:36 +00:00
Raymond Hettinger
6d121f168c
Do not let overflows in enumerate() and count() pass silently.
2007-02-08 00:07:32 +00:00
Raymond Hettinger
4da5bf644a
Bug #1575169 : operator.isSequenceType() now returns False for subclasses of dict.
2007-02-07 22:24:07 +00:00
Raymond Hettinger
5a0217efea
Check for a common user error with defaultdict().
2007-02-07 21:42:17 +00:00
Raymond Hettinger
0922d71604
SF #1615701 : make d.update(m) honor __getitem__() and keys() in dict subclasses
2007-02-07 20:08:22 +00:00
Lars Gustäbel
3f8aca1164
Patch #1652681 : create nonexistent files in append mode and
...
allow appending to empty files.
2007-02-06 18:38:13 +00:00
Brett Cannon
129bd52146
No more raising of string exceptions!
...
The next step of PEP 352 (for 2.6) causes raising a string exception to trigger
a TypeError. Trying to catch a string exception raises a DeprecationWarning.
References to string exceptions has been removed from the docs since they are
now just an error.
2007-01-30 21:34:36 +00:00
Tim Peters
f733abb783
Whitespace normalization.
2007-01-30 03:03:46 +00:00
Brett Cannon
e05e6b0032
Add a test for slicing an exception.
2007-01-29 04:41:44 +00:00
Georg Brandl
ab49684f55
Patch #1638243 : the compiler package is now able to correctly compile
...
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
2007-01-27 17:43:02 +00:00
Brett Cannon
07e1db317d
Fix time.strptime's %U support. Basically rewrote the algorithm to be more
...
generic so that one only has to shift certain values based on whether the week
was specified to start on Monday or Sunday. Cut out a lot of edge case code
compared to the previous version. Also broke algorithm out into its own
function (that is private to the module).
Fixes bug #1643943 (thanks Biran Nahas for the report).
2007-01-25 20:22:02 +00:00
Walter Dörwald
4b884a5cc2
Port test_popen.py to unittest.
2007-01-24 00:42:19 +00:00
Brett Cannon
f5bee30e30
Fix crasher for when an object's __del__ creates a new weakref to itself.
...
Patch only fixes new-style classes; classic classes still buggy.
Closes bug #1377858 . Already backported.
2007-01-23 23:21:22 +00:00
Andrew M. Kuchling
b78bb74c41
Improve pattern used for mbox 'From' lines; add a simple test
2007-01-22 20:26:40 +00:00
Georg Brandl
5a096e1b10
Use new email module names ( #1637162 , #1637159 , #1637157 ).
2007-01-22 19:40:21 +00:00
Georg Brandl
dd7b0525e9
Patch #1627441 : close sockets properly in urllib2.
2007-01-21 10:35:10 +00:00
Georg Brandl
b84c13792d
Bug #1486663 : don't reject keyword arguments for subclasses of builtin
...
types.
2007-01-21 10:28:43 +00:00
Martin v. Löwis
aef4c6bc00
Patch #1610575 : Add support for _Bool to struct.
2007-01-21 09:33:07 +00:00
Walter Dörwald
71cd55150b
Port test_new.py to unittest.
2007-01-20 23:07:28 +00:00
Walter Dörwald
d414302eec
resource.RUSAGE_BOTH might not exist.
2007-01-20 19:03:17 +00:00
Walter Dörwald
66262ab064
Add argument tests an calls of resource.getrusage().
2007-01-20 18:19:33 +00:00
Walter Dörwald
9fab9a7da8
Port test_resource.py to unittest.
2007-01-20 17:28:31 +00:00
Neal Norwitz
06a9a0ccf4
This test doesn't pass on Windows. The cause seems to be that chmod
...
doesn't support the same funcationality as on Unix. I'm not sure if
this fix is the best (or if it will even work)--it's a test to see
if the buildbots start passing again.
It might be better to not even run this test if it's windows (or non-posix).
2007-01-18 06:20:55 +00:00
Neal Norwitz
7beeb2b0a5
Try reverting part of r53145 that seems to cause the Windows buildbots to fail in test_uu.UUFileTest.test_encode
2007-01-18 05:40:58 +00:00
Sjoerd Mullender
33a0a06d31
Fixed ntpath.expandvars to not replace references to non-existing
...
variables with nothing. Also added tests.
This fixes bug #494589 .
2007-01-16 16:42:38 +00:00
Guido van Rossum
bb2cc698c1
Patch #1635058 by Mark Roberts: ensure that htonl and friends never accept or
...
return negative numbers, per the underlying C implementation.
2007-01-14 17:03:32 +00:00
Guido van Rossum
0567ba20f3
Remove a dependency of this test on $COLUMNS.
2007-01-14 03:46:33 +00:00
Peter Astrand
10514a70ac
Fix for bug #1634343 : allow specifying empty arguments on Windows
2007-01-13 22:35:35 +00:00
Brett Cannon
093b67061a
Deprecate the sets module.
2007-01-13 00:29:49 +00:00
Raymond Hettinger
9fdfadb06e
SF #1486663 -- Allow keyword args in subclasses of set() and frozenset().
2007-01-11 18:22:55 +00:00
Raymond Hettinger
51c2f6cd18
Fix zero-length corner case for iterating over a mutating deque.
2007-01-08 18:09:20 +00:00
Raymond Hettinger
769a40a1d0
Fix stability of heapq's nlargest() and nsmallest().
2007-01-04 17:53:34 +00:00
Brett Cannon
92d54d5e9c
Add EnvironmentVarGuard to test.test_support. Provides a context manager to
...
temporarily set or unset environment variables.
2007-01-04 00:23:49 +00:00