| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
user-defined iterator.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
MacPython 2.2.
|
| |
|
|
|
|
| |
arbitrary versions of Expat.
Not applicable to Python 2.3, which will incorporate an Expat that does not
need this crutch.
|
| | |
|
| |
|
|
|
|
| |
Fix SF # 591713, Fix "file:" URL to have right no. of /'s, by Bruce Atherton
Add a test too. urljoin() would make file:/tmp/foo instead of file:///tmp/foo
|
| | |
|
| |
|
|
|
|
|
|
| |
Raise ValueError if user passes a size to mmap which is larger
than the file.
Also need Tim's fix in test_mmap.py, 1.22 which flushes the file
before mmap'ing it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
imports of test_support. That causes multiple copies of test_support
to get loaded, and the one used by test_base64.py didn't see the proper
value of verbose=False, so spewed output. That in turn apparenly caused
Barry to check in an expected-results output file, but a unitttest-based
test should never have one of those. I noticed this because, on Windows,
the final unittest output line contains the number of seconds needed to
run the test, and that varied on *some* runs when I tried it, causing
bogus test failures.
Anyway, this gets rid of the expected-output file again, and changes
the imports to work with 2.2's way of doing this.
|
| |
|
|
|
|
|
|
|
| |
base64.decodestring('') should return '' instead of raising an
exception. The bug fix for SF #430849 wasn't quite right. This
closes SF bug #595671. I'll backport this to Python 2.2.
One addition here is that there was no test of the base64 module in
Python 2.2 cvs yet, so I added that too.
|
| |
|
|
|
|
|
|
|
| |
existed at the time atexit first got imported. That's a bug, and this
fixes it.
Also reworked test_atexit.py to test for this too, and to stop using
an "expected output" file, and to test what actually happens at exit
instead of just simulating what it thinks atexit will do at exit.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
[ 516299 ] urlparse can get fragments wrong
|
| |
|
|
|
|
| |
revision 1.6 of test_cfgparser
As part of fixing bug #523301, add a simple test of ConfigParser.write()
|
| |
|
|
|
|
|
|
|
|
| |
revision 1.7 of test_builtin
SF patch #523169, by Samuele Pedroni.
There were never tests for the fact that list() always returns a *new*
list object, even when the argument is a list, while tuple() may
return a reference to the argument when it is a tuple. Now there are.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
type.__module__ behavior.
This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this). Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right. Apologies if they're
not. This also touches the weakref docs, which contains a sample type
object initializer. It also touches the mmap test output, because the
mmap type's repr is included in that output. It touches object.h to
put the correct description in a comment.
|
| |
|
|
| |
properly set. This fixes that.
|
| |
|
|
|
| |
the node being added is a fragment node.
This closes SF bug #487929.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This gives mmap() on Windows the ability to create read-only, write-
through and copy-on-write mmaps. A new keyword argument is introduced
because the mmap() signatures diverged between Windows and Unix, so
while they (now) both support this functionality, there wasn't a way to
spell it in a common way without introducing a new spelling gimmick.
The old spellings are still accepted, so there isn't a backward-
compatibility issue here.
|
| |
|
|
|
|
| |
Easy enough to catch assignment in the compiler. The perverse user
can still change the value of __debug__, but that may be the least he
can do.
|
| |
|
|
| |
This patch should also be applied to the 2.2b1 trunk.
|
| |
|
|
|
|
|
|
|
|
| |
:-).
Add a test that prevents the __hello__ bytecode from going stale
unnoticed again.
The test also tests the loophole noted in SF bug #404545. This test
will fail right now; I'll check in the fix in a minute.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly by Toby Dickenson and Titus Brown.
Add an optional argument to a decompression object's decompress()
method. The argument specifies the maximum length of the return
value. If the uncompressed data exceeds this length, the excess data
is stored as the unconsumed_tail attribute. (Not to be confused with
unused_data, which is a separate issue.)
Difference from SF patch: Default value for unconsumed_tail is ""
rather than None. It's simpler if the attribute is always a string.
|
| |
|
|
|
| |
Extend tests to cover a few more cases. For cPickle, test several of
the undocumented features.
|
| |
|
|
| |
SF patch #467580.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it deals correctly with some anomalous cases; according to this test
suite I've fixed it right.
The anomalous cases had to do with 'exception' events: these aren't
generated when they would be most helpful, and the profiler has to
work hard to recover the right information. The problems occur when C
code (such as hasattr(), which is used as the example here) calls back
into Python code and clears an exception raised by that Python code.
Consider this example:
def foo():
hasattr(obj, "bar")
Where obj is an instance from a class like this:
class C:
def __getattr__(self, name):
raise AttributeError
The profiler sees the following sequence of events:
call (foo)
call (__getattr__)
exception (in __getattr__)
return (from foo)
Previously, the profiler would assume the return event returned from
__getattr__. An if statement checking for this condition and raising
an exception was commented out... This version does the right thing.
|
| |
|
|
| |
NodeList interface.
|
| |
|
|
|
| |
a better place. Excessively fragile code, but at least it breaks when
something in this area changes!
|
| |
|
|
|
|
|
| |
Lib/test/output/test_StringIO is no longer necessary.
Also, added a test of the iterator protocol that's just been added to
StringIO's and cStringIO's.
|
| |
|
|
|
|
|
|
|
|
| |
elements which are not Unicode objects or strings. (This matches
the string.join() behaviour.)
Fix a memory leak in the .join() method which occurs in case
the Unicode resize fails.
Restore the test_unicode output.
|
| | |
|
| |
|
|
|
| |
integer types, and y must be >= 0. See discussion at
http://sf.net/tracker/index.php?func=detail&aid=457066&group_id=5470&atid=105470
|
| | |
|
| | |
|
| |
|
|
| |
calling unbound method with wrong first argument.
|
| | |
|
| | |
|
| |
|
|
|
| |
Add test case to cover multiple future statements on separate lines of
a module.
|
| |
|
|
| |
test in a trivial way. Fixed.
|
| |
|
|
| |
Converted tests to PyUnit.
|
| | |
|
| |
|
|
|
|
| |
when quoting attribute values that contain single & double quotes.
This provides the rest of the regression test for SF bug #440351.
|
| | |
|