]> granicus.if.org Git - python/log
python
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.

24 years agoMoved to the Compat folder (in case anyone still wants to try MPW building), it hasn...
Jack Jansen [Wed, 3 May 2000 08:42:26 +0000 (08:42 +0000)]
Moved to the Compat folder (in case anyone still wants to try MPW building), it hasn't been used for years.

24 years agoRemoved, the core-python getmtime works fine with GUSI2.
Jack Jansen [Wed, 3 May 2000 08:41:56 +0000 (08:41 +0000)]
Removed, the core-python getmtime works fine with GUSI2.

24 years agoMark Hammond to the rescue:
Guido van Rossum [Wed, 3 May 2000 02:44:55 +0000 (02:44 +0000)]
Mark Hammond to the rescue:

Checkin 2.131 of posixmodule.c changed os.stat on Windows, so that
"/bin/" type notation (trailing backslash) would work on Windows to
be consistent with Unix.

However, the patch broke the simple case of: os.stat("\\")

This did work in 1.5.2, and obviously should!

This patch addresses this, and restores the correct behaviour.

24 years agopatches from Mark Hammond
Jeremy Hylton [Tue, 2 May 2000 22:32:59 +0000 (22:32 +0000)]
patches from Mark Hammond

Attached is a set of diffs for the .py compiler that adds support
for the new extended call syntax.

compiler/ast.py:
CallFunc node gets 2 new children to support extended call syntax -
"star_args" (for "*args") and "dstar_args" (for "**args")

compiler/pyassem.py
It appear that self.lnotab is supposed to be responsible for
tracking line numbers, but self.firstlineno was still hanging
around.  Removed self.firstlineno completely.  NOTE - I didnt
actually test that the generated code has the correct line numbers!!

Stack depth tracking appeared a little broken - the checks never
made it beyond the "self.patterns" check - thus, the custom methods
were never called!  Fixed this.

(XXX Jeremy notes: I think this code is still broken because it
doesn't track stack effects across block bounaries.)

Added support for the new extended call syntax opcodes for depth
calculations.

compiler/pycodegen.py

Added support for the new extended call syntax opcodes.

compiler/transformer.py

Added support for the new extended call syntax.

24 years agopatches from Mark Hammond
Jeremy Hylton [Tue, 2 May 2000 22:29:46 +0000 (22:29 +0000)]
patches from Mark Hammond

compile.py:
On Windows, use 'nul' instead of '/dev/null'.

test.py:
Use double-quotes for the command-line, as Windows doesnt recognise
singles.

24 years agoDisable the ZEROTRAP code -- this turns a 0 byte into a 2 byte and I
Guido van Rossum [Tue, 2 May 2000 21:18:13 +0000 (21:18 +0000)]
Disable the ZEROTRAP code -- this turns a 0 byte into a 2 byte and I
don't think that's what we want.  There was some brief discussion
of this somewhere but I don't recall where.

24 years agoAdded an unused Unicode string for testing.
Barry Warsaw [Tue, 2 May 2000 19:28:30 +0000 (19:28 +0000)]
Added an unused Unicode string for testing.

24 years agoPyErr_GivenExceptionMatches(): Check for err==NULL and exc==NULL and
Barry Warsaw [Tue, 2 May 2000 19:27:51 +0000 (19:27 +0000)]
PyErr_GivenExceptionMatches(): Check for err==NULL and exc==NULL and
return 0 (exceptions don't match).  This means that if an ImportError
is raised because exceptions.py can't be imported, the interpreter
will exit "cleanly" with an error message instead of just core
dumping.

PyErr_SetFromErrnoWithFilename(), PyErr_SetFromWindowsErrWithFilename():
Don't test on Py_UseClassExceptionsFlag.

24 years ago_PyBuiltin_Init_2(): Remove the misleading comment.
Barry Warsaw [Tue, 2 May 2000 19:24:39 +0000 (19:24 +0000)]
_PyBuiltin_Init_2(): Remove the misleading comment.

24 years agoiniterrors(): Remove this function. String-based standard exceptions
Barry Warsaw [Tue, 2 May 2000 19:24:06 +0000 (19:24 +0000)]
initerrors(): Remove this function.  String-based standard exceptions
are no longer supported (i.e. -X option is removed).

_PyBuiltin_Init_1(): Don't call initerrors().  This does mean that it
is possible to raise an ImportError before that exception has been
initialized, say because exceptions.py can't be found, or contains
bogosity.  See changes to errors.c for how this is handled.

_PyBuiltin_Init_2(): Don't test Py_UseClassExceptionsFlag, just go
ahead and initialize the class-based standard exceptions.  If this
fails, we throw a Py_FatalError.

24 years agousage_mid: Remove the description of the -X flag; it's gone now.
Barry Warsaw [Tue, 2 May 2000 19:20:26 +0000 (19:20 +0000)]
usage_mid: Remove the description of the -X flag; it's gone now.

Py_Main(): Remove the 'X' case.

24 years agoPy_UseClassExceptionsFlag is deprecated. We keep the C variable for C
Barry Warsaw [Tue, 2 May 2000 19:18:59 +0000 (19:18 +0000)]
Py_UseClassExceptionsFlag is deprecated.  We keep the C variable for C
API consistency, but nothing sets it or checks it now.

24 years agoAt last, this backward compatibility file bites the dust.
Guido van Rossum [Tue, 2 May 2000 19:09:40 +0000 (19:09 +0000)]
At last, this backward compatibility file bites the dust.
If you still haven't updated your extension since the Grand Renaming,
you don't deserve Python 1.6. :-)

24 years agoIgnore a bunch of generated files.
Barry Warsaw [Tue, 2 May 2000 18:34:30 +0000 (18:34 +0000)]
Ignore a bunch of generated files.

24 years agoAdded descriptions of \versionadded and \versionchanged.
Fred Drake [Tue, 2 May 2000 17:43:44 +0000 (17:43 +0000)]
Added descriptions of \versionadded and \versionchanged.

24 years agodo_cmd_versionchanged():
Fred Drake [Tue, 2 May 2000 17:37:42 +0000 (17:37 +0000)]
do_cmd_versionchanged():
        Added support for optional parameter explaining the change
        that was made in the specified version.

24 years agoUse \versionchanged to indicate when the second parameter to utime()
Fred Drake [Tue, 2 May 2000 17:29:35 +0000 (17:29 +0000)]
Use \versionchanged to indicate when the second parameter to utime()
was allowed to be None.

24 years ago\versionchanged: Added optional parameter for explanation of change.
Fred Drake [Tue, 2 May 2000 17:28:36 +0000 (17:28 +0000)]
\versionchanged:  Added optional parameter for explanation of change.

24 years agoI know this is only a temporary stop-gap measure, but the match() and
Guido van Rossum [Tue, 2 May 2000 15:52:33 +0000 (15:52 +0000)]
I know this is only a temporary stop-gap measure, but the match() and
search() functions didn't even work because _fixflags() isn't
idempotent.  I'm adding another stop-gap measure so that you can at
least use sre.search() and sre.match() with a zero flags arg.

24 years agoCaolan McNamara:
Guido van Rossum [Tue, 2 May 2000 14:32:11 +0000 (14:32 +0000)]
Caolan McNamara:

telnetlib is unable to connect to a few telnet daemons because of
improper IAC handling, heres an attached oneliner to reject WILL
messages which will allow many more telnet daemons to work with it,
namely FreeBSD.

24 years agoSjoerd Mullender:
Guido van Rossum [Tue, 2 May 2000 13:49:13 +0000 (13:49 +0000)]
Sjoerd Mullender:

Bad % formatting.

24 years agoThe debug settings for zlib contained a bogus reference to msvcrt in
Guido van Rossum [Tue, 2 May 2000 12:44:22 +0000 (12:44 +0000)]
The debug settings for zlib contained a bogus reference to msvcrt in
the /nodefaultlib: option.