[tahoe-dev] new foolscap version requirement

Zooko O'Whielacronx zooko at zooko.com
Thu Jan 6 07:38:06 UTC 2011


On Wed, Jan 5, 2011 at 11:48 AM, Brian Warner <warner at lothar.com> wrote:
>
>> -                  "foolscap[secure_connections] >= 0.5.1",
>> +                  # foolscap < 0.6 is incompatible with Twisted 10.2.0.
>> +                  "foolscap[secure_connections] >= 0.6.0",
...
> But for everyone else, this introduces a needless incompatibility. For
> example, the folks running on the current Ubuntu long-term support
> release ("Lucid") get twisted-10.0 and foolscap-0.5.1, which Tahoe
> handled just fine a few days ago. My local development tree just stopped
> working after pulling the change, because I've got twisted-10.1 and
> foolscap-0.5.1 .

Does the following fix the specific problem described above?

def get_package_version_tuple_from_setuptools(pkgname):
    try:
        return pkg_resources.parse_version(pkg_resources.require(pkgname)[0].version)
    except pkg_resources.DistributionNotFound:
        return None

install_requires.append('Twisted >= 2.4.0')
twistedver = get_package_version_from_setuptools('Twisted')
if twistedver and (twistedverstr < pkg_resources.parse_version('10.2')):
    # If you already have Twisted < 10.2 installed, then you need
    # foolscap >= 0.5.1.
    install_requires.append('foolscap >= 0.5.1')
else:
    # Else, you need foolscap >= 0.6. (This is because you either
    # already have Twisted >= 10.2 installed, or you have no version
    # of Twisted installed, and when this build system automatically
    # downloads one for you it is going to get one >= 10.2. If you end
    # up with Twisted >= 10.2 then you require foolscap >= 0.6.)
    install_requires.append('foolscap >= 0.6.0')


More information about the tahoe-dev mailing list