Guido van Rossum [Wed, 15 Aug 2001 21:02:20 +0000 (21:02 +0000)]
Given a class without __cmp__ or __eq__, cmp() of two instances of
that class should compare the id() of those instances. Add a test
that verifies this. This test currently fails; I believe this is
caused by object.c:2.132 (Patch #424475 by loewis).
Fred Drake [Wed, 15 Aug 2001 19:07:18 +0000 (19:07 +0000)]
A large contribution from Dave Kuhlman describing what each of the slots
in the type object is used for, for many of the more commonly used slots.
Thanks!
(But there is still a lot more to write on this topic.)
Markup and organizational changes by your friendly neighborhood
documentation czar.
Fred Drake [Wed, 15 Aug 2001 18:32:33 +0000 (18:32 +0000)]
Added comments before recently added/assigned slots in the type object,
so the backward compatibility issues will be easier to understand. I only
added comments indicating additions and assignments back to Python 2.0.
Jack Jansen [Wed, 15 Aug 2001 13:55:15 +0000 (13:55 +0000)]
MacOSX: if we're building without --enable-toolbox-glue don't attempt to
include _PyMac_Error. Also don't try to include __dummy: it needs Foundation
and I think (not 100% sure) that this isn't part of naked Darwin.
Tim Peters [Wed, 15 Aug 2001 06:10:16 +0000 (06:10 +0000)]
New, larger installer bitmap from Erik van Blokland. Added more
vertical whitespace to the acknowledgements portion of the "Installation
Completed!" screen for easier reading.
Jack Jansen [Wed, 15 Aug 2001 01:26:28 +0000 (01:26 +0000)]
Lots of changes in the framework support:
- Made framework builds work for MacOSX. The configure arg is now
"--enable-framework".
- Added an install target frameworkinstall which installs the framework.
- Ripped out Next/OpenStep support, which was broken anyway.
- Made the MacOSX toolbox glue dependant on a --enable-toolbox-glue
configure arg. This should make naked darwin build work again (untested).
A few targets have been added to Makefile.pre.in, and on inspection they
look harmless to non-MacOSX machines, but it is worth checking.
Jack Jansen [Wed, 15 Aug 2001 01:14:40 +0000 (01:14 +0000)]
With WITH_NEXT_FRAMEWORK defined we now also expect a normal Python
installation.
If there is no LANDMARK we assume we're a bare framework in the
install directory (again WITH_NEXT_FRAMEWORK only).
Jeremy Hylton [Tue, 14 Aug 2001 20:01:59 +0000 (20:01 +0000)]
Fix SF bug [ #450909 ] __future__.division fails at prompt
When code is compiled and compiler flags are passed in, be sure to
update cf_flags with any features defined by future statements in the
compiled code.
Barry Warsaw [Tue, 14 Aug 2001 18:35:02 +0000 (18:35 +0000)]
Document the new semantics for setting and deleting a function's
__dict__ attribute. Deleting it, or setting it to a non-dictionary
result in a TypeError. Note that getting it the first time magically
initializes it to an empty dict so that func.__dict__ will always
appear to be a dictionary (never None).
Barry Warsaw [Tue, 14 Aug 2001 18:28:28 +0000 (18:28 +0000)]
Test the new semantics for setting and deleting a function's __dict__
attribute. Deleting it, or setting it to a non-dictionary result in a
TypeError. Note that getting it the first time magically initializes
it to an empty dict so that func.__dict__ will always appear to be a
dictionary (never None).
Barry Warsaw [Tue, 14 Aug 2001 18:23:58 +0000 (18:23 +0000)]
func_getattro(), func_setattro(): Implement the new semantics for
setting and deleting a function's __dict__ attribute. Deleting
it, or setting it to a non-dictionary result in a TypeError. Note
that getting it the first time magically initializes it to an
empty dict so that func.__dict__ will always appear to be a
dictionary (never None).
Barry Warsaw [Tue, 14 Aug 2001 18:22:24 +0000 (18:22 +0000)]
Describe the new semantics for setting and deleting a function's
__dict__ attribute. Deleting it, or setting it to a non-dictionary
result in a TypeError. Note that getting it the first time magically
initializes it to an empty dict so that func.__dict__ will always
appear to be a dictionary (never None).
Barry Warsaw [Mon, 13 Aug 2001 23:04:56 +0000 (23:04 +0000)]
Py_Initialize(): Apply patch by Jürgen Hermann to call
_PyImport_FixupExtension() on the exceptions module. Now
reload(exceptions) acts just like reload(sys) instead of raising
an ImportError.
Fred Drake [Mon, 13 Aug 2001 19:31:59 +0000 (19:31 +0000)]
David Goodger <dgoodger@atsautomation.com>:
Documentation for difflib/ndiff refactoring: more of the ndiff functionality
has been moved to the underlying library (difflib).
Guido van Rossum [Mon, 13 Aug 2001 14:12:35 +0000 (14:12 +0000)]
Fix two bugs discovered by PyChecker. (I cannot test these, but I'm
confident that the old code was utterly broken -- the worse that can
happen is that the new code is still broken.)
Tim Peters [Mon, 13 Aug 2001 05:33:53 +0000 (05:33 +0000)]
+ A msg on c.l.py reminded me that docstrings can be implicitly catenated.
Cater to that.
+ Major speed boost via not reading more of files than necessary. This
was no slouch before; now it screams.
+ Improve msg when giving up on a goofy future statement.
Jeremy Hylton [Sun, 12 Aug 2001 21:52:24 +0000 (21:52 +0000)]
Remove much dead code from ceval.c
The descr changes moved the dispatch for calling objects from
call_object() in ceval.c to PyObject_Call() in abstract.c.
call_object() and the many functions it used in ceval.c were no longer
used, but were not removed.
Rename meth_call() as PyCFunction_Call() so that it can be called by
the CALL_FUNCTION opcode in ceval.c.
Also, fix error message that referred to PyEval_EvalCodeEx() by its
old name eval_code2(). (I'll probably refer to it by its old name,
too.)
Guido van Rossum [Sun, 12 Aug 2001 05:24:18 +0000 (05:24 +0000)]
- Expand test for dynamic objects.
- Remove various 'global' directives and move some global definitions
inside the test functions that use them -- we have nested scopes so
the old hacks using globals are no longer needed.
Guido van Rossum [Sun, 12 Aug 2001 05:17:56 +0000 (05:17 +0000)]
Make dynamic types work as intended. Or at least more so.
XXX There are still some loose ends: repr(), str(), hash() and
comparisons don't inherit a default implementation from object. This
must be resolved similarly to the way it's resolved for classic
instances.
Guido van Rossum [Sun, 12 Aug 2001 03:43:35 +0000 (03:43 +0000)]
Temporary stop-gap fix for dynamic classes, so they pass the test.
XXX This is not sufficient: if a dynamic class has no __repr__ method
(for instance), but later one is added, that doesn't add a tp_repr
slot, so repr() doesn't call the __repr__ method. To make this work,
I'll have to add default implementations of several slots to 'object'.
XXX Also, dynamic types currently only inherit slots from their
dominant base.
Guido van Rossum [Sun, 12 Aug 2001 02:22:19 +0000 (02:22 +0000)]
Add the list of expected skips for Linux 2.x. Restructured the code a
little bit using a dictionary to avoid more code duplication as
more platforms are supported.