]> granicus.if.org Git - python/log
python
24 years agoRemoving junk
Guido van Rossum [Thu, 11 May 2000 18:28:03 +0000 (18:28 +0000)]
Removing junk

24 years agoremoving more stdwin users
Guido van Rossum [Thu, 11 May 2000 18:27:21 +0000 (18:27 +0000)]
removing more stdwin users

24 years agoAdded a few new names...
Guido van Rossum [Thu, 11 May 2000 18:20:30 +0000 (18:20 +0000)]
Added a few new names...

24 years agoAdded math.rint() -- round according to current IEEE754 mode
Guido van Rossum [Thu, 11 May 2000 18:19:42 +0000 (18:19 +0000)]
Added math.rint() -- round according to current IEEE754 mode

24 years agoremoving more stdwin users
Guido van Rossum [Thu, 11 May 2000 14:43:52 +0000 (14:43 +0000)]
removing more stdwin users

24 years agoBill Tutt:
Guido van Rossum [Thu, 11 May 2000 12:53:51 +0000 (12:53 +0000)]
Bill Tutt:

Calling Sleep(0) for a spinlock can cause a priority inversion, adding
comments to explain what's going on.

24 years agoOops, better also note that the module initialization function must be
Fred Drake [Wed, 10 May 2000 20:36:34 +0000 (20:36 +0000)]
Oops, better also note that the module initialization function must be
extern "C" for C++.

24 years agoSection "The Module's Method Table and Initialization Function":
Fred Drake [Wed, 10 May 2000 20:33:18 +0000 (20:33 +0000)]
Section "The Module's Method Table and Initialization Function":
        Explain that the name of the initialization function must be
        init<module>().  Omission noted by Daniel Kozan
        <crum@dev-group.com>.

24 years agoAt Bob Kahn's request, add CNRI to the copyright string (but not to
Guido van Rossum [Wed, 10 May 2000 20:06:00 +0000 (20:06 +0000)]
At Bob Kahn's request, add CNRI to the copyright string (but not to
the notice yet).

24 years agoRename the "browser" module to "BrowserControl", since Guido did not
Fred Drake [Wed, 10 May 2000 17:28:42 +0000 (17:28 +0000)]
Rename the "browser" module to "BrowserControl", since Guido did not
like the short, ambiguous name.

24 years agoEditorWindow.python_docs():
Fred Drake [Wed, 10 May 2000 16:50:07 +0000 (16:50 +0000)]
EditorWindow.python_docs():
        Instead of using Netscape through os.system(), use the new
        browser.open() function to load the documentation on the
        default browser.  On Windows, this will use the installed
        documentation if it exists, instead of hitting python.org.

24 years agoCollection of classes and convenience functions to control external
Fred Drake [Wed, 10 May 2000 16:47:27 +0000 (16:47 +0000)]
Collection of classes and convenience functions to control external
Web browsers.

24 years agoGUSI 2.0.5 has a non-functional getsockname() if you use Open Transport. For now...
Jack Jansen [Wed, 10 May 2000 15:15:54 +0000 (15:15 +0000)]
GUSI 2.0.5 has a non-functional getsockname() if you use Open Transport. For now the workaround is to only enable MacTCP sockets.

24 years agoTrent Mick:
Guido van Rossum [Wed, 10 May 2000 13:25:32 +0000 (13:25 +0000)]
Trent Mick:

Use "win32" for sys.platform on Win64 instead of "win32" because:
1. While it may be confusing to the Python scriptor on Win64 that he has to
   check for win*32*, that is something that he will learn the first time. It
   is better than the alternative of the scriptor happily using "win64" and
   then that code not running on Win32 for no good reason.
2. The main question is: is Win64 so much more like Win32 than different from
   it that the common-case general Python programmer should not ever have to
   make the differentiation in his Python code. Or, at least, enough so that
   such differentiation by the Python scriptor is rare enough that some other
   provided mechanism is sufficient (even preferable). Currently the answer
   is yes. Hopefully MS will not change this answer.

24 years agoTrent Mick <trentm@activestate.com>:
Fred Drake [Tue, 9 May 2000 21:50:00 +0000 (21:50 +0000)]
Trent Mick <trentm@activestate.com>:
Limit the 'b' formatter of PyArg_ParseTuple to valid values of an unsigned
char, i.e. [0,UCHAR_MAX]. It is expected that this is the common usage of 'b'.
An OverflowError is raised if the parsed value is outside this range.

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:58:19 +0000 (19:58 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added a useful link to Markus Kuhn's Unicode and UTF-8
FAQ.

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:57:46 +0000 (19:57 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added another test for string formatting (the one that
produced the core dump now fixed in unicodeobject.c).

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:57:01 +0000 (19:57 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added APIs to allow setting and querying the system's
current string encoding: sys.set_string_encoding()
and sys.get_string_encoding().

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:55:59 +0000 (19:55 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Moved some docs to the include file.

Added a NULL check to _PyCodec_Lookup() to make it
core dump safe.

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:55:16 +0000 (19:55 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Fixed docs according to the new behaviour (the Unicode
encoding is no longer fixed to UTF-8).

24 years agoMinimal change so I can add the rest of MAL's checkin message:
Fred Drake [Tue, 9 May 2000 19:54:43 +0000 (19:54 +0000)]
Minimal change so I can add the rest of MAL's checkin message:

M.-A. Lemburg <mal@lemburg.com>:
Fixed a core dump in PyUnicode_Format().

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:53:39 +0000 (19:53 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added support for user settable default encodings. The
current implementation uses a per-process global which
defines the value of the encoding parameter in case it
is set to NULL (meaning: use the default encoding).

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:52:40 +0000 (19:52 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Fixed a bug due to a /* inside /*...*/. GCC doesn't like
this and bombs.

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:51:53 +0000 (19:51 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added PyUnicode_GetDefaultEncoding() and
PyUnicode_GetDefaultEncoding() APIs.

24 years agoM.-A. Lemburg <mal@lemburg.com>:
Fred Drake [Tue, 9 May 2000 19:51:10 +0000 (19:51 +0000)]
M.-A. Lemburg <mal@lemburg.com>:
Added documentation and the missing PyCodec_StreamWriter API.

24 years agoNew version from Jim Fulton to fix a problem that Eric Raymond ran
Guido van Rossum [Tue, 9 May 2000 18:14:50 +0000 (18:14 +0000)]
New version from Jim Fulton to fix a problem that Eric Raymond ran
into.  Jim writes:

The core dump was due to a C decrement operation
in a macro invocation in load_pop.  (BAD)

I fixed this by moving the decrement outside
the macro call.

I added a comment to load_pop and load_mark
to document the fact that cPickle separates the
unpickling stack into two separate stacks, one for
objects and one for marks.

I also moved some increments out of some macro
calls (PyTuple_SET_ITEM and PyList_SET_ITEM).
This wasn't necessary, but made me feel better. :)

I tested these changes in *my* cPickle, which
doesn't have the new Unicode stuff.

24 years agoFix references to the built-in compile() that don't include the
Fred Drake [Tue, 9 May 2000 17:10:23 +0000 (17:10 +0000)]
Fix references to the built-in compile() that don't include the
filename parameter.  Noted by Randall Hopper <aa8vb@yahoo.com>.

24 years agoSkip Montanaro <skip@mojam.com>:
Fred Drake [Tue, 9 May 2000 16:23:23 +0000 (16:23 +0000)]
Skip Montanaro <skip@mojam.com>:
The intent is that this diff adds a link to the rfc822 module doc and
an index reference to this module under the rfc822 heading.

Fred, based on a suggestion from Grant Griffin <grant.griffin@honeywell.com>:
Added link to the MIME FAQ, so people can more easily get more
information about the subject of the module.

24 years agoDefine \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake [Tue, 9 May 2000 16:18:44 +0000 (16:18 +0000)]
Define \seeurl in the seealso environment.  Two parameters: url, why.

24 years agodo_cmd_seeurl(): New function.
Fred Drake [Tue, 9 May 2000 16:17:51 +0000 (16:17 +0000)]
do_cmd_seeurl():  New function.

24 years agoread() method: clarify that strings are accepted and interpreted
Fred Drake [Tue, 9 May 2000 15:06:32 +0000 (15:06 +0000)]
read() method:  clarify that strings are accepted and interpreted
        reasonably.

readfp() method:  added documentation.

24 years agoAdd a simple directory listing function.
Guido van Rossum [Tue, 9 May 2000 14:57:09 +0000 (14:57 +0000)]
Add a simple directory listing function.

24 years agoSet HTTPServer class variable allow_reuse_address to 1, so restarting
Guido van Rossum [Tue, 9 May 2000 14:54:13 +0000 (14:54 +0000)]
Set HTTPServer class variable allow_reuse_address to 1, so restarting
the server after it died doesn't require a wait period.

24 years agoAdd class variable allow_reuse_address in TCPServer -- if nonzero, the
Guido van Rossum [Tue, 9 May 2000 14:53:29 +0000 (14:53 +0000)]
Add class variable allow_reuse_address in TCPServer -- if nonzero, the
server_bind() method calls setsockopt(SOL_SOCKET, SO_REUSEADDR, 1).

24 years agoConfigParser.read():
Fred Drake [Tue, 9 May 2000 14:46:40 +0000 (14:46 +0000)]
ConfigParser.read():
        Instead of wrapping 'filenames' value in a list if it's a
        string, wrap it if it's a string or unicode string.

24 years agoMinor edit of leading comments: 'the the' --> 'the', quoted 'enable'
Fred Drake [Tue, 9 May 2000 14:28:03 +0000 (14:28 +0000)]
Minor edit of leading comments: 'the the' --> 'the', quoted 'enable'
option name for clarity.

24 years agoReplace PyErr_BadArgument() error in PyInt_AsLong() with "an integer
Guido van Rossum [Tue, 9 May 2000 14:27:48 +0000 (14:27 +0000)]
Replace PyErr_BadArgument() error in PyInt_AsLong() with "an integer
is required" (we can't say more because we don't know in which context
it is called).

24 years agoTrent Mick:
Guido van Rossum [Tue, 9 May 2000 14:14:27 +0000 (14:14 +0000)]
Trent Mick:

Fix the string methods that implement slice-like semantics with
optional args (count, find, endswith, etc.) to properly handle
indeces outside [INT_MIN, INT_MAX]. Previously the "i" formatter
for PyArg_ParseTuple was used to get the indices. These could overflow.

This patch changes the string methods to use the "O&" formatter with
the slice_index() function from ceval.c which is used to do the same
job for Python code slices (e.g. 'abcabcabc'[0:1000000000L]).

24 years agoCaolan McNamara: properly undo the byte-stuffing of lines starting
Guido van Rossum [Tue, 9 May 2000 10:56:00 +0000 (10:56 +0000)]
Caolan McNamara: properly undo the byte-stuffing of lines starting
with a dot.  [GvR change: only unstuff when line starts with two dots.]

24 years agoUSE_GUSI2 should be defined, not USE_GUSI1.
Jack Jansen [Tue, 9 May 2000 10:02:30 +0000 (10:02 +0000)]
USE_GUSI2 should be defined, not USE_GUSI1.

24 years agoSelecting the macfsn option didn't work, fixed.
Jack Jansen [Tue, 9 May 2000 10:01:52 +0000 (10:01 +0000)]
Selecting the macfsn option didn't work, fixed.
Fixed the help strings.
Swapped the macfsn and help button numbers.

24 years agoImport this to replace open() by an extended version that uses
Jack Jansen [Tue, 9 May 2000 08:38:20 +0000 (08:38 +0000)]
Import this to replace open() by an extended version that uses
Internet Config to set creator/type based on the extension. Donated by
Oliver Steele.

24 years agoAdded comment about the MSVC-specific kludge.
Greg Ward [Tue, 9 May 2000 01:50:41 +0000 (01:50 +0000)]
Added comment about the MSVC-specific kludge.

24 years agoDeleted some modules that are no longer supported.
Guido van Rossum [Mon, 8 May 2000 17:42:17 +0000 (17:42 +0000)]
Deleted some modules that are no longer supported.

24 years agoThe usual...
Guido van Rossum [Mon, 8 May 2000 17:31:04 +0000 (17:31 +0000)]
The usual...

24 years agoDeleted the stdwin-based test() function.
Guido van Rossum [Mon, 8 May 2000 17:29:50 +0000 (17:29 +0000)]
Deleted the stdwin-based test() function.

24 years agoDeleting all stdwin library modules.
Guido van Rossum [Mon, 8 May 2000 17:25:17 +0000 (17:25 +0000)]
Deleting all stdwin library modules.

24 years agoif the GzipFile constructor fails, the __del__ method is still
Jeremy Hylton [Mon, 8 May 2000 16:59:59 +0000 (16:59 +0000)]
if the GzipFile constructor fails, the __del__ method is still
called.  catch the resulting AttributeError and exit cleanly.

24 years agoTrent Mick:
Guido van Rossum [Mon, 8 May 2000 14:29:38 +0000 (14:29 +0000)]
Trent Mick:

Fix overflow bug in ldexp(x, exp). The 'exp' argument maps to a C int for the
math library call [double ldexp(double, int)], however the 'd'
PyArg_ParseTuple formatter was used to yield a double, which was subsequently
cast to an int. This could overflow.

[GvR: mysteriously, on Solaris 2.7, ldexp(1, 2147483647) returns Inf
while ldexp(1, 2147483646) raises OverflowError; this seems a bug in
the math library (it also takes a real long time to compute the
Inf outcome).  Does this point to a bug in the CHECK() macro?  It
should have discovered that the result was outside the HUGE_VAL range.]

24 years agoTrent Mick:
Guido van Rossum [Mon, 8 May 2000 14:15:19 +0000 (14:15 +0000)]
Trent Mick:

The following modules are specifically excluded in the Win64 build:
audioop, binascii, imageop, rgbimg. They are advertised as heavily 32-bit
dependent.  [They should probably be fixed!  --GvR]

24 years agoTrent Mick:
Guido van Rossum [Mon, 8 May 2000 14:14:48 +0000 (14:14 +0000)]
Trent Mick:

Changes to PC\config.[hc] for Win64. MSVC defines _WINxx to differentiate the
various windows platforms. Python's MS_WINxx are keyed off of these. Note
that _WIN32 (and hence MS_WIN32 in Python) are defined on Win32 *and* on
Win64. This is for compatibility reasons. The idea is that the common case is
that code specific to Win32 will also work on Win64 rather than being
specific to Win32 (i.e. there is more the same than different in WIn32 and
Win64).

The following modules are specifically excluded in the Win64 build:
audioop, binascii, imageop, rgbimg. They are advertised as heavily 32-bit
dependent.  [They should probably be fixed!  --GvR]

The patch to config.h looks big but it really is not. These are the effective
changes:
- MS_WINxx are keyed off _WINxx
- SIZEOF_VOID_P is set to 8 for Win64
- COMPILER string is changed appropriately for Win64

24 years agoTrent Mick:
Guido van Rossum [Mon, 8 May 2000 14:08:05 +0000 (14:08 +0000)]
Trent Mick:

Fix the string methods that implement slice-like semantics with
optional args (count, find, endswith, etc.) to properly handle
indeces outside [INT_MIN, INT_MAX]. Previously the "i" formatter
for PyArg_ParseTuple was used to get the indices. These could overflow.

This patch changes the string methods to use the "O&" formatter with
the slice_index() function from ceval.c which is used to do the same
job for Python code slices (e.g. 'abcabcabc'[0:1000000000L]). slice_index()
is renamed _PyEval_SliceIndex() and is now exported. As well, the return
values for success/fail were changed to make slice_index directly
usable as required by the "O&" formatter.

[GvR: shouldn't a similar patch be applied to unicodeobject.c?]

24 years agoTrent Mick:
Guido van Rossum [Mon, 8 May 2000 14:06:50 +0000 (14:06 +0000)]
Trent Mick:

Change static slice_index() to extern _PyEval_SliceIndex() (with
different return value interpretation: 0 for failure, 1 for success).

24 years agoTrent Mick:
Guido van Rossum [Mon, 8 May 2000 14:04:54 +0000 (14:04 +0000)]
Trent Mick:

Add declaration of PyEval_SliceIndex().

24 years agoTrent Mick:
Guido van Rossum [Mon, 8 May 2000 14:02:41 +0000 (14:02 +0000)]
Trent Mick:

Changes the 'b', 'h', and 'i' formatters in PyArg_ParseTuple to raise an
Overflow exception if they overflow (previously they just silently
overflowed).

Changes by Guido: always accept values [0..255] (in addition to
[CHAR_MIN..CHAR_MAX]) for 'b' format; changed some spaces into tabs in
other code.

24 years agoAndy Dustman: add GNU pth user-space thread support.
Guido van Rossum [Mon, 8 May 2000 13:41:38 +0000 (13:41 +0000)]
Andy Dustman: add GNU pth user-space thread support.

24 years agoUpdated for the 1.6a2 distribution: added a note about the special Tcl/Tk distributio...
Jack Jansen [Sun, 7 May 2000 22:08:42 +0000 (22:08 +0000)]
Updated for the 1.6a2 distribution: added a note about the special Tcl/Tk distribution, about Quicktime Exschange and a few minor updates.

24 years agoChanged for the new preference resource version.
Jack Jansen [Sun, 7 May 2000 22:07:26 +0000 (22:07 +0000)]
Changed for the new preference resource version.

24 years agoThe applets need more memory nowadays, it seems (because of navservices, maybe?)...
Jack Jansen [Sun, 7 May 2000 22:05:33 +0000 (22:05 +0000)]
The applets need more memory nowadays, it seems (because of navservices, maybe?). Give them 4M, that should be okay for a while.

24 years agoInstaller for 1.6a2. This is not the optimal location for the VCT file, it should...
Jack Jansen [Sun, 7 May 2000 22:04:27 +0000 (22:04 +0000)]
Installer for 1.6a2. This is not the optimal location for the VCT file, it should be one level higher, but I can't be bothered fixing that this time around.

24 years ago1.6a2 directive files.
Jack Jansen [Sun, 7 May 2000 22:02:30 +0000 (22:02 +0000)]
1.6a2 directive files.

24 years agoThese were never used, removed.
Jack Jansen [Sun, 7 May 2000 22:02:10 +0000 (22:02 +0000)]
These were never used, removed.

24 years agoMoved and renamed
Jack Jansen [Sun, 7 May 2000 22:01:21 +0000 (22:01 +0000)]
Moved and renamed

24 years agoDon't use 'set_option()' or 'get_option()' method -- direct attribute access,
Greg Ward [Sun, 7 May 2000 15:32:13 +0000 (15:32 +0000)]
Don't use 'set_option()' or 'get_option()' method -- direct attribute access,
or getattr/setattr, is all that's needed.

24 years agoGot rid of several little-used and not-very-useful methods: 'get_option()',
Greg Ward [Sun, 7 May 2000 15:30:31 +0000 (15:30 +0000)]
Got rid of several little-used and not-very-useful methods: 'get_option()',
'get_options()', 'get_command_option()', 'get_command_options()'.

24 years agoGot rid of some little-used and not-very-useful methods: 'get_option()' and
Greg Ward [Sun, 7 May 2000 15:29:15 +0000 (15:29 +0000)]
Got rid of some little-used and not-very-useful methods: 'get_option()' and
'get_options()'.

24 years agoTentative MkDistr scripts for 1.6a2.
Jack Jansen [Sat, 6 May 2000 23:13:47 +0000 (23:13 +0000)]
Tentative MkDistr scripts for 1.6a2.

24 years agoUpdated for 1.6a2.
Jack Jansen [Sat, 6 May 2000 23:01:07 +0000 (23:01 +0000)]
Updated for 1.6a2.

24 years agoPut the install folders in (vise), not vise, so the include files aren't accidentally...
Jack Jansen [Sat, 6 May 2000 22:34:20 +0000 (22:34 +0000)]
Put the install folders in (vise), not vise, so the include files aren't accidentally picked up by the normal build process.

24 years agoWe should define both USE_GUSI and USE_GUSI2.
Jack Jansen [Sat, 6 May 2000 22:32:35 +0000 (22:32 +0000)]
We should define both USE_GUSI and USE_GUSI2.

24 years agoAdded the ability to sneak extra flags onto the C compiler command line
Greg Ward [Sat, 6 May 2000 13:12:59 +0000 (13:12 +0000)]
Added the ability to sneak extra flags onto the C compiler command line
via an 'extra_compile_args' option in the 'build_info' dictionary.

24 years agoToby Dickenson:
Guido van Rossum [Sat, 6 May 2000 03:18:08 +0000 (03:18 +0000)]
Toby Dickenson:

Fix for problem with freeze when both "-m" and "-s service" options
are used.

(Blessed by MarkH)

24 years agoAdding projects to the repository again, this time in MacBinary form. If you have...
Jack Jansen [Fri, 5 May 2000 23:14:11 +0000 (23:14 +0000)]
Adding projects to the repository again, this time in MacBinary form. If you have added the MMPr filetype as "plain binary" in the MacCVS preferences you should revert this before doing this update.

Got rid of last references to GUSI1.

Upped for current python CVS status.

Various minor tweaks, I guess:-)

24 years agoRemoved string-exception preference, added tabcheck and NavService preference, upped...
Jack Jansen [Fri, 5 May 2000 23:11:14 +0000 (23:11 +0000)]
Removed string-exception preference, added tabcheck and NavService preference, upped version number.

24 years agoAuto-install on import, if NavServices is available. Unless a "no navservices" flag...
Jack Jansen [Fri, 5 May 2000 23:10:58 +0000 (23:10 +0000)]
Auto-install on import, if NavServices is available. Unless a "no navservices" flag is set Python automagically imports this module so code that uses macfs.xxxGetFile will get NavServices dialogs.

24 years agoGot rid of PyMem_XDEL.
Jack Jansen [Fri, 5 May 2000 23:09:16 +0000 (23:09 +0000)]
Got rid of PyMem_XDEL.

24 years agoGot rid of w/MSL in the version string.
Jack Jansen [Fri, 5 May 2000 23:08:47 +0000 (23:08 +0000)]
Got rid of w/MSL in the version string.

24 years agoAutomatically dump distribution folders where I want them, next to the vise scripts.
Jack Jansen [Fri, 5 May 2000 23:07:43 +0000 (23:07 +0000)]
Automatically dump distribution folders where I want them, next to the vise scripts.

24 years agoThe methods islower(), isupper(), isspace(), isdigit() and istitle()
Guido van Rossum [Fri, 5 May 2000 20:44:24 +0000 (20:44 +0000)]
The methods islower(), isupper(), isspace(), isdigit() and istitle()
gave bogus results for chars in the range 128-255, because their
implementation was using signed characters.  Fixed this by using
unsigned character pointers (as opposed to using Py_CHARMASK()).

24 years agoAdd two scenarios by Vladimir Marangozov that show how to use your own
Guido van Rossum [Fri, 5 May 2000 15:36:09 +0000 (15:36 +0000)]
Add two scenarios by Vladimir Marangozov that show how to use your own
allocator.

24 years agoQuick fix by Mark Hammond -- Yakov changed a dprintf call but it was
Guido van Rossum [Fri, 5 May 2000 14:29:59 +0000 (14:29 +0000)]
Quick fix by Mark Hammond -- Yakov changed a dprintf call but it was
referencing an undefined variable, so we better change it back.

24 years agoAlas, Vladimir's patch was too aggressive, and started causing really
Guido van Rossum [Fri, 5 May 2000 14:27:39 +0000 (14:27 +0000)]
Alas, Vladimir's patch was too aggressive, and started causing really
weird errors.  (E.g. see thread "weird bug in test_winreg" in python-dev.)

Since it's actually useful to be able to re-run an individual test
after running test.autotest, we keep the unloading code, but only for
modules whose full name starts with "test.".

24 years agoFast NonRecursiveMutex support by Yakov Markovitch, markovitch@iso.ru,
Guido van Rossum [Thu, 4 May 2000 18:47:15 +0000 (18:47 +0000)]
Fast NonRecursiveMutex support by Yakov Markovitch, markovitch@iso.ru,
who wrote:

Here's the new version of thread_nt.h.  More particular, there is a
new version of thread lock that uses kernel object (e.g. semaphore)
only in case of contention; in other case it simply uses interlocked
functions, which are faster by the order of magnitude.  It doesn't
make much difference without threads present, but as soon as thread
machinery initialised and (mostly) the interpreter global lock is on,
difference becomes tremendous.  I've included a small script, which
initialises threads and launches pystone.  With original thread_nt.h,
Pystone results with initialised threads are twofold worse then w/o
threads.  With the new version, only 10% worse.  I have used this
patch for about 6 months (with threaded and non-threaded
applications).  It works remarkably well (though I'd desperately
prefer Python was free-threaded; I hope, it will soon).

24 years agoWhen the UTF-8 conversion to Unicode fails, return an 8-bit string
Guido van Rossum [Thu, 4 May 2000 15:55:17 +0000 (15:55 +0000)]
When the UTF-8 conversion to Unicode fails, return an 8-bit string
instead.  This seems more robust than returning an Unicode string with
some unconverted charcters in it.

This still doesn't support getting truly binary data out of Tcl, since
we look for the trailing null byte; but the old (pre-Unicode) code did
this too, so apparently there's no need.  (Plus, I really don't feel
like finding out how Tcl deals with this in each version.)

24 years agoMark Hammond should get his act into gear (his words :-). Zero length
Guido van Rossum [Thu, 4 May 2000 15:52:20 +0000 (15:52 +0000)]
Mark Hammond should get his act into gear (his words :-).  Zero length
strings _are_ valid!

24 years agoAdded accessor for kControlListBoxDoubleClickPart
Jack Jansen [Thu, 4 May 2000 15:43:00 +0000 (15:43 +0000)]
Added accessor for kControlListBoxDoubleClickPart

24 years agoTwo changes to improve (I hope) Unicode support.
Guido van Rossum [Thu, 4 May 2000 15:07:16 +0000 (15:07 +0000)]
Two changes to improve (I hope) Unicode support.

1. In Tcl 8.2 and later, use Tcl_NewUnicodeObj() when passing a Python
Unicode object rather than going through UTF-8.  (This function
doesn't exist in Tcl 8.1, so there the original UTF-8 code is still
used; in Tcl 8.0 there is no support for Unicode.)  This assumes that
Tcl_UniChar is the same thing as Py_UNICODE; a run-time error is
issued if this is not the case.

2. In Tcl 8.1 and later (i.e., whenever Tcl supports Unicode), when a
string returned from Tcl contains bytes with the top bit set, we
assume it is encoded in UTF-8, and decode it into a Unicode string
object.

Notes:

- Passing Unicode strings to Tcl 8.0 does not do the right thing; this
isn't worth fixing.

- When passing an 8-bit string to Tcl 8.1 or later that has bytes with
the top bit set, Tcl tries to interpret it as UTF-8; it seems to fall
back on Latin-1 for non-UTF-8 bytes.  I'm not sure what to do about
this besides telling the user to disambiguate such strings by
converting them to Unicode (forcing the user to be explicit about the
encoding).

- Obviously it won't be possible to get binary data out of Tk this
way.  Do we need that ability?  How to do it?

24 years agoAdd useless 'return 1' to prtrace() to shut up VC++.
Guido van Rossum [Thu, 4 May 2000 00:55:17 +0000 (00:55 +0000)]
Add useless 'return 1' to prtrace() to shut up VC++.

24 years agoRaise ImportError when os.fork does not exist.
Guido van Rossum [Thu, 4 May 2000 00:36:42 +0000 (00:36 +0000)]
Raise ImportError when os.fork does not exist.

24 years agoFix warning detected by VC++ on assignment of Py_UNICODE to char.
Guido van Rossum [Wed, 3 May 2000 23:58:29 +0000 (23:58 +0000)]
Fix warning detected by VC++ on assignment of Py_UNICODE to char.

24 years agoVladimir Marangozov's long-awaited malloc restructuring.
Guido van Rossum [Wed, 3 May 2000 23:44:39 +0000 (23:44 +0000)]
Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.

(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode.  I'm also holding back on his
change to main.c, which seems unnecessary to me.)

24 years agoRemove all references to stdwin.
Guido van Rossum [Wed, 3 May 2000 22:34:12 +0000 (22:34 +0000)]
Remove all references to stdwin.

24 years ago>>Boing!<<
Guido van Rossum [Wed, 3 May 2000 22:33:14 +0000 (22:33 +0000)]
>>Boing!<<

Finally, this long-obsolete module bites the dust.

24 years agoVladimir Marangozov:
Guido van Rossum [Wed, 3 May 2000 22:30:13 +0000 (22:30 +0000)]
Vladimir Marangozov:

Change Py_Malloc/Realloc/Free calls to PyMem_Malloc/Realloc/Free +
PyErr_Nomemory on error check.  Py_Malloc c.s. are obsolete.

24 years agoA bit of cleanup:
Guido van Rossum [Wed, 3 May 2000 22:03:46 +0000 (22:03 +0000)]
A bit of cleanup:

- When 'import exceptions' fails, don't suggest to use -v to print the traceback;
  this doesn't actually work.
- Remove comment about fallback to string exceptions.
- Remove a PyErr_Occurred() check after all is said and done that can
  never trigger.
- Remove static function newstdexception() which is no longer called.

24 years agoSomeone found the examples of poor practice on socket addresses!
Fred Drake [Wed, 3 May 2000 19:40:32 +0000 (19:40 +0000)]
Someone found the examples of poor practice on socket addresses!
Spotted by Greg Kochanski <gpk@bell-labs.com>.

24 years agoBrian Hooper <brian_takashi@hotmail.com>:
Fred Drake [Wed, 3 May 2000 15:17:02 +0000 (15:17 +0000)]
Brian Hooper <brian_takashi@hotmail.com>:

Added 'u' and 'u#' tags for PyArg_ParseTuple - these turn a
PyUnicodeObject argument into a Py_UNICODE * buffer, or a Py_UNICODE *
buffer plus a length with the '#'.  Also added an analog to 'U'
for Py_BuildValue.

24 years agoClarify status of connection of a new instance; it *is* connected if
Fred Drake [Wed, 3 May 2000 15:11:47 +0000 (15:11 +0000)]
Clarify status of connection of a new instance; it *is* connected if
you pass server information to the constructor.  Error noted by Pedro
Diaz Jimenez <diazjimenez@ctv.es>.

24 years agoMark Hammond withdraws his fix -- the size includes the trailing 0 so
Guido van Rossum [Wed, 3 May 2000 12:27:22 +0000 (12:27 +0000)]
Mark Hammond withdraws his fix -- the size includes the trailing 0 so
a size of 0 *is* illegal.

24 years agoMark Hammond:
Guido van Rossum [Wed, 3 May 2000 11:03:24 +0000 (11:03 +0000)]
Mark Hammond:

Fixes the MBCS codec to work correctly with zero length strings.