[Python-checkins] python/dist/src/Misc NEWS,1.412,1.413
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Mon, 03 Jun 2002 22:58:36 -0700
Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv15616
Modified Files:
NEWS
Log Message:
Surprising fix for SF bug 563060: module can be used as base class.
Change the module constructor (module_init) to have the signature
__init__(name:str, doc=None); this prevents the call from type_new()
to succeed. While we're at it, prevent repeated calling of
module_init for the same module from leaking the dict, changing the
semantics so that __dict__ is only initialized if NULL.
Also adding a unittest, test_module.py.
This is an incompatibility with 2.2, if anybody was instantiating the
module class before, their argument list was probably empty; so this
can't be backported to 2.2.x.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.412
retrieving revision 1.413
diff -C2 -d -r1.412 -r1.413
*** NEWS 31 May 2002 19:58:00 -0000 1.412
--- NEWS 4 Jun 2002 05:58:34 -0000 1.413
***************
*** 7,10 ****
--- 7,17 ----
Core and builtins
+ - The constructor for the module type now requires a name argument and
+ takes an optional docstring argument. Previously, this constructor
+ ignored its arguments. As a consequence, deriving a class from a
+ module (not from the module type) is now illegal; previously this
+ created an unnamed module, just like invoking the module type did.
+ [SF bug 563060]
+
- A new warning PendingDeprecationWarning was added to provide
direction on features which are in the process of being deprecated.