Hi All, Do you guys on this lists have any ideas how packages can indicate to package managers like setuptools could indicate that if they are required by another package, that requirement must be for greater than a certain version? This stems from the "backwards compatibility" discussion for zope.interface here: https://mail.zope.org/pipermail/zope-dev/2009-November/038417.html Off the top of my head, zope.component could spell it's requirement as: def setup( ... incompatible_with='<4.0' ) Whereby, setuptools would raise an exception if the following packages were installed: def setup( ... install_requires=['zope.component'] ) def setup( ... install_requires=['zope.component >= 3.4.1'] ) ...while it wouldn't for the following package: def setup( ... install_requires=['zope.component >= 4'] ) Ideas? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
On Fri, Nov 27, 2009 at 13:05, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,
Do you guys on this lists have any ideas how packages can indicate to package managers like setuptools could indicate that if they are required by another package, that requirement must be for greater than a certain version?
This stems from the "backwards compatibility" discussion for zope.interface here:
https://mail.zope.org/pipermail/zope-dev/2009-November/038417.html
Off the top of my head, zope.component could spell it's requirement as:
def setup( ... incompatible_with='<4.0' )
Whereby, setuptools would raise an exception if the following packages were installed:
def setup( ... install_requires=['zope.component'] )
I think this is the problem. I understand what you mean, but it's not obvious to me at all that this should raise an error in this situation. But yet, for your suggestion to work, it has to. In practice, that means that you, to use zope.component >= 4.0, must give a version number. But even when an API changes, it may be possible to support both versions. And that would then be impossible to do in this case. I suspect it's an unsolvable problem. It's too open ended. -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64
Lennart Regebro wrote:
Whereby, setuptools would raise an exception if the following packages were installed:
def setup( ... install_requires=['zope.component'] )
I think this is the problem. I understand what you mean, but it's not obvious to me at all that this should raise an error in this situation.
...I'm not even suggesting it should ;-) I was just presenting the problem, and typing a possibility as I was writing.
But yet, for your suggestion to work, it has to.
Well, per library. The sketch I put down allowed zope.component 4.0 to complain if a library requests zope.component, didn't specify 4.0 and newer, but yet 4.0+ ended up installed.
In practice, that means that you, to use zope.component >= 4.0, must give a version number. But even when an API changes, it may be possible to support both versions. And that would then be impossible to do in this case.
Well, that's why I put the hint in zope.component's setup function call in the example... It would only be used for incompatible API versions, otherwise it could be left out, and any newer version would be fine... Chris
participants (2)
-
Chris Withers
-
Lennart Regebro