Fwd: setuptools: Spelling < 3.1.0beta3 ?

On Fri, May 2, 2008 at 12:30 PM, Pete <pfein@pobox.com> wrote:
Hi-
What's the proper way to spell "any version in the 3.0.x series" if a project has a 3.1.0beta3 release?
Specifically, CherryPy has both 3.0.2 and 3.1.0beta3 releases. I'd like to depend on any 3.0.x
I've tried both 'CherryPy < 3.1' and 'CherryPy < 3.1.0' in my install_requires, and both cause setuptools to pull 3.1.0beta3.
I realize I can use 'CherryPy == 3.0.2' but that defeats the "any 3.0.x" idea...
I find this surprising as well, but the answer is:
import pkg_resources v = pkg_resources.parse_version v('3.1.0beta3') < v('3.1.0') True v('3.1.0beta3') < v('3.1.0a0') False
I wish it was "easier" to say "3.1.x" (as in any final sub-point release in the 3 series) or "1.x" (as in any final version 1 release) which didn't allow development, alpha, beta, candidate, etc. releases. Is there?

On Friday 02 May 2008 11:48:26 Alexander Michael wrote:
On Fri, May 2, 2008 at 12:30 PM, Pete <pfein@pobox.com> wrote:
Hi-
What's the proper way to spell "any version in the 3.0.x series" if a project has a 3.1.0beta3 release?
Specifically, CherryPy has both 3.0.2 and 3.1.0beta3 releases. I'd like to depend on any 3.0.x
I've tried both 'CherryPy < 3.1' and 'CherryPy < 3.1.0' in my install_requires, and both cause setuptools to pull 3.1.0beta3.
I realize I can use 'CherryPy == 3.0.2' but that defeats the "any 3.0.x" idea...
I find this surprising as well, but the answer is:
import pkg_resources v = pkg_resources.parse_version v('3.1.0beta3') < v('3.1.0')
True
v('3.1.0beta3') < v('3.1.0a0')
False
I wish it was "easier" to say "3.1.x" (as in any final sub-point release in the 3 series) or "1.x" (as in any final version 1 release) which didn't allow development, alpha, beta, candidate, etc. releases. Is there?
When installing via easy_install, I typically say "<3.0.99", but I would never embed that requirement into code. A lot of our requirements are specified as "<3.1.0a" Bryce
participants (2)
-
Alexander Michael
-
Bryce Hendrix