Guido van Rossum [Tue, 12 Dec 2000 15:24:57 +0000 (15:24 +0000)]
Typo detected by "the miraculous Debian package lint tool "lintian"
(http://package.debian.org/lintian), which includes a spellchecker for
common typos in control files of packages... You see, we're so
paranoid that we even have automatic tools that keep monitoring
license files ;-)" (Gregor Hoffleit)
Changed .getaliases() support to register the new aliases in the
encodings package aliases mapping dictionary rather than in the
internal cache used by the search function.
This enables aliases to take advantage of the full normalization
process applied to encoding names which was previously not available.
The patch restricts alias registration to new aliases. Existing
aliases cannot be overridden anymore.
Tim Peters [Tue, 12 Dec 2000 01:58:56 +0000 (01:58 +0000)]
Partial fix for SF bug 122780 (msvcrt.locking constants aren't defined).
Still needs docs; see bug report (which was reassigned to Fred) for MS's docs.
Guido van Rossum [Mon, 11 Dec 2000 20:32:20 +0000 (20:32 +0000)]
Hoepeful fix for SF bug #123924: Windows - using OpenSSL, problem with
socket in httplib.py.
The bug reports that on Windows, you must pass sock._sock to the
socket.ssl() call. But on Unix, you must pass sock itself. (sock is
a wrapper on Windows but not on Unix; the ssl() call wants the real
socket object, not the wrapper.)
So we see if sock has an _sock attribute and if so, extract it.
Unfortunately, the submitter of the bug didn't confirm that this patch
works, so I'll just have to believe it (can't test it myself since I
don't have OpenSSL on Windows set up, and that's a nontrivial thing I
believe).
Fred Drake [Mon, 11 Dec 2000 15:50:07 +0000 (15:50 +0000)]
select.select(): Add note that though this function accepts empty lists,
using *only* empty lists may not be acceptable on all
platforms, with the specific caveat that it does not
work on Windows. Also clarified list of acceptable
objects that may be in the lists, to let the user know
that file objects are not usable here on Windows.
Fred Drake [Thu, 7 Dec 2000 04:54:02 +0000 (04:54 +0000)]
Fix error noted by Gerrit Holl (old; had been buried in my INBOX):
sequence repitition works just fine with long integers now, so we
should not say that only plain integers are allowed.
Fred Drake [Thu, 7 Dec 2000 04:49:34 +0000 (04:49 +0000)]
Added a note that objects which emulate built-in types should only
implement as many of the relevant methods as make sense for the particular
information being modelled.
Barry Warsaw [Wed, 6 Dec 2000 21:47:46 +0000 (21:47 +0000)]
_getframe(): New sys module function for getting at the stack frame.
Implements and closes SF patch #102106, with Guido's suggested
documentation changes.
Two changes:
- Use new Error class (subclass of RuntimeError so is backward
compatible) which is raised when RuntimeError used to be raised.
- Report original attribute name in error messages instead of name
mangled with namespace URL.
Make isinstance() more permissive in what types of arguments it
accepts. Clarify exception messages for isinstance() and
issubclass(). Closes bug #124106.
Tim Peters [Fri, 1 Dec 2000 07:59:35 +0000 (07:59 +0000)]
Made the description of %[udxXo] formats of negative longs in 2.1 more accurate.
I suggested to Guido that %u be deprecated (it seems useless in Python to me).
Fred Drake [Thu, 30 Nov 2000 07:12:54 +0000 (07:12 +0000)]
Use small tables instead of bare \item markers to describe the contents
of return tuples. The bare \item took advantage of an implementation
detail when formatting in LaTeX, and was just wrong when generating HTML.
It also broke the XML conversion scripts, since there was no enclosing
list-like environment to contain them.
Fred Drake [Wed, 29 Nov 2000 15:48:22 +0000 (15:48 +0000)]
In the first discussion showing how to handle exceptions from C, make the
Python equivalent actually equivalent to the C code. Also, in the C code,
place the "goto" statements on a line by themselves for better visibility
of statements that affect control flow.
Fred Drake [Wed, 29 Nov 2000 06:10:22 +0000 (06:10 +0000)]
Substantial re-organization of the DOM documentation. The abstract API
is now separated from the supplied standard implementation. Not all
interfaces are documented yet, but the structure is better set up to do
so.
There is still a lot to do here, but the shape of the documentation is
coming into line.
Fred Drake [Tue, 28 Nov 2000 16:20:50 +0000 (16:20 +0000)]
Use a subclass of buildindex.Node to clean up the HTML and get the
ordering fixed up (this makes sure that "xml.dom" comes before
"xml.dom.minidom" in the Module Index, which was not true before because
some HTML cruft crept into the data structures).
Guido van Rossum [Mon, 27 Nov 2000 22:22:36 +0000 (22:22 +0000)]
Plug a memory leak in com_import_stmt(): the tuple created to hold the
"..." in "from M import ..." was never DECREFed. Leak reported by
James Slaughter and nailed by Barry, who also provided an earlier
version of this patch.
Fred Drake [Wed, 22 Nov 2000 16:06:16 +0000 (16:06 +0000)]
Do not use \verb in the Python documentation -- it makes parsing the LaTeX
sources more difficult and other tools do not always work well with it.
Since we have better markup for this case, just fix it.
Fred Drake [Tue, 21 Nov 2000 22:02:43 +0000 (22:02 +0000)]
testInsertBefore(): Rewritten to actually test insertBefore() somewhat.
testAAA(),
testAAB(): Added checks that the results are right.
testTooManyDocumentElements(): Added code to actually test this.
testCloneElementDeep()
testCloneElementShallow(): Filled these in with test code.
_testCloneElementCopiesAttributes(),
_setupCloneElement(): Helper functions used with the other
testCloneElement*() functions.
testCloneElementShallowCopiesAttributes(): No longer a separate test;
_setupCloneElement() uses _testCloneElementCopiesAttributes() to
test that this is always done.
Fred Drake [Tue, 21 Nov 2000 22:02:22 +0000 (22:02 +0000)]
Reduce the visibility of imported modules for cleaner "from ... import *"
behavior.
Added support for the Attr.ownerElement attribute.
Everywhere: Define constant object attributes in the classes rather than
on the instances during object construction. This reduces the amount of
work needed for object construction and destruction; these need to be
lightweight operations on a DOM.
Node._get_firstChild(),
Node._get_lastChild(): Return None if there are no children (required for
compliance with DOM level 1).
Node.insertBefore(): If refChild is None, append the new node instead of
failing (required for compliance). Also, update the sibling
relationships. Return the inserted node (required for compliance).
Node.appendChild(): Update the parent of the appended node.
Node.replaceChild(): Actually replace the old child! Update the parent
and sibling relationships of both the old and new children. Return
the replaced child (required for compliance).
Node.normalize(): Implemented the normalize() method. Required for
compliance, but missing from the release. Useful for joining
adjacent Text nodes into a single node for easier processing.
Node.cloneNode(): Actually make this work. Don't let the new node share
the instance __dict__ with the original. Do proper recursion if
doing a "deep" clone. Move the attribute cloning out of the base
class, since only Element is supposed to have attributes.
Node.unlink(): Simplify handling of child nodes for efficiency, and
remove the attribute handling since only Element nodes support
attributes.
Attr.cloneNode(): Extend this to clear the ownerElement attribute in
the clone.
Jack Jansen [Sun, 19 Nov 2000 21:53:15 +0000 (21:53 +0000)]
Added MathLib and InterfaceLib. Added Python:Include so #include "package/file.h" works. Moved bits around so now at least Numeric with Distutils builds and instals.