[Zope-dev] setting missing minimum version in setup.py

Martijn Faassen faassen at startifact.com
Mon Mar 16 10:24:25 EDT 2009


Stephan Richter wrote:
> On Sunday 15 March 2009, Wichert Akkerman wrote:
>> If the package does not work with an older version of zope.publisher
>> than imho that version restriction *has* to be in setup.py.
> 
> And what if I backport the fix?
> 
> We have done version specification like this in the Zope packages before and 
> it almost brought development to complete halt, because versions would not 
> match anymore.

I'm not sure I agree you here, Stephan. A possible disagreement within 
the steering group, how interesting! :)

I agree we should never hardcode version requirements in setup.py that 
limit the usable version to only one or a few selected ones.

The version requirements in setup.py should always be "open".

The most widely open requirement is this:

zope.foo

but another open requirement is this:

zope.foo >= 1.3

I also don't recall open requirements bringing development to a halt?

I think more specific open requirements (as opposed to the most widely 
open requirement) can be very useful. Useful to the maintainers of the 
Zope Framework KGS, the Zope 3 KGS, the Grok KGS, the Zope 2 KGS, and to 
application specific lists of packages, and users who are developing or 
testing packages in some other way. I've used this pattern quite 
successfully when developing a bunch of related packages.

You bring up the case of backporting a fix (a relatively rare 
occurrence, but it certainly happens):

So, zope.bar 3.2 says it needs zope.foo >= 1.3.

Now you take something from zope.foo 1.3 and also put it in zope.foo 
1.2.3 and onwards. zope.bar could now work with zope.foo 1.2 too, and it 
doesn't declare that it does.

You could release a new minor version of zope.bar 3.2.1 that has a wider 
specification (if I get the spelling right):

zope.foo >= 1.3, >= 1.2.3

(I'm not sure whether setuptools will consider this an "adjacent 
redundant condition and resolve this to zope.foo >= 1.2.3..)

Updating that in all packages that depend on zope.foo for just that 
feature is indeed a bit of a burden. It does make it more likely that 
when someone does an update they'll get a set of package that work together.

Opinions?

Regards,

Martijn



More information about the Zope-Dev mailing list