]> granicus.if.org Git - python/log
python
23 years agoclassic(), methods(): add another test relating to unbound methods:
Guido van Rossum [Fri, 17 Aug 2001 13:40:47 +0000 (13:40 +0000)]
classic(), methods(): add another test relating to unbound methods:
when an unbound method of class A is stored as a class variable of
class B, and class B is *not* a subclass of class A, that method
should *not* get bound to B instances.

23 years agoInstance methods: allow a NULL value for im_class.
Guido van Rossum [Fri, 17 Aug 2001 12:07:34 +0000 (12:07 +0000)]
Instance methods: allow a NULL value for im_class.

23 years agoAdd early binding of methods to the 2nd metaclass example.
Guido van Rossum [Fri, 17 Aug 2001 11:55:58 +0000 (11:55 +0000)]
Add early binding of methods to the 2nd metaclass example.

23 years agometaclass(): add tests for metaclasses written in Python: one that
Guido van Rossum [Fri, 17 Aug 2001 11:43:17 +0000 (11:43 +0000)]
metaclass(): add tests for metaclasses written in Python: one that
subclasses type, one that doesn't (the latter isn't fully functional
yet).

23 years agotype_new(): only defer to the winning metatype if it's different from
Guido van Rossum [Fri, 17 Aug 2001 11:18:38 +0000 (11:18 +0000)]
type_new(): only defer to the winning metatype if it's different from
the metatype passed in as an argument.  This prevents infinite
recursion when a metatype written in Python calls type.__new__() as a
"super" call.

Also tweaked some comments.

23 years agoStop adding 3 to FD_SETSIZE -- it makes no sense. If it turns out it
Tim Peters [Thu, 16 Aug 2001 21:59:46 +0000 (21:59 +0000)]
Stop adding 3 to FD_SETSIZE -- it makes no sense.  If it turns out it
actually does <wink>, perhaps an Insure run will catch it.
Also removed senseless Windows comment.

23 years agofix_font(): Instead of using a long if/elsif cluster, use a bloody
Fred Drake [Thu, 16 Aug 2001 21:56:24 +0000 (21:56 +0000)]
fix_font():  Instead of using a long if/elsif cluster, use a bloody
    dictionary.  Added some entries to the dictionary to fix part of
    SF bug #451556.

23 years agoFix typo reported by Joonas Paalasmaa: dada-->data
Fred Drake [Thu, 16 Aug 2001 21:25:24 +0000 (21:25 +0000)]
Fix typo reported by Joonas Paalasmaa:  dada-->data

23 years agoRe-write the description of the os.spawn*() functions, and cover the
Fred Drake [Thu, 16 Aug 2001 21:21:28 +0000 (21:21 +0000)]
Re-write the description of the os.spawn*() functions, and cover the
whole family instead of just two.

This closes SF bug #451630.

23 years agoAdded a test for module repr truncation when the package name is
Barry Warsaw [Thu, 16 Aug 2001 20:42:38 +0000 (20:42 +0000)]
Added a test for module repr truncation when the package name is
really long.  Closes SF bug #437984.

23 years agoclassobject.c:instancemethod_descr_get(): when a bound method is
Guido van Rossum [Thu, 16 Aug 2001 20:41:56 +0000 (20:41 +0000)]
classobject.c:instancemethod_descr_get(): when a bound method is
assigned to a class variable and then accessed via an instance, it
should not be rebound.

test_descr.py:methods(): test for the condition above.

23 years agomodule_repr(): Instead of fixing the maximum buf size to 400,
Barry Warsaw [Thu, 16 Aug 2001 20:39:24 +0000 (20:39 +0000)]
module_repr(): Instead of fixing the maximum buf size to 400,
    calculate it on the fly.  This way even modules with long package
    names get an accurate repr instead of a truncated one.  The extra
    malloc/free cost shouldn't be a problem in a repr function.

    Closes SF bug #437984

23 years agoIf genpluginprojects is called from fullbuild we set the Python source directory...
Jack Jansen [Thu, 16 Aug 2001 20:39:17 +0000 (20:39 +0000)]
If genpluginprojects is called from fullbuild we set the Python source directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.

23 years agoinit_sre(): Plug a little leak reported by Insure.
Barry Warsaw [Thu, 16 Aug 2001 20:33:48 +0000 (20:33 +0000)]
init_sre(): Plug a little leak reported by Insure.

23 years agoLink readline module with ncurses in preference to termcap. [Bug ##441580]
Andrew M. Kuchling [Thu, 16 Aug 2001 20:30:18 +0000 (20:30 +0000)]
Link readline module with ncurses in preference to termcap. [Bug ##441580]
Remove pointless comment

23 years ago[Patch #441691] preprocess() method for Borland C compiler.
Andrew M. Kuchling [Thu, 16 Aug 2001 20:17:41 +0000 (20:17 +0000)]
[Patch #441691] preprocess() method for Borland C compiler.
    I have no way of testing this.

23 years agotest_descr started breaking in yet another way in the same place.
Tim Peters [Thu, 16 Aug 2001 19:50:51 +0000 (19:50 +0000)]
test_descr started breaking in yet another way in the same place.

23 years agoFix object_repr() to include the module (using the same rules as
Guido van Rossum [Thu, 16 Aug 2001 18:52:43 +0000 (18:52 +0000)]
Fix object_repr() to include the module (using the same rules as
type_repr() for when to show or not to show it).

23 years agoNew unit test for the mimetypes module, to avoid future regressions.
Fred Drake [Thu, 16 Aug 2001 18:36:59 +0000 (18:36 +0000)]
New unit test for the mimetypes module, to avoid future regressions.

23 years agoAnother egregious error that copied the encodings info over the suffix
Fred Drake [Thu, 16 Aug 2001 18:14:38 +0000 (18:14 +0000)]
Another egregious error that copied the encodings info over the suffix
info.  Caught by the tests that I'm writing now.

23 years agoUse (c)StringIO for collecting bytes. Fixes bug #451622.
Martin v. Löwis [Thu, 16 Aug 2001 17:06:44 +0000 (17:06 +0000)]
Use (c)StringIO for collecting bytes. Fixes bug #451622.

23 years agoRepair some accidents causing Windows failures:
Tim Peters [Thu, 16 Aug 2001 16:56:16 +0000 (16:56 +0000)]
Repair some accidents causing Windows failures:
+ test_compare.  While None compares less than anything else, it's not
  always the case that None has the smallest id().
+ test_descr.  The output of %p (pointer) formats varies across platforms.
  In particular, on Windows it doesn't produce a leading "0x".

23 years agoFixed a couple of minor formatting nits where lines were > 79 columns wide.
Barry Warsaw [Thu, 16 Aug 2001 16:55:10 +0000 (16:55 +0000)]
Fixed a couple of minor formatting nits where lines were > 79 columns wide.

23 years agoselect_select(): Closing bug #448351 the easy way, i.e. by changing
Barry Warsaw [Thu, 16 Aug 2001 16:52:59 +0000 (16:52 +0000)]
select_select(): Closing bug #448351 the easy way, i.e. by changing
    the "#ifdef MS_WINDOWS" to "#ifdef SELECT_USES_HEAP" and by
    setting SELECT_USES_HEAP when FD_SETSIZE > 1024.

    The indirection seems useful since this subtly changes the path
    that "normal" Windows programs take (where Timmie sez FD_SETSIZE =
    512).  If that's a problem for Windows, he has only one place to
    change.

23 years agoBad bug: the MimeTypes.readfp() was supposed to take a file object as a
Fred Drake [Thu, 16 Aug 2001 15:54:28 +0000 (15:54 +0000)]
Bad bug: the MimeTypes.readfp() was supposed to take a file object as a
parameter, but did not.  This was found because it can create failures
elsewhere based on the presence of mime.types files in some common locations
the module searches by default.

(I will be writing a test for this module shortly!)

23 years agoI should add that the previous checkin also added a slight
Guido van Rossum [Thu, 16 Aug 2001 15:42:49 +0000 (15:42 +0000)]
I should add that the previous checkin also added a slight
optimization for dynamic classes.  If __getattr__ is not found as an
attribute on the type, slot_tp_getattro replaces itself with
PyObject_GenericGetAttr.  This means you can't add a __getattr__
method to a class after the fact -- but you can still *change* a
__getattr__ method into a different one.

(A similar restriction exists for classic classes.)

23 years agoLong time overdue: change sys.path defaults so that people will
Just van Rossum [Thu, 16 Aug 2001 15:16:19 +0000 (15:16 +0000)]
Long time overdue: change sys.path defaults so that people will
have to do "from PIL import Image" instead of "import Image".

23 years agoUse METH_O where possible (two functions). This does not lead to real
Fred Drake [Thu, 16 Aug 2001 14:11:30 +0000 (14:11 +0000)]
Use METH_O where possible (two functions).  This does not lead to real
performance changes since the affected functions are not expected to be
used frequently, but reduces the volume of code.

23 years agoUpdated to the current state of things (long overdue).
Jack Jansen [Thu, 16 Aug 2001 14:10:56 +0000 (14:10 +0000)]
Updated to the current state of things (long overdue).

23 years agoRemoved expat from the access paths, it isn't needed.
Jack Jansen [Thu, 16 Aug 2001 14:10:08 +0000 (14:10 +0000)]
Removed expat from the access paths, it isn't needed.

23 years ago[Patch #444854 from twburton]
Andrew M. Kuchling [Thu, 16 Aug 2001 14:08:02 +0000 (14:08 +0000)]
[Patch #444854 from twburton]
    Add executable extension, needed to get the program name right on Win32

23 years ago[Patch #442530 from twburton]
Andrew M. Kuchling [Thu, 16 Aug 2001 13:56:40 +0000 (13:56 +0000)]
[Patch #442530 from twburton]
    Provide include_dirs argument to all calls to ._preprocess and ._compile
    Fix typo: pattern.search(pattern) should be pattern.search(line)

23 years agoPatch #427190: Implement and use METH_NOARGS and METH_O.
Martin v. Löwis [Thu, 16 Aug 2001 13:15:00 +0000 (13:15 +0000)]
Patch #427190: Implement and use METH_NOARGS and METH_O.

23 years agoFix SF bug #442501: calculate __module__ properly.
Guido van Rossum [Thu, 16 Aug 2001 09:18:56 +0000 (09:18 +0000)]
Fix SF bug #442501: calculate __module__ properly.

- type_module(), type_name(): if tp_name contains one or more period,
  the part before the last period is __module__, the part after that
  is __name__.  Otherwise, for non-heap types, __module__ is
  "__builtin__".  For heap types, __module__ is looked up in
  tp_defined.

- type_new(): heap types have their __module__ set from
  globals().__name__; a pre-existing __module__ in their dict is not
  overridden.  This is not inherited.

- type_repr(): if __module__ exists and is not "__builtin__", it is
  included in the string representation (just as it already is for
  classes).  For example <type '__main__.C'>.

23 years agoChange the type names to xxsublist.<name>.
Guido van Rossum [Thu, 16 Aug 2001 09:10:42 +0000 (09:10 +0000)]
Change the type names to xxsublist.<name>.

23 years agoThe change of type(None).__name__ from 'None' to 'NoneType' broke this
Guido van Rossum [Thu, 16 Aug 2001 08:32:39 +0000 (08:32 +0000)]
The change of type(None).__name__ from 'None' to 'NoneType' broke this
test in a trivial way.  Fixed.

23 years agoSubtle change to make None.__class__ work:
Guido van Rossum [Thu, 16 Aug 2001 08:27:33 +0000 (08:27 +0000)]
Subtle change to make None.__class__ work:

- descrobject.c:descr_check(): only believe None means the same as
  NULL if the type given is None's type.

- typeobject.c:wrap_descr_get(): don't "conventiently" default an
  absent type to the type of the object argument.  Let the called
  function figure it out.

23 years agoOops. Two fixes for SF bug #422004 are not needed. :-)
Guido van Rossum [Thu, 16 Aug 2001 08:24:00 +0000 (08:24 +0000)]
Oops.  Two fixes for SF bug #422004 are not needed. :-)

23 years agoBunchathings:
Guido van Rossum [Thu, 16 Aug 2001 08:21:42 +0000 (08:21 +0000)]
Bunchathings:

- initsigs(): Ignore SIGXFZ so writing files beyond the file system
  size limit won't kill us.

- Py_Initialize(): call _Py_ReadyTypes() instead of readying types
  here.

- Py_Initialize(): call _PyImport_FixupExtension() for module
  "extensions".  (SF bug #422004.)

23 years agoAdd a function _Py_ReadyTypes() which initializes various and sundry
Guido van Rossum [Thu, 16 Aug 2001 08:17:26 +0000 (08:17 +0000)]
Add a function _Py_ReadyTypes() which initializes various and sundry
types -- currently Type, List, None and NotImplemented.  To be called
from Py_Initialize() instead of accumulating calls there.

Also rename type(None) to NoneType and type(NotImplemented) to
NotImplementedType -- naming the type identical to the object was
confusing.

23 years agoUpdate to MvL's patch #424475 to avoid returning 2 when tp_compare
Guido van Rossum [Thu, 16 Aug 2001 08:02:45 +0000 (08:02 +0000)]
Update to MvL's patch #424475 to avoid returning 2 when tp_compare
returns that.  (This fix is also by MvL; checkin it in because I want
to make more changes here.  I'm still not 100% satisfied -- see
comments attached to the patch.)

23 years agoNo change, just wanted to record more info in the log: after the last
Tim Peters [Thu, 16 Aug 2001 02:23:04 +0000 (02:23 +0000)]
No change, just wanted to record more info in the log:  after the last
checkin, the Wise uninstaller *will* delete the Python DLL from the system
directory, but if and only if there wasn't a same-named Python DLL already
in the system directory at the time the installer ran.  That (no same-named
DLL) should be the typical case for most most people (I'm different because
I've run perhaps hundreds of 2.2 installs over the last several weeks).
IOW, the change was worth making.

23 years agoWise uninstallers never delete the Python DLL from the system directory.
Tim Peters [Thu, 16 Aug 2001 01:53:51 +0000 (01:53 +0000)]
Wise uninstallers never delete the Python DLL from the system directory.
They should.  Added a line that's supposed to fix that -- it doesn't
actually work on my box, but checking it in anyway.

23 years agoAdd tests for overridable operators that have default interpretations
Guido van Rossum [Wed, 15 Aug 2001 23:57:59 +0000 (23:57 +0000)]
Add tests for overridable operators that have default interpretations
(__hash__ etc.), in static and dynamic classes, overridden and
default.

23 years ago- Another big step in the right direction. All the overridable
Guido van Rossum [Wed, 15 Aug 2001 23:57:02 +0000 (23:57 +0000)]
- Another big step in the right direction.  All the overridable
  operators for which a default implementation exist now work, both in
  dynamic classes and in static classes, overridden or not.  This
  affects __repr__, __str__, __hash__, __contains__, __nonzero__,
  __cmp__, and the rich comparisons (__lt__ etc.).  For dynamic
  classes, this meant copying a lot of code from classobject!  (XXX
  There are still some holes, because the comparison code in object.c
  uses PyInstance_Check(), meaning new-style classes don't get the
  same dispensation.  This needs more thinking.)

- Add object.__hash__, object.__repr__, object.__str__.  The __str__
  dispatcher now calls the __repr__ dispatcher, as it should.

- For static classes, the tp_compare, tp_richcompare and tp_hash slots
  are now inherited together, or not at all.  (XXX I fear there are
  still some situations where you can inherit __hash__ when you
  shouldn't, but mostly it's OK now, and I think there's no way we can
  get that 100% right.)

23 years agoRewrote Jack's latest change so it does what it intended to do...
Just van Rossum [Wed, 15 Aug 2001 21:20:42 +0000 (21:20 +0000)]
Rewrote Jack's latest change so it does what it intended to do...

23 years agoGiven a class without __cmp__ or __eq__, cmp() of two instances of
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).

23 years agoA large contribution from Dave Kuhlman describing what each of the slots
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.

23 years agoDave Kuhlman has contributed a nice improvement to the "Defining New Types"
Fred Drake [Wed, 15 Aug 2001 19:00:29 +0000 (19:00 +0000)]
Dave Kuhlman has contributed a nice improvement to the "Defining New Types"
section of the Extending & Embedding manual -- thanks!

23 years agoRemove spurious space before a period.
Fred Drake [Wed, 15 Aug 2001 18:48:10 +0000 (18:48 +0000)]
Remove spurious space before a period.

23 years agoAdded comments before recently added/assigned slots in the type object,
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.

23 years agoAdd 'state' as a get/set attribute to spamlist. This serves as an
Guido van Rossum [Wed, 15 Aug 2001 18:18:58 +0000 (18:18 +0000)]
Add 'state' as a get/set attribute to spamlist.  This serves as an
example.

23 years agoAdd 'state' as a read-only attribute to spamdict. This serves as an
Guido van Rossum [Wed, 15 Aug 2001 18:09:11 +0000 (18:09 +0000)]
Add 'state' as a read-only attribute to spamdict.  This serves as an
example.

23 years agoPyMethod_Type: add a tp_descr_get slot function to ensure proper
Guido van Rossum [Wed, 15 Aug 2001 17:52:31 +0000 (17:52 +0000)]
PyMethod_Type: add a tp_descr_get slot function to ensure proper
binding of unbound methods.

23 years agoAdd a test to verify that bound methods work correctly.
Guido van Rossum [Wed, 15 Aug 2001 17:51:17 +0000 (17:51 +0000)]
Add a test to verify that bound methods work correctly.

23 years agoFix portability problems with glibc 2.0, as reported in #449157.
Martin v. Löwis [Wed, 15 Aug 2001 17:14:33 +0000 (17:14 +0000)]
Fix portability problems with glibc 2.0, as reported in #449157.

23 years agoUse the "howto" document class rather than the "manual" class.
Fred Drake [Wed, 15 Aug 2001 17:01:34 +0000 (17:01 +0000)]
Use the "howto" document class rather than the "manual" class.

Remove the module index; there aren't enough modules documented yet
for this to make sense.

Add a couple more index entries, fixed a few typos, and adjusted a few
more things for consistency.

23 years agoProperly mark attribute names in the table.
Fred Drake [Wed, 15 Aug 2001 16:47:10 +0000 (16:47 +0000)]
Properly mark attribute names in the table.

23 years agoChange the generated markup so that attribute names are properly marked.
Fred Drake [Wed, 15 Aug 2001 16:46:22 +0000 (16:46 +0000)]
Change the generated markup so that attribute names are properly marked.

23 years agoUse the abstract object interfaces when digging around in module objects
Fred Drake [Wed, 15 Aug 2001 16:44:56 +0000 (16:44 +0000)]
Use the abstract object interfaces when digging around in module objects
instead of directly manipulating the underlying dictionary.

23 years agoNote addition of cleanfuture.py
Andrew M. Kuchling [Wed, 15 Aug 2001 15:55:48 +0000 (15:55 +0000)]
Note addition of cleanfuture.py

23 years agoFix typo
Andrew M. Kuchling [Wed, 15 Aug 2001 15:54:56 +0000 (15:54 +0000)]
Fix typo

23 years agoFix small markup consistency nits.
Fred Drake [Wed, 15 Aug 2001 14:35:13 +0000 (14:35 +0000)]
Fix small markup consistency nits.

23 years agoMacOSX: if we're building without --enable-toolbox-glue don't attempt to
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.

23 years agoOn OSX we should not pass the -shared option to ld: it make the build
Jack Jansen [Wed, 15 Aug 2001 13:17:45 +0000 (13:17 +0000)]
On OSX we should not pass the -shared option to ld: it make the build
of audioop and cmath fail. Removing it seems to have no adverse consequences.

Closes bug #450510.

23 years agoDon't remove non-directories from sys.path on the mac: files
Jack Jansen [Wed, 15 Aug 2001 12:07:46 +0000 (12:07 +0000)]
Don't remove non-directories from sys.path on the mac: files
can be on sys.path too.

23 years agoNew, larger installer bitmap from Erik van Blokland. Added more
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.

23 years agoFix typo in module docstring.
Tim Peters [Wed, 15 Aug 2001 06:07:42 +0000 (06:07 +0000)]
Fix typo in module docstring.

23 years agoAdd blurb about cleanfuture.py. Fix misspelling in an older item.
Tim Peters [Wed, 15 Aug 2001 06:06:44 +0000 (06:06 +0000)]
Add blurb about cleanfuture.py.  Fix misspelling in an older item.

23 years agoMove one of the tests into the "PEP 255" section, to reflect a change in
Tim Peters [Wed, 15 Aug 2001 04:41:19 +0000 (04:41 +0000)]
Move one of the tests into the "PEP 255" section, to reflect a change in
the PEP.

23 years agoOops, forgot to check in configure.
Jack Jansen [Wed, 15 Aug 2001 01:27:14 +0000 (01:27 +0000)]
Oops, forgot to check in configure.

23 years agoLots of changes in the framework support:
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.

Closes bug #420601 and patch #450350.

23 years agoWith WITH_NEXT_FRAMEWORK defined we now also expect a normal Python
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).

23 years agoupdate simple explanation of parseFile()
Jeremy Hylton [Tue, 14 Aug 2001 22:38:03 +0000 (22:38 +0000)]
update simple explanation of parseFile()

23 years agoFirst day's progress on documentation
Jeremy Hylton [Tue, 14 Aug 2001 22:04:44 +0000 (22:04 +0000)]
First day's progress on documentation

23 years agoFix a minor typo and mark an exception name that was missed.
Fred Drake [Tue, 14 Aug 2001 21:51:50 +0000 (21:51 +0000)]
Fix a minor typo and mark an exception name that was missed.

23 years agoAdd material about the "r" and "u" prefixes for string literals; should
Fred Drake [Tue, 14 Aug 2001 21:43:31 +0000 (21:43 +0000)]
Add material about the "r" and "u" prefixes for string literals; should
be reviewed for clarity.

Work around a bogosity in the HTML version of the escape sequences table
conversion.

23 years agoAdded some examples of table markup.
Fred Drake [Tue, 14 Aug 2001 21:36:19 +0000 (21:36 +0000)]
Added some examples of table markup.

23 years agoFix typo in astgen script
Jeremy Hylton [Tue, 14 Aug 2001 21:18:30 +0000 (21:18 +0000)]
Fix typo in astgen script

23 years agoAdd information about __floordiv__() and __truediv__() methods for
Fred Drake [Tue, 14 Aug 2001 20:28:08 +0000 (20:28 +0000)]
Add information about __floordiv__() and __truediv__() methods for
implementing numeric objects in Python.

23 years agoNon-function fields, like tp_dictoffset and tp_weaklistoffset, should
Guido van Rossum [Tue, 14 Aug 2001 20:04:48 +0000 (20:04 +0000)]
Non-function fields, like tp_dictoffset and tp_weaklistoffset, should
be inherited in inherit_special(), otherwise dynamic types don't
inherit these.

Also added some XXX comments about open ends.

23 years agoFix SF bug [ #450909 ] __future__.division fails at prompt
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.

23 years agoAdd a test for a weird bug I just discovered: a dynamic subclass
Guido van Rossum [Tue, 14 Aug 2001 20:00:33 +0000 (20:00 +0000)]
Add a test for a weird bug I just discovered: a dynamic subclass
doesn't have a __dict__!

23 years agoClarify the prompt in an example.
Fred Drake [Tue, 14 Aug 2001 19:55:42 +0000 (19:55 +0000)]
Clarify the prompt in an example.
This closes SF bug #450633.

23 years agoRegenerated from new ast.txt and new astgen.py
Jeremy Hylton [Tue, 14 Aug 2001 18:59:01 +0000 (18:59 +0000)]
Regenerated from new ast.txt and new astgen.py

23 years agoAdd getChildNodes() method to Node
Jeremy Hylton [Tue, 14 Aug 2001 18:58:00 +0000 (18:58 +0000)]
Add getChildNodes() method to Node

23 years agoAdd Yield node
Jeremy Hylton [Tue, 14 Aug 2001 18:57:43 +0000 (18:57 +0000)]
Add Yield node

23 years agoDocument the new semantics for setting and deleting a function's
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).

Closes SF bug #446645.

23 years agoTest the new semantics for setting and deleting a function's __dict__
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).

Closes SF bug #446645.

23 years agofunc_getattro(), func_setattro(): Implement the new semantics for
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).

    Closes SF bug #446645.

23 years agoDescribe the new semantics for setting and deleting a function's
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).

Closes SF bug #446645.

23 years agoAdd "exceptions" to the list of fundamental modules
Fred Drake [Tue, 14 Aug 2001 15:32:16 +0000 (15:32 +0000)]
Add "exceptions" to the list of fundamental modules
created by Py_Initialize().

This closes SF bug #450621.

23 years agoInsert omitted "the".
Fred Drake [Tue, 14 Aug 2001 11:42:13 +0000 (11:42 +0000)]
Insert omitted "the".

23 years agoAdd the smtpd module to the list of undocumented modules; Barry needs to
Fred Drake [Tue, 14 Aug 2001 11:38:35 +0000 (11:38 +0000)]
Add the smtpd module to the list of undocumented modules; Barry needs to
write the documentation for this module.

23 years agoreload(exceptions) should not raise an ImportError, but should act
Barry Warsaw [Mon, 13 Aug 2001 23:07:00 +0000 (23:07 +0000)]
reload(exceptions) should not raise an ImportError, but should act
just like reload(sys).  Test that this is so.  Closes SF bug #422004.

23 years agoFixed typo in comment leading up to _PyImport_FixupExtension().
Barry Warsaw [Mon, 13 Aug 2001 23:05:44 +0000 (23:05 +0000)]
Fixed typo in comment leading up to _PyImport_FixupExtension().

23 years agoPy_Initialize(): Apply patch by Jürgen Hermann to call
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.

    This closes SF bug #422004.

23 years agoRepair Unix-specific assumptions that caused this to fail on Windows.
Tim Peters [Mon, 13 Aug 2001 22:25:24 +0000 (22:25 +0000)]
Repair Unix-specific assumptions that caused this to fail on Windows.

23 years agofound_terminator(): Add a debug print showing the data.
Barry Warsaw [Mon, 13 Aug 2001 21:18:01 +0000 (21:18 +0000)]
found_terminator(): Add a debug print showing the data.

23 years agoNick Mathewson: test suite for the class browser support module.
Fred Drake [Mon, 13 Aug 2001 20:26:19 +0000 (20:26 +0000)]
Nick Mathewson: test suite for the class browser support module.