Implement dict() style constructor.
Already supported dict() and dict(mapping).
Now supports dict(itemsequence) and
Just van Rossum's new syntax for dict(keywordargs).
Also, added related unittests.
The docs already promise dict-like behavior
so no update is needed there.
Tim Peters [Thu, 21 Nov 2002 22:26:37 +0000 (22:26 +0000)]
float_int(): Some systems raise an exception if a double is cast to
long but the double is too big to fit in a long. Prevent that. This
closes some recent bug or patch on SF, but SF is down now so I can't
say which.
Guido van Rossum [Thu, 21 Nov 2002 21:08:39 +0000 (21:08 +0000)]
The _Event class should be more careful with releasing its lock when
interrupted. A try/finally will do nicely. Maybe other classes need
this too, but since they manipulate more state it's less clear that
that is always the right thing, and I'm in a hurry.
Walter Dörwald [Thu, 21 Nov 2002 20:08:33 +0000 (20:08 +0000)]
Fix PEP 293 related problems with --disable-unicode builds
reported by Michael Hudson in
http://mail.python.org/pipermail/python-dev/2002-November/030299.html
Bug #639118 from Ollie Oldham: archiver should use zipfile before zip
Previously archive_util.py attempted to spawn an
external 'zip' program for the zip action, if this fails, an
attempt to import zipfile.py is made...
This bites folks who have 'old' or non-conforming zip
programs on windows platforms. This change tries the 'zipfile'
module first, falling back to spawning a zip process if
the module isn't available.
Tim Peters [Thu, 21 Nov 2002 15:59:59 +0000 (15:59 +0000)]
_RandomNameSequence(): style guide changes, small speedup, don't
put more in the critical section than absolutely needed, acquire
the mutex before the "try".
Neal Norwitz [Wed, 20 Nov 2002 23:15:54 +0000 (23:15 +0000)]
Fix SF #640094, on win32 getpass runs into unix_getpass
Make sure we have a UNIX-compatible termios.
Apparently, McMillan Installer made a termios on windows
which caused unix_getpass() to be used instead of win_getpass().
Walter Dörwald [Tue, 19 Nov 2002 20:49:15 +0000 (20:49 +0000)]
Change int() so that passing a string, unicode, float or long argument
that is outside the integer range no longer raises OverflowError, but
returns a long object instead.
Tim Peters [Tue, 19 Nov 2002 17:38:27 +0000 (17:38 +0000)]
Renamed Wise vrbl from _TCLMINOR_ to _TCLDIR_, to remove any script
dependence on the Tcl/Tk version number. Now you point it at the
Tcl/Tk install you want to ship, and that's what it ships.
Neil Schemenauer [Mon, 18 Nov 2002 16:04:52 +0000 (16:04 +0000)]
str and unicode objects now have a __mod__ slot so don't special case them in
PyNumber_Remainder(). This fixes SF bug #615506 and allows string and unicode
subclasses to override __mod__.
Improve DictMixin.
Replaced docstring with comments. Prevents subclass contamination.
Added the missing __cmp__() method and a test for __cmp__().
Used try/except style in preference to has_key() followed by a look-up.
Used iteritem() where possible to save creating a long key list and
to save redundant lookups.
Expanded .update() to look for the most helpful methods first and gradually
work down to a mininum expected interface.
Expanded documentation to be more clear on how to use the class.
Neil Schemenauer [Sun, 17 Nov 2002 17:52:44 +0000 (17:52 +0000)]
Remove _Py_ResetReferences. Fixes bug #529750 "Circular reference makes
Py_Init crash". refchain cannot be cleared because objects can live across
Py_Finalize() and Py_Initialize() if they are kept alive by circular
references.
Tim Peters [Fri, 15 Nov 2002 19:08:50 +0000 (19:08 +0000)]
Style guide reformats. I saw this test fail on a very heavily loaded
Win98SE box, but whatever the cause, it had scrolled off the DOS box.
(There was just the "test_queue failed" summary at the end of the
regrtest run.)
Fred Drake [Fri, 15 Nov 2002 19:04:10 +0000 (19:04 +0000)]
Squash an enormous number of warnings reported when adding "use
warnings;" to this, and keep the "use" statement this time.
Fix an obscure bug that caused weird index entries to be generated in
a few cases, and a minor problem with horizontal alignmetn of the last
column of 5-column tables.
[I'd report a SF bug #, but I can't get to that right now.]
SF patch #520382: Expand shelve.py to have a full dictionary interface
and add a mixin to UserDict.py to make it easier to implement a full
dictionary interface.
SF patch #520382: Expand shelve.py to have a full dictionary interface
and add a mixin to UserDict.py to make it easier to implement a full
dictionary interface.
Draft a section on modifying Python's path. I'm not sure where
this section fits best in inst.tex's organization; Fred or someone, feel
free to move it.
Jack Jansen [Fri, 15 Nov 2002 00:13:33 +0000 (00:13 +0000)]
First stab at a Makefile that will create a MacPython that uses the
Apple-installed Python 2.2 from /usr/bin as it's underlying engine.
All the MacPython stuff is installed into /Applications/MacPython-OSX,
and .pth files and other magic are used to tie everything together.
So far only the raw windowing interpreter and BuildApplet work.
Jack Jansen [Fri, 15 Nov 2002 00:05:47 +0000 (00:05 +0000)]
Added a hack so we can build applets with a MacPython that uses the
OSX 10.2 apple-supplied Python as its base: if we've copied a symlink
as the executable we remove it and install appletrunner in stead.
Tim Peters [Thu, 14 Nov 2002 23:24:40 +0000 (23:24 +0000)]
Windows changes to move from Tcl/Tk 8.3.2 to 8.4.1. I tested this by
running IDLE, and since I'm not a Tcl Guy I'm not sure what else to do.
Up to you! See XXX comments in PCbuild\readme.txt for cautions.
Also repaired typos in the new bz2-for-Windows instructions.