cPickle.c out-of-date w.r.t. version in Zope 2.2.1

I'm trying to get Zope 2.2.1 to build to I can use gc to track down a memory leak. In working my way through some compilation errors I noticed that Zope's cPickle.c appears to be somewhat different than Python's version. (Haven't checked cStringIO.c yet, but I imagine there may be a couple differences there as well.) Should we try to sync them up before 2.0b1? Before 2.0final? Wait until 2.1? If so, should I post a patch to the SourceForge Patch Manager or send diffs to Jim (or both)? Skip

On Fri, Sep 01, 2000 at 09:13:39AM -0500, Skip Montanaro wrote:
There are also diffs in cStringIO.c, though not ones that affect functionality: ANSI-fication, and a few changes to the Python API (PyObject_Length -> PyObject_Size, PyObject_NEW -> PyObject_New, &c). The cPickle.c changes look to be: * ANSIfication. * API changes. * Support for Unicode strings. The API changes are the most annoying ones, since you need to add #ifdefs in order for the module to compile with both 1.5.2 and 2.0. (Might be worth seeing if this can be alleviated with a few strategic macros, though I think not...) --amk

Andrew Kuchling wrote:
Huh ? There is support for Unicode objects in Python's cPickle.c... does Zope's version do something different ?
-- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

>> The cPickle.c changes look to be: >> * ANSIfication. >> * API changes. >> * Support for Unicode strings. MAL> Huh ? There is support for Unicode objects in Python's cPickle.c... MAL> does Zope's version do something different ? Zope is still running 1.5.2 and thus has a version of cPickle that is at least that old. The RCS revision string is * $Id: cPickle.c,v 1.72 2000/05/09 18:05:09 jim Exp $ I saw new unicode functions in the Python 2.0 version of cPickle that weren't in the version distributed with Zope 2.2.1. Here's a grep buffer from XEmacs: cd /home/dolphin/skip/src/Zope/lib/Components/cPickle/ grep -n -i unicode cPickle.c /dev/null grep finished with no matches found at Fri Sep 1 12:39:57 Skip

amk> There are also diffs in cStringIO.c, though not ones that affect amk> functionality: ... amk> The API changes are the most annoying ones, since you need to add amk> #ifdefs in order for the module to compile with both 1.5.2 and 2.0. After posting my note I compared the Zope and Py2.0 versions of cPickle.c. There are enough differences (ANISfication, gc, unicode support) that it appears not worthwhile to try and get Python 2.0's cPickle to run under 1.5.2 and 2.0. I tried simply commenting out the relevant lines in Zope's lib/Components/Setup file. Zope built fine without them, though I haven't yet had a chance to test that configuration. I don't use either cPickle or cStringIO, nor do I actually use much of Zope, just ZServer and DocumentTemplates, so I doubt my code would exercise either module heavily. Skip

On Fri, Sep 01, 2000 at 09:13:39AM -0500, Skip Montanaro wrote:
There are also diffs in cStringIO.c, though not ones that affect functionality: ANSI-fication, and a few changes to the Python API (PyObject_Length -> PyObject_Size, PyObject_NEW -> PyObject_New, &c). The cPickle.c changes look to be: * ANSIfication. * API changes. * Support for Unicode strings. The API changes are the most annoying ones, since you need to add #ifdefs in order for the module to compile with both 1.5.2 and 2.0. (Might be worth seeing if this can be alleviated with a few strategic macros, though I think not...) --amk

Andrew Kuchling wrote:
Huh ? There is support for Unicode objects in Python's cPickle.c... does Zope's version do something different ?
-- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

>> The cPickle.c changes look to be: >> * ANSIfication. >> * API changes. >> * Support for Unicode strings. MAL> Huh ? There is support for Unicode objects in Python's cPickle.c... MAL> does Zope's version do something different ? Zope is still running 1.5.2 and thus has a version of cPickle that is at least that old. The RCS revision string is * $Id: cPickle.c,v 1.72 2000/05/09 18:05:09 jim Exp $ I saw new unicode functions in the Python 2.0 version of cPickle that weren't in the version distributed with Zope 2.2.1. Here's a grep buffer from XEmacs: cd /home/dolphin/skip/src/Zope/lib/Components/cPickle/ grep -n -i unicode cPickle.c /dev/null grep finished with no matches found at Fri Sep 1 12:39:57 Skip

amk> There are also diffs in cStringIO.c, though not ones that affect amk> functionality: ... amk> The API changes are the most annoying ones, since you need to add amk> #ifdefs in order for the module to compile with both 1.5.2 and 2.0. After posting my note I compared the Zope and Py2.0 versions of cPickle.c. There are enough differences (ANISfication, gc, unicode support) that it appears not worthwhile to try and get Python 2.0's cPickle to run under 1.5.2 and 2.0. I tried simply commenting out the relevant lines in Zope's lib/Components/Setup file. Zope built fine without them, though I haven't yet had a chance to test that configuration. I don't use either cPickle or cStringIO, nor do I actually use much of Zope, just ZServer and DocumentTemplates, so I doubt my code would exercise either module heavily. Skip
participants (3)
-
Andrew Kuchling
-
M.-A. Lemburg
-
Skip Montanaro