| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Closes SF patch 494871.
|
| |
|
|
|
|
| |
[ 516299 ] urlparse can get fragments wrong
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for the UTF-8 decoder: it will now accept isolated surrogates
(previously it raised an exception which causes round-trips to
fail).
Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for
marshalling Unicode objects, so we better make sure it works for
all Unicode code points, including isolated surrogates).
Bumped the PYC magic in a non-standard way -- please review. This
was needed because the old PYC format used illegal UTF-8 sequences
for isolated high surrogates which now raise an exception.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Add test that calls eval with a code object that has free variables.
|
| |
|
|
|
|
| |
expected-output file.
|
|
|
|
| |
This closes SF bug #440351. It should not be moved to Python 2.1.1.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Change test_doctest and test_difflib to pass regrtest's notion of
verbosity on to doctest.
Add explanation for a dozen "new" things to test/README.
|
|
|
|
|
| |
generating it. Since this is purely a doctest, the output file never
served a good purpose.
|
|
|
|
| |
tests were moved to PyUnit.
|
| |
|