[buildout] bug related to package name capitalisation
Hi All, The following buildout.cfg demonstrates something that feels buggy to me: [buildout] parts = sqlalchemy migrate versions = versions [versions] SQLAlchemy = 0.6.0 sqlalchemy = 0.6.2 [sqlalchemy] recipe = zc.recipe.egg eggs = SQLAlchemy entry-points = foo=bar:baz [migrate] recipe = zc.recipe.egg eggs = sqlalchemy-migrate When run, you'll get two scripts: bin/migrate: ... sys.path[0:0] = [ '/opt/buildout-eggs/sqlalchemy_migrate-0.6-py2.6.egg', '/opt/buildout-eggs/Tempita-0.4-py2.6.egg', '/opt/buildout-eggs/decorator-3.2.0-py2.6.egg', '/opt/buildout-eggs/SQLAlchemy-0.6.2-py2.6.egg', ... bin/foo: ... sys.path[0:0] = [ '/opt/buildout-eggs/SQLAlchemy-0.6.0-py2.6.egg', ] ... The problem is that sqlalchemy-migrate declares an install_requires dependency on "sqlalchemy", which the package is actually called SQLAlchemy. It could be argued that sqlalchemy-migrate is "wrong" but it remains that all python's packaging tools appear case insensitive to package names. As such, I'd expect buildout's version pinning to be case agnostic as well. What do other people feel about this? Chris
On Thu, Aug 12, 2010 at 11:01 AM, Chris Withers
As such, I'd expect buildout's version pinning to be case agnostic as well. What do other people feel about this?
A lot of case-insensitivity is present for dealing with case-insensitive file systems; when looking at a distribution, the case of the name often doesn't matter. For importable names, case *does* matter; Python bothers to verify case on case-preserving file systems. I've seen very few cases where case-insensitivity in package names is tolerated (once, I think). There's no reason to spread the case-senseless disease any further. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> "A storm broke loose in my mind." --Albert Einstein
On Thu, Aug 12, 2010 at 1:22 PM, Fred Drake
On Thu, Aug 12, 2010 at 11:01 AM, Chris Withers
wrote: As such, I'd expect buildout's version pinning to be case agnostic as well. What do other people feel about this?
I've seen very few cases where case-insensitivity in package names is tolerated (once, I think). There's no reason to spread the case-senseless disease any further.
+1 Case-insensitivity usually hurts more than it helps. -- Benji York
Benji York wrote:
On Thu, Aug 12, 2010 at 1:22 PM, Fred Drake
wrote: On Thu, Aug 12, 2010 at 11:01 AM, Chris Withers
wrote: As such, I'd expect buildout's version pinning to be case agnostic as well. What do other people feel about this?
I've seen very few cases where case-insensitivity in package names is tolerated (once, I think). There's no reason to spread the case-senseless disease any further.
+1 Case-insensitivity usually hurts more than it helps.
Indeed, but sadly, setuptools is case insensitive as far as distributions go, which means that buildout ends up doing bizarre things when different casings of the same package name are used, particularly when it comes to pinning versions. Yes, the "correct" thing to do would be for buildout to kick out requirements where the case of the distribution name specified didn't match that returned by the distribution that setuptools decided would satisfy that requirement. However, that would mean you'd suddenly have distributions that would work with easy_install and pip but not with buildout. I guess my point is that, by way of being based on setuptools, buildout already *is* case insensitive w.r.t. distribution names and the fact that *only* version pinning *is* case sensitive ends up being a bug... cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
On Thu, Aug 12, 2010 at 5:59 PM, Chris Withers
I guess my point is that, by way of being based on setuptools, buildout already *is* case insensitive w.r.t. distribution names and the fact that *only* version pinning *is* case sensitive ends up being a bug...
I guess that might be construed as a bug. Maybe. This makes me even happier that I always use allow-picked-versions = false. It means that my versions section will always have the correctly capitalized names. -- Benji York
Benji York wrote:
On Thu, Aug 12, 2010 at 5:59 PM, Chris Withers
wrote: I guess my point is that, by way of being based on setuptools, buildout already *is* case insensitive w.r.t. distribution names and the fact that *only* version pinning *is* case sensitive ends up being a bug...
I guess that might be construed as a bug. Maybe.
This makes me even happier that I always use allow-picked-versions = false. It means that my versions section will always have the correctly capitalized names.
Yes, which is exactly how I bumped into this ;-) See the example I gave; you end up having to specify the same package with the same version but with all the capitalisation permutations in order for the version pin to stick and allow-picked-versions* not to kick the distribution out... cheers, Chris *I use buildout-versions so as not to have to deal with the cycle of pin, unpinned version kicked out, next unpinned version kicked out, etc... buildout-versions tells me all the problems up front and even keeps the versions.cfg file up to date for me ;-) -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
On Thu, Aug 12, 2010 at 5:59 PM, Chris Withers
I guess my point is that, by way of being based on setuptools, buildout already *is* case insensitive w.r.t. distribution names and the fact that *only* version pinning *is* case sensitive ends up being a bug...
The fix for probably include abandoning setuptools and case-senseless file systems. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> "A storm broke loose in my mind." --Albert Einstein
Fred Drake wrote:
On Thu, Aug 12, 2010 at 5:59 PM, Chris Withers
wrote: I guess my point is that, by way of being based on setuptools, buildout already *is* case insensitive w.r.t. distribution names and the fact that *only* version pinning *is* case sensitive ends up being a bug...
The fix for probably include abandoning setuptools and case-senseless file systems.
OK, and back in reality, buildout-versions will likely grow a fix for this within the next 24 hrs... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Benji York
-
Chris Withers
-
Fred Drake