Re: [Zope-dev] zc.relationship - can't pickle module objects
On Mar 16, 2009, at 10:55 PM, Martin Aspeli wrote: Gary Poster wrote: Yes, +1. Thank you. I was about to write to your other message that this was quite possibly the only 3.8 dependency. Cool. Committed. If we do that, then we can let plone.relations depend on zc.relationship 1.1.1 explicitly and have support for both ZODB versions, which would be nice. Sounds great. Would you like access to the PyPI zc.relationship record so you can upload the new version? If so, are you optilude there? That'd be great, yeah. Or else, if you want to tag a release from the 1.1 branch, that should be safe (and even less work for me :-) OK. I changed setup to fix the tests with the most recent packages, made a tag and release, and gave you access to the PyPI package just in case. Gary ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] zc.relationship - can't pickle module objects
Hi, I *think* this is a bug in zc.relationship, but I'm not quite sure. I'm using ZODB3 3.8.1 (to get BLOB support) and trying to install plone.app.relations, which depends on zc.relationship 1.0.2. In particular, it subclasses zc.relationship.shared.Container, and stores a zc.relationship.index.Index object in self.relationIndex. Now, the __init__ of zc.relationship.index.Index, which derives from Persistent, contains the code below. In self._relTools and and self._attrs, there are a pile of modules, types and functions being stored. I think these are causing the ZODB to barf. Interestingly, with whatever version of ZODB that comes with Zope 2.10 (3.7?), there's no problem. Any ideas how to work around this, or even why it's a problem in one version of the ZODB but not another? zc.relationship.index.Index's initialiser: def __init__(self, attrs, defaultTransitiveQueriesFactory=None, dumpRel=generateToken, loadRel=resolveToken, relFamily=IFBTree, deactivateSets=False): self._name_TO_mapping = OOBTree.OOBTree() # held mappings are objtoken to (relcount, relset) self._EMPTY_name_TO_relcount_relset = OOBTree.OOBTree() self._reltoken_name_TO_objtokenset = OOBTree.OOBTree() self.defaultTransitiveQueriesFactory = defaultTransitiveQueriesFactory self._relTools = getModuleTools(relFamily) self._relTools['load'] = loadRel self._relTools['dump'] = dumpRel self._relLength = Length.Length() self._relTokens = self._relTools['TreeSet']() self.deactivateSets = deactivateSets self._attrs = _attrs = {} # this is private, and it's not expected to # mutate after this initial setting. seen = set() for data in attrs: # see README.txt for description of attrs. if zope.interface.interfaces.IElement.providedBy(data): data = {'element': data} res = getModuleTools(data.get('btree', IFBTree)) res['element'] = val = data['element'] res['attrname'] = val.__name__ res['name'] = data.get('name', res['attrname']) if res['name'] in _attrs or val in seen: raise ValueError('Duplicate in attrs', name, val) seen.add(val) _attrs[res['name']] = res res['dump'] = data.get('dump', generateToken) res['load'] = data.get('load', resolveToken) if (res['dump'] is None) ^ (res['load'] is None): raise ValueError( either both of 'dump' and 'load' must be None, or neither) # when both load and dump are None, this is a small # optimization that can be a large optimization if the returned # value is one of the main four options of the selected btree # family (BTree, TreeSet, Set, Bucket). res['interface'] = val.interface res['multiple'] = data.get('multiple', False) res['call'] = zope.interface.interfaces.IMethod.providedBy(val) if res['TreeSet'].__name__.startswith('I'): Mapping = IOBTree.IOBTree else: assert res['TreeSet'].__name__.startswith('O') Mapping = OOBTree.OOBTree self._name_TO_mapping[res['name']] = Mapping() # these are objtoken to (relcount, relset) Regards, Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
On Mar 16, 2009, at 4:02 AM, Martin Aspeli wrote: Hi, I *think* this is a bug in zc.relationship, but I'm not quite sure. I'm using ZODB3 3.8.1 (to get BLOB support) and trying to install plone.app.relations, which depends on zc.relationship 1.0.2. In particular, it subclasses zc.relationship.shared.Container, and stores a zc.relationship.index.Index object in self.relationIndex. Now, the __init__ of zc.relationship.index.Index, which derives from Persistent, contains the code below. In self._relTools and and self._attrs, there are a pile of modules, types and functions being stored. I think these are causing the ZODB to barf. Interestingly, with whatever version of ZODB that comes with Zope 2.10 (3.7?), there's no problem. Any ideas how to work around this, or even why it's a problem in one version of the ZODB but not another? No idea yet. What's the barf's traceback? Gary ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
Gary Poster wrote: On Mar 16, 2009, at 4:02 AM, Martin Aspeli wrote: Hi, I *think* this is a bug in zc.relationship, but I'm not quite sure. I'm using ZODB3 3.8.1 (to get BLOB support) and trying to install plone.app.relations, which depends on zc.relationship 1.0.2. In particular, it subclasses zc.relationship.shared.Container, and stores a zc.relationship.index.Index object in self.relationIndex. Now, the __init__ of zc.relationship.index.Index, which derives from Persistent, contains the code below. In self._relTools and and self._attrs, there are a pile of modules, types and functions being stored. I think these are causing the ZODB to barf. Interestingly, with whatever version of ZODB that comes with Zope 2.10 (3.7?), there's no problem. Any ideas how to work around this, or even why it's a problem in one version of the ZODB but not another? No idea yet. What's the barf's traceback? Mmmm... it seems that zc.relationship 1.1 fixes the issue, but has some other problems (an undefined variable minValues or similar - I haven't got a build with this version in it right now); 2.0dev seems better, albeit a bit scary at pre-alpha. Also, I think 2.0dev *requires* ZODB 3.8, though, which means we have to choose one or the other. Ideally, I'd like a version of plone.relations that works with both ZODB 2.7 and 2.8. I'm still having some problems with zc.relationship 2.0dev interacting with five.intid (which has some special path handling to aq-wrap objects that are turned from key references), though I'm hoping to work around them. The traceback was: File /Users/optilude/.buildout/zope/Zope-2.10.6-final-py2.4/lib/python/ZServer/PubCore/ZServerPublisher.py, line 25, in __init__ response=b) File /Users/optilude/.buildout/zope/Zope-2.10.6-final-py2.4/lib/python/ZPublisher/Publish.py, line 401, in publish_module environ, debug, request, response) File /Users/optilude/.buildout/zope/Zope-2.10.6-final-py2.4/lib/python/ZPublisher/Publish.py, line 202, in publish_module_standard response = publish(request, module_name, after_list, debug=debug) File /Users/optilude/.buildout/eggs/Products.PDBDebugMode-0.2-py2.4.egg/Products/PDBDebugMode/__init__.py, line 47, in pdb_publish mapply=mapply, ) File /Users/optilude/.buildout/zope/Zope-2.10.6-final-py2.4/lib/python/ZPublisher/Publish.py, line 125, in publish transactions_manager.commit() File /Users/optilude/.buildout/zope/Zope-2.10.6-final-py2.4/lib/python/Zope2/App/startup.py, line 238, in commit transaction.commit() File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/transaction/_manager.py, line 93, in commit return self.get().commit() File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/transaction/_transaction.py, line 328, in commit t, v, tb = self._saveAndGetCommitishError() File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/transaction/_transaction.py, line 325, in commit self._commitResources() File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/transaction/_transaction.py, line 424, in _commitResources rm.commit(self) File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/ZODB/Connection.py, line 541, in commit self._commit(transaction) File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/ZODB/Connection.py, line 586, in _commit self._store_objects(ObjectWriter(obj), transaction) File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/ZODB/Connection.py, line 620, in _store_objects p = writer.serialize(obj) # This calls __getstate__ of obj File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/ZODB/serialize.py, line 407, in serialize return self._dump(meta, obj.__getstate__()) File /Users/optilude/.buildout/eggs/ZODB3-3.8.1-py2.4-macosx-10.3-i386.egg/ZODB/serialize.py, line 416, in _dump self._p.dump(state) File /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/copy_reg.py, line 69, in _reduce_ex raise TypeError, can't pickle %s objects % base.__name__ TypeError: can't pickle module objects Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
Martin Aspeli wrote: Gary Poster wrote: On Mar 16, 2009, at 4:02 AM, Martin Aspeli wrote: Hi, I *think* this is a bug in zc.relationship, but I'm not quite sure. I'm using ZODB3 3.8.1 (to get BLOB support) and trying to install plone.app.relations, which depends on zc.relationship 1.0.2. In particular, it subclasses zc.relationship.shared.Container, and stores a zc.relationship.index.Index object in self.relationIndex. Now, the __init__ of zc.relationship.index.Index, which derives from Persistent, contains the code below. In self._relTools and and self._attrs, there are a pile of modules, types and functions being stored. I think these are causing the ZODB to barf. Interestingly, with whatever version of ZODB that comes with Zope 2.10 (3.7?), there's no problem. Any ideas how to work around this, or even why it's a problem in one version of the ZODB but not another? No idea yet. What's the barf's traceback? Mmmm... it seems that zc.relationship 1.1 fixes the issue, but has some other problems (an undefined variable minValues or similar - I haven't got a build with this version in it right now); 2.0dev seems better, albeit a bit scary at pre-alpha. Also, I think 2.0dev *requires* ZODB 3.8, though, which means we have to choose one or the other. Ideally, I'd like a version of plone.relations that works with both ZODB 2.7 and 2.8. I meant ZODB 3.7 and 3.8, of course. :) Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
On Mar 16, 2009, at 8:39 AM, Martin Aspeli wrote: Gary Poster wrote: On Mar 16, 2009, at 4:02 AM, Martin Aspeli wrote: Hi, I *think* this is a bug in zc.relationship, but I'm not quite sure. I'm using ZODB3 3.8.1 (to get BLOB support) and trying to install plone.app.relations, which depends on zc.relationship 1.0.2. In particular, it subclasses zc.relationship.shared.Container, and stores a zc.relationship.index.Index object in self.relationIndex. Now, the __init__ of zc.relationship.index.Index, which derives from Persistent, contains the code below. In self._relTools and and self._attrs, there are a pile of modules, types and functions being stored. I think these are causing the ZODB to barf. Interestingly, with whatever version of ZODB that comes with Zope 2.10 (3.7?), there's no problem. Any ideas how to work around this, or even why it's a problem in one version of the ZODB but not another? No idea yet. What's the barf's traceback? Mmmm... it seems that zc.relationship 1.1 fixes the issue, but has some other problems (an undefined variable minValues or similar - I haven't got a build with this version in it right now); OK. 2.0dev seems better, albeit a bit scary at pre-alpha. zc.relationship 2.0 trunk is now essentially a wrapping of zc.relation code for backwards compatibility. You guys are the main clients for zc.relationship at this point, I suspect. As I see it, your relatively reasonable options are these: - MOST WORK: Move the plone.relation code to depend on zc.relation. There is an upgrade path for the old indexes. You would need to copy over the old zc.relationship relationship containers to the Plone package. IIRC, Alec's tests of those bits were good, and you could just keep the bits from zc.relationship you needed. ZODB module path issues in legacy databases would be among the more annoying bits of this approach, though we all know the usual solutions there. - LESS WORK: See how zc.relationship trunk works for you. If it makes the code happy, I can release it or help you to do so. It's certainly been sitting around long enough. Then at least you are sitting (indirectly) on top of zc.relation, the package that (for instance) Martijn F.'s Grok work exercises. This would be my preferred compromise between effort and migration. The problem here is that it probably does depend on ZODB 3.8, and I'd rather not make the zc.relation code support the older spellings, so that's probably out for you unless you want to make a concrete counter-proposal in this regard. - LEAST WORK: Figure out what's wrong with zc.relationship 1.1. What you described sounds trivial to fix, and I don't have any ethical issues over only supporting the most recent release of the 1.x line, so I don't want to think about the earlier releases. I suspect this is what you want. We can make a 1.1.1 release and you can move on. Gary ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
Hi Gary, zc.relationship 2.0 trunk is now essentially a wrapping of zc.relation code for backwards compatibility. I see. But 2.0dev on pypi isn't? What's the story behind zc.relation and the evolution of zc.relationship? You guys are the main clients for zc.relationship at this point, I suspect. Possibly, yes. ;-) As I see it, your relatively reasonable options are these: - MOST WORK: Move the plone.relation code to depend on zc.relation. There is an upgrade path for the old indexes. You would need to copy over the old zc.relationship relationship containers to the Plone package. IIRC, Alec's tests of those bits were good, and you could just keep the bits from zc.relationship you needed. ZODB module path issues in legacy databases would be among the more annoying bits of this approach, though we all know the usual solutions there. I think we'd need Alec to find the time to do this if it's to happen, but it does sound like the better option. - LESS WORK: See how zc.relationship trunk works for you. If it makes the code happy, I can release it or help you to do so. It's certainly been sitting around long enough. Then at least you are sitting (indirectly) on top of zc.relation, the package that (for instance) Martijn F.'s Grok work exercises. This would be my preferred compromise between effort and migration. The problem here is that it probably does depend on ZODB 3.8, and I'd rather not make the zc.relation code support the older spellings, so that's probably out for you unless you want to make a concrete counter-proposal in this regard. Well, having a version that only works with ZODB 3.8 isn't *terrible*, it's just annoying. If and when Plone actually ships with five.intid and plone.relations, it'll be on ZODB 3.8 anyway. It's just a bit more work for people wanting to use it. - LEAST WORK: Figure out what's wrong with zc.relationship 1.1. What you described sounds trivial to fix, and I don't have any ethical issues over only supporting the most recent release of the 1.x line, so I don't want to think about the earlier releases. I suspect this is what you want. We can make a 1.1.1 release and you can move on. Hopefully. Do we know that zc.relationship 1.1 works with both ZODB versions? What's the difference between 1.1.1 and 2.0dev on pypi? Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
On Mar 16, 2009, at 9:19 AM, Martin Aspeli wrote: Hi Gary, zc.relationship 2.0 trunk is now essentially a wrapping of zc.relation code for backwards compatibility. I see. But 2.0dev on pypi isn't? What's the story behind zc.relation and the evolution of zc.relationship? Briefly, I wanted a package that only included the bit I used, the index (in zc.relation, the catalog). I abstracted it, made sure that zc.relation had 100% test coverage, and changed the names and the API in a backwards incompatible way. I also added a bunch of new features, like a transitive index for hierarchies. See http://pypi.python.org/pypi/zc.relation#changes for details. zc.relationship trunk then depended on zc.relation, and existed to provide backwards compatibility while not forcing me to maintain two versions of the same codebase. The upgrade path that the zc.relation PyPI doc describes from a zc.relationship index to a zc.relation index has been used in production, IIRC, but it requires zc.relationship trunk. I would be quite happy to release zc.relationship trunk as 2.0, if it helped you: it was used in production. If the ZODB 3.8-only issue is not a show-stopper then that's a good approach, and hopefully pretty easy for everyone. You guys are the main clients for zc.relationship at this point, I suspect. Possibly, yes. ;-) As I see it, your relatively reasonable options are these: - MOST WORK: Move the plone.relation code to depend on zc.relation. There is an upgrade path for the old indexes. You would need to copy over the old zc.relationship relationship containers to the Plone package. IIRC, Alec's tests of those bits were good, and you could just keep the bits from zc.relationship you needed. ZODB module path issues in legacy databases would be among the more annoying bits of this approach, though we all know the usual solutions there. I think we'd need Alec to find the time to do this if it's to happen, but it does sound like the better option. Perfect world, sure. - LESS WORK: See how zc.relationship trunk works for you. If it makes the code happy, I can release it or help you to do so. It's certainly been sitting around long enough. Then at least you are sitting (indirectly) on top of zc.relation, the package that (for instance) Martijn F.'s Grok work exercises. This would be my preferred compromise between effort and migration. The problem here is that it probably does depend on ZODB 3.8, and I'd rather not make the zc.relation code support the older spellings, so that's probably out for you unless you want to make a concrete counter-proposal in this regard. Well, having a version that only works with ZODB 3.8 isn't *terrible*, it's just annoying. If and when Plone actually ships with five.intid and plone.relations, it'll be on ZODB 3.8 anyway. It's just a bit more work for people wanting to use it. Gotcha. Your choice. FWIW, this was the path I intended/hoped you guys would follow when I did the work to make zc.relationship sit on top of zc.relation. - LEAST WORK: Figure out what's wrong with zc.relationship 1.1. What you described sounds trivial to fix, and I don't have any ethical issues over only supporting the most recent release of the 1.x line, so I don't want to think about the earlier releases. I suspect this is what you want. We can make a 1.1.1 release and you can move on. Hopefully. Do we know that zc.relationship 1.1 works with both ZODB versions? That would be a significant point of its existence, so I certainly hope so. I'm 80%+ confident that it does, and would regard not supporting 3.7 as a bug that I'd be willing to fix. What's the difference between 1.1.1 and 2.0dev on pypi? I intended that 1.1.1 would simply make the absolutely minimal changes necessary for you to be able to use the 1.1 branch. It would not have any of the 2.x changes at all. Gary ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
Hi Gary, Thanks for being so helpful! What's the difference between 1.1.1 and 2.0dev on pypi? I intended that 1.1.1 would simply make the absolutely minimal changes necessary for you to be able to use the 1.1 branch. It would not have any of the 2.x changes at all. But we're saying that 2.0dev is a very different beast to the trunk that could eventually become 2.0, right? 2.0dev doesn't have a zc.relation dependency, for example. I'm not sure what else there may be in 2.0dev that's useful, of course. I think we need to hear from Alec on what makes most sense for plone.relations. I care pretty much only about the plone.relations API, so I'm sure either of your three options could work. However, I have no idea how hard it'd be in practice to move closer to zc.relation. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
On Mar 16, 2009, at 10:21 AM, Martin Aspeli wrote: Hi Gary, Thanks for being so helpful! Happy to. What's the difference between 1.1.1 and 2.0dev on pypi? I intended that 1.1.1 would simply make the absolutely minimal changes necessary for you to be able to use the 1.1 branch. It would not have any of the 2.x changes at all. But we're saying that 2.0dev is a very different beast to the trunk that could eventually become 2.0, right? 2.0dev doesn't have a zc.relation dependency, for example. Yes. They are related, of course, but practically significantly different. I'm not sure what else there may be in 2.0dev that's useful, of course. Honestly, I'm not sure about the alpha any more either, though IIRC I did do a reasonable job on the change logs, so we could figure it out. I think we need to hear from Alec on what makes most sense for plone.relations. I care pretty much only about the plone.relations API, so I'm sure either of your three options could work. However, I have no idea how hard it'd be in practice to move closer to zc.relation. Sure. My hope is that switching to zc.relationship trunk (2.0) would be a drop-in change. Otherwise, 1.1(.1) definitely should be (with whatever necessary bug fixes). Let me know how I can help, once you all decide what direction you want to go. Gary ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
Gary Poster wrote: Hopefully. Do we know that zc.relationship 1.1 works with both ZODB versions? That would be a significant point of its existence, so I certainly hope so. I'm 80%+ confident that it does, and would regard not supporting 3.7 as a bug that I'd be willing to fix. Right... so I've just fixed the errors Pyflakes found with zc.relationship 1.1 branch. This now works reliably for my ZODB 3.8.1 build. However, it won't install in my ZODB 3.7 environment, because of this line in setup.py: 'ZODB3 = 3.8dev', Was that an intentional minimum? Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
Martin Aspeli wrote: Gary Poster wrote: Hopefully. Do we know that zc.relationship 1.1 works with both ZODB versions? That would be a significant point of its existence, so I certainly hope so. I'm 80%+ confident that it does, and would regard not supporting 3.7 as a bug that I'd be willing to fix. Right... so I've just fixed the errors Pyflakes found with zc.relationship 1.1 branch. This now works reliably for my ZODB 3.8.1 build. However, it won't install in my ZODB 3.7 environment, because of this line in setup.py: 'ZODB3 = 3.8dev', Was that an intentional minimum? Okay... so, if we remove that restriction, and add the following monkey patch to (which is already in plone.relations) to __init__.py, then this works on ZODB 3.7 with Zope 2.10, and the tests pass (save for cosmetic doctest failures on 3.7 which are easy to fix): # A tiny monkey patch due to some re-organization of future BTree modules try: from BTrees.OOBTree import BTree except ImportError: import BTrees.OOBTree import BTrees.IOBTree import BTrees.OIBTree import BTrees.IIBTree import BTrees.IFBTree BTrees.OOBTree.BTree = BTrees.OOBTree.OOBTree BTrees.OOBTree.Set = BTrees.OOBTree.OOSet BTrees.OOBTree.Bucket = BTrees.OOBTree.OOBucket BTrees.OOBTree.TreeSet = BTrees.OOBTree.OOTreeSet BTrees.IOBTree.BTree = BTrees.IOBTree.IOBTree BTrees.IOBTree.Set = BTrees.IOBTree.IOSet BTrees.IOBTree.Bucket = BTrees.IOBTree.IOBucket BTrees.IOBTree.TreeSet = BTrees.IOBTree.IOTreeSet BTrees.OIBTree.BTree = BTrees.OIBTree.OIBTree BTrees.OIBTree.Set = BTrees.OIBTree.OISet BTrees.OIBTree.Bucket = BTrees.OIBTree.OIBucket BTrees.OIBTree.TreeSet = BTrees.OIBTree.OITreeSet BTrees.IIBTree.BTree = BTrees.IIBTree.IIBTree BTrees.IIBTree.Set = BTrees.IIBTree.IISet BTrees.IIBTree.Bucket = BTrees.IIBTree.IIBucket BTrees.IIBTree.TreeSet = BTrees.IIBTree.IITreeSet BTrees.IFBTree.BTree = BTrees.IFBTree.IFBTree BTrees.IFBTree.Set = BTrees.IFBTree.IFSet BTrees.IFBTree.Bucket = BTrees.IFBTree.IFBucket BTrees.IFBTree.TreeSet = BTrees.IFBTree.IFTreeSet Shall I just check that in + the removal of the minimum version pin? If we do that, then we can let plone.relations depend on zc.relationship 1.1.1 explicitly and have support for both ZODB versions, which would be nice. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
On Mar 16, 2009, at 1:20 PM, Martin Aspeli wrote: Martin Aspeli wrote: Gary Poster wrote: Hopefully. Do we know that zc.relationship 1.1 works with both ZODB versions? That would be a significant point of its existence, so I certainly hope so. I'm 80%+ confident that it does, and would regard not supporting 3.7 as a bug that I'd be willing to fix. Right... so I've just fixed the errors Pyflakes found with zc.relationship 1.1 branch. This now works reliably for my ZODB 3.8.1 build. However, it won't install in my ZODB 3.7 environment, because of this line in setup.py: 'ZODB3 = 3.8dev', Was that an intentional minimum? Okay... so, if we remove that restriction, and add the following monkey patch to (which is already in plone.relations) to __init__.py, then this works on ZODB 3.7 with Zope 2.10, and the tests pass (save for cosmetic doctest failures on 3.7 which are easy to fix): # A tiny monkey patch due to some re-organization of future BTree modules try: from BTrees.OOBTree import BTree except ImportError: import BTrees.OOBTree import BTrees.IOBTree import BTrees.OIBTree import BTrees.IIBTree import BTrees.IFBTree BTrees.OOBTree.BTree = BTrees.OOBTree.OOBTree BTrees.OOBTree.Set = BTrees.OOBTree.OOSet BTrees.OOBTree.Bucket = BTrees.OOBTree.OOBucket BTrees.OOBTree.TreeSet = BTrees.OOBTree.OOTreeSet BTrees.IOBTree.BTree = BTrees.IOBTree.IOBTree BTrees.IOBTree.Set = BTrees.IOBTree.IOSet BTrees.IOBTree.Bucket = BTrees.IOBTree.IOBucket BTrees.IOBTree.TreeSet = BTrees.IOBTree.IOTreeSet BTrees.OIBTree.BTree = BTrees.OIBTree.OIBTree BTrees.OIBTree.Set = BTrees.OIBTree.OISet BTrees.OIBTree.Bucket = BTrees.OIBTree.OIBucket BTrees.OIBTree.TreeSet = BTrees.OIBTree.OITreeSet BTrees.IIBTree.BTree = BTrees.IIBTree.IIBTree BTrees.IIBTree.Set = BTrees.IIBTree.IISet BTrees.IIBTree.Bucket = BTrees.IIBTree.IIBucket BTrees.IIBTree.TreeSet = BTrees.IIBTree.IITreeSet BTrees.IFBTree.BTree = BTrees.IFBTree.IFBTree BTrees.IFBTree.Set = BTrees.IFBTree.IFSet BTrees.IFBTree.Bucket = BTrees.IFBTree.IFBucket BTrees.IFBTree.TreeSet = BTrees.IFBTree.IFTreeSet Shall I just check that in + the removal of the minimum version pin? Yes, +1. Thank you. I was about to write to your other message that this was quite possibly the only 3.8 dependency. If we do that, then we can let plone.relations depend on zc.relationship 1.1.1 explicitly and have support for both ZODB versions, which would be nice. Sounds great. Would you like access to the PyPI zc.relationship record so you can upload the new version? If so, are you optilude there? Gary ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zc.relationship - can't pickle module objects
Gary Poster wrote: Yes, +1. Thank you. I was about to write to your other message that this was quite possibly the only 3.8 dependency. Cool. Committed. If we do that, then we can let plone.relations depend on zc.relationship 1.1.1 explicitly and have support for both ZODB versions, which would be nice. Sounds great. Would you like access to the PyPI zc.relationship record so you can upload the new version? If so, are you optilude there? That'd be great, yeah. Or else, if you want to tag a release from the 1.1 branch, that should be safe (and even less work for me :-) Cheers, Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )