Georg Brandl
d0a962506b
Patch #787789 : allow to pass custom TestRunner instances to unittest's
...
main() function.
2007-03-07 09:21:06 +00:00
Georg Brandl
15c5ce936f
Patches #1550273 , #1550272 : fix a few bugs in unittest and add a
...
comprehensive test suite for the module.
2007-03-07 09:09:40 +00:00
Georg Brandl
71ff646743
Patch #1001604 : glob.glob() now returns unicode filenames if it was
...
given a unicode argument and os.listdir() returns unicode filenames.
2007-03-07 08:31:51 +00:00
Georg Brandl
172e7257f6
Patch #812285 : allow multiple auth schemes in AbstractBasicAuthHandler.
2007-03-07 07:39:06 +00:00
Walter Dörwald
d391f0855c
Patch for bug #1633621 : if curses.resizeterm() or
...
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.
2007-03-06 20:38:57 +00:00
Georg Brandl
40c626159d
Patch #1654417 : make operator.{get,set,del}slice use the full range
...
of Py_ssize_t.
2007-03-06 18:59:11 +00:00
Georg Brandl
00cd818dea
Patch #1638879 : don't accept strings with embedded NUL bytes in long().
2007-03-06 18:41:12 +00:00
Georg Brandl
cff1ae3a2f
Small nit, found by Neal.
2007-03-06 18:21:32 +00:00
Guido van Rossum
2054ee9b6f
Patch #1646728 : datetime.fromtimestamp fails with negative
...
fractional times. With unittest.
Somebody please backport to 2.5.
2007-03-06 15:50:01 +00:00
Martin v. Löwis
ab8a6bba25
Patch #912410 : Replace HTML entity references for attribute values
...
in HTMLParser.
2007-03-06 14:43:00 +00:00
Georg Brandl
ff432e6f4a
Patch #1663234 : you can now run doctest on test files and modules
...
using "python -m doctest [-v] filename ...".
2007-03-06 13:37:45 +00:00
Georg Brandl
72363031b9
A test case for the defaultdict KeyError bug.
2007-03-06 13:35:00 +00:00
Georg Brandl
d53d951c24
Patch #1672481 : fix bug in idlelib.MultiCall.
2007-03-06 11:52:24 +00:00
Georg Brandl
3071a1aec9
A test case for the fix in #1674228 .
2007-03-06 11:51:14 +00:00
Martin v. Löwis
3eb7648986
Patch #1121142 : Implement ZipFile.open.
2007-03-06 10:41:24 +00:00
Georg Brandl
0fca97a5fb
Patch #1674228 : when assigning a slice (old-style), check for the
...
sq_ass_slice instead of the sq_slice slot.
2007-03-05 22:28:08 +00:00
Facundo Batista
ca90ca81a4
Minor corrections to docs, and an explanation comentary
2007-03-05 16:31:54 +00:00
Georg Brandl
8905bb10e0
Fix a bug in test_dict and test_userdict, found at the PyPy sprint.
2007-03-04 17:18:54 +00:00
Raymond Hettinger
20e1199fbe
Fix embarrassing typo and fix constantification of None
2007-03-02 19:20:46 +00:00
Georg Brandl
117a05ed50
Bug #1628895 : some better tries to find HTML documentation in pydoc.
2007-03-02 14:37:12 +00:00
Raymond Hettinger
c37e5e04eb
Add collections.NamedTuple
2007-03-01 06:16:43 +00:00
Raymond Hettinger
eb9798892d
Prepare collections module for pure python code entries.
2007-02-28 18:37:52 +00:00
Raymond Hettinger
3035d2397f
Docstring nit.
2007-02-28 18:27:41 +00:00
Brett Cannon
f8267df2ad
Add a test for instantiating SyntaxError with no arguments.
2007-02-28 18:15:00 +00:00
Armin Rigo
adf172339c
Modify the segfaulting example to show why r53997 is not a solution to
...
it.
2007-02-28 09:25:29 +00:00
Jeremy Hylton
fa955697fa
Add checking for a number of metaclass error conditions.
...
We add some new rules that are required for preserving internal
invariants of types.
1. If type (or a subclass of type) appears in bases, it must appear
before any non-type bases. If a non-type base (like a regular
new-style class) occurred first, it could trick type into
allocating the new class an __dict__ which must be impossible.
2. There are several checks that are made of bases when creating a
type. Those checks are now repeated when assigning to __bases__.
We also add the restriction that assignment to __bases__ may not
change the metaclass of the type.
Add new tests for these cases and for a few other oddball errors that
were no previously tested. Remove a crasher test that was fixed.
Also some internal refactoring: Extract the code to find the most
derived metaclass of a type and its bases. It is now needed in two
places. Rewrite the TypeError checks in test_descr to use doctest.
The tests now clearly show what exception they expect to see.
2007-02-27 18:29:45 +00:00
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
Raymond Hettinger
cbac8ce5b0
Fixup docstrings for merge().
2007-02-19 18:15:04 +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
45eb0f1419
Use C heapreplace() instead of slower _siftup() in pure python.
2007-02-19 06:59:32 +00:00
Raymond Hettinger
54da9819cc
Add tie-breaker count to preserve sort stability.
2007-02-19 05:28:28 +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
Vinay Sajip
f7ccc101d2
Minor fix for currentframe (SF #1652788 ).
2007-02-16 22:36:24 +00:00
Brett Cannon
fa6521b4fd
Make the __import__ call in encodings.__init__ absolute with a level 0 call.
2007-02-16 19:33:01 +00:00
Brett Cannon
971a012ce1
Update the encoding package's search function to use absolute imports when
...
calling __import__. This helps make the expected search locations for encoding
modules be more explicit.
One could use an explicit value for __path__ when making the call to __import__
to force the exact location searched for encodings. This would give the most
strict search path possible if one is worried about malicious code being
imported. The unfortunate side-effect of that is that if __path__ was modified
on 'encodings' on purpose in a safe way it would not be picked up in future
__import__ calls.
2007-02-15 22:54:39 +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
f19c1b5e0e
Strip the '.gz' extension from the filename that is written to the
...
gzip header.
2007-02-13 16:24:00 +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
Martin v. Löwis
07aa3ed372
Patch #685268 : Consider a package's __path__ in imputil.
...
Will backport.
2007-02-13 08:34:45 +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