#1383 closed defect

foolscap 0.6.1 has no such extra feature 'secure_connections' — at Version 1

Reported by: zooko Owned by: somebody
Priority: major Milestone: 1.9.0
Component: packaging Version: 1.8.2
Keywords: setuptools foolscap pyOpenSSL Cc: charles@…
Launchpad Bug:

Description (last modified by davidsarah)

Charles N Wyble posted this:

http://tahoe-lafs.org/pipermail/tahoe-dev/2011-March/006239.html

harles at charles-laptop:~/projects/bluejacket/allmydata-tahoe-1.8.2$ 
python setup.py build
Traceback (most recent call last):
   File "setup.py", line 78, in <module>
     import setuptools; setuptools.bootstrap_install_from = egg
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/setuptools/__init__.py", 
line 2, in <module>
     from setuptools.extension import Extension, Library
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/setuptools/extension.py", 
line 2, in <module>
     from dist import _get_unpatched
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/setuptools/dist.py", 
line 6, in <module>
     from setuptools.command.sdist import sdist
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/setuptools/command/sdist.py", 
line 5, in <module>
     import os, re, sys, pkg_resources
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/pkg_resources.py", 
line 2628, in <module>
     working_set.require(__requires__)
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/pkg_resources.py", 
line 676, in require
     needed = self.resolve(parse_requirements(requirements))
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/pkg_resources.py", 
line 580, in resolve
     requirements.extend(dist.requires(req.extras)[::-1])
   File 
"/home/charles/projects/bluejacket/allmydata-tahoe-1.8.2/setuptools-0.6c16dev3.egg/pkg_resources.py", 
line 2181, in requires
     "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: foolscap 0.6.1 has no such extra feature 
'secure_connections'
charles at charles-laptop:~/projects/bluejacket/allmydata-tahoe-1.8.2$

I guess you have an installation of foolscap which doesn't declare that it has an extra feature named 'secure_connections'. Tahoe-LAFS specifies that it depends on foolscap with the 'secure_connections' feature.

Change History (1)

comment:1 Changed at 2011-03-30T20:54:21Z by davidsarah

  • Description modified (diff)
  • Priority changed from minor to major

(Removed commentary about possible fixes from Description; the Description should only describe the bug.)

zooko wrote:

Could you help us make sure this is what happened by telling us about your installation of foolscap? I haven't heard of this problem before, so perhaps you did something that most people don't do, such as installing foolscap yourself before installing Tahoe-LAFS, and doing so without having setuptools installed.

Charles replied on tahoe-dev that he believed the installation was by apt-get, on fully-patched Ubuntu 11.04 alpha3.

A quick workaround for you would be to delete whatever installation of foolscap you have there and rerun Tahoe-LAFS's python setup.py build. This will cause it to download foolscap source code and build a new package.

I'm not sure what a better long-term solution would be. I can think of a few things that would make sure this problem doesn't happen again to someone else:

  1. The maintainer of foolscap (Brian Warner) could make setuptools a hard requirement to build foolscap packages so that people wouldn't get foolscap packages without the 'secure_connections' feature declared.
  1. We could hack the fork of setuptools which is bundled into the Tahoe-LAFS source tree (sometimes called "zetuptoolz") so that it doesn't treat a missing extra as a fatal error. The theory being that if the package doesn't declare an extra then probably it actually has that extra but didn't declare it.

Well, if the installed package doesn't satisfy the dependency (for whatever reason), then setuptools should try to download a version that does. Even if the latter has the same version number, it might not have the same packaging error.

OTOH I'm pretty hacked off with the quantity and subtlety of setuptools bugs and misdesign; we've reached a point of diminishing returns in attempting to fix it.

  1. The maintainer of foolscap could make pyOpenSSL a hard requirement of foolscap instead of an "extra". I think there used to be a user of foolscap who wanted to use it without secure connections, but perhaps they've stopped using it that way. In any case, it wouldn't harm them very much if it came with secure connections even if they didn't want to use them.

Hm... try as I might I can't think of any other solutions that I would support besides these three. One solution that I would not support is to add documentation to quickstart.html instructing the user to install pyOpenSSL manually, or to install setuptools manually before installing foolscap.

Oh, there is one more possibility:

  1. Add a declaration to Tahoe-LAFS that it depends on pyOpenSSL and remove from foolscap the declaration that it depends on pyOpenSSL. This is technically incorrect (Tahoe-LAFS doesn't depend on pyOpenSSL directly), but Tahoe-LAFS's build scripts are guaranteed to be executed with setuptools present, so we can at least make it work for all users that way.
Last edited at 2011-03-30T20:55:19Z by davidsarah (previous) (diff)
Note: See TracTickets for help on using tickets.