Backport improvements to set.py so that the interface will remain
consistent across versions.
* Relaxed the argument restrictions for non-operator methods. They now
allow any iterable instead of requiring a set. This makes the module
a little easier to use and paves the way for an efficient C
implementation which can take better advantage of iterable arguments
while screening out immutables.
* Added a PendingDeprecationWarning for Set.update() because it now
duplicates Set.union_update()
* Adapted the tests and docs to include the above changes.
* Added more test coverage including testing identities and checking
to make sure non-restartable generators work as arguments.
Walter Dörwald [Thu, 14 Aug 2003 21:00:28 +0000 (21:00 +0000)]
Backport checkin:
Fix refcount leak in the UnicodeError constructor:
When parsing the constructor arguments failed, a
reference to the argument tuple was leaked.
Walter Dörwald [Thu, 14 Aug 2003 20:26:44 +0000 (20:26 +0000)]
Backport checkins:
Fix refcount leak in PyUnicode_EncodeCharmap(). The bug surfaces
when an encoding error occurs and the callback name is unknown,
i.e. when the callback has to be called. The problem was that
the fact that the callback has already been looked up was only
recorded in a local variable in charmap_encoding_error(), because
charmap_encoding_error() got it's own copy of the errorHandler
pointer instead of a pointer to the pointer in
PyUnicode_EncodeCharmap().
Walter Dörwald [Tue, 12 Aug 2003 17:38:22 +0000 (17:38 +0000)]
Backport checkins:
* Enhance message for UnicodeEncodeError and UnicodeTranslateError.
If there is only one bad character it will now be printed in a
form that is a valid Python string.
* Add a unicode prefix to the characters in the UnicodeEncodeError
and UnicodeTranslateError message.
The default seed is time.time().
Multiplied by 256 before truncating so that fractional seconds are used.
This way, two consequetive calls to random.seed() are much more likely
to produce different sequences.
Brett Cannon [Wed, 6 Aug 2003 21:17:09 +0000 (21:17 +0000)]
Re-introduction of caching. Not thread-safe against the changing of locale
in the middle of executing time.strptime . Added new tests for caching
mechanism; taken from 2.4 branch and tweaked appropriately.
Backport SF bug #782369: Massive memory leak in array module
Fixed leak caused by switching from PyList_GetItem to PySequence_GetItem.
Added missing NULL check.
Clarified code by converting an "if" to an "else if".
Tim Peters [Tue, 29 Jul 2003 17:22:57 +0000 (17:22 +0000)]
SF bug 778400: IDLE hangs when selecting "Edit with IDLE".
The fix is confined to the Windows installer.
Not a bugfix candidate: the need for the new -n switch added here was
introduced by moving to the idlefork IDLE (so this change isn't needed
or helpful before 2.3).
Kurt B. Kaiser [Sun, 27 Jul 2003 03:24:19 +0000 (03:24 +0000)]
Added a banner to the shell startup message discussing possible
warnings from personal firewall software. Added the same text
to README.txt, updated NEWS.txt for release.
Jack Jansen [Thu, 24 Jul 2003 22:25:03 +0000 (22:25 +0000)]
Don't export the SPB type as "SPB", because it shadows the method SPB,
which is really important. This is a stopgap measure, as only the generated
C code is adapted. Fixes #776533.
Fixes bug of having default argument for TimeRE's __init__ that caused the
LocaleTime instance to only be created once and thus not be recreated when
the locale changed.
Remove caching of TimeRE (and thus LocaleTime) instance. Error was being
caught when executing test_strptime, test_logging, and test_time in that order
when the testing of "%c" occured. Suspect the cache was not being recreated
(the test passed when test_logging was forced to re-establish the locale).
Kurt B. Kaiser [Wed, 23 Jul 2003 15:42:14 +0000 (15:42 +0000)]
1. Python Bug 775541: Calltips error when docstring is None. Introduced
by patch 769142. Fixed by patch 776062. KBK will backport net result
to IDLE release22-maint and IDLEfork.
2. Update NEWS.txt and idlever for release.
Jack Jansen [Wed, 23 Jul 2003 10:51:55 +0000 (10:51 +0000)]
Don't force boot-disk-only install, for reasons unknown it causes more
problems than it solves. In stead, put a warning near the top of the
welcome message. Fixes (or, rather works around) bug #764975.