]> granicus.if.org Git - python/log
python
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.

21 years agofromutc(): Repair incorrect failure return, as noted by NealN. Thanks!
Tim Peters [Thu, 23 Jan 2003 17:20:36 +0000 (17:20 +0000)]
fromutc():  Repair incorrect failure return, as noted by NealN.  Thanks!

21 years agoBringing the code and test suite into line with doc and NEWS changes
Tim Peters [Thu, 23 Jan 2003 16:36:11 +0000 (16:36 +0000)]
Bringing the code and test suite into line with doc and NEWS changes
checked in two days agao:

Refactoring of, and new rules for, dt.astimezone(tz).

dt must be aware now, and tz.utcoffset() and tz.dst() must not return None.
The old dt.astimezone(None) no longer works to change an aware datetime
into a naive datetime; use dt.replace(tzinfo=None) instead.

The tzinfo base class now supplies a new fromutc(self, dt) method, and
datetime.astimezone(tz) invokes tz.fromutc().  The default implementation
of fromutc() reproduces the same results as the old astimezone()
implementation, but tzinfo subclasses can override fromutc() if the
default implementation isn't strong enough to get the correct results
in all cases (for example, this may be necessary if a tzinfo subclass
models a time zone whose "standard offset" (wrt UTC) changed in some
year(s), or in some variations of double-daylight time -- the creativity
of time zone politics can't be captured in a single default implementation).

22 years agoadd support for Python's bool type to xmlrpclib - patch # 559288
Skip Montanaro [Wed, 22 Jan 2003 18:17:25 +0000 (18:17 +0000)]
add support for Python's bool type to xmlrpclib - patch # 559288

22 years agoTweaked time conversion to work in MacPython-OS9.
Jack Jansen [Wed, 22 Jan 2003 14:04:18 +0000 (14:04 +0000)]
Tweaked time conversion to work in MacPython-OS9.

22 years agoGetting rid of StandardGetFile
Jack Jansen [Wed, 22 Jan 2003 14:03:12 +0000 (14:03 +0000)]
Getting rid of StandardGetFile

22 years agoKurt pointed out another method affected by the changes to pyclbr.py.
Raymond Hettinger [Wed, 22 Jan 2003 13:29:00 +0000 (13:29 +0000)]
Kurt pointed out another method affected by the changes to pyclbr.py.

22 years agoConvert booleans to integers in IntVar.set. Fixes #671741.
Martin v. Löwis [Wed, 22 Jan 2003 09:17:38 +0000 (09:17 +0000)]
Convert booleans to integers in IntVar.set. Fixes #671741.
Return booleans from _tkinter.getboolean.
Convert booleans to Tcl booleans in AsObj.

22 years agoPatch #671459: Invoke import hooks in Py_NewInterpreter.
Martin v. Löwis [Wed, 22 Jan 2003 09:00:38 +0000 (09:00 +0000)]
Patch #671459: Invoke import hooks in Py_NewInterpreter.

22 years ago"Premature" doc changes, for new astimezone() rules, and the new
Tim Peters [Wed, 22 Jan 2003 04:45:50 +0000 (04:45 +0000)]
"Premature" doc changes, for new astimezone() rules, and the new
tzinfo.fromutc() method.  The C code doesn't implement any of this
yet (well, not the C code on the machine I'm using now), nor does
the test suite reflect it.  The Python datetime.py implementation and
test suite in the sandbox do match these doc changes.  The C
implementation probably won't catch up before Thursday (Wednesday is
a scheduled "black hole" day this week <0.4 wink>).

22 years agoSF patch #667730: More DictMixin
Raymond Hettinger [Wed, 22 Jan 2003 01:39:06 +0000 (01:39 +0000)]
SF patch #667730: More DictMixin

Sebastien Keim pointed out that iterkeys and __contains__ require
their own definitions so their behavior will update when the
underlying method is subclassed.

22 years agoMake Alt-Key-2 the Zoom Height binding for ClassBrowser and PathBrowser,
Kurt B. Kaiser [Wed, 22 Jan 2003 00:31:09 +0000 (00:31 +0000)]
Make Alt-Key-2 the Zoom Height binding for ClassBrowser and PathBrowser,
consistent with the Edit/Shell windows.

22 years agoM Bindings.py
Kurt B. Kaiser [Wed, 22 Jan 2003 00:23:23 +0000 (00:23 +0000)]
M Bindings.py
M PyShell.py
M config-keys.def
M configHandler.py

1. Clear any un-entered characters from input line before printing the
   restart boundary.
2. Restore the Debug menu: There are now both Shell and Debug menus.
3. Add Control-F6 keybinding to Restart Shell.
4. Clarify PyShell.cancel_check() comment.
5. Update doc string for Bindings.py and re-format the file slightly.

22 years agoAdded DepracationWarnings to the old Standard File calls.
Jack Jansen [Tue, 21 Jan 2003 22:58:39 +0000 (22:58 +0000)]
Added DepracationWarnings to the old Standard File calls.

22 years agoTuples and lists don't have a copy() method (yet?).
Jack Jansen [Tue, 21 Jan 2003 22:57:53 +0000 (22:57 +0000)]
Tuples and lists don't have a copy() method (yet?).

22 years agoAvoid usage of PyDoc_STR in 2.2 compatibility code.
Martin v. Löwis [Tue, 21 Jan 2003 21:52:57 +0000 (21:52 +0000)]
Avoid usage of PyDoc_STR in 2.2 compatibility code.

22 years agoFix from Vinaj for the "writing to closed file" errors. SF 670390.
Guido van Rossum [Tue, 21 Jan 2003 21:05:22 +0000 (21:05 +0000)]
Fix from Vinaj for the "writing to closed file" errors.  SF 670390.

22 years agoossaudiodev.c currently gives compilation errors, and Greg doesn't fix
Guido van Rossum [Tue, 21 Jan 2003 21:01:37 +0000 (21:01 +0000)]
ossaudiodev.c currently gives compilation errors, and Greg doesn't fix
it, so disable the build for now.

22 years agoSF bug 671779: Error in tzinfo.dst() docs
Tim Peters [Tue, 21 Jan 2003 16:44:27 +0000 (16:44 +0000)]
SF bug 671779: Error in tzinfo.dst() docs
tzinfo dst() should return timedelta(0) if DST is not effect, not 0.

22 years agoImplemented StandardGetFile and friends with the new EasyDialogs file
Jack Jansen [Tue, 21 Jan 2003 15:31:16 +0000 (15:31 +0000)]
Implemented StandardGetFile and friends with the new EasyDialogs file
dialogs.

22 years agoOops, this file wasn't 8-bit-clean yet. Fixed.
Jack Jansen [Tue, 21 Jan 2003 15:30:21 +0000 (15:30 +0000)]
Oops, this file wasn't 8-bit-clean yet. Fixed.

22 years agoFixed typo in package name that went unnoticed because of MacOSX's case-insensitive
Jack Jansen [Tue, 21 Jan 2003 15:05:02 +0000 (15:05 +0000)]
Fixed typo in package name that went unnoticed because of MacOSX's case-insensitive
filenames.

22 years agoSpell out the arguments to AskFileForOpen and friends, so help() gives useful
Jack Jansen [Tue, 21 Jan 2003 14:38:32 +0000 (14:38 +0000)]
Spell out the arguments to AskFileForOpen and friends, so help() gives useful
help.

22 years agoFix example in a docstring to not use 'file' as a variable name
Andrew M. Kuchling [Tue, 21 Jan 2003 14:19:21 +0000 (14:19 +0000)]
Fix example in a docstring to not use 'file' as a variable name

22 years agoUse new file dialogs in GetArgv()
Jack Jansen [Tue, 21 Jan 2003 13:56:34 +0000 (13:56 +0000)]
Use new file dialogs in GetArgv()

22 years agoCompile site-packages with -t, not -tt.
Jack Jansen [Tue, 21 Jan 2003 13:50:34 +0000 (13:50 +0000)]
Compile site-packages with -t, not -tt.

22 years agoConditionalize features not found in PyXML 1.95.2.
Martin v. Löwis [Tue, 21 Jan 2003 11:09:21 +0000 (11:09 +0000)]
Conditionalize features not found in PyXML 1.95.2.

22 years agoMerge with PyXML 1.71:
Martin v. Löwis [Tue, 21 Jan 2003 10:58:18 +0000 (10:58 +0000)]
Merge with PyXML 1.71:
60: Added support for the SkippedEntityHandler, new in Expat 1.95.4.
61: Added support for namespace prefixes, which can be enabled by setting the
    "namespace_prefixes" attribute on the parser object.
65: Disable profiling changes for Python 2.0 and 2.1.
66: Update pyexpat to export the Expat 1.95.5 XML_GetFeatureList()
    information, and tighten up a type declaration now that Expat is using
    an incomplete type rather than a void * for the XML_Parser type.
67: Clarified a comment.
    Added support for XML_UseForeignDTD(), new in Expat 1.95.5.
68: Refactor to avoid partial duplication of the code to construct an
    ExpatError instance, and actually conform to the API for the exception
    instance as well.
69: Remove some spurious trailing whitespace.
    Add a special external-entity-ref handler that gets installed once a
    handler has raised a Python exception; this can cancel actual parsing
    earlier if there's an external entity reference in the input data
    after the the Python excpetion has been raised.
70: Untabify APPEND.
71: Backport PyMODINIT_FUNC for 2.2 and earlier.

22 years agoDon't use Posix semaphores on Solaris 8. Fixes #662787.
Martin v. Löwis [Tue, 21 Jan 2003 10:14:41 +0000 (10:14 +0000)]
Don't use Posix semaphores on Solaris 8. Fixes #662787.

22 years ago1. Restore the rest of Python IDLE setup.py Rev 1.4 (Python SF 634078)
Kurt B. Kaiser [Tue, 21 Jan 2003 04:42:50 +0000 (04:42 +0000)]
1. Restore the rest of Python IDLE setup.py Rev 1.4 (Python SF 634078)
   (Loewis) which uses 'SRCDIR' (if available) in package dir path.
2. Merge Python IDLE setup.py Rev 1.5 (Loewis) to allow installation
   from the build directory. IDLEfork SF Patch 668998 (Loewis)

22 years agoflesh out open() docstring
Skip Montanaro [Tue, 21 Jan 2003 01:53:09 +0000 (01:53 +0000)]
flesh out open() docstring

22 years agomore tweaks
Skip Montanaro [Tue, 21 Jan 2003 01:52:39 +0000 (01:52 +0000)]
more tweaks

22 years ago* document open() function
Skip Montanaro [Tue, 21 Jan 2003 01:38:47 +0000 (01:38 +0000)]
* document open() function
* promote the example and the documented restrictions to \subsection status
* document the flag parameter of the DbfilenameShelf class

22 years agoNew rule for tzinfo subclasses handling both standard and daylight time:
Tim Peters [Mon, 20 Jan 2003 22:54:38 +0000 (22:54 +0000)]
New rule for tzinfo subclasses handling both standard and daylight time:
When daylight time ends, an hour repeats on the local clock (for example,
in US Eastern, the clock jumps from 1:59 back to 1:00 again).  Times in
the repeated hour are ambiguous.  A tzinfo subclass that wants to play
with astimezone() needs to treat times in the repeated hour as being
standard time.  astimezone() previously required that such times be
treated as daylight time.  There seems no killer argument either way,
but Guido wants the standard-time version, and it does seem easier the
new way to code both American (local-time based) and European (UTC-based)
switch rules, and the astimezone() implementation is simpler.

22 years agoRecursive compare machinery: The code that intended to exempt tuples
Tim Peters [Mon, 20 Jan 2003 16:54:59 +0000 (16:54 +0000)]
Recursive compare machinery:  The code that intended to exempt tuples
was broken because new-in-2.3 code added a tp_as_mapping slot to tuples.
Repaired that.

Added basic docs to check_recursion().

The code that intended to exempt tuples and strings was also broken here,
and in 2.2:  these should use PyXYZ_CheckExact(), not PyXYZ_Check() -- we
can't know whether subclass instances are immutable.  This part (and this
part alone) is a bugfix candidate.

22 years agoOn MacOSX, added -prebind option to link phase for executable (and
Jack Jansen [Mon, 20 Jan 2003 10:47:48 +0000 (10:47 +0000)]
On MacOSX, added -prebind option to link phase for executable (and
framework, if applicable). This speeds up startup time by up to 50%.

22 years agoFix bug #670845: cut & clear in the output window now work, in that
Just van Rossum [Mon, 20 Jan 2003 09:02:23 +0000 (09:02 +0000)]
Fix bug #670845: cut & clear in the output window now work, in that
  - clear clears the entire buffer
  - cut doesn't cut, but copies.

22 years ago...and the old pyclbr.py faked Function instances with Class instances
Kurt B. Kaiser [Mon, 20 Jan 2003 04:49:37 +0000 (04:49 +0000)]
...and the old pyclbr.py faked Function instances with Class instances
which had empty method and super attributes.  ClassBrowser.IsExpandable()
could not handle the missing attributes.  SF Bug 667787.

22 years agoAdd comments and remove duplicate tests.
Walter Dörwald [Mon, 20 Jan 2003 02:34:07 +0000 (02:34 +0000)]
Add comments and remove duplicate tests.

22 years agoInstall email/test, email/test/data and bsddb/test subdirectories.
Barry Warsaw [Mon, 20 Jan 2003 01:13:21 +0000 (01:13 +0000)]
Install email/test, email/test/data and bsddb/test subdirectories.