Fix some problems that a picky SGI compiler reported. Two were benign
(unreachable break after a return) but one was a real bug:
ReadFrames() was getting a bogus framecount because of a missing '&'.
Sigh. The hack to enable special treatment for errno on SGI machines
must be enabled here, otherwise the errno we set on overflows is not
the errno that's being read by compile.c. Wonder how many other files
that do their own "#include config.h" need this too :-(
(Because of the structure of autoconf, it's not so simple to get this
into config.h...)
(1) reorder the tests for -Olimit 1500 and -OPT:Olimit=0 so that the
latter test is performed first, and if it works, the former test is
skipped. This should get rid of the problem that the new SGI
compilers accept both but emit a warning about -Olimit 1500.
(2) The DGUX hack was somehow split in two by the Olimit tests,
probably as the result of a non-context diff. Moved this back
together again, after the Olimit tests.
Barry Warsaw [Tue, 7 Jul 1998 17:45:38 +0000 (17:45 +0000)]
(py-beginning-of-def-or-class, py-end-of-def-or-class,
py-mark-def-or-class): Integrated Michael Ernst latest patches.
Primarily, it allows functions that search or mark defs/classes based
on programmatic specification, to take an 'either flag value which
allows searching for both classes and defs (stopping at the nearest
construct).
Barry Warsaw [Tue, 7 Jul 1998 15:11:24 +0000 (15:11 +0000)]
(py-comment-indent-function): A replacement for
comment-indent-function's default lambda value (in simple.el), this
version finally kills this nit: auto-filling a comment that starts in
column zero with filladapt turned off would cascade the #'s to the
right.
Now auto-filling seems to work with or without filladapt, and with the
comment starting in any column.
Added back the description of the exec statement. It appears that I
accidentally cut it out when removing the access statement! Added a
paragraph on __builtins__ and other possible manipulations of the key
space of the dictionaries. Added some index entries.
On Windows, put the select file descriptor arrays on the heap.
This is because they are huge and the stack is limited on Windows.
Other platforms keep declaring it on the stack.
Barry Warsaw [Wed, 1 Jul 1998 20:41:12 +0000 (20:41 +0000)]
Several changes:
1. Convert to using re module
2. Added two new exception classes
a. MissingSectionHeaderError which signals an early parsing
exception when options appear in the file before any section
header. Previously a bogus TypeError was thrown deeper down.
b. ParsingError which collates any non-fatal parsing errors.
ConfigParser.read() will raise this after the entire file was
parsed if any errors occurred during parsing (client could just
catch the exception and continue, because the ConfigParser
instance would still be initialized with the valid data).
(small note: Error.__msg => Error._msg)
3. ConfigParser.__read() now uses re which has the following minor
semantic change: underscore is now allowed in section header and
option name. Also, because of the old regexps, theoretically.
Fixed continuation line bug reported by F. Lundh.
4. It seemed that the old ConfigParser automatically added the option
`name' to every section, which contained the name of the section.
This seemed bogus to me so I took it out.
Added a section to the chapter on modules, describing the package system.
The text is almost completely from GvR's essay on packages; some
introductory paragraphs have been removed, and everything after the
'Details' section in the HTML has been dropped (seems too technical). A
paragraph has been added after the sample package layout stating that there
must be a file called__init__.py in a directory to make it a package.
Guido van Rossum [Mon, 29 Jun 1998 23:17:16 +0000 (23:17 +0000)]
Fix by Sjoerd Mullender to support symbolic links and make a backup of
.mirrorinfo. Fix by me to call string.lstrip(filename) to cope with a
bug in strop.strip() in Python 1.4. Additionally, I changed all print
statements that print filenames etc. to put them in backquotes so that
it will be more obvious when there's a funny character on one of them
(such as a space...).
Guido van Rossum [Mon, 29 Jun 1998 20:32:57 +0000 (20:32 +0000)]
For completeness, add a dummy load_package() method to RHooks. It
should never be called, so this isn't really needed, but this
signifies that rexec now supports packages -- because ihooks does.
Guido van Rossum [Mon, 29 Jun 1998 20:29:08 +0000 (20:29 +0000)]
Added findall() to RegexObject -- return a list of all matches in a
string. Added groupdict() to MatchObject -- return the named groups
as a dict. Added default argument to groups() to specify what to
return for unmatching groups; groupdict() also has this.
Guido van Rossum [Sat, 27 Jun 1998 21:53:17 +0000 (21:53 +0000)]
Windows-specific hack to make sure that when LoadLibrary() is called,
the filename contains at least a rudimentary pathname.
(The bad part is that we need to call getcwd() because only a prefix
of ".\\" is not enough -- we prefix the drive letter.)
Guido van Rossum [Sat, 27 Jun 1998 18:25:44 +0000 (18:25 +0000)]
Document optional kwargs argument to start_new_thread(). Also
document new LockType and reverse the preference for exit()
vs. exit_thread() -- exit() is now preferred and exit_thread() is
obsolete.
Jack Jansen [Fri, 26 Jun 1998 14:56:00 +0000 (14:56 +0000)]
Mac version of freeze. Uses standard freeze modules where it can,
augmenting them here and there. For now, it works more-or-less similar
to unix/windows freeze, generating a config.c file, but storing
modules in PYC resources. A template project is also copied.
The hooks are in place to freeze by merging shared libraries so you
can freeze without a C compiler/linker, but this does not work yet.
Guido van Rossum [Tue, 23 Jun 1998 19:31:19 +0000 (19:31 +0000)]
Subsume the interact() function in a class. This should make it
possible to use this in PythonWin, and to replace Fredrik Lundh's
PythonInterpreter class. Fredrik is credited with the class' API.