[Checkins] SVN: zc.twist/trunk/ 1.1 uses new setuptools-compatible
twisted 8.0.1. Also cleaned up C file trivially.
Gary Poster
gary at zope.com
Thu Mar 27 12:44:14 EDT 2008
Log message for revision 84969:
1.1 uses new setuptools-compatible twisted 8.0.1. Also cleaned up C file trivially.
Changed:
U zc.twist/trunk/CHANGES.txt
U zc.twist/trunk/setup.py
U zc.twist/trunk/src/zc/twist/_methodwrapper.c
-=-
Modified: zc.twist/trunk/CHANGES.txt
===================================================================
--- zc.twist/trunk/CHANGES.txt 2008-03-27 16:09:32 UTC (rev 84968)
+++ zc.twist/trunk/CHANGES.txt 2008-03-27 16:44:11 UTC (rev 84969)
@@ -1,3 +1,16 @@
+1.1 (2008-3-27)
+---------------
+
+* Now depends on twisted 8.0.1 or higher, which is newly setuptools
+ compatible. The twisted build is a little frightening, at least with
+ Py2.4, with multiple warnings and errors, but works. The dependency
+ change is the reason for the bump to 1.1; this release has no new
+ features.
+
+* setup.py uses os.path rather than assuming *nix paths
+
+* C extension uses older comment style and has less cruft.
+
1.0.1 (2008-3-14)
-----------------
Modified: zc.twist/trunk/setup.py
===================================================================
--- zc.twist/trunk/setup.py 2008-03-27 16:09:32 UTC (rev 84968)
+++ zc.twist/trunk/setup.py 2008-03-27 16:44:11 UTC (rev 84969)
@@ -1,4 +1,4 @@
-
+import os
from setuptools.extension import Extension
from setuptools import setup, find_packages
@@ -8,12 +8,12 @@
methodwrapper = Extension(
name='zc.twist._methodwrapper',
- sources=['src/zc/twist/_methodwrapper.c'],
+ sources=[os.path.join('src','zc','twist','_methodwrapper.c')],
)
setup(
name='zc.twist',
- version='1.0.1',
+ version='1.1',
packages=find_packages('src'),
package_dir={'':'src'},
zip_safe=False,
@@ -24,9 +24,7 @@
license='ZPL',
install_requires=[
'ZODB3',
- 'zc.twisted', # setup-friendly Twisted distro. Someday soon we can
- # discard zc.twisted, hopefully. See
- # http://twistedmatrix.com/trac/ticket/1286
+ 'Twisted>=8.0.1', # 8.0 was setuptools compatible
'zope.component',
'setuptools',
'zope.testing',
Modified: zc.twist/trunk/src/zc/twist/_methodwrapper.c
===================================================================
--- zc.twist/trunk/src/zc/twist/_methodwrapper.c 2008-03-27 16:09:32 UTC (rev 84968)
+++ zc.twist/trunk/src/zc/twist/_methodwrapper.c 2008-03-27 16:44:11 UTC (rev 84969)
@@ -1,6 +1,6 @@
#include <Python.h>
-// wrapperobject is not in a header. Also see wrappertype comment.
+/* wrapperobject is not in a header. Also see wrappertype comment. */
typedef struct {
PyObject_HEAD
PyWrapperDescrObject *descr;
@@ -8,9 +8,6 @@
} wrapperobject;
-#define Wrapper_Check(obj) \
- PyObject_TypeCheck(obj, &wrapperobject)
-
static PyObject *
module_getSelf(PyObject *self, PyObject *args)
{
@@ -19,10 +16,16 @@
if (!PyArg_ParseTuple(args, "O", &wrapper))
return NULL;
-// wrappertype is not in a header. :-(
-// if (!PyObject_TypeCheck(wrapper, &wrappertype))
-// result = Py_None; // Exception might be nice
-// else
+
+/* wrappertype is not in a header. :-(
+ if it were, we also could have used PyArg_ParseTuple to do our type
+ checking. This also would raise a TypeError rather than returning
+ None, which would be "more Pythonic".
+
+ if (!PyObject_TypeCheck(wrapper, &wrappertype))
+ result = Py_None;
+ else
+*/
result = (PyObject*)((wrapperobject*)wrapper)->self;
Py_INCREF(result);
More information about the Checkins
mailing list