[Zope-Checkins] CVS: StandaloneZODB/ExtensionClass/src - Acquisition.c:1.55 ComputedAttribute.c:1.6 ExtensionClass.c:1.50 MethodObject.c:1.7 Missing.c:1.12 MultiMapping.c:1.10 Record.c:1.14 Sync.c:1.4 ThreadLock.c:1.11

Guido van Rossum guido@python.org
Fri, 25 Jan 2002 10:34:07 -0500


Update of /cvs-repository/StandaloneZODB/ExtensionClass/src
In directory cvs.zope.org:/tmp/cvs-serv10384/ExtensionClass/src

Modified Files:
	Acquisition.c ComputedAttribute.c ExtensionClass.c 
	MethodObject.c Missing.c MultiMapping.c Record.c Sync.c 
	ThreadLock.c 
Log Message:
Get rid of __version__, as Jim recommends.  Use $ from docstring instead.

=== StandaloneZODB/ExtensionClass/src/Acquisition.c 1.54 => 1.55 ===
   PyObject *m, *d;
   PyObject *api;
-  char *rev="$Revision$";
+
   PURE_MIXIN_CLASS(Acquirer,
     "Base class for objects that implicitly"
     " acquire attributes from containers\n"
@@ -1559,10 +1559,6 @@
   /* Create aliases */
   PyDict_SetItemString(d,"Implicit",OBJECT(&AcquirerType));
   PyDict_SetItemString(d,"Explicit",OBJECT(&ExplicitAcquirerType));
-  
-  PyDict_SetItemString(d,"__version__",
-		       PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
-  PyDict_SetItemString(d,"Acquired",Acquired);
 
   AcquisitionCAPI.AQ_Acquire = capi_aq_acquire;
   AcquisitionCAPI.AQ_Get = capi_aq_get;


=== StandaloneZODB/ExtensionClass/src/ComputedAttribute.c 1.5 => 1.6 ===
 {
   PyObject *m, *d;
-  char *rev="$Revision$";
 
   UNLESS(ExtensionClassImported) return;
 
@@ -151,7 +150,5 @@
 
   d = PyModule_GetDict(m);
   PyExtensionClass_Export(d,"ComputedAttribute",ComputedAttributeType);
-  PyDict_SetItemString(d,"__version__",
-		       PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
   CHECK_FOR_ERRORS("can't initialize module Acquisition");
 }


=== StandaloneZODB/ExtensionClass/src/ExtensionClass.c 1.49 => 1.50 ===
 {
   PyObject *m, *d, *s;
-  char *rev="$Revision$";
   PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL);
 
   PMethodType.ob_type=&PyType_Type;
@@ -3534,9 +3533,6 @@
 		     (PyObject*)NULL,PYTHON_API_VERSION);
 
   d = PyModule_GetDict(m);
-  s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
-  PyDict_SetItemString(d,"__version__", s);
-  Py_XDECREF(s);
 
   init_py_names();
 


=== StandaloneZODB/ExtensionClass/src/MethodObject.c 1.6 => 1.7 ===
 {
   PyObject *m, *d;
-  char *rev="$Revision$";
   PURE_MIXIN_CLASS(Method,
 	"Base class for objects that want to be treated as methods\n"
 	"\n"
@@ -88,8 +87,6 @@
 
   d = PyModule_GetDict(m);
   PyExtensionClass_Export(d,"Method",MethodType);
-  PyDict_SetItemString(d,"__version__",
-		       PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
 
   /* Check for errors */
   CHECK_FOR_ERRORS("can't initialize module MethodObject");


=== StandaloneZODB/ExtensionClass/src/Missing.c 1.11 => 1.12 ===
 {
   PyObject *m, *d;
-  char *rev="$Revision$";
 
   if(! ((vname=PyString_FromString("V"))
 	&& (Missing_dot_Value=PyString_FromString("Missing.Value"))
@@ -319,9 +318,6 @@
   /* Add some symbolic constants to the module */
   d = PyModule_GetDict(m);
 
-  PyDict_SetItemString(d, "__version__",
-		       PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
-
   PyExtensionClass_Export(d,"Missing",MissingType);
 
   theValue=PyObject_CallObject((PyObject*)&MissingType, NULL);
@@ -340,6 +336,9 @@
 Revision Log:
 
   $Log$
+  Revision 1.12  2002/01/25 15:34:06  gvanrossum
+  Get rid of __version__, as Jim recommends.  Use $ from docstring instead.
+
   Revision 1.11  2001/03/28 14:06:51  jeremy
   gcc -Wall cleanup
       - make function decls prototypes


=== StandaloneZODB/ExtensionClass/src/MultiMapping.c 1.9 => 1.10 ===
 {
   PyObject *m, *d;
-  char *rev="$Revision$";
 
   m = Py_InitModule4(
       "MultiMapping", MultiMapping_methods,
@@ -244,8 +243,6 @@
       (PyObject*)NULL,PYTHON_API_VERSION);
   d = PyModule_GetDict(m);
   PyExtensionClass_Export(d,"MultiMapping",MMtype);
-  PyDict_SetItemString(d,"__version__",
-		       PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
 
   if (PyErr_Occurred()) Py_FatalError("can't initialize module MultiMapping");
 }


=== StandaloneZODB/ExtensionClass/src/Record.c 1.13 => 1.14 ===
 {
   PyObject *m, *d;
-  char *rev="$Revision$";
 
   UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
 
@@ -548,10 +547,6 @@
 
   PyExtensionClass_Export(d,"Record",RecordType);
 
-  PyDict_SetItemString(d, "__version__",
-		       PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
-  
-	
   /* Check for errors */
   if (PyErr_Occurred()) Py_FatalError("can't initialize module Record");
 }


=== StandaloneZODB/ExtensionClass/src/Sync.c 1.3 => 1.4 ===
 {
   PyObject *m, *d;
-  char *rev="$Revision$";
   PURE_MIXIN_CLASS(
        Synchronized,
        "Mix-in class that provides synchonization of method calls\n"
@@ -138,8 +137,6 @@
 
   d = PyModule_GetDict(m);
   PyExtensionClass_Export(d,"Synchronized",SynchronizedType);
-  PyDict_SetItemString(d,"__version__",
-		       PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
 
   CHECK_FOR_ERRORS("can't initialize module MethodObject");
 }


=== StandaloneZODB/ExtensionClass/src/ThreadLock.c 1.10 => 1.11 ===
 initThreadLock(void)
 {
-  PyObject *m, *d, *s;
-  char *rev="$Revision$";
+  PyObject *m, *d;
 
   m = Py_InitModule4("ThreadLock", Module_methods,
 		     ThreadLock_module_documentation,
@@ -319,10 +318,6 @@
 
   ErrorObject = PyString_FromString("ThreadLock.error");
   PyDict_SetItemString(d, "error", ErrorObject);
-
-  s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
-  PyDict_SetItemString(d, "__version__", s);
-  Py_XDECREF(s);
 
 #ifdef WITH_THREAD
   PyDict_SetItemString(d, "WITH_THREAD", PyInt_FromLong(1));