| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
with default False for testmod(). The real point of introducing this was
so that output from doctest.master.summarize() would be the same as in
2.3, and doctest.master in 2.4 is a backward-compatability hack used only
by testmod().
|
| |
|
|
|
|
|
| |
modification. Also, renamed the positional argument to '__mapping' to further
reduce the chance of duplicate keyword arguments.
|
|
|
|
|
| |
controls whether tests are included for objects with empty docstrings.
Defaults to True, to match the behavior of Python 2.3.
|
|
|
|
|
| |
doctest always promised to stick "__test__" in the name. That got
broken. Now it's fixed again.
|
| |
|
|
|
|
| |
the "backward compatibility" here was a joke.
|
|
|
|
| |
was passed.
|
| |
|
| |
|
|
|
|
|
| |
functions and methods now, including functions defined inside doctests
in test_doctest.py's recursive doctest'ing.
|
|
|
|
| |
(functions and methods have grown the __module__ attribute too). See bug #570300.
|
|
|
|
| |
Template and unicode classes.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Template no longer inherits from unicode.
- SafeTemplate is removed. Now Templates have both a substitute() and a
safe_substitute() method, so we don't need separate classes. No more
__mod__() operator.
- Adopt Tim Peter's idea for giving Template a metaclass, which makes the
delimiter, the identifier pattern, or the entire pattern easy to override
and document, while retaining efficiency of class-time compilation of the
regexp.
- More informative ValueError messages which will help a user narrow down the
bogus delimiter to the line and column in the original string (helpful for
long triple quoted strings).
|
|
|
|
| |
(needs documentation)
|
| |
|
| |
|
|
|
|
|
|
| |
comments
(see SF patch #901369)
|
|
|
|
|
|
|
| |
Also added a comment about why the code is bother to see what setlocale thinks
the set locale is.
Closes bug #1023798.
|
|
|
|
|
|
|
|
|
|
|
| |
decoding incomplete input (when the input stream is temporarily exhausted).
codecs.StreamReader now implements buffering, which enables proper
readline support for the UTF-16 decoders. codecs.StreamReader.read()
has a new argument chars which specifies the number of characters to
return. codecs.StreamReader.readline() and codecs.StreamReader.readlines()
have a new argument keepends. Trailing "\n"s will be stripped from the lines
if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and
PyUnicode_DecodeUTF16Stateful.
|
|
|
|
| |
about how the code should raise a SyntaxError.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SF patch #1015989
The basic idea of this patch is to compute lineno attributes for all AST nodes. The actual
implementation lead to a lot of restructing and code cleanup.
The generated AST nodes now have an optional lineno argument to constructor. Remove the
top-level asList(), since it didn't seem to serve any purpose. Add an __iter__ to ast nodes.
Use isinstance() instead of explicit type tests.
Change transformer to use the new lineno attribute, which replaces three lines of code with one.
Use universal newlines so that we can get rid of special-case code for line endings. Use
lookup_node() in a few more frequently called, but simple com_xxx methods(). Change string
exception to class exception.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several functions adopted the strategy of altering a full lengthed
string copy and resizing afterwards. That would fail if the initial
string was short enough (0 or 1) to be interned. Interning precluded
the subsequent resizing operation.
The solution was to make sure the initial string was at least two
characters long.
Added tests to verify that all binascii functions do not crater when
given an empty string argument.
|
| |
|
|
|
|
| |
you leap" approach. Makes the early call to os.urandom() unnecessary.
|
| |
|
|
|
|
|
| |
* Complete the previous patch by making sure that the MachineRandom
tests are only run when the underlying resource is available.
|
|
|
|
|
|
|
|
| |
"all or none" to "all or some".
This provides much greater test coverage without eating much time.
It also makes it more likely that routine regression testing will
unearth bugs.
|
|
|
|
|
|
|
|
| |
in the new docs.
DocTestRunner.__run: Separate the determination of the example outcome
from reporting that outcome, to squash brittle code duplication and
excessive nesting.
|
| |
|
| |
|
|
|
|
|
| |
* trap NotImplementedError raised by os.urandom calls when not available
on a particular system.
|
|
|
|
|
| |
empty final matches with finditer(). New test cases included
for this bug and for #581080.
|
|
|
|
| |
some escaping bugs in SRE.
|
|
|
|
| |
fd is readable or writable
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
"from blah import (foo, bar
baz, bongo)"
|