Expand the groupby() example to:
* show that it is typically used with sorted data,
* highlight commonalities with SQL's groupby and Unix's uniq,
* demonstrate valid uses for the default identity function,
* add some excitement by suggesting the range of possibilities.
Jack Jansen [Wed, 10 Dec 2003 15:18:18 +0000 (15:18 +0000)]
- Renamed OSA.ComponentInstance to OSA.OSAComponentInstance. It is not
a real subtype of Cm.ComponentInstance right now, it turns out that is
too difficult.
- OSA.OSAComponentInstance initializer does accept a Cm.ComponentInstance
instance, though, so at least things are becoming useable.
Hye-Shik Chang [Wed, 10 Dec 2003 07:31:08 +0000 (07:31 +0000)]
Fix memory error treatment correctly. Going to dsu_fail causes
deallocating garbage pointers; saved_ob_item and empty_ob_item.
(Reviewed by Raymond Hettinger)
Walter Dörwald [Mon, 8 Dec 2003 11:38:45 +0000 (11:38 +0000)]
Move list and tuple tests from test_types.py to their own scripts:
test_tuple.py and test_list.py. Common tests for tuple, list and UserList
are shared (in seq_tests.py and list_tests.py). Port tests to PyUnit.
(From SF patch #736962)
Jack Jansen [Mon, 8 Dec 2003 01:10:12 +0000 (01:10 +0000)]
Revamped framework search path handling for MacOSX. This should allow
two framework builds (in /Library and /System/Library) to coexist
with distutils linking against the right one.
Should be backported to 2.3, but getting Apple-supplied Python to pick
up these fixes is going to be non-trivial.
SF bug #855317: unittest: 5.3.9 Getting Extended Error Information
The example code did not work and could not easily be made to work.
Since the docs were already complex and the feature was not used
(it took two years for the errors to surface), we decided to dedocument
it entirely, leaving unittest cleaner than before.
Original idea by Guido van Rossum.
Idea for skipable inner iterators by Raymond Hettinger.
Idea for argument order and identity function default by Alex Martelli.
Implementation by Hye-Shik Chang (with tweaks by Raymond Hettinger).
Jack Jansen [Fri, 5 Dec 2003 23:51:54 +0000 (23:51 +0000)]
Reverting to previous version, which works. And I don't really care about
the new waste functionality because it's probably going to be dropped
anyway.
Thomas Heller [Fri, 5 Dec 2003 20:12:23 +0000 (20:12 +0000)]
Compile the files in the same order they are passed to the compiler.
Use case: Sometimes 'compiling' source files (with SWIG, for example)
creates additionl files which included by later sources. The win32all
setup script requires this.
There is no SF item for this, but it was discussed on distutils-sig:
http://mail.python.org/pipermail/distutils-sig/2003-November/003514.html
Jack Jansen [Wed, 3 Dec 2003 22:34:19 +0000 (22:34 +0000)]
Adding an interface to the high-level Open Scripting Architecture,
by request of Donovan Preston. In return, he promised to use this
to create a Python OSA component, which would turn Python
into a first-class OSA scripting language (like AppleScript itself).
Mark Hammond [Wed, 3 Dec 2003 22:16:47 +0000 (22:16 +0000)]
Fix test_unicode_file errors on platforms without Unicode file support,
by setting TESTFN_UNICODE_UNENCODEABLE on these platforms.
test_unicode_file only attempts to use the name for testing if not None.
Reduce the size of Big String and Big Binary tests to 2**14 (minus one
for Big String). This should make the tests pass on Win98SE. Note
that the docs only promise lengths up to 2048. Unfortunately this no
longer tests for the segfault I was seeing earlier, but I'm confident
I've nailed that one. :-) Fixes SF 852281. Will backport to 2.3.
Mark Hammond [Wed, 3 Dec 2003 01:29:56 +0000 (01:29 +0000)]
Add test for bug "[ 846133 ] os.chmod/os.utime/shutil do not work with
unicode filenames"
Reorganize tests into functions so more combinations of
unicode/encoded/ascii can be tested, and while I was at it, upgrade to
unittest based test.
EMX lacks an implementation of link(). As Mailman wants os.link() to
implement its locking scheme, this module implements a crude link() by
way of copying the source to the destination provided the destination
doesn't already exist.
To find the curses extension as a DLL (on OS/2), we need to adjust the
library search path to include the extension directory. Without this,
the curses_panel extension can't find the curses extension/DLL, which
exports some curses symbols to it.
- add build support for curses extension to be a normal DLL as well as
a Python extension, so that the curses_panel extension works.
- minor compiler switch tweak.
Guido van Rossum [Sun, 30 Nov 2003 22:01:43 +0000 (22:01 +0000)]
Remove all uses of alloca() from this module. The alloca() return value
isn't checked, and it *is* possible that a very large alloca() call is
made, e.g. when a large registry value is being read. I don't know if
alloca() in that case returns NULL or returns a pointer pointing outside
the stack, and I don't want to know -- I've simply replaced all calls to
alloca() with either PyMem_Malloc() or PyString_FromStringAndSize(NULL,)
as appropriate, followed by a size check. This addresses SF buf 851056.
Will backport to 2.3 next.
Guido van Rossum [Sat, 29 Nov 2003 23:52:13 +0000 (23:52 +0000)]
- Removed FutureWarnings related to hex/oct literals and conversions
and left shifts. (Thanks to Kalle Svensson for SF patch 849227.)
This addresses most of the remaining semantic changes promised by
PEP 237, except for repr() of a long, which still shows the trailing
'L'. The PEP appears to promise warnings for operations that
changed semantics compared to Python 2.3, but this is not
implemented; we've suffered through enough warnings related to
hex/oct literals and I think it's best to be silent now.
Thomas Heller [Fri, 28 Nov 2003 19:42:56 +0000 (19:42 +0000)]
See SF #848614: distutils' msvccompiler now tries to detect that MSVC6
is installed but the registry settings are incomplete because the gui
has never been run.
Jack Jansen [Thu, 27 Nov 2003 23:19:33 +0000 (23:19 +0000)]
Fix (workaround, actually) for bug #844676: deselecting "show hidden" can
cause an index error. We now select the first package if this threatens
to happen. Will backport.
Jack Jansen [Thu, 27 Nov 2003 23:12:17 +0000 (23:12 +0000)]
Package Mnager error dialogs could refer to hidden packages, which was
confusing. To be on the safe side we always show hidden packages before
showing error dialogs. Will backport.