Fred Drake [Mon, 3 Jul 2000 08:18:47 +0000 (08:18 +0000)]
cmpfiles(): Added shallow and use_statcache parameters, with same meanings
and defaults as for filecmp.cmp(). Updated docstring
accordingly, and formatted it more like others in the standard
library.
Fred Drake [Mon, 3 Jul 2000 07:23:13 +0000 (07:23 +0000)]
Martin von Löwis <martin@loewis.home.cs.tu-berlin.de>:
This patch delegates more string functions to string object methods,
uses the varargs delegation syntax, and stops using stringold.
Tim Peters [Sun, 2 Jul 2000 23:18:43 +0000 (23:18 +0000)]
The example_nt directory was old enough to vote. Frank Stajano
pointed out some of the problems he had following the instructions,
and I stumbled into the others: MSVC has changed in several
respects, Python has changed the directories into which it builds
its own Windows outputs, and we grew the unusual scheme of
appending "_d" to the names of debug-mode output files.
This should all work with VC6 + CVS Python now. Some other Windows
geek please confirm! And the less you know, the better <0.5 wink>.
Explanations and examples for versions of MSVC before 6, and
versions of Python before 2.0b1, have been removed, because
they're too different and so confuse life. This last step I OK'ed
with Guido first (indeed, 'twas his idea!).
Fredrik Lundh [Sun, 2 Jul 2000 22:25:39 +0000 (22:25 +0000)]
- experimental: added two new attributes to the match object:
"lastgroup" is the name of the last matched capturing group,
"lastindex" is the index of the same group. if no group was
matched, both attributes are set to None.
the (?P#) feature will be removed in the next relase.
Fredrik Lundh [Sun, 2 Jul 2000 17:33:27 +0000 (17:33 +0000)]
- actually enabled charset anchors in the engine (still not
used by the code generator)
- changed max repeat value in engine (to match earlier array fix)
- added experimental "which part matched?" mechanism to sre; see
http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954
or python-dev for details.
Changes from Moshe:
- distutils: Windows installers are already working
- string methods: .join() seems to be the concensus, so it should probably
be docommented
- filecmp.py supersedes cmp, cmpcache and dircmp
- winreg is completely new: _winreg is an adaptation of what used to be in
win32api, and winreg is a Python implementation which adds OO syntax.
Perhaps you know that, but the text is misleading.
Fred Drake [Sat, 1 Jul 2000 07:03:30 +0000 (07:03 +0000)]
Fix bug #314, reported by Craig Allen <cba@mediaone.net>:
splittype(): Always lower-case the URL scheme; these are supposed to be
normalized according to RFC 1738 anyway.
Mark Hammond [Sat, 1 Jul 2000 03:12:59 +0000 (03:12 +0000)]
Update all projects so Debug builds use "/Zi" instead of "/ZI", which means everything should still build under MSVC5
NOTE: All these projects had messed-up line endings (but MSVC didnt mind). Executing a diff with "--ignore-all-space" will show the specific changes, but I made a complete checkin with correct line endiings as it is the correct thing to do!
In b_setitem(), instead of the platform dependent CHAR_MIN and
CHAR_MAX, use hardcoded -128 and 127. This may seem strange, unless
you realize that we're talking about signed bytes here! Bytes are
always 8 bits and 2's complement. CHAR_MIN and CHAR_MAX are
properties of the char data type, which is guaranteed to hold at least
8 bits anyway.
Otherwise you'd get failing tests on platforms where unsigned char is
the default (e.g. AIX).
Thanks, Vladimir Marangozov, for finding this nit!
Tim Peters [Sat, 1 Jul 2000 00:03:43 +0000 (00:03 +0000)]
Update for 2.0b1. Also add more text, to be more explicit about
what the dozen+ subprojects are for, which are and aren't
expected to build out of the box, and what else is needed to get
them all to build. Also explained that Alpha configurations
don't refer to pre-beta, but to the Alpha processor! That's
baffled me for years <0.7 wink>.
Greg Ward [Fri, 30 Jun 2000 19:37:59 +0000 (19:37 +0000)]
Simplify the registry-module-finding code: _winreg or win32api/win32con.
This'll work fine with 2.0 or 1.5.2, but is less than ideal for
1.6a1/a2. But the code to accomodate 1.6a1/a2 was released with
Distutils 0.9, so it can go away now.
Fred Drake [Fri, 30 Jun 2000 17:48:51 +0000 (17:48 +0000)]
[*** Not tested as I don't have Windows running right now! ***]
Trent Mick <trentm@activestate.com>:
Fix PC/msvcrtmodule.c and PC/winreg.c for Win64. Basically:
- sizeof(HKEY) > sizeof(long) on Win64, so use PyLong_FromVoidPtr()
instead of PyInt_FromLong() to return HKEY values on Win64
- Check for string overflow of an arbitrary registry value (I know
that ensuring that a registry value does not overflow 2**31 characters
seems ridiculous but it is *possible*).
Skip Montanaro [Fri, 30 Jun 2000 16:39:27 +0000 (16:39 +0000)]
* added a randomize flag and corresponding -r command line argument that
allows the caller to execute the various tests in pseudo-random order -
default is still to execute tests in the order returned by findtests().
* moved initialization of the various flag variables to the main() function
definition, making it possible to execute regrtest.main() interactively
and still override default behavior.
Guido van Rossum [Fri, 30 Jun 2000 16:25:20 +0000 (16:25 +0000)]
Switch to sre for regular expression matching (the new mini-re module
is actually by Fredrik Lundh). This will break the re tests --
Fredrik will fix this before the final release.
Barry Warsaw [Fri, 30 Jun 2000 16:21:01 +0000 (16:21 +0000)]
Enable the garbage collection module by default. --without-cycle-gc
disables it. The gc test is moved to just after the thread test, as
is the wctype-functions test.
Modules/Setup.config is generated instead of Modules/Setup.thread.
Applied SF patch #100684 (loewis) to fix help alignment bug.
Fred Drake [Fri, 30 Jun 2000 16:20:13 +0000 (16:20 +0000)]
Trent Mick <trentm@activestate.com>:
The common technique for printing out a pointer has been to cast to a long
and use the "%lx" printf modifier. This is incorrect on Win64 where casting
to a long truncates the pointer. The "%p" formatter should be used instead.
The problem as stated by Tim:
> Unfortunately, the C committee refused to define what %p conversion "looks
> like" -- they explicitly allowed it to be implementation-defined. Older
> versions of Microsoft C even stuck a colon in the middle of the address (in
> the days of segment+offset addressing)!
The result is that the hex value of a pointer will maybe/maybe not have a 0x
prepended to it.
Notes on the patch:
There are two main classes of changes:
- in the various repr() functions that print out pointers
- debugging printf's in the various thread_*.h files (these are why the
patch is large)
Fred Drake [Fri, 30 Jun 2000 16:18:57 +0000 (16:18 +0000)]
Trent Mick <trentm@activestate.com>:
This patch fixes possible overflow in the use of
PyOS_GetLastModificationTime in getmtime.c and Python/import.c.
Currently PyOS_GetLastModificationTime returns a C long. This can
overflow on Win64 where sizeof(time_t) > sizeof(long). Besides it
should logically return a time_t anyway (this patch changes this).
As well, import.c uses PyOS_GetLastModificationTime for .pyc
timestamping. There has been recent discussion about the .pyc header
format on python-dev. This patch adds oveflow checking to import.c so
that an exception will be raised if the modification time
overflows. There are a few other minor 64-bit readiness changes made
to the module as well:
- size_t instead of int or long for function-local buffer and string
length variables
- one buffer overflow check was added (raises an exception on possible
overflow, this overflow chance exists on 32-bit platforms as well), no
other possible buffer overflows existed (from my analysis anyway)
Barry Warsaw [Fri, 30 Jun 2000 16:12:15 +0000 (16:12 +0000)]
Setup.thread.in was misnamed so it has been replaced by
Setup.config.in. The latter contains all configure-time selectable
modules; currently thread and gc.