Guido van Rossum [Fri, 24 Aug 2001 16:55:27 +0000 (16:55 +0000)]
Add test suite for super().
Guido van Rossum [Fri, 24 Aug 2001 16:52:18 +0000 (16:52 +0000)]
Add 'super' builtin type.
Guido van Rossum [Fri, 24 Aug 2001 16:51:42 +0000 (16:51 +0000)]
Add decl of PySuper_Type; fixup comments for the two other types.
Guido van Rossum [Fri, 24 Aug 2001 16:47:00 +0000 (16:47 +0000)]
Add 'super', another new object type with magical properties.
super(type) -> unbound super object
super(type, obj) -> bound super object; requires isinstance(obj, type)
Typical use to call a cooperative superclass method:
class C(B):
def meth(self, arg):
super(C, self).meth(arg);
Guido van Rossum [Fri, 24 Aug 2001 15:24:24 +0000 (15:24 +0000)]
Add a test for the new getset type.
Guido van Rossum [Fri, 24 Aug 2001 15:23:20 +0000 (15:23 +0000)]
Change the getset type to take an optional third function argument:
the delete function. (Question: should the attribute name also be
recorded in the getset object? That makes the protocol more work, but
may give us better error messages.)
Guido van Rossum [Fri, 24 Aug 2001 13:10:13 +0000 (13:10 +0000)]
SF patch #454553 by Walter Dörwald: add content-type to FTP URLs, like
for urllib.
Guido van Rossum [Fri, 24 Aug 2001 10:17:36 +0000 (10:17 +0000)]
getset_descr_set(): guard against deletion (indicated by a set call
with a NULL value), in a somewhat lame way: call the set() function
with one argument. Should I add a 3rd function, 'del', instead?
Guido van Rossum [Fri, 24 Aug 2001 10:13:31 +0000 (10:13 +0000)]
slot_tp_descr_get(): guard against NULL obj or type (bug reported by
Thomas Hellor on python-dev).
slot_tp_descr_set(): if value is NULL, call __del__ instead of
__set__.
Guido van Rossum [Fri, 24 Aug 2001 09:55:51 +0000 (09:55 +0000)]
getset_init(): make the arguments optional.
getset_doc: add docstring.
Jack Jansen [Fri, 24 Aug 2001 09:17:15 +0000 (09:17 +0000)]
Last renamed module that wasn't removed yet.
Tim Peters [Fri, 24 Aug 2001 06:29:12 +0000 (06:29 +0000)]
Back out trying to use the C values for CO_xxx.
__future__.py reverted to 1.9.
newmodule.c reverted to 2.32.
Tim Peters [Fri, 24 Aug 2001 04:33:10 +0000 (04:33 +0000)]
Looks like someone forgot the change the expected output file.
Tim Peters [Thu, 23 Aug 2001 23:02:57 +0000 (23:02 +0000)]
Add a test for the new // operator too.
Tim Peters [Thu, 23 Aug 2001 22:56:21 +0000 (22:56 +0000)]
SF bug [#454456] int overflow code needs tests.
Added tests for boundary cases in magical PEP 237 int->long auto-overflow,
but nothing here addresses the rest of the bug report so left it open.
Tim Peters [Thu, 23 Aug 2001 22:31:37 +0000 (22:31 +0000)]
float_pow: Put *all* of the burden on the libm pow in normal
cases.
powu: Deleted.
This started with a nonsensical error msg:
>>> x = -1.
>>> import sys
>>> x**(-sys.maxint-1L)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: negative number cannot be raised to a fractional power
>>>
The special-casing in float_pow was simply wrong in this case (there's
not even anything peculiar about these inputs), and I don't see any point
to it in *any* case: a decent libm pow should have worst-case error under
1 ULP, so in particular should deliver the exact result whenever the exact
result is representable (else its error is at least 1 ULP). Thus our
special fiddling for integral values "shouldn't" buy anything in accuracy,
and, to the contrary, repeated multiplication is less accurate than a
decent pow when the true result isn't exactly representable. So just
letting pow() do its job here (we may not be able to trust libm x-platform
in exceptional cases, but these are normal cases).
Guido van Rossum [Thu, 23 Aug 2001 21:40:38 +0000 (21:40 +0000)]
Add new built-in type 'getset' (PyGetSet_Type).
This implements the 'getset' class from test_binop.py.
Guido van Rossum [Thu, 23 Aug 2001 21:32:40 +0000 (21:32 +0000)]
err_ovf(): only raise OverflowError when OverflowWarning was raised.
Tim Peters [Thu, 23 Aug 2001 21:28:33 +0000 (21:28 +0000)]
int_pow(): Repair typo when passing on to float pow (the 2nd argument was
being passed as both the 2nd and 3rd args). Regression test will follow.
Greg Ward [Thu, 23 Aug 2001 20:53:27 +0000 (20:53 +0000)]
Patch #449054 to implement PEP 250. The standard install directory for
modules and extensions on Windows is now $PREFIX/Lib/site-packages.
Includes backwards compatibility code for pre-2.2 Pythons. Contributed
by Paul Moore.
Tim Peters [Thu, 23 Aug 2001 20:34:01 +0000 (20:34 +0000)]
Remove test_long's expected-output file.
Fredrik Lundh [Thu, 23 Aug 2001 20:13:08 +0000 (20:13 +0000)]
untabification
Fredrik Lundh [Thu, 23 Aug 2001 20:04:33 +0000 (20:04 +0000)]
updated to current PythonWare version (1.0b3). fixed type checks in
DateTime constructor. use ServerProxy instead of Server in sample
code.
Finn Bock [Thu, 23 Aug 2001 18:57:01 +0000 (18:57 +0000)]
Committing and closing SF patch #441348 to help Jython to pass this test.
Barry Warsaw [Thu, 23 Aug 2001 16:15:21 +0000 (16:15 +0000)]
Bump to version 1.3. Also document the new behavior of the chip widgets.
Barry Warsaw [Thu, 23 Aug 2001 16:15:02 +0000 (16:15 +0000)]
Bump to version 1.3
Barry Warsaw [Thu, 23 Aug 2001 16:14:45 +0000 (16:14 +0000)]
Implement some suggestions by Laura Creighton.
ChipWidget.__init__(): Added a message area just below the color
name. Both the message and name widgets are now FLAT, DISABLED
Entry widgets instead of Labels. This allows users to
copy-n-paste the color names or color specs. Also, the contents
of both widgets are now driven by StringVars.
set_color(): This only sets the chip color; it does not set the name
widgets.
set_name(): New method which only sets the name widget contents.
set_message(): New method which only sets the message widget contents.
ChipViewer.update_yourself(): Set the color, name, and message for
each chip as follows: the first line always contains the color
spec in #rrggbb format. The second line will contain the color
name, but slightly differently for each widget. For the Selected
widget, if the color exactly matches the Nearest color, the name
is shown, otherwise the message field will be empty. The name
field of the Nearest widget will always contain the color name.
Jack Jansen [Thu, 23 Aug 2001 14:13:06 +0000 (14:13 +0000)]
Wrapper modules underound the toolbox modules, which now have an _ prepended.
Jack Jansen [Thu, 23 Aug 2001 14:11:10 +0000 (14:11 +0000)]
Renamed.
Jack Jansen [Thu, 23 Aug 2001 14:02:09 +0000 (14:02 +0000)]
Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen [Thu, 23 Aug 2001 13:53:34 +0000 (13:53 +0000)]
Mac toolbox modules have gotten an _ prepended to their name.
Jack Jansen [Thu, 23 Aug 2001 13:51:46 +0000 (13:51 +0000)]
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Guido van Rossum [Thu, 23 Aug 2001 13:38:15 +0000 (13:38 +0000)]
SF patch #454553 by Walter Dörwald: auto-guess content-type header for
ftp urls.
Jack Jansen [Thu, 23 Aug 2001 13:25:59 +0000 (13:25 +0000)]
Don't make even the _slightest_ modification between test and checkin,
or you will break something:-)
Jack Jansen [Thu, 23 Aug 2001 13:18:10 +0000 (13:18 +0000)]
The MacOS module may be available on Mac OS X, but it doesn't have a SchedParams() method, and there's no need to call it anyway.
Guido van Rossum [Thu, 23 Aug 2001 03:23:03 +0000 (03:23 +0000)]
Turn OverflowWarning into an error locally, in order to make the
OverflowError test succeed.
Guido van Rossum [Thu, 23 Aug 2001 03:07:42 +0000 (03:07 +0000)]
Ignore OverflowWarning by default. To enable the warning, use
python -Wdefault
or
python -Wdefault::OverflowWarning
Guido van Rossum [Thu, 23 Aug 2001 02:59:04 +0000 (02:59 +0000)]
Change all case where we used to raise OverflowError to issue a
warning and then redo the operation using long ints.
Guido van Rossum [Thu, 23 Aug 2001 02:58:07 +0000 (02:58 +0000)]
When an inlined operation on two small ints causes overflow, don't
raise the exception here -- call the generic function (which may
convert the arguments to long and try again).
Guido van Rossum [Thu, 23 Aug 2001 02:56:07 +0000 (02:56 +0000)]
Introduce OverflowWarning -- to be issued when short int operations
are overflowing and a long int operation is substituted.
Tim Peters [Wed, 22 Aug 2001 22:18:31 +0000 (22:18 +0000)]
Add pynche's top-level txt files to Windows installer -- I don't believe
we've *ever* installed them!
Tim Peters [Wed, 22 Aug 2001 21:36:50 +0000 (21:36 +0000)]
"The usual" post-release fiddling.
Barry Warsaw [Wed, 22 Aug 2001 20:26:56 +0000 (20:26 +0000)]
Add an item about Tim's new installer. This didn't make it into the
2.2a2 release, but it's still worth mentioning.
Barry Warsaw [Wed, 22 Aug 2001 19:24:42 +0000 (19:24 +0000)]
Merge changes from r22a2-branch back into trunk. Also, change patch
level to 2.2a2+
Skip Montanaro [Wed, 22 Aug 2001 12:44:27 +0000 (12:44 +0000)]
indicate that mktime is platform-dependent. See SF bug 434143.
Skip Montanaro [Wed, 22 Aug 2001 12:43:38 +0000 (12:43 +0000)]
indicate that the years for which the calendar function will work are
platform dependent. See SF bug 434143.
Skip Montanaro [Wed, 22 Aug 2001 12:39:16 +0000 (12:39 +0000)]
make the gettmarg error message more correct by making it more vague ;-)
see SF bug 434143, part of which this addresses
Barry Warsaw [Wed, 22 Aug 2001 04:08:41 +0000 (04:08 +0000)]
More NEWS for 2.2a2.
Jack Jansen [Tue, 21 Aug 2001 19:28:20 +0000 (19:28 +0000)]
Added a note about --enable-framework on Mac OS X.
Jack Jansen [Tue, 21 Aug 2001 10:51:47 +0000 (10:51 +0000)]
These long dead files somehow got revived. Killed them (but for how
long? :-).
Jack Jansen [Tue, 21 Aug 2001 10:49:11 +0000 (10:49 +0000)]
This file has been dead for aeons. I have no idea how it suddenly
surfaced again.
Ka-Ping Yee [Tue, 21 Aug 2001 06:53:01 +0000 (06:53 +0000)]
Enhancements:
- file URL now starts with "file://" (standard) rather than "file:"
- new optional argument 'context' to enable()
- repeated variable names don't have their values shown twice
- dotted attributes are shown; missing attributes handled reasonably
- highlight the whole logical line even if it has multiple physical lines
- use nice generator interface to tokenize
- formatting fixed so that it looks good in lynx, links, and w3m too
Skip Montanaro [Tue, 21 Aug 2001 04:23:21 +0000 (04:23 +0000)]
This is supposed to help configure better sort out the various libdb
incarnations. It's probably not quite sufficient, but should be better than
the status quo...
Barry Warsaw [Mon, 20 Aug 2001 22:39:42 +0000 (22:39 +0000)]
A test of SSL support, using a roundabout method suggested by Guido.
However, this is only enabled with regrtest's --use=network switch.
Barry Warsaw [Mon, 20 Aug 2001 22:37:34 +0000 (22:37 +0000)]
Use test_support.requires() to decide whether additional largefile
tests should be run.
Barry Warsaw [Mon, 20 Aug 2001 22:33:46 +0000 (22:33 +0000)]
Removed --have-resources flag in favor of the more granular -u/--use
flag, which specifies external or resource intensive tests to
perform. This is used by test_largefile and test_socket_ssl.
-u/--use takes a comma separated list of flags, currently supported:
largefile, network.
usage(): New function. Note that the semantics of main() have changed
slightly; instead of returning an error code, it raises a
SystemExit (via sys.exit()) with the given error code.
main(): use_large_resources => use_resources
Also, added support for long-option alternative to the short
options.
_expectations: Added test_socket_ssl to the list of expectedly skipped
tests.
Barry Warsaw [Mon, 20 Aug 2001 22:29:23 +0000 (22:29 +0000)]
use_large_resources => use_resources
requires(): New function which can be used to `assert' that a specific
-u/--use resource flag is present. Raises a TestSkipped if not.
This is used in test_largefile and test_socket_ssl to enable
external or resource consumptive tests that are normally
disabled.
Barry Warsaw [Mon, 20 Aug 2001 22:26:24 +0000 (22:26 +0000)]
SSL_dealloc(): Apply the change suggested in SF bug #425370 which
changes the order of the free calls to be the reverse of the alloc
calls. Closes that bug.
Tim Peters [Mon, 20 Aug 2001 21:48:00 +0000 (21:48 +0000)]
Whitespace normalization.
Tim Peters [Mon, 20 Aug 2001 21:45:19 +0000 (21:45 +0000)]
Test failed because these was no expected-output file, but always printed
to stdout. Repaired by not printing at all except in verbose mode.
Made the test about 6x faster -- envelope analysis showed it took time
proportional to the square of the # of tasks. Now it's linear.
Fred Drake [Mon, 20 Aug 2001 21:36:38 +0000 (21:36 +0000)]
New \grammartoken markup, similar to \token but allowed everywhere.
Fred Drake [Mon, 20 Aug 2001 21:33:41 +0000 (21:33 +0000)]
Add another name.
Fred Drake [Mon, 20 Aug 2001 21:24:19 +0000 (21:24 +0000)]
Deal more appropriately with bare ampersands and pointy brackets; this
module has to deal with "class" HTML-as-deployed as well as XHTML, so we
cannot be as strict as XHTML allows.
This closes SF bug #453059, but uses a different fix than suggested in
the bug comments.
Jeremy Hylton [Mon, 20 Aug 2001 21:18:56 +0000 (21:18 +0000)]
Add test case to cover multiple future statements on separate lines of
a module.
Jeremy Hylton [Mon, 20 Aug 2001 20:33:42 +0000 (20:33 +0000)]
Fix SF bug [ #450245 ] Error in parsing future stmts
Add test case to cover multiple future statements on separate lines of
a module.
Jeremy Hylton [Mon, 20 Aug 2001 20:32:33 +0000 (20:32 +0000)]
Fix SF bug [ #450245 ] Error in parsing future stmts
Check return value from future_parse() in for loop for file_input to
accomodate multiple future statements on separate lines.
Add several comments explaining how the code works.
Remove out-dated XXX comment.
Barry Warsaw [Mon, 20 Aug 2001 20:29:07 +0000 (20:29 +0000)]
Committing and closing SF patch #403671 by Finn Bock to help Jython
pass these tests.
Skip Montanaro [Mon, 20 Aug 2001 20:28:48 +0000 (20:28 +0000)]
add a few test cases for threading module.
Skip Montanaro [Mon, 20 Aug 2001 20:27:58 +0000 (20:27 +0000)]
Added new BoundedSemaphore class. Closes bug 452836.
Jeremy Hylton [Mon, 20 Aug 2001 20:10:01 +0000 (20:10 +0000)]
Silence warnings during test_os
Fred Drake [Mon, 20 Aug 2001 19:30:29 +0000 (19:30 +0000)]
Split "Extending & Embedding" into separate files, one per chapter.
Jeremy Hylton [Mon, 20 Aug 2001 19:06:36 +0000 (19:06 +0000)]
It will always be a string, because it is created just before this call.
Fred Drake [Mon, 20 Aug 2001 18:49:00 +0000 (18:49 +0000)]
Added documentation for BoundedSemaphore(), contributed by Skip Montanaro.
This closes SF patch #452836.
Fred Drake [Mon, 20 Aug 2001 16:48:59 +0000 (16:48 +0000)]
Document PyTuple_GET_SIZE(), removing confusing sentence from PyDict_Copy()
description.
This fixes SF bug #453111.
Jack Jansen [Mon, 20 Aug 2001 15:35:57 +0000 (15:35 +0000)]
Oops, these compatibility modules were missing. Which went unnoticed because their companions had been put in the wrong place.
Jack Jansen [Mon, 20 Aug 2001 15:31:56 +0000 (15:31 +0000)]
Various toolbox modules were generated in lib-dynload accidentally
in stead of in Carbon. Fixed.
Eric S. Raymond [Mon, 20 Aug 2001 13:16:30 +0000 (13:16 +0000)]
Clean up some argument profiles, enrich the docstring.
Jack Jansen [Mon, 20 Aug 2001 10:20:27 +0000 (10:20 +0000)]
Oops, this file shouldn't have been removed.
Jack Jansen [Sun, 19 Aug 2001 22:32:57 +0000 (22:32 +0000)]
The destination folder is now :Lib:lib-dynload
Jack Jansen [Sun, 19 Aug 2001 22:32:27 +0000 (22:32 +0000)]
PATCHLEVEL is outdated, use PY_VERSION.
Jack Jansen [Sun, 19 Aug 2001 22:30:31 +0000 (22:30 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.
Jack Jansen [Sun, 19 Aug 2001 22:29:57 +0000 (22:29 +0000)]
Dynamic modules are now put in :Lib:lib-dynload by default. For the toolbox modules this is overridden to put them in :Mac:Lib:Carbon.
Jack Jansen [Sun, 19 Aug 2001 22:28:32 +0000 (22:28 +0000)]
Compatibility modules. lib-compat is on the default sys.path for MacPython 2.2, and each of these modules imports * from its namesake in the Carbon package.
Jack Jansen [Sun, 19 Aug 2001 22:20:55 +0000 (22:20 +0000)]
Moved to either :Mac:Lib (WASTEconst and files that weren't generated) or to the Carbon package.
Jack Jansen [Sun, 19 Aug 2001 22:13:00 +0000 (22:13 +0000)]
The modules with toolbox constants.
Jack Jansen [Sun, 19 Aug 2001 22:07:59 +0000 (22:07 +0000)]
Carbon is now a package encapsulating all the toolbox modules. Carbon is not
the best of names right now (because QuickTime, for instance, is part of
its own framekwork in OSX terminology, and because all these modules also
work on pre-Carbon MacOS) but in a year or so it will be:-).
Jack Jansen [Sun, 19 Aug 2001 22:05:33 +0000 (22:05 +0000)]
Moved here form lib-toolbox, for lack of a better place to go.
Jack Jansen [Sun, 19 Aug 2001 22:05:06 +0000 (22:05 +0000)]
Moved here from lib-toolbox, where they should never have been in the first place (all the other stuff there wa generated with bgen).
Jack Jansen [Sun, 19 Aug 2001 22:02:56 +0000 (22:02 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.
Jack Jansen [Sun, 19 Aug 2001 22:00:20 +0000 (22:00 +0000)]
Temporarily disabled the import hook. It breaks with the package-based
Carbon and its workaround.
Jack Jansen [Sun, 19 Aug 2001 21:18:04 +0000 (21:18 +0000)]
Removed NEXT-NOTES, the NeXT is no longer supported.
Jack Jansen [Sun, 19 Aug 2001 21:17:03 +0000 (21:17 +0000)]
Removed NeXT notes (replacing them with a line saying NeXT is no
longer supported) and updated MacOSX notes.
Jack Jansen [Sun, 19 Aug 2001 20:28:39 +0000 (20:28 +0000)]
Got rid of all the plugin xml files: they are generated, and
they were only in the repository for people building MacPython from
CVS (the .cmp project files are in a MacPython source
distribution). The process to regenerate them is now easier (and
documented!) so these shouldn't be needed anymore.
And eventually they should all be built by setup.py anyway.
Skip Montanaro [Sun, 19 Aug 2001 05:53:47 +0000 (05:53 +0000)]
of course I muffed it separating the notes code from the initial_value
code. grrr...
Guido van Rossum [Sun, 19 Aug 2001 05:29:25 +0000 (05:29 +0000)]
Avoid total dependency on the new module. This addresses the problem
reported by Greg Ball on python-dev.
Skip Montanaro [Sun, 19 Aug 2001 04:25:24 +0000 (04:25 +0000)]
add debug calls to self._note for the Semaphore class. This closes bug
443614. I will submit a new feature request and patch to threading.py and
libthreading.tex to address the bounded semaphore issue.
Tim Peters [Sun, 19 Aug 2001 01:38:03 +0000 (01:38 +0000)]
Improve Windows time.clock() blurb; was missing return type and unit.
Tim Peters [Sun, 19 Aug 2001 00:56:28 +0000 (00:56 +0000)]
Windows fiddling for 2.2a2: bump build number; update copyright and
company info in resource files; change installer strings to match.
This belongs in the release branch too, of course.
Guido van Rossum [Sat, 18 Aug 2001 21:22:07 +0000 (21:22 +0000)]
SF patch #452239 by Gordon McMillan, to fix SF bug #451547.
This patch attempts to do to cPickle what Guido did
for pickle.py v 1.50. That is: save_global tries
importing the module, and fetching the name from the
module. If that fails, or the returned object is not
the same one we started with, it raises a
PicklingError. (All this so pickling a lambda will
fail at save time, rather than load time).
Guido van Rossum [Sat, 18 Aug 2001 21:08:22 +0000 (21:08 +0000)]
Add dependencies for Python/thread.c on all of the header files that
it may depend on. It's really annoying that thread.o doesn't get
rebuilt when the .h file is changed! :-)
The dependency is on *all* the Python/thread_*.h files -- that should
be sufficient and rarely cause unneeded recompilations.