Fred Drake [Tue, 22 Apr 2003 18:15:05 +0000 (18:15 +0000)]
Do a little more searching for the data file for the test: this allows
using a build directory just inside the source directory and saving
just one copy of the test data in the source tree, rather than having
a copy in each build directory.
Improved the bytecode optimizer.
* Can now test for basic blocks.
* Optimize inverted comparisions.
* Optimize unary_not followed by a conditional jump.
* Added a new opcode, NOP, to keep code size constant.
* Applied NOP to previous transformations where appropriate.
Note, the NOP would not be necessary if other functions were
added to re-target jump addresses and update the co_lnotab mapping.
That would yield slightly faster and cleaner bytecode at the
expense of optimizer simplicity and of keeping it decoupled
from the line-numbering structure.
Get test_capi & test_getargs2 to pass on alphas
* UINT_MAX -> ULONG_MAX since we are dealing with longs
* ParseTuple needs &int for 'i' and &long for 'l'
There may be a better way to do this, but this works.
Andrew MacIntyre [Mon, 21 Apr 2003 14:33:04 +0000 (14:33 +0000)]
Makefile & config.c:
- restructure build for modules now in Python DLL
README.os2emx
- clean out old cruft no longer appropriate now that EMX port builds
from CVS
- reflect move of modules into core DLL
- add section on building from source
Update to Optik 1.4.1; here are the relevant bits of the change log:
* Fixed some long-hidden bugs revealed by the new PyUnit-based
test suite (thanks to Johannes Gijsbers the new test suite,
improved tests that caught the bugs, and the bug fixes).
* Make store_true/store_false store True/False rather than 1/0.
I've applied a modified version of Greg Chapman's patch. I've included
the fixes without introducing the reorganization mentioned, for the sake
of stability. Also, the second fix mentioned in the patch don't fix the
mentioned problem anymore, because of the change introduced by patch
#720991 (by Greg as well). The new fix wasn't complicated though, and is
included as well.
As a note. It seems that there are other places that require the
"protection" of LASTMARK_SAVE()/LASTMARK_RESTORE(), and are just waiting
for someone to find how to break them. Particularly, I belive that every
recursion of SRE_MATCH() should be protected by these macros. I won't
do that right now since I'm not completely sure about this, and we don't
have much time for testing until the next release.
- Fixed bug #672491. This change restores the behavior of lastindex/lastgroup
to be compliant with previous python versions, by backing out the changes
made in revision 2.84 which affected this. The bugfix for backtracking is
still maintained.
Tim Peters [Sat, 19 Apr 2003 18:47:02 +0000 (18:47 +0000)]
handle_system_exit(): This leaked the current exception info, in
particular leaving the traceback object (and everything reachable
from it) alive throughout shutdown. The patch is mostly from Guido.
- bool() called without arguments now returns False rather than
raising an exception. This is consistent with calling the
constructors for the other builtin types -- called without argument
they all return the false value of that type. (SF patch #724135)
Thanks to Alex Martelli.
- Several methods of nntplib.NNTP have grown an optional file argument
which specifies a file where to divert the command's output
(already supported by the body() method). (SF patch #720468)
Thanks to Terry Carroll.
Jason Tishler [Fri, 18 Apr 2003 17:27:47 +0000 (17:27 +0000)]
Patch #718049: Setting exe_extension for cygwin
On cygwin, the setup.py script uses unixccompiler.py for compiling and linking
C extensions. The unixccompiler.py script assumes that executables do not get
special extensions, which makes sense for Unix. However, on Cygwin,
executables get an .exe extension.
This causes a problem during the configuration step (python setup.py config),
in which some temporary executables may be generated. As unixccompiler.py does
not know about the .exe extension, distutils fails to clean up after itself: it
does not remove _configtest.exe but tries to remove _configtest instead.
The attached patch to unixccompiler.py sets the correct exe_extension for
cygwin by checking if sys.platform is 'cygwin'. With this patch, distutils
cleans up after itself correctly.
Michiel de Hoon
University of Tokyo, Human Genome Center.
Fred Drake [Fri, 18 Apr 2003 15:50:13 +0000 (15:50 +0000)]
- accepted (slightly) modified version of docs for the OptionGroup
class; closes SF patch #697941
- use em-dashes intead of en-dashes
- section references: use a "tie" between the word "section" and the
section number, use quotation marks around section titles
- other minor markup corrections/cleanups
Tim Peters [Fri, 18 Apr 2003 00:45:59 +0000 (00:45 +0000)]
_Py_PrintReferenceAddresses(): also print the type name. In real use
I'm finding some pretty baffling output, like reprs consisting entirely
of three left parens. At least this will let us know what type the object
is (it's not str -- there's no quote character in the repr).
New tool combinerefs.py, to combine the two output blocks produced via
PYTHONDUMPREFS.
Tim Peters [Thu, 17 Apr 2003 19:52:29 +0000 (19:52 +0000)]
_Py_PrintReferences(): Changed to print object address at start of each
new line.
New pvt API function _Py_PrintReferenceAddresses(): Prints only the
addresses and refcnts of the live objects. This is always safe to call,
because it has no dependence on Python's C API.
Py_Finalize(): If envar PYTHONDUMPREFS is set, call (the new)
_Py_PrintReferenceAddresses() right before dumping final pymalloc stats.
We can't print the reprs of the objects here because too much of the
interpreter has been shut down. You need to correlate the addresses
displayed here with the object reprs printed by the earlier
PYTHONDUMPREFS call to _Py_PrintReferences().
Thomas Heller [Thu, 17 Apr 2003 18:55:45 +0000 (18:55 +0000)]
SF # 595026: support for masks in getargs.c.
New functions:
unsigned long PyInt_AsUnsignedLongMask(PyObject *);
unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
unsigned long PyLong_AsUnsignedLongMask(PyObject *);
unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);
New and changed format codes:
b unsigned char 0..UCHAR_MAX
B unsigned char none **
h unsigned short 0..USHRT_MAX
H unsigned short none **
i int INT_MIN..INT_MAX
I * unsigned int 0..UINT_MAX
l long LONG_MIN..LONG_MAX
k * unsigned long none
L long long LLONG_MIN..LLONG_MAX
K * unsigned long long none
Notes:
* New format codes.
** Changed from previous "range-and-a-half" to "none"; the
range-and-a-half checking wasn't particularly useful.
Tim Peters [Thu, 17 Apr 2003 15:21:01 +0000 (15:21 +0000)]
Py_Finalize(): Reverted recent changes that tried to move the
PYTHONDUMPREFS output after most teardown. Attempts to use
PYTHONDUMPREFS with the Zope3 test suite died with Py_FatalError(),
since _Py_PrintReferences() can end up executing arbitrary Python code
(for objects that override __repr__), and that requires an intact
interpreter.
Changes from Jonathan Riehl to allow his pgen extension (PEP 269) to
work. This includes some more code that used to be part of pgen in
the main parser; I'm okay with that. I'll see if the Windows build
needs work next.
Add 'get' method to Variable and switch it from internal class to
standard class (it is now useful because it doesn't constrain the type
of the value).
- super() no longer ignores data descriptors, except __class__. See
the thread started at
http://mail.python.org/pipermail/python-dev/2003-April/034338.html
- super() no longer ignores data descriptors, except __class__. See
the thread started at
http://mail.python.org/pipermail/python-dev/2003-April/034338.html
Jack Jansen [Wed, 16 Apr 2003 12:17:56 +0000 (12:17 +0000)]
Added support for per-user installs.
Don't show psuedo-packages by default, added a button to show them.
Cleaned up interface a little (not enough, though).
Walter Dörwald [Wed, 16 Apr 2003 09:46:13 +0000 (09:46 +0000)]
Add two dictionaries to htmlentitydefs: name2codepoint maps
HTML entity names to Unicode codepoints (as integers).
codepoint2name is the reverse mapping. From SF patch #722017.