"""
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.
Fred Drake [Tue, 29 Jun 1999 21:21:19 +0000 (21:21 +0000)]
For "Matching vs. Searching", remove comment that the section is
incomplete; I don't remember what else I thought I was going to put
in, but it looks o.k. to me know.
Fred Drake [Tue, 29 Jun 1999 18:15:59 +0000 (18:15 +0000)]
Move the setting for secnumdepth to the document classes; make the numbering
for the manual class go one deeper than it previously did (\subsection
entries will now be numbered); no change for howto documents.
This makes it easier to refer precisely to smaller sections using \ref.
Fred Drake [Fri, 25 Jun 1999 17:52:17 +0000 (17:52 +0000)]
Update to Sjoerd's documentation of the chunk module, with some
additions from Moshe's version. Used my table for describing the
chunk format, and added some markup and index entries.
Guido van Rossum [Fri, 25 Jun 1999 16:06:29 +0000 (16:06 +0000)]
Add _close() method that does the actual cleanup (close() asks the
user what they want first if there's unsaved stuff, and may cancel).
It closes more than before.
Add unload_extensions() method to unload all extensions; called from
_close(). It calls an extension's close() method if it has one.
Guido van Rossum [Thu, 24 Jun 1999 17:58:44 +0000 (17:58 +0000)]
Clarify the example by explicitly importing the fcntl module -- this
avoid being fooled into thinking that fcntl and FCNTL are the same
thing -- they aren't! (fcntl is the extension, FCNTL.py is h2py
output that defines all the constants).
(XXX The example is still weird -- I think there's a more portable way
to do locking now. That's for someone else to fix...)
Guido van Rossum [Thu, 24 Jun 1999 15:27:36 +0000 (15:27 +0000)]
Sjoerd Mullender writes:
Urllib makes the URL of the opened file available through the geturl
method of the returned object. For local files, this consists of
file: plus the name of the file. This results in an invalid URL if
the file name was relative. This patch fixes this so that the
returned URL is just a relative URL in that case. When the file name
is absolute, the URL returned is of the form file:///absolute/path.
[I guess that a URL of the form "file:foo.html" is illegal... GvR]
Guido van Rossum [Wed, 23 Jun 1999 21:37:57 +0000 (21:37 +0000)]
Simplified version of a patch by Chih-Hao Huang, who wrote:
"""
When there are additional Setup files, specified by -e option of freeze,
checkextenstions.py assumes that *.o, *.a, -Lpath, and -Rpath are all
relative to where the Setup file is. select() inserts the path to the
Setup file to make them absolute. However, the assumption is not true.
There are cases that absolute paths are specified for them. The inserted
prefix, by select(), results in error.
The following fix check for absolute paths. The assumption is: an
absolute path begins with either '/' or '$'. In the latter case, it is
from the environmental variable. (Variables defined locally in the Setup
file have already been handled by expandvars())
"""
My version of the patch has been verified by Charles Waldman (a
colleague of Chih-Hao).