| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
because there test_grammar.py pulls them out of strings there.
|
|
|
|
| |
testNtoHL but testNtoH.
|
| |
|
|
|
|
| |
2.2.2 candidate.
|
| |
|
|
|
|
| |
the usability of the output of the Xenofarm builds.
|
|
|
|
| |
the test should be skipped if that's the case.
|
|
|
|
|
|
| |
The original expected value is actually wrong, but we'll pick up the
real fix and test when we refresh the xml package from PyXML before
2.3a1.
|
|
|
|
|
|
|
|
| |
Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a
64-bit value, there's no way to make this test succeed on a 64-bit
platform. So just skip it when sys.maxint isn't 0x7fffffff.
Backport candidate.
|
|
|
|
|
| |
This makes things a touch more like 2.2. Read the comments in
Python/ceval.c for more details.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
exception occurred so it should only be closed in the else clause.
Without this change we can an UnboundLocalError on Linux:
Traceback (most recent call last):
File "Lib/test/test_mmap.py", line 304, in ?
test_both()
File "Lib/test/test_mmap.py", line 208, in test_both
m.close()
UnboundLocalError: local variable 'm' referenced before assignment
|
|
|
|
| |
(adapted from Quinn Dunkan's mimelib SF patch #573204).
|
|
|
|
|
| |
more instances of the bizarre "del f; del m" ways to spell .close() (del
won't do any good here under Jython, etc).
|
|
|
|
|
|
|
|
|
|
| |
with a size larger than the underlying file worked on Windows. It
does <wink>. However, merely creating an mmap that way has the side
effect of growing the file on disk to match the specified size. A
*later* test assumed that the file on disk was still exactly as it was
before the new "size too big" test was added, but that's no longer true.
So added a hack at the end of the "size too big" test to truncate the
disk file back to its original size on Windows.
|
| |
|
| |
|
|
|
|
| |
GUSI/Threading interaction, I'm not sure, but I don't have the time to fix this right now.
|
|
|
|
|
| |
when the replacement from an encoding error callback is itself
unencodable.
|
|
|
|
|
| |
Raise ValueError if user passes a size to mmap which is larger
than the file.
|
|
|
|
|
|
|
|
|
|
| |
Unicode strings (with arbitrary length) are allowed
as entries in the unicode.translate mapping.
Add a test case for multicharacter replacements.
(Multicharacter replacements were enabled by the
PEP 293 patch)
|
|
|
|
|
|
| |
to fix it. (It fails when the day of the month is a 1-digit number,
because %c produces space+digit there, while strptime seems to expect
zero+digit somehow.)
|
|
|
|
|
| |
missing key. (Also added a guard to SyntaxError__str__ to prevent
calling PyString_Check(NULL).)
|
|
|
|
| |
sometimes wasn't short enough.
|
|
|
|
|
|
|
|
|
| |
of PyString_DecodeEscape(). This prevents a call to
_PyString_Resize() for the empty string, which would
result in a PyErr_BadInternalCall(), because the
empty string has more than one reference.
This closes SF bug http://www.python.org/sf/603937
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use a slightly different strategy to determine when not to call the line
trace function. This removes the need for the RETURN_NONE opcode, so
that's gone again. Update docs and comments to match.
Thanks to Neal and Armin!
Also add a test suite. This should have come with the original patch...
|
|
|
|
|
|
|
|
| |
localtime, which in -0400 is 12 noon GMT. The bug boiled down to
broken conversion of 12 PM to hour 12 for the '%I %p' format string.
Added a test for this specific condition: Strptime12AMPMTests. Fix to
_strptime.py coming momentarily.
|
|
|
|
|
|
| |
the tokenize module by test_tokenize.py. The FutureWarnings only
appeared during installation, and I've figured out a way to suppress
those in a different way.
|
|
|
|
| |
of FutureWarnings. Added a comment explaining the situation.
|
|
|
|
| |
when given its own type as an argument.
|
|
|
|
|
|
|
|
|
|
|
| |
sure these are the best fixes.
- Test maxint-1 against the negative octal constant -020000000000
- Comment out the tests for oct -1 and hex -1, since 037777777777 and
0xffffffff raise FutureWarnings now and in Python 2.4 those
constants will produce positive values, not negative values. So the
existing test seems to test something that won't be true in 2.4.
|
|
|
|
| |
trailing `L's.
|
| |
|
|
|
|
|
|
| |
meanings. I did not add new, e.g., ispropersubset() methods; we're
going nuts on those, and, e.g., there was no "friendly name" for
== either.
|
|
|
|
| |
<, <=, etc methods too.
|
| |
|
| |
|
| |
|
|
|
|
| |
should never be used in tests. Repaired dozens, but more is needed.
|
| |
|
|
|
|
|
|
|
|
| |
underlying dictionaries, there were no reasonable use cases (lexicographic
sorting of a list of sets is somewhat esoteric). Frees the operators
for other uses (such as strict subset and superset comparisons).
Updated documentation and test suite accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
| |
the inplace operators. The strategy is to have the operator overloading
code do the work and then to define equivalent method calls which rely on
the operators. The changes facilitate proper application of TypeError
and NonImplementedErrors.
Added corresponding tests to the test suite to make sure both the operator
and method call versions get exercised.
Add missing tests for difference_update().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wrong thing for a unicode subclass when there were zero string
replacements. The example given in the SF bug report was only one way
to trigger this; replacing a string of length >= 2 that's not found is
another. The code would actually write outside allocated memory if
replacement string was longer than the search string.
(I wonder how many more of these are lurking? The unicode code base
is full of wonders.)
Bugfix candidate; this same bug is present in 2.2.1.
|
|
|
|
|
| |
the string/unicode method .replace() with a zero-lengt first argument.
Inyeol contributed tests for this too.
|
| |
|
| |
|
|
|
|
| |
we need to test TextWrapper._split().
|