Ka-Ping Yee [Fri, 28 Mar 2003 16:35:51 +0000 (16:35 +0000)]
Hide private names beginning with _ (but don't hide __special__ names).
Clean up section headings; make the bars on the left less fat.
Adjust the display of properties slightly.
Don't show stuff inherited from the base 'object' type.
Jack Jansen [Wed, 26 Mar 2003 23:14:44 +0000 (23:14 +0000)]
If GetAppTerminology fails (which seems to be the usual case on OSX?)
we try to manually launch the application and send it an ascr/gdte
event to get its terminology.
Adds a single function to improve generated bytecode. Has a single line
attachment point, so it is completely de-coupled from both the compiler
and ceval.c.
Makes three simple transforms that do not require a basic block analysis
or re-ordering of code. Gives improved timings on pystone, pybench,
and any code using either "while 1" or "x,y=y,x".
Jack Jansen [Tue, 25 Mar 2003 10:20:55 +0000 (10:20 +0000)]
Frank Vercruesse gave an okay on removing the copyright notice:
"Hereby I make the script in question available under the terms and
conditions of the latest Python License."
Guido van Rossum [Mon, 24 Mar 2003 23:49:49 +0000 (23:49 +0000)]
Refactoring: rename update_these_slots() into update_subclasses() and
generalize to take a callback function and a void * data argument.
This might come in handy later... :-)
Tim Peters [Sun, 23 Mar 2003 17:52:28 +0000 (17:52 +0000)]
Improved new Py_TRACE_REFS gimmicks.
Arranged that all the objects exposed by __builtin__ appear in the list
of all objects. I basically peed away two days tracking down a mystery
leak in sys.gettotalrefcount() in a ZODB app (== tons of code), because
the object leaking the references didn't appear in the sys.getobjects(0)
list. The object happened to be False. Now False is in the list, along
with other popular & previously missing leak candidates (like None).
Alas, we still don't have a choke point covering *all* Python objects,
so the list of all objects may still be incomplete.
Tim Peters [Sun, 23 Mar 2003 03:33:13 +0000 (03:33 +0000)]
Refactored some of the Py_TRACE_REFS code. New private API function
_Py_AddToAllObjects() that simply inserts an object at the front of
the doubly-linked list of all objects. Changed PyType_Ready() (the
closest thing we've got to a choke point for type objects) to call
that.
Tim Peters [Sun, 23 Mar 2003 02:51:01 +0000 (02:51 +0000)]
When Py_TRACE_REFS is defined, a list of all live objects is maintained in
a doubly-linked list, exposed by sys.getobjects(). Unfortunately, it's not
really all live objects, and it seems my fate to bump into programs where
sys.gettotalrefcount() keeps going up but where the reference leaks aren't
accounted for by anything in the list of all objects.
This patch helps a little: if COUNT_ALLOCS is also defined, from now on
type objects will also appear in this list, provided at least one object
of a type has been allocated.
Kurt B. Kaiser [Sat, 22 Mar 2003 19:40:19 +0000 (19:40 +0000)]
M PyShell.py
M run.py
1. Move subprocess socket handling to a subthread - "SockThread".
2. In the subprocess, implement a queue and global completion and exit
flags. Execute code after it is passed through the queue. (Currently,
user code is executed in SockThread. The next phase of development will
move the tail of the queue to MainThread.)
3. Implement an RPC message used to shut down the execution server.
4. Improve normal and exception subprocess exits.
(At this checkin a "pass loop" interrupt doesn't work on any platform. It
will be restored for all platforms once user code execution is moved to
MainThread.)
Neal Norwitz [Sat, 22 Mar 2003 16:35:37 +0000 (16:35 +0000)]
Include Python.h first which defines _XOPEN_SOURCE
which allows the file to compile and removes a warning about _XOPEN_SOURCE
being redefined (works on AIX 4.3 and 5.1 at least).
Fred Drake [Thu, 20 Mar 2003 22:17:59 +0000 (22:17 +0000)]
- added example of using a comparison function with list.sort(), and
explained the construction of a [(key, value), ...] list as an
alternative
- note that support for cmpfunc=None was added in 2.3
Tim Peters [Thu, 20 Mar 2003 20:53:32 +0000 (20:53 +0000)]
New private API functions _PyFloat_{Pack,Unpack}(4,8}. This is a
refactoring to get all the duplicates of this delicate code out of the
cPickle and struct modules.
Tim Peters [Thu, 20 Mar 2003 18:32:13 +0000 (18:32 +0000)]
SF bug 705836: struct.pack of floats in non-native endian order
pack_float, pack_double, save_float: All the routines for creating
IEEE-format packed representations of floats and doubles simply ignored
that rounding can (in rare cases) propagate out of a long string of
1 bits. At worst, the end-off carry can (by mistake) interfere with
the exponent value, and then unpacking yields a result wrong by a factor
of 2. In less severe cases, it can end up losing more low-order bits
than intended, or fail to catch overflow *caused* by rounding.
Bugfix candidate, but I already backported this to 2.2.
In 2.3, this code remains in severe need of refactoring.
Fred Drake [Thu, 20 Mar 2003 17:39:38 +0000 (17:39 +0000)]
- explain what a UNC path is in the makedirs() description, since
they're actually mentioned there
- remove some extraneous paragraph separations
- \versionadded --> \versionchanged in one place
Gustavo Niemeyer [Wed, 19 Mar 2003 00:35:36 +0000 (00:35 +0000)]
Fixed SF bug #663074. The codec system was using global static
variables to store internal data. As a result, any atempts to use the
unicode system with multiple active interpreters, or successive
interpreter executions, would fail.
Now that information is stored into members of the PyInterpreterState
structure.
Barry Warsaw [Mon, 17 Mar 2003 18:35:42 +0000 (18:35 +0000)]
getaddrlist(): Make sure this consumes all the data, and if there is
no address there (perhaps because of invalid characters, it appends
('', '') to the result set.
Jack Jansen [Mon, 17 Mar 2003 15:44:10 +0000 (15:44 +0000)]
Added a define EXTRAMACHDEPPATH which can be used to add sys.path items
for specific platforms. Use this to add plat-mac and
plat-mac/lib-scriptpackages on MacOSX. Also tested for not having adverse
effects on Linux, and I think this code isn't used on Windows anyway.
Thomas Wouters [Mon, 17 Mar 2003 11:24:29 +0000 (11:24 +0000)]
binascii_a2b_base64: Properly return an empty string if the input was all
invalid, rather than returning a string of random garbage of the
estimated result length. Closes SF patch #703471 by Hye-Shik Chang.