| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
ThreadingMixIn/TCPServer forgets close (Max Neunhöffer).
This ensures that handle_error() and close_request() are called when
an error occurs in the thread.
(I am not applying the second chunk of the patch, which moved the
finish() call into the finally clause in BaseRequestHandler's __init__
method; that would be a semantic change that I cannot accept at this
point - the data would be sent even if the handler raised an
exception.)
|
| |
|
| |
|
|
|
|
|
|
| |
Repair unlikely surprise due to magical softspace attr and the use of
print with a trailing comma in doctest examples.
Bugfix candidate.
|
| |
|
|
|
|
|
|
| |
used by the weakref code since he didn't like the word "referencable".
Is it really necessary to be more specific than to test for TypeError here,
though?
|
|
|
|
|
| |
Don't put paren in column 0 (to please font-lock mode).
Put space after comma in argument list.
|
|
|
|
|
| |
the curses module. It's not run automatically; '-u curses' must be
specified as an argument to regrtest
|
|
|
|
| |
(sorry, barry)
|
|
|
|
|
|
|
|
|
|
| |
There really isn't a good reason for instance method objects to have
their own __dict__, __doc__ and __name__ properties that just delegate
the request to the function (callable); the default attribute behavior
already does this.
The test suite had to be fixed because the error changes from
TypeError to AttributeError.
|
|
|
|
|
| |
(formerly these were silently ignored). The only built-in methods
that take keyword arguments are __call__, __init__ and __new__.
|
|
|
|
|
| |
checking in changes. The test suite requires consistent use of spaces
and tabs.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
strings, not C strings)
removed USE_PYTHON defines, and related sre.py helpers
skip calling the subx helper if the template is callable.
interestingly enough, this means that
def callback(m):
return literal
result = pattern.sub(callback, string)
is much faster than
result = pattern.sub(literal, string)
|
| |
|
|
|
|
|
|
| |
check to the test suite.
added a few missing exception checks in the _sre module
|
|
|
|
|
|
|
|
|
| |
removed (conceptually flawed) getliteral helper; the new sub/subn code
uses a faster code path for literal replacement strings, but doesn't
(yet) look for literal patterns.
added STATE_OFFSET macro, and use it to convert state.start/ptr to
char indexes
|
|
|
|
| |
should have been checked in as part of patch #470254.
|
|
|
|
| |
This patch should also be applied to the 2.2b1 trunk.
|
|
|
|
|
| |
TestMIMEMessage.test_epilogue(), TestIdempotent.test_preamble_epilogue():
Test cases for SF bug #472481.
|
| |
|
|
|
|
|
|
| |
_handle_multipart(): If there is an epilogue and the epilogue does
not itself start with a newline, add a newline before writing the
epilogue. Closes SF bug #472481.
|
|
|
|
|
|
|
|
| |
This adds unsetenv to posix, and uses it in the __delitem__ method of
os.environ.
(XXX Should we change the preferred name for putenv to setenv, for
consistency?)
|
| |
|
| |
|
|
|
|
|
| |
TypeError (on systems where it's not defined at all, it raises
AttributeError; when it's defined, assignment to it raises TypeError).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a big one, touching lots of files. Some of the platforms
aren't tested yet. Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences. When accessed as a sequence, they behave exactly as
before. But they also have attributes like st_mtime or tm_year. The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there). If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.
(Still missing is a documentation update.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GUI-mode code to display properties blew up if the property functions
(get, set, etc) weren't simply methods (or functions).
"The problem" here is really that the generic document() method dispatches
to one of .doc{routine, class, module, other}(), but all of those require
a different(!) number of arguments. Thus document isn't general-purpose
at all: you have to know exactly what kind of thing is it you're going
to document first, in order to pass the correct number of arguments to
.document for it to pass on. As an expedient hack, just tacked "*ignored"
on to the end of the formal argument lists for the .docXXX routines so
that .document's caller doesn't have to know in advance which path
.document is going to take.
|
|
|
|
|
| |
The right fix is to generate line number events anyway ;-), but this will
have to do for now.
|
|
|
|
|
|
|
|
| |
compile should raise error for non-strings
SRE bug #432570, 448951:
reset group after failed match
also bumped version number to 2.2.0
|
| |
|
|
|
|
|
|
|
|
|
|
| |
:-).
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.
|
|
|
|
| |
handlers. This was fixed in Objects/weakrefobject.c 1.2.
|
|
|
|
|
| |
Solved with a helper method that calls finish_request() and then
close_request(). The code is by Max Neunhöffer.
|
| |
|
| |
|
|
|
|
|
| |
The fix is a band-aid: type_call() now makes the same exception for a
single-argument call to type() as type_new() was already making.
|
| |
|
|
|
|
| |
(The rest of the test cases are trivial, so I don't feel too bad.)
|
|
|
|
| |
closes patch 470254
|
|
|
|
|
|
|
|
|
| |
test_no_semis_header_splitter(): This actually should still split.
test_no_split_long_header(): An example of an unsplittable line.
test_no_semis_header_splitter(): Test for SF bug # 471918, Generator
splitting long headers.
|
|
|
|
|
|
|
|
| |
_split_header(): Split on folding whitespace if the attempt to split
on semi-colons failed.
_split_header(): Patch by Matthew Cowles for fixing SF bug # 471918,
Generator splitting long headers.
|
|
|
|
| |
ValueError on too-large inputs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are now no known cases where the compiler package computes a
stack depth lower than the one computed by the builtin compiler. (To
achieve this state, we had to fix bugs in both compilers :-).
The chief change is to do the depth calculations with respect to basic
blocks. The stack effect of block is calculated. Then the flow graph
is traversed using breadth-first search to find the max weight path
through the graph.
Had to fix the StackDepthTracker to calculate the right info for
several opcodes: LOAD_ATTR, CALL_FUNCTION (and friends), MAKE_CLOSURE,
and DUP_TOPX.
XXX Still need to handle free variables in MAKE_CLOSURE.
XXX There are still a lot of places where the computed stack depth is
larger than for the builtin compiler. These won't cause the
interpreter to overflow the frame, but they waste space.
|
| |
|
| |
|
|
|
|
|
|
| |
- replace some log_error() calls with log_message()
- flush self.rfile before forking too (hope this works on Windows)
|
| |
|