| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object.c, PyObject_Str: Don't try to optimize anything except exact
string objects here; in particular, let str subclasses go thru tp_str,
same as non-str objects. This allows overrides of tp_str to take
effect.
stringobject.c:
+ string_print (str's tp_print): If the argument isn't an exact string
object, get one from PyObject_Str.
+ string_str (str's tp_str): Make a genuine-string copy of the object if
it's of a proper str subclass type. str() applied to a str subclass
that doesn't override __str__ ends up here.
test_descr.py: New str_of_str_subclass() test.
|
|
|
|
|
| |
size(), parse150(): try int() first, catch OverflowError, fall back to
long().
|
| |
|
| |
|
| |
|
|
|
|
|
| |
hotshot.stats.load(logfilename) returns a pstats.Stats instance, which is
about as compatible as it gets.
|
|
|
|
|
|
| |
changing an application to collect profile data on one part of the
app while still making use of the profiled component, without relying
on side effects.
|
|
|
|
|
| |
Add support for extracting function names from the log file, keeping the
extract-names-from-sources support as a fallback.
|
|
|
|
|
| |
distinguish __dict__ and __defined__ any more. In the C structure,
tp_cache takes its place -- but this hasn't been implemented yet.
|
|
|
|
|
| |
Extend tests to cover a few more cases. For cPickle, test several of
the undocumented features.
|
|
|
|
| |
Remove test code. It's available in Lib/test/picklertester.py.
|
|
|
|
|
| |
Py_TPFLAGS_DYNAMICTYPE bit. There is no longer a performance benefit,
and I don't really see the use case any more.
|
|
|
|
|
| |
RFC 2049 recommends never outputting a line consisting of a single
dot.
|
|
|
|
| |
Pass binary mode to makefile().
|
|
|
|
| |
has no Content-Type: header, it should be treated as text/plain.
|
|
|
|
|
|
| |
failobj, and when getting the subtype use 'plain' as the failobj.
text/plain is supposed to be the default if the message contains no
Content-Type: header.
|
| |
|
|
|
|
| |
reported by Neal Norwitz.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Reported by Neal Norwitz.
|
| |
|
|
|
|
|
|
| |
Remove the log file after we are done with it. This should clean up after
the test even on Windows, since the file is now closed before we attempt
removal.
|
| |
|
|
|
|
|
|
| |
Simply commented it out, and then test_hotshot passes on Windows.
Leaving to Fred to fix "the right way" (it seems to be a feature of
unittest that all unittests try to unlink open files <wink>).
|
|
|
|
| |
use 0x format for id. Proposed by Cesar Eduardo Barros in patch #470680.
|
|
|
|
| |
tool; look for that on Monday.
|
|
|
|
| |
reported and can read the log back in.
|
|
|
|
|
| |
al. if already set. Also adds TIX_LIBRARY (just in case).
(Note that this is entirely Windows specific.)
|
|
|
|
|
|
|
| |
inherit_slots(): tp_as_buffer was getting inherited as if it were a
method pointer, rather than a pointer to a vector of method pointers. As
a result, inheriting from a type that implemented buffer methods was
ineffective, leaving all the tp_as_buffer slots NULL in the subclass.
|
|
|
|
|
|
|
|
|
| |
corresponding to a dispatch slot (e.g. __getitem__ or __add__) is set,
calculate the proper dispatch slot and propagate the change to all
subclasses. Because of multiple inheritance, there's no easy way to
avoid always recursing down the tree of subclasses. Who cares?
(There's more to do, but this works. There's also a test for this now.)
|
|
|
|
| |
SyntaxError. Fix it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to be systematic about dealing with socket and ssl exceptions in
FakeSocket.makefile(). The previous version of the code caught all
ssl errors and treated them as EOF, even though most of the errors
don't mean EOF.
An SSL error can mean on of three things:
1. The SSL/TLS connection was closed.
2. The operation should be retried.
3. An error occurred.
Also, if a socket error occurred and the error was EINTR, retry the
call. Otherwise, it was a legitimate error and the caller should
receive the exception.
|
| |
|
|
|
|
|
|
| |
headers. It does not parse the body of the message, instead simply
assigning it as a string to the container's payload. This can be much
faster when you're only interested in a message's header.
|
| |
|
|
|
|
|
|
|
| |
value, so the programmer will have to catch OverflowError. I'm not sure
what /F's perspective is on this. Perhaps it should be caught and mapped to
an xmlrpclib-specific exception. None of the other type-specific dump
methods seem to do any exception handling though.
|
|
|
|
|
| |
We have 5 implementations of walk(), and 5 different docstrings. Combined
'em. Let's see how long it takes before they're all different again!
|
|
|
|
|
|
| |
The behavior of co_varnames in the presence of nested argument tuples
is not consistent across Python and Jython. Test each platform
separately.
|
| |
|