Commit Graph

12609 Commits

Author SHA1 Message Date
Barry Warsaw 48719d3d1f _PyBuiltin_Init_2(): Remove the misleading comment. 2000-05-02 19:24:39 +00:00
Barry Warsaw 47eeb9bdad 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.
2000-05-02 19:24:06 +00:00
Barry Warsaw 57e11ae847 usage_mid: Remove the description of the -X flag; it's gone now.
Py_Main(): Remove the 'X' case.
2000-05-02 19:20:26 +00:00
Barry Warsaw 3ce096459e Py_UseClassExceptionsFlag is deprecated. We keep the C variable for C
API consistency, but nothing sets it or checks it now.
2000-05-02 19:18:59 +00:00
Guido van Rossum e326b1efe2 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. :-)
2000-05-02 19:09:40 +00:00
Barry Warsaw ee98e4e75d Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
Fred Drake c26cc91c0c Added descriptions of \versionadded and \versionchanged. 2000-05-02 17:43:44 +00:00
Fred Drake 52e7684af1 do_cmd_versionchanged():
Added support for optional parameter explaining the change
        that was made in the specified version.
2000-05-02 17:37:42 +00:00
Fred Drake e06d025e00 Use \versionchanged to indicate when the second parameter to utime()
was allowed to be None.
2000-05-02 17:29:35 +00:00
Fred Drake a6e8339e61 \versionchanged: Added optional parameter for explanation of change. 2000-05-02 17:28:36 +00:00
Guido van Rossum 1b6aecb08c 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.
2000-05-02 15:52:33 +00:00
Guido van Rossum 823eb4ba81 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.
2000-05-02 14:32:11 +00:00
Guido van Rossum ce33eb3ee8 Sjoerd Mullender:
Bad % formatting.
2000-05-02 13:49:13 +00:00
Guido van Rossum 26af93cf35 The debug settings for zlib contained a bogus reference to msvcrt in
the /nodefaultlib: option.
2000-05-02 12:44:22 +00:00
Guido van Rossum 0e4f657a50 Marc-Andre Lemburg:
Fixed \OOO interpretation for Unicode objects. \777 now
correctly produces the Unicode character with ordinal 511.
2000-05-01 21:27:20 +00:00
Guido van Rossum 96774c1347 Marc-Andre Lemburg:
Changed all references to the MAGIC constant to use a global
pyc_magic instead. This global is initially set to MAGIC, but can be
changed by the _PyImport_Init() function to provide for
special features implemented in the compiler which are settable
using command line switches and affect the way PYC files are
generated.

Currently this change is only done for the -U flag.
2000-05-01 20:19:08 +00:00
Guido van Rossum d67ddbbec1 Eric Raymond:
(1) Added and documented the capability for shlex to handle
lexical-level inclusion and a stack of input sources.  Also, the input
stream member is now documented, and the constructor takes an optional
source-filename.  The class provides facilities to generate error
messages that track file and line number.

(2) Add a convenience function to generate C-compiler style error
leaders.
2000-05-01 20:14:47 +00:00
Guido van Rossum 4b83ecbbaa Eric Raymond:
Add a convenience function to generate C-compiler style error leaders.
2000-05-01 20:14:12 +00:00
Guido van Rossum eb4e11ae44 Eric Raymond:
Added and documented the capability for shlex to handle lexical-level
inclusion and a stack of input sources.  Also, the input stream member
is now documented, and the constructor takes an optional source-filename.
The class provides facilities to generate error messages that track
file and line number.

[GvR: I changed the __main__ code so that it actually stops at EOF, as
Eric surely intended -- however it returned '' instead of the None he
was testing for.]
2000-05-01 20:08:46 +00:00
Guido van Rossum b16d197d66 Marc-Andre Lemburg:
Added Py_UnicodeFlag for use by the -U command line option.
2000-05-01 17:55:15 +00:00
Guido van Rossum fdc8bdb67b Marc-Andre Lemburg:
Support for the new -U command line option option:
with the option enabled the Python compiler
interprets all "..." strings as u"..." (same with r"..." and
ur"...").
2000-05-01 17:54:56 +00:00
Guido van Rossum c15a9a1f98 Marc-Andre Lemburg:
Added -U command line option.

With the option enabled the Python compiler interprets all "..."
strings as u"..." (same with r"..." and ur"...").
2000-05-01 17:54:33 +00:00
Guido van Rossum 22b65a8edc Robin Becker: The following patch seems to fix a module case bug in
1.6a2 caused by wrong return values in routine allcaps83.  [GvR: I
also changed the case for end-s>8 to return 0.]
2000-05-01 17:36:58 +00:00
Barry Warsaw 93a8eacde5 Document the new additional signature for utime(). In addition to the
previous functionality utime(path, (atime, mtime)), now allowed is
utime(path, None) which sets the file's times to the current time.
2000-05-01 16:18:22 +00:00
Guido van Rossum d58c26fec6 Marc-Andre Lemburg:
The two methods .readline() and .readlines() in StreamReaderWriter
didn't define the self argument. Found by Tom Emerson.
2000-05-01 16:17:32 +00:00
Barry Warsaw 3cef856dd9 posix_utime(): Allow the second argument to be None, which invokes the
utime(path, NULL) call, setting the atime and mtime of the file to the
current time.  The previous signature utime(path, (atime, mtime)) is
of course still allowed.
2000-05-01 16:17:24 +00:00
Guido van Rossum 6650320349 Get rid of memory leak caused by assingning sys.exc_info() to a local.
Store sys.exc_info()[:2] instead.
2000-04-28 20:39:58 +00:00
Guido van Rossum 1cb6cd0ec5 As Marc-Andre Lemburg points out, the magic number needs to change
because we've added Unicode marshalling to the repertoire.
2000-04-28 19:03:54 +00:00
Fred Drake 40ee7acb95 \file and \filenq should not be used in section titles; they are not
sufficiently robust to survive the creation of bookmarks in the PDF
format.
2000-04-28 18:17:23 +00:00
Fred Drake 20bab56118 Don't worry about the output dirs for the distutils manuals. 2000-04-28 17:45:27 +00:00
Fred Drake 8187cb9664 Added distutils manuals.
Made the attributes more XHTML-friendly.
2000-04-28 17:43:12 +00:00
Greg Ward e78298a6bd Stripped leading 'sec:' from all section labels -- generates bad filenames,
bad link URLs in HTML, etc.
2000-04-28 17:12:24 +00:00
Greg Ward e9792c4563 When building HTML releases, refer to */*.css and */*.html instead of
???/*.css and ???/*.html -- need to pick up the Distutils manuals!
2000-04-28 17:09:17 +00:00
Greg Ward 3abb104356 Added the Distutils manuals. 2000-04-28 17:05:41 +00:00
Greg Ward 0784c335f3 Added the Distutils manuals: inst and dist. 2000-04-28 17:03:26 +00:00
Greg Ward 0862f800d0 Added 'inst' and 'dist' -- the two Distutils manuals. 2000-04-28 16:53:36 +00:00
Guido van Rossum a2ace6ae25 Charles G Waldman:
Follow a suggestion in an /*XXX*/ comment [in com_add()] to speed up
compilation by using supplemental dictionaries to keep track of names
and constants, eliminating quadratic behavior.  With this patch in
place, the time to import a 5000-line file with lots of constants [at
the global level] is reduced from 20 seconds to under 3 on my system.
2000-04-28 16:42:25 +00:00
Fred Drake 3c3507fd4f Documentation patch describing the 'u' and 'u#' format specifiers,
from Brian Hooper <brian_takashi@hotmail.com>.
2000-04-28 14:43:33 +00:00
Fred Drake 25d34473c3 Brian Hooper <brian_takashi@hotmail.com>:
Here's a patch which changes modsupport to add 'u' and 'u#',
to support building Unicode objects from a null-terminated
Py_UNICODE *, and a Py_UNICODE * with length, respectively.

[Conversion from 'U' to 'u' by Fred, based on python-dev comments.]

Note that the use of None for NULL values of the Py_UNICODE* value is
still in; I'm not sure of the conclusion on that issue.
2000-04-28 14:42:37 +00:00
Guido van Rossum 6664bb87dc Sjoerd Mullender: cmp.py is obsolete... 2000-04-28 13:31:52 +00:00
Guido van Rossum eca4784781 Mark Hammond: For Windows debug builds, we now only offer to dump
remaining object references if the environment variable PYTHONDUMPREFS
exists.  The default behaviour caused problems for background or
otherwise invisible processes that use the debug build of Python.
2000-04-27 23:44:15 +00:00
Jeremy Hylton 7c4f96f442 Deviant1 didn't work as advertised 2000-04-27 21:42:48 +00:00
Jeremy Hylton 37b1a26c89 add list_contains and tuplecontains: efficient implementations of tp_contains 2000-04-27 21:41:03 +00:00
Jeremy Hylton 035a07e263 add some more contains tests on the builtin types 2000-04-27 21:40:08 +00:00
Fred Drake 638ae9d0bb Support for the special macros used by the distutils documentation. 2000-04-27 21:27:49 +00:00
Guido van Rossum 8823accd1f Marc-Andre Lemburg:
Fixes a memory leak found by Fredrik Lundh.
2000-04-27 20:14:31 +00:00
Guido van Rossum ec5b776998 Marc-Andre Lemburg:
Doc strings can now be given as Unicode strings.
2000-04-27 20:14:13 +00:00
Guido van Rossum 3c1bb8043f Marc-Andre Lemburg:
Fixed a reference leak in the allocator.

Renamed utf8_string to _PyUnicode_AsUTF8String() and made
it external for use by other parts of the interpreter.
2000-04-27 20:13:50 +00:00
Guido van Rossum 700c6ff1fb Marc-Andre Lemburg:
Fixed a memory leak found by Fredrik Lundh.  Instead of
PyUnicode_AsUTF8String() we now use _PyUnicode_AsUTF8String() which
returns the string object without incremented refcount (and assures
that the so obtained object remains alive until the Unicode object is
garbage collected).
2000-04-27 20:13:18 +00:00
Greg Ward 38c28e379c Added a note to the section on 'exec' about the need for a trailing newline
in certain circumstances.  (Apparently, this is a CPython problem.)
2000-04-27 18:32:02 +00:00