Greg Ward [Tue, 10 Aug 1999 20:09:38 +0000 (20:09 +0000)]
Allow comment characters (#) to be escaped:
- did away with 'comment_re' option -- it's just not that simple anymore
- heavily revised the main logic in 'readline()' to accomodate this
Beefed up 'warn()': 'line' can be list or tuple, and 'msg' is
automatically converted to a string.
Vladimir Marangozov fixes an AIX-specific problem, writing:
"""
Following up Robin Dunn's troubles with freeze, here's a patch that
fixes an oddity regarding the import logic of shared modules on AIX.
Symbol resolution of shared modules is now handled properly for the cases
when the python library is linked to a binary with an arbitrary name.
This includes the standard python[version] executable, but also applications
that are embedding the python core (i.e. linked with libpython[version].a,
the latter being static or shared).
"""
Jack Jansen [Wed, 4 Aug 1999 12:07:09 +0000 (12:07 +0000)]
Added available() method, which checks whether quicktime is installed at all (by
testing whether EnterMovies points to an actual routine or is a null pointer).
It turns out that modifying the environment strings is not safe.
Treat them as read-only, and make a copy as appropriately. This was
first reported by Bill Janssend and later by Craig Rowland and Ron
Sedlmeyer. This fix is mine.
Fred Drake [Tue, 3 Aug 1999 15:32:48 +0000 (15:32 +0000)]
remap_element_names(): Only used for things that the new conversion
engine in latex2esis.py can do, so discard it.
paragraph detection & markup: Handle some of the list-like
environments properly, picking up paragraphs inside
list items. (Only changed a few element-sets used for
recognition.)
fixup_refmodindexes_chunk(): Use the right attribute to determine the
module a <ref*modindex/> element is referring to.
convert(): Don't call remap_element_names(); it was removed.
Fred Drake [Mon, 2 Aug 1999 20:19:17 +0000 (20:19 +0000)]
Re-implementation of mktarball.sh as a more portable Python script;
with a more descriptive name.
Allow creation of multiple archive formats with a single pass; useful
in this case since it uses a fresh export/checkout from CVS to ensure
that the tree is "clean" (no build turds, saved files, &c). Use --all
to create all supported formats.
Fred Drake [Mon, 2 Aug 1999 14:46:15 +0000 (14:46 +0000)]
bwrite(), ewrite(): Helpers for diagnostic output; essentially the
same as sys.stderr.write(), but bwrite() will make it
bold if stderr is a tty (for visibility).
Use these everywhere instead of accessing
sys.stderr.write() directly.
find_all_child_elements(): Find all elements by type name that are
immediate children of another.
cleanup_synopses(): Receive both the document and fragment objects as
parameters; if only the document is passed, synopsis
information is never found since it's in the fragment!
build_para(): Add a chunk of code to ensure that a newline always
follows the </para> end-tag. Not really important, but
makes presentation consistent for authoring/
maintenance.
fixup_bifuncindexes_chunk(): Use find_all_child_elements() instead of
find_all_elements() so we don't work with too many
levels at once; that could cause DOM exceptions with
the <elem>.removeChild() method.
"""
If the filename being complained about contains a space, enclose the
file-name in quotes.
The reason is simply that when I try and parse tabnanny's output, filenames
with spaces make it very difficult to determine where the filename stops
and the linenumber begins!
"""
Tim approves.
I slightly changed the patch (use 'in' instead of string.find()) and
arbitrarily bumped the __version__ variable up to 6.
Remove some redundant code from Canvas.tag_bind(), which added all
bindings to a dictionary _tagcommands which was otherwise unused.
(This was checked in accidentally with rev. 1.125 and not deleted with
rev. 1.127 when the other half of this code was removed -- although
even as originally checked in the _tagcommands variable was never
used.)
Fred Drake [Thu, 29 Jul 1999 22:22:13 +0000 (22:22 +0000)]
Massive changes.
Separate the Conversion class into a base and a subclass; the subclass
is pretty minimal but the separation is useful for....
NewConversion: New class that implements a somewhat different
approach to the conversion. This uses a table of
instances (rather than tuples) that have more
information than the tuples used for the older
conversion procedure. This allows a lot more control
over the conversion, and it seems to be pretty
stable.
TableEntry,
Parameter: New classes that are used to build the conversion
specification used by NewConversion.
TableParser: xmllib.XMLParser subclass that builds a conversion
specification from an XML document.
load_table(): Convenience function that loads a table from a file.
main(): Added flags --new and --old; these select which conversion is
used. The default is --new.
Several fixes have been made in the old conversion as well; these were
done before writing & switching to the new conversion, and should be
archived.
The next checkin of this file will discard the old conversion; is is
kept in this checkin to allow it to be retrieved if needed, and to
avoid lossing the bugfixes that have been made to it in the interim.
Fred Drake [Thu, 29 Jul 1999 22:03:11 +0000 (22:03 +0000)]
Conversion specification, used by a new path through latex2esis.py.
The specific markup conversion is coded here instead of an even more
cryptic table in the code of latex2esis.py.
Barry Warsaw [Wed, 28 Jul 1999 21:59:43 +0000 (21:59 +0000)]
(python-mode): Set which interpreter (CPython or JPython) to use the
first time a py buffer is visited during the Emacs session. This
ensures that py-which-shells is initialized and also guarantees that
the mode lines reflect the correct shell. First bug found by GvR,
second one has long bugged :) me.
(py-toggle-shells): Programmatically, arg can also take the symbols
`cpython' or `jpython', which makes it easy to call with the value of
py-default-interpreter.
(py-shell): Don't need to initialize py-which-* variables since these
will guarantee to be initialized by python-mode when the first py
buffer is visited.
"""
Here's a patch for the ForkingMixIn which will prevent the server from
forking itself into the ground. Note: I've tested a very similar patch
(subclassed ForkingMixIn) but not actually tested this one. As you might
surmise, this was done out of necessity...
If the maximum number of children are already running, block while waiting
for a child to exit.
"""
(I added that last sentence as a comment to the code --GvR.)
Fred Drake [Thu, 22 Jul 1999 13:56:51 +0000 (13:56 +0000)]
Make the default target xml instead of sgml.
Use a temporary file to pass results from latex2esis.py to
docfixer.py; this makes for better error detection by make (if the
first pipeline stage fails, make wasn't catching it).
"""
It fixes a memory corruption error resulting from BadPickleGet
exceptions in load_get, load_binget and load_long_binget. This was
initially reported on c.l.py as a problem with Cookie.py; see the thread
titled "python core dump (SIGBUS) on Solaris" for more details.
If PyDict_GetItem(self->memo, py_key) call failed, then py_key was being
Py_DECREF'd out of existence before call was made to
PyErr_SetObject(BadPickleGet, py_key).
The bug can be duplicated as follows:
import cPickle
cPickle.loads('garyp')
This raises a BadPickleGet exception whose value is a freed object. A
core dump will soon follow.
"""
Barry Warsaw [Mon, 12 Jul 1999 18:37:02 +0000 (18:37 +0000)]
AddrlistClass.getaddress(): when parsing `:'s, in the loop, watch out
for gotonext() pushing self.pos past the end of the string. This can
happen if the message has a To field like "To: :" and you call
msg.getaddrlist('to').
Fred Drake [Mon, 12 Jul 1999 16:49:30 +0000 (16:49 +0000)]
Move chdir() and getcwd() descriptions to "Files and Directories" with
a pointer from the "Process Parameters" section. Based on comments
from Aahz Maruch, Tim Peters, and GvR.
Marc-Andre Lemburg discovered that the switch from .pyc to .pyo files,
done by _PyImport_Init(), comes to late to affect the import of
exceptions.py by _PyBuiltin_Init_2(). Move _PyImport_Init() up few lines.
Fred Drake [Wed, 7 Jul 1999 13:42:56 +0000 (13:42 +0000)]
Move some misc. comments from the example section to the main section.
Use the lowercase versions of the method names in the example, since
that's what's documented (Greg Stein's suggestion). Add a blank line
after the import line for clarity.
Barry Warsaw [Tue, 6 Jul 1999 22:00:52 +0000 (22:00 +0000)]
make_view_popups(): Catch import error which can occur if a viewer is
dynamically imported when Pynche is running via askcolor out of a
package. If the ImportError occurs, try again, prepending the package
name and digging out the module.
Milton L. Hankin reports that on Windows it is possible to have two
different values in the environ dict with the same key (although he
couldn't explain exactly how this came to be). Since getenv() uses
the first one, Python should do too. (Some doubts about case
sensitivity, but for now this at least seems the right thing to do
regardless of platform.)
In splithost, accept empty host part in URLs. This is required for
file URLs that can have an empty host part. For such URLs, we should
not return the initial 2 slashes as part of the file name.
Fred Drake [Thu, 1 Jul 1999 13:54:40 +0000 (13:54 +0000)]
Per Frank Stajano's suggestion, state explicitly that the functions
described in the sub-sections are directly available at the module
level. He found this confusing.