]> granicus.if.org Git - python/log
python
21 years agosave_dict(): Untangled most of the bin-vs-not-bin logic. Also used
Tim Peters [Tue, 28 Jan 2003 01:34:43 +0000 (01:34 +0000)]
save_dict():  Untangled most of the bin-vs-not-bin logic.  Also used
iteritems() instead of materializing a (possibly giant) list of the
items.

21 years agosave_list(): Rewrote, to untangle the proto 0 from the proto 1 cases.
Tim Peters [Tue, 28 Jan 2003 01:15:46 +0000 (01:15 +0000)]
save_list():  Rewrote, to untangle the proto 0 from the proto 1 cases.
The code is much easier to follow now, and I bet it's faster too.

21 years agosave_list(): removed unused local "d".
Tim Peters [Tue, 28 Jan 2003 01:07:48 +0000 (01:07 +0000)]
save_list():  removed unused local "d".

21 years agosave_list(): removed unused local "memo".
Tim Peters [Tue, 28 Jan 2003 01:07:10 +0000 (01:07 +0000)]
save_list():  removed unused local "memo".

21 years agosave_pers(): Switched the order of cases, to get rid of a "not", and to
Tim Peters [Tue, 28 Jan 2003 01:03:10 +0000 (01:03 +0000)]
save_pers():  Switched the order of cases, to get rid of a "not", and to
make the bin-vs-not-bin order consistent with what other routines try to
do (they almost all handle the bin case first).

21 years agoSeveral routines appeared to inline the guts of memoize(), possibly for
Tim Peters [Tue, 28 Jan 2003 01:00:38 +0000 (01:00 +0000)]
Several routines appeared to inline the guts of memoize(), possibly for
some notion of low-level efficiency.  Undid that, but left one routine
alone:  save_inst() claims it has a reason for not using memoize().
I don't understand that comment, so added an XXX comment there.

21 years agosave(): Fiddled the control flow to put the normal case where it
Tim Peters [Tue, 28 Jan 2003 00:48:09 +0000 (00:48 +0000)]
save():  Fiddled the control flow to put the normal case where it
belongs.  This is a much smaller change than it may appear:  the bulk
of the function merely got unindented by one level.

21 years agoAdded XXX about save()'s special-casing of tuples -- I don't get it.
Tim Peters [Tue, 28 Jan 2003 00:43:26 +0000 (00:43 +0000)]
Added XXX about save()'s special-casing of tuples -- I don't get it.

21 years agosave_bool(): simplified.
Tim Peters [Tue, 28 Jan 2003 00:26:14 +0000 (00:26 +0000)]
save_bool():  simplified.

21 years agoRepaired grammar in new comment.
Tim Peters [Tue, 28 Jan 2003 00:24:43 +0000 (00:24 +0000)]
Repaired grammar in new comment.

21 years agoclear_memo(): Repaired grammar in docstring.
Tim Peters [Tue, 28 Jan 2003 00:23:36 +0000 (00:23 +0000)]
clear_memo():  Repaired grammar in docstring.

21 years agoAdded one-line comments to the proto 2 opcodes.
Tim Peters [Tue, 28 Jan 2003 00:22:12 +0000 (00:22 +0000)]
Added one-line comments to the proto 2 opcodes.

21 years agoUse proper function name in exception messages
Neal Norwitz [Tue, 28 Jan 2003 00:20:41 +0000 (00:20 +0000)]
Use proper function name in exception messages

21 years agoRemoved the new LONG2 opcode: it's extravagant. If LONG1 isn't enough,
Tim Peters [Tue, 28 Jan 2003 00:13:19 +0000 (00:13 +0000)]
Removed the new LONG2 opcode:  it's extravagant.  If LONG1 isn't enough,
then the embedded argument consumes at least 256 bytes.  The difference
between a 3-byte prefix (LONG2 + 2 bytes) and a 5-byte prefix (LONG4 +
4 bytes) is at worst less than 1%.  Note that binary strings and binary
Unicode strings also have only "size is 1 byte, or size is 4 bytes?"
flavors, and I expect for the same reason.  The only place a 2-byte
thingie was used was in BININT2, where the 2 bytes make up the *entire*
embedded argument (and now EXT2 also does this); that's a large savings
over 4 bytes, because the total opcode+argument size is so small in
the BININT2/EXT2 case.

Removed the TAKEN_FROM_ARGUMENT "number of bytes" code, and bifurcated it
into TAKEN_FROM_ARGUMENT1 and TAKEN_FROM_ARGUMENT4.  Now there's enough
info in ArgumentDescriptor objects to deduce the # of bytes consumed by
each opcode.

Rearranged the order in which proto2 opcodes are listed in pickle.py.

21 years agoDocumented the 2's-comp business for the new long opcodes.
Tim Peters [Mon, 27 Jan 2003 23:54:04 +0000 (23:54 +0000)]
Documented the 2's-comp business for the new long opcodes.

21 years agoWhitespace normalization.
Tim Peters [Mon, 27 Jan 2003 23:51:36 +0000 (23:51 +0000)]
Whitespace normalization.

21 years agodecode_long(): Simplified the "is it negative?" test.
Tim Peters [Mon, 27 Jan 2003 23:51:11 +0000 (23:51 +0000)]
decode_long():  Simplified the "is it negative?" test.

21 years agoBegin the change from 'binary vs. text mode' to 'protocol 0, 1, 2'.
Guido van Rossum [Mon, 27 Jan 2003 22:47:53 +0000 (22:47 +0000)]
Begin the change from 'binary vs. text mode' to 'protocol 0, 1, 2'.
The protocol now defaults to 1.  Protocol 2 is still unimplemented.

21 years agoSupport socket timeout in SSL, by Geoff Talvola.
Guido van Rossum [Mon, 27 Jan 2003 22:22:50 +0000 (22:22 +0000)]
Support socket timeout in SSL, by Geoff Talvola.
(SF patch #675750, to fix SF bug #675552.)

21 years agoBegin documenting protocol 2.
Guido van Rossum [Mon, 27 Jan 2003 21:44:25 +0000 (21:44 +0000)]
Begin documenting protocol 2.

21 years agoAdded some comments.
Tim Peters [Mon, 27 Jan 2003 21:25:41 +0000 (21:25 +0000)]
Added some comments.

21 years agomemoize(): Reworded the docs to try to disentangle the Pickler's memo
Tim Peters [Mon, 27 Jan 2003 21:22:10 +0000 (21:22 +0000)]
memoize():  Reworded the docs to try to disentangle the Pickler's memo
dict from the Unpickler's memo (which is a different beast!).

21 years agoUsing marshal functions to pack & unpack 1-byte ints is an obscure &
Tim Peters [Mon, 27 Jan 2003 21:15:36 +0000 (21:15 +0000)]
Using marshal functions to pack & unpack 1-byte ints is an obscure &
expensive way to spell chr() and ord().

21 years agoAdded a brief comment to each pickle opcode declaration.
Tim Peters [Mon, 27 Jan 2003 20:16:36 +0000 (20:16 +0000)]
Added a brief comment to each pickle opcode declaration.

21 years agoRemove a stray quote.
Guido van Rossum [Mon, 27 Jan 2003 19:40:47 +0000 (19:40 +0000)]
Remove a stray quote.

21 years agoRepaired comment.
Tim Peters [Mon, 27 Jan 2003 19:38:34 +0000 (19:38 +0000)]
Repaired comment.

21 years agostringnl_noescape_pair(): changed the reader to separate the two
Tim Peters [Mon, 27 Jan 2003 19:01:47 +0000 (19:01 +0000)]
stringnl_noescape_pair():  changed the reader to separate the two
component strings by a blank instead of a period.  Guido pointed
out that the component strings (at least the first one) can be
dotted already.  find_class() is overridable too, so only God knows
all the possibilities that make sense to someone.

21 years agoMoving pickletools.py from the sandbox into the std library. I started
Tim Peters [Mon, 27 Jan 2003 18:51:48 +0000 (18:51 +0000)]
Moving pickletools.py from the sandbox into the std library.  I started
this over the weekend, and it made faster & better progress than I
expected -- it's already useful <wink>.

21 years agoRepaired spelling of "test_iconv_codecs" in various expected-skip lists.
Tim Peters [Mon, 27 Jan 2003 16:45:03 +0000 (16:45 +0000)]
Repaired spelling of "test_iconv_codecs" in various expected-skip lists.

21 years agoUpdate register example
Andrew M. Kuchling [Mon, 27 Jan 2003 16:36:34 +0000 (16:36 +0000)]
Update register example

21 years agoAdjust some of Skip's latest changes slightly; these really are things
Fred Drake [Mon, 27 Jan 2003 16:32:04 +0000 (16:32 +0000)]
Adjust some of Skip's latest changes slightly; these really are things
that should stand out.

21 years agoMake the "notice" environments somewhat similar, with less difference
Fred Drake [Mon, 27 Jan 2003 16:31:16 +0000 (16:31 +0000)]
Make the "notice" environments somewhat similar, with less difference
between the "note" and "warning" flavors.

21 years agoRemove the recently-added get_distutil_options(), and just
Andrew M. Kuchling [Mon, 27 Jan 2003 16:30:36 +0000 (16:30 +0000)]
Remove the recently-added get_distutil_options(), and just
   have two tuples listing the legal keywords for setup() and Extension()

21 years agoFix comment typos
Walter Dörwald [Mon, 27 Jan 2003 15:57:14 +0000 (15:57 +0000)]
Fix comment typos

21 years agoAttempting to keep the Mac section of the NEWS file up-to-date, in stead
Jack Jansen [Mon, 27 Jan 2003 15:21:39 +0000 (15:21 +0000)]
Attempting to keep the Mac section of the NEWS file up-to-date, in stead
of the usual frantic editing at the last moment:-)

21 years ago* add \versionadded{} strings as appropriate
Skip Montanaro [Mon, 27 Jan 2003 15:00:38 +0000 (15:00 +0000)]
* add \versionadded{} strings as appropriate
* remove doc for defunct IllegalKeywordArgument exception
* add note that HTTP class is for backward compatibility and refer reader to
  online docstrings for help

21 years agoFix reference counting of iconvcodec_Type. Fixes #670715.
Martin v. Löwis [Mon, 27 Jan 2003 11:39:04 +0000 (11:39 +0000)]
Fix reference counting of iconvcodec_Type. Fixes #670715.
Remove GC code; the base type does not need GC.

21 years agoPatch #670715: Universal Unicode Codec for POSIX iconv.
Martin v. Löwis [Mon, 27 Jan 2003 11:28:52 +0000 (11:28 +0000)]
Patch #670715: Universal Unicode Codec for POSIX iconv.

21 years agoUpdate for release.
Kurt B. Kaiser [Mon, 27 Jan 2003 02:40:20 +0000 (02:40 +0000)]
Update for release.
Modified Files:
  INSTALL.txt NEWS.txt idlever.py

21 years agoWhitespace normalization.
Kurt B. Kaiser [Mon, 27 Jan 2003 02:36:18 +0000 (02:36 +0000)]
Whitespace normalization.
Modified Files:
  Bindings.py configHandler.py configHelpSourceEdit.py

21 years agoUse new file dialogs.
Jack Jansen [Sun, 26 Jan 2003 22:15:48 +0000 (22:15 +0000)]
Use new file dialogs.

21 years agoFix an omission in the previous checkin.
Jack Jansen [Sun, 26 Jan 2003 22:15:10 +0000 (22:15 +0000)]
Fix an omission in the previous checkin.

21 years agoUse new file dialogs.
Jack Jansen [Sun, 26 Jan 2003 21:40:00 +0000 (21:40 +0000)]
Use new file dialogs.

21 years agoUpdate.
Kurt B. Kaiser [Sun, 26 Jan 2003 20:37:01 +0000 (20:37 +0000)]
Update.

21 years agoUse new file dialogs.
Jack Jansen [Sun, 26 Jan 2003 20:35:47 +0000 (20:35 +0000)]
Use new file dialogs.

21 years agoPath to default location for Python output has changed.
Jack Jansen [Sun, 26 Jan 2003 20:33:46 +0000 (20:33 +0000)]
Path to default location for Python output has changed.

21 years agoFSRef and EasyDialogs pathname support was pretty much broken in MacPython-OS9. Fixed.
Jack Jansen [Sun, 26 Jan 2003 20:22:41 +0000 (20:22 +0000)]
FSRef and EasyDialogs pathname support was pretty much broken in MacPython-OS9. Fixed.

21 years agoGet rid of compiler warnings on Redhat
Neal Norwitz [Sun, 26 Jan 2003 16:26:20 +0000 (16:26 +0000)]
Get rid of compiler warnings on Redhat

21 years agoamk pointed out that syslog may use UDP or TCP sockets.
Neal Norwitz [Sun, 26 Jan 2003 16:15:24 +0000 (16:15 +0000)]
amk pointed out that syslog may use UDP or TCP sockets.
Update to try UDP, if that fails, try TCP.

21 years agoDefine XML_STATIC.
Martin v. Löwis [Sun, 26 Jan 2003 12:17:52 +0000 (12:17 +0000)]
Define XML_STATIC.

21 years agoAdd _iconv_codec to Setup.dist. Use PyModule_ functions.
Martin v. Löwis [Sun, 26 Jan 2003 11:48:20 +0000 (11:48 +0000)]
Add _iconv_codec to Setup.dist. Use PyModule_ functions.

21 years agoTest that True can be copied.
Martin v. Löwis [Sun, 26 Jan 2003 11:32:44 +0000 (11:32 +0000)]
Test that True can be copied.

21 years agoPatch #670715: Universal Unicode Codec for POSIX iconv.
Martin v. Löwis [Sun, 26 Jan 2003 11:30:36 +0000 (11:30 +0000)]
Patch #670715: Universal Unicode Codec for POSIX iconv.

21 years agoRequire PyXML 0.8.2.
Martin v. Löwis [Sun, 26 Jan 2003 10:36:33 +0000 (10:36 +0000)]
Require PyXML 0.8.2.

21 years agoMerge with PyXML 1.3:
Martin v. Löwis [Sun, 26 Jan 2003 09:04:35 +0000 (09:04 +0000)]
Merge with PyXML 1.3:
Add support for the DOM Level 3 (draft) DOMImplementationSource interface
to the xml.dom and xml.dom.minidom modules.  Note API issue: the draft spec
says to return null when there is no suitable implementation, while the
Python getDOMImplementation() function raises ImportError (minor).

21 years agoMerge with PyXML 1.34: Correct typo. Fixes #674700.
Martin v. Löwis [Sun, 26 Jan 2003 09:01:30 +0000 (09:01 +0000)]
Merge with PyXML 1.34: Correct typo. Fixes #674700.

21 years agoMerge with PyXML 1.82:
Martin v. Löwis [Sun, 26 Jan 2003 08:59:32 +0000 (08:59 +0000)]
Merge with PyXML 1.82:
Correct various typos. Fixes #674700.
Set newly created attribute via setNamedItem.

21 years agoUndo inclusion of Python.h. Remove HAVE_MEMCPY section.
Martin v. Löwis [Sun, 26 Jan 2003 08:40:50 +0000 (08:40 +0000)]
Undo inclusion of Python.h. Remove HAVE_MEMCPY section.
Update Windows command line.

21 years agoM ScriptBinding.py
Kurt B. Kaiser [Sun, 26 Jan 2003 04:17:16 +0000 (04:17 +0000)]
M ScriptBinding.py
M config-extensions.def
M help.txt

1. Run Script  -->  Run Module
2. Update IDLE Help file and do more work on format.

21 years agoPart 3 of Py2.3 update
Raymond Hettinger [Sun, 26 Jan 2003 03:29:15 +0000 (03:29 +0000)]
Part 3 of Py2.3 update

21 years agoSF #642974, logging SysLogHandler proto type wrong
Neal Norwitz [Sun, 26 Jan 2003 02:45:47 +0000 (02:45 +0000)]
SF #642974, logging SysLogHandler proto type wrong

Syslog uses UDP (SOCK_DGRAM)

21 years agoSF #642974, logging SysLogHandler proto type wrong
Neal Norwitz [Sun, 26 Jan 2003 02:14:23 +0000 (02:14 +0000)]
SF #642974, logging SysLogHandler proto type wrong

Syslog uses UDP (SOCK_DGRAM)

21 years agoUncomment usage of expat_config.h
Martin v. Löwis [Sat, 25 Jan 2003 22:48:51 +0000 (22:48 +0000)]
Uncomment usage of expat_config.h

21 years agoPatch #636005: Filter unicode into unicode.
Martin v. Löwis [Sat, 25 Jan 2003 22:46:11 +0000 (22:46 +0000)]
Patch #636005: Filter unicode into unicode.

21 years agoIncorporate Expat 1.95.6.
Martin v. Löwis [Sat, 25 Jan 2003 22:41:29 +0000 (22:41 +0000)]
Incorporate Expat 1.95.6.

21 years agoPart II of Python2.3 update
Raymond Hettinger [Sat, 25 Jan 2003 22:35:42 +0000 (22:35 +0000)]
Part II of Python2.3 update

21 years agoSynchronize with PyXML's 1.33: Import missing modules.
Martin v. Löwis [Sat, 25 Jan 2003 22:02:52 +0000 (22:02 +0000)]
Synchronize with PyXML's 1.33: Import missing modules.

21 years agoFix minor typos.
Raymond Hettinger [Sat, 25 Jan 2003 21:46:53 +0000 (21:46 +0000)]
Fix minor typos.

21 years agoMerge PyXML 1.11-1.26:
Martin v. Löwis [Sat, 25 Jan 2003 21:39:09 +0000 (21:39 +0000)]
Merge PyXML 1.11-1.26:
Re-arrange the imports into "Python normal form."
Add test of the getUserData() / setUserData() methods, including the
NODE_CLONED callback.

Added support for renameNode() and getInterface().
Changed Node.unlink() so an unlinked node is not rendered completely
unusable by setting childNodes to None.
Element.removeAttributeNode() is slightly less destructive.

Added test for the wholeText attribute.

Added a test for Text.replaceWholeText().

Fixed to properly create Element in test of user data

Rename a local variable so it makes sense when viewed as a sequence.
Unlink a few documents when we're done with them.

Added tests to define the behavior of the cloneNode() and importNode()
mehods, especially in the "difficult" cases of document and
document-type nodes.

Filled in a few more of the other cloneNode() tests.

NodeList.item() does not exist before Python 2.2, since it requires being
able to create subtypes of list.  Use the subscript syntax instead.

Added a test that minidom documents can be pickled and unpickled.
Closes SF bug #609641.

Fill in an empty test, making sure we get the whitespace right for the
data attribute of a processing instruction.

Added checks for a few more invariants for processing instructions.

testProcessingInstruction():  The length attribute of the NodeList
    interface is not implemented for Python 2.0, 2.1, so only use
    len() to test the length.

testSchemaType():  New test, testing just the minimum of schemaType
    support; this is different from the test_xmlbuilder version of the
    test since it doesn't rely on using a specific builder, and the
    builders support different levels of DTD support.

Add tests for the removeNamedItem() and removeNamedItemNS() methods of
the NamedNodeMap instances found on Element nodes.
These do not pass; the fix will be committed shortly.

Added support for the DOM Level 3 (draft) Element.setIdAttribute*() methods.

Do more to avoid creating new Attr nodes, so that attributes do not lose
their ID-ness when set using setIdAttribute*().

21 years agoM PyShell.py
Kurt B. Kaiser [Sat, 25 Jan 2003 21:33:40 +0000 (21:33 +0000)]
M PyShell.py
M RemoteDebugger.py
M rpc.py

Fix the incorrect shell exception tracebacks generated when running
under debugger control:

1. Use rpc.SocketIO.asynccall() instead of remotecall() to handle the
   IdbProxy.run() command.
2. Add a 'shell' attribute to RemoteDebugger.IdbProxy to allow setting
   of ModifiedInterpreter's active_seq attribute from RemoteDebugger code.
3. Cleanup PyShell.ModifiedInterpreter.runcode() and remove ambiguity
   regarding use of begin/endexecuting().
4. In runcode() and cleanup_traceback() use 'console' instead of 'file' to
   denote the entity to which the exception traceback is printed.
5. Enhance cleanup_traceback() so if the traceback is pruned entirely away
   (the error is in IDLE internals) it will be displayed in its entirety
   instead.
6. ModifiedInterpreter.runcode() now prints ERROR RPC returns to both
   console and __stderr__.
7. Make a small tweak to the rpc.py debug messages.

21 years agoSF #638299, LaTeX documentation for logging package
Neal Norwitz [Sat, 25 Jan 2003 21:29:41 +0000 (21:29 +0000)]
SF #638299, LaTeX documentation for logging package

Replace existing doc with new version from Vinay.
Fixed markup and wrapped long lines from patch.
Needs review.

21 years agoPart I of an update for Python 2.3.
Raymond Hettinger [Sat, 25 Jan 2003 21:22:52 +0000 (21:22 +0000)]
Part I of an update for Python 2.3.

21 years agoFix markup
Neal Norwitz [Sat, 25 Jan 2003 21:08:30 +0000 (21:08 +0000)]
Fix markup

21 years agoImport UserDataHandler from PyXML.
Martin v. Löwis [Sat, 25 Jan 2003 17:11:07 +0000 (17:11 +0000)]
Import UserDataHandler from PyXML.

21 years agoImport NodeFilter from DOM2 Traversal/Range.
Martin v. Löwis [Sat, 25 Jan 2003 17:07:03 +0000 (17:07 +0000)]
Import NodeFilter from DOM2 Traversal/Range.

21 years agoMerge with PyXML 1.28:
Martin v. Löwis [Sat, 25 Jan 2003 16:51:50 +0000 (16:51 +0000)]
Merge with PyXML 1.28:
Wrap a lot of long lines.
Clean up a handler for expat.error.

If a lexical handler is set, make sure we call the startDTD() and
endDTD().  If the lexical handler is unset (by setting it to None),
remove the handlers from the underlying pyexpat parser object.
Closes SF bug #485584.

In namespaces mode, make sure we set up the qnames dictionary
correctly for the AttributesNSImpl instance passed to the
start-element-handler.
Closes SF bug #563399.

Support skippedEntity. Fixes #665486.

21 years agoImport from PyXML 1.10.
Martin v. Löwis [Sat, 25 Jan 2003 15:29:56 +0000 (15:29 +0000)]
Import from PyXML 1.10.

21 years agoMerge with PyXML 1.80:
Martin v. Löwis [Sat, 25 Jan 2003 15:28:29 +0000 (15:28 +0000)]
Merge with PyXML 1.80:
Basic minidom changes to support the new higher-performance builder, as
described: http://mail.python.org/pipermail/xml-sig/2002-February/007217.html

Use True/False where appropriate.

isSupported():  Implemented from DOM Level 2.

Support a variety of things from the DOM Level 3 draft, integrate with
the xml.dom.xmlbuilder module for the new Document and
DOMImplementation methods.

Support the NODE_CLONED callback for the UserDataHandler set using
setUserData().

Add Entity and Notation nodes to minidom.
Add __getitem__() to ReadOnlySequentialNamedNodeMap to match NamedNodeMap.
TupleType was used without being defined; rename to _TupleType and define.

Add magic so that instances of the NamedNodeMap (and its read-only cousin)
take a bit less memory in the new-style world of Python 2.2/2.3.  Now, the
assignments to __slots__ actually work.  ;-)

Add support for the Text.wholeText attribute.
Document.createCDATASection():  Do not pass unsupported arg to CDATASection
constructor.

Implemented Text.replaceWholeText().

Updated minidom interfaces to work better with current 4Suite XPath and Xslt.
* Added childNodes to class Attr
* Added localName and prefix to all Nodes
* Added specified on class Attr
* Changed DOMImplementation.createDocument to all creating a document with no document element and
a
Null doctype
* Changed CharacterData__setattr__ to keep nodeValue and data in synch
* fixed typo of ownerDoc in createDocumentFragment
* Changed Comment to inherit from CharacterData
* Allowed mutation of name on PIs
* Added importNode and rewrote cloneNode so both use same code base
* Changed EmptyNodeList to be a list not a tuple

Use a table-driven DOMImplementation.hasFeature().
Shorten lines longer than 80 characters.

Rename CloneNode to _clone_node (better naming consistency within the
module).

When defining localName as a property, the defproperty() call is
needed for each class that defined _get_localName(), otherwise only
the first version is used for Python 2.2 and newer.

Node.insertBefore():  When the reference node is not found, raise the
    exception defined by the DOM specification.

Attr._set_value():  Added setter that does the right thing.

Childless.removeChild():  Raise the exception defined by the
    specification, even though it seem less than intuitive.

_clone_node():  Access nodeType constants so we actually find them.
    Add support for document fragments.

Node.removeChild(), .replaceChild():
    Fix exception raised when a reference node is not found.

CharacterData._set_data():  Update the nodeValue attribute as well as
    the data attribute.

Entity.attributes, .childNodes:  Added these attributes.

Document.removeChild():  Raise the right exception when the node being
    removed is not a child of this node.

Element.removeAttributeNode():  Raise the right exception when the
    node isn't present on this element.  Don't unlink the node unless
    it is present.

Added support for the following methods and accessors:
    Node._get_childNodes(), Attr._get_specified(), Attr._set_prefix(),
    NamedNodeMap.has_key(), .getNamedItem(), .getNamedItemNS(),
    .removeNamedItem(), .removeNamedItemNS(),
    ProcessingInstruction._get_data(), ._get_target(), ._set_data(),
    ._set_target(), CharacterData.__len__(),
    Document.getElementById().

Add many more of the _get_*() accessors.

Convert internal helpers to use a more consistent naming convention.

Remove unused definition of _nssplit(); there can be only one!

Move the Identified mixin up so it can be used by one more class.

Remove comment about NamedNodeMap.__getitem__(); the API won't be
changing now!  Way too late for that.

Preliminary support for getElementById() for DOMs built with
xml.dom.expatbuilder.
Not necessarily very efficient, but it works, and is still fast for Document
instances that do not have the ID information.

DOMImplementation.createDocument():  Don't forget to add the
    DocumentType node to the tree.  This appearantly was lost in the
    previous release.

DocumentType.writexml():  New function.

Implement the final determination on the behaviors of importNode() and
cloneNode() with regard to Document and DocumentType nodes.

When cloning and importing, call the UserDataHandler with the right
operation, not just blindly use NODE_CLONED.

parse(), parseString():  When called with parser=None, use
xml.dom.expatbuilder instead of xml.dom.pulldom, to get a performance
boost (the main point of expatbuilder).

Fix for calling parse / parseString with a given parser instance;
the else-paths were ignored when refactoring the function signatures;
pychecker found that error instantly, BTW (hint, hint)

Added pickle support for NamedNodeMap, ReadOnlySequentialNamedNodeMap,
and ElementInfo. Closes SF bug #609641.

In _clone_node for elements, fixed arguments for getAttributeNodeNS

At least make sure the DOM API won't allow you to modify the child
node list of an entity node (since entity ndoes are supposed to be
readonly).

Add support for the DOM Level 3 (draft) DOMImplementationSource interface
to the xml.dom and xml.dom.minidom modules.  Note API issue: the draft spec
says to return null when there is no suitable implementation, while the
Python getDOMImplementation() function raises ImportError (minor).

Implement the DOM Level 3 Attr.isId property.
Refactor the lookup of the ElementInfo objects.

Implement the schemaType attribute for Element and Attr nodes.
Defined by the (draft) DOM Level 3 specification.

getElementById():  Support caching of IDs found.  This implementation is
    sufficient for DOM Level 2 compliance, but additional changes will be
    needed to support the setIdAttribute() and setIdAttributeNS() methods
    in DOM Level 3.

Add support for Text.isWhitespaceInElementContent (draft Level 3).

NamedNodeMap.removeNamedItem(), .removeNamedItemNS():
    Pass the new tests:  Return the removed node, or raise NotFoundErr
    if there was no matching node.

When changing attributes via a NamedNodeMap, update the ID-cache
appropriately.

Added support for the DOM Level 3 (draft) Element.setIdAttribute*() methods.

setAttributeNode():  Be more careful about not calling
    removeAttributeNode() twice for a single node.

Do more to avoid creating new Attr nodes, so that attributes do not lose
their ID-ness when set using setIdAttribute*().

Work harder to avoid calls to Attr.__setattr__() and
CharacterData.__setattr__().

Attr.unlink():
    Implement everything directly instead of calling to the base
    class, which does several things that aren't needed for Attr
    nodes.

Change some remaining assignments that caused __setattr__() to be
called when it can be avoided.  expatbuilder can now perform DOM
construction without __setattr__() interferance in common cases.

Remove unused _make_parent_nodes logic.

21 years agoImport expatbuilder, minicompat from PyXML.
Martin v. Löwis [Sat, 25 Jan 2003 15:11:07 +0000 (15:11 +0000)]
Import expatbuilder, minicompat from PyXML.

21 years agoInclude version annotation for PyObject_Call().
Fred Drake [Sat, 25 Jan 2003 07:48:13 +0000 (07:48 +0000)]
Include version annotation for PyObject_Call().

21 years agoFix typo reported to python-docs.
Fred Drake [Sat, 25 Jan 2003 03:47:35 +0000 (03:47 +0000)]
Fix typo reported to python-docs.

21 years ago1. Eliminate putrequest(): only used in asynccall(), merge it there.
Kurt B. Kaiser [Sat, 25 Jan 2003 03:26:35 +0000 (03:26 +0000)]
1. Eliminate putrequest(): only used in asynccall(), merge it there.
2. Add additional debugging statements and enhance others.
3. Clarify comments.
4. Move SocketIO.nextseq class attribute to beginning of class.

21 years agodate and datetime comparison: when we don't know how to
Tim Peters [Fri, 24 Jan 2003 22:36:34 +0000 (22:36 +0000)]
date and datetime comparison:  when we don't know how to
compare against "the other" argument, we raise TypeError,
in order to prevent comparison from falling back to the
default (and worse than useless, in this case) comparison
by object address.

That's fine so far as it goes, but leaves no way for
another date/datetime object to make itself comparable
to our objects.  For example, it leaves Marc-Andre no way
to teach mxDateTime dates how to compare against Python
dates.

Discussion on Python-Dev raised a number of impractical
ideas, and the simple one implemented here:  when we don't
know how to compare against "the other" argument, we raise
TypeError *unless* the other object has a timetuple attr.
In that case, we return NotImplemented instead, and Python
will give the other object a shot at handling the
comparison then.

Note that comparisons of time and timedelta objects still
suffer the original problem, though.

21 years agoAdd news about getargs change.
Neil Schemenauer [Fri, 24 Jan 2003 22:15:53 +0000 (22:15 +0000)]
Add news about getargs change.

21 years agoRaise a TypeError if a float is passed when an integer is specified.
Neil Schemenauer [Fri, 24 Jan 2003 22:15:21 +0000 (22:15 +0000)]
Raise a TypeError if a float is passed when an integer is specified.
Calling PyInt_AsLong() on a float truncates it which is almost never
the desired behavior.  This closes SF bug #660144.

21 years agoRaise PicklingError when __reduce__() fails, and
Jeremy Hylton [Fri, 24 Jan 2003 19:29:52 +0000 (19:29 +0000)]
Raise PicklingError when __reduce__() fails, and
add memoize() helper function to update the memo.

The first element of the tuple returned by __reduce__() must be a
callable.  If it isn't the Unpickler will raise an error.  Catch this
error in the pickler and raise the error there.

The memoize() helper also has a comment explaining how the memo
works.  So methods can't use memoize() because the write funny codes.

21 years agormtree(): Make implementation agree with documentation (both latex and
Barry Warsaw [Fri, 24 Jan 2003 17:36:15 +0000 (17:36 +0000)]
rmtree(): Make implementation agree with documentation (both latex and
docstring).  Even if ignore_errors was true, an exception would occur
if path didn't exist.

21 years agoA very minimal start to a test of the shutil module.
Barry Warsaw [Fri, 24 Jan 2003 17:34:13 +0000 (17:34 +0000)]
A very minimal start to a test of the shutil module.

21 years agoFred drives and fixes a formatting nit.
Barry Warsaw [Fri, 24 Jan 2003 17:33:30 +0000 (17:33 +0000)]
Fred drives and fixes a formatting nit.

21 years agoMacPython-OS9 has had an abort() function for quite a while now, so there's no reason...
Jack Jansen [Fri, 24 Jan 2003 16:17:18 +0000 (16:17 +0000)]
MacPython-OS9 has had an abort() function for quite a while now, so there's no reason to stall in an endless loop, just call abort() on a fatal error.

21 years agoMacPython-OS9 specific fix: If there are non-string items on sys.path don't try to...
Jack Jansen [Fri, 24 Jan 2003 16:15:45 +0000 (16:15 +0000)]
MacPython-OS9 specific fix: If there are non-string items on sys.path don't try to intern them. This has the theoretical problem that resource filenames on sys.path cannot be unicode objects, but in practice that shouldn't matter.

21 years agoBump the Windows build to use Sleepycat's 4.1.25.NC release (the
Tim Peters [Fri, 24 Jan 2003 15:31:31 +0000 (15:31 +0000)]
Bump the Windows build to use Sleepycat's 4.1.25.NC release (the
latest bsddb release without strong cryptography).

21 years agoChange the mode of scripts in the build/scripts* directory to
Guido van Rossum [Fri, 24 Jan 2003 14:56:52 +0000 (14:56 +0000)]
Change the mode of scripts in the build/scripts* directory to
executable.

21 years agoUpdated the doc strings to refer to PyArg_Parse and Py_BuildValue in stead
Jack Jansen [Fri, 24 Jan 2003 09:23:13 +0000 (09:23 +0000)]
Updated the doc strings to refer to PyArg_Parse and Py_BuildValue in stead
of getargs() and mkvalue().

21 years agoUpdated the astimezone() proof to recover from all the last week's
Tim Peters [Fri, 24 Jan 2003 02:44:45 +0000 (02:44 +0000)]
Updated the astimezone() proof to recover from all the last week's
changes (and there were a lot of relevant changes!).

21 years agoFix typo
Neal Norwitz [Thu, 23 Jan 2003 21:09:05 +0000 (21:09 +0000)]
Fix typo

21 years agoSF bug 660872: datetimetz constructors behave counterintuitively (2.3a1).
Tim Peters [Thu, 23 Jan 2003 20:53:10 +0000 (20:53 +0000)]
SF bug 660872:  datetimetz constructors behave counterintuitively (2.3a1).
This gives much the same treatment to datetime.fromtimestamp(stamp, tz) as
the last batch of checkins gave to datetime.now(tz):  do "the obvious"
thing with the tz argument instead of a senseless thing.

21 years agoReimplemented datetime.now() to be useful.
Tim Peters [Thu, 23 Jan 2003 19:58:02 +0000 (19:58 +0000)]
Reimplemented datetime.now() to be useful.

21 years agoUse lightweight introspection instead of the inspect module hammer.
Jeremy Hylton [Thu, 23 Jan 2003 18:29:29 +0000 (18:29 +0000)]
Use lightweight introspection instead of the inspect module hammer.

Removing locking are findCaller() calls as the implementation using
sys._getframe() is thread-safe.

Changes reviewed by Vinay.

21 years agoFix for SF bug 661340: test_httplib fails on the mac.
Jeremy Hylton [Thu, 23 Jan 2003 18:02:20 +0000 (18:02 +0000)]
Fix for SF bug 661340: test_httplib fails on the mac.

The test no longer produces output with \r\n in it.