[tahoe-lafs-trac-stream] [tahoe-lafs] #1539: stop putting pkg_resources.require() into .tac files

tahoe-lafs trac at tahoe-lafs.org
Fri Sep 23 20:48:24 PDT 2011


#1539: stop putting pkg_resources.require() into .tac files
-------------------------+-------------------------------------------------
     Reporter:  zooko    |      Owner:  davidsarah
         Type:           |     Status:  assigned
  enhancement            |  Milestone:  1.10.0
     Priority:  major    |    Version:  1.9.0a1
    Component:  code-    |   Keywords:  forward-compatibility appname tac
  nodeadmin              |  packaging setuptools
   Resolution:           |
Launchpad Bug:           |
-------------------------+-------------------------------------------------

Comment (by davidsarah):

 Replying to [comment:2 zooko]:
 > There are two calls to {{{pkg_resources.require()}}} in the .tac files
 [http://tahoe-lafs.org/trac/tahoe-
 lafs/browser/trunk/src/allmydata/scripts/create_node.py?annotate=blame&rev=5133#L43
 that we currently produce]. According to [19700101235005-92b7f-
 0c2b3c010354bb97bbcba2d207819b56515aa7cb] the patch that added them, this
 was necessary to make them importable if they were installed in
 setuptools's "multiversion mode".

 Those calls should never have been necessary even for multiversion mode; I
 think the commit comment was wrong. {{{pkg_resources.require()}}} does
 not, despite the misleading name and documentation, make a package
 available that wouldn't already have been available. The set of packages
 available in the working set is determined at the point of first importing
 {{{pkg_resources}}}, which happens in the setuptools-generated support
 script, long before the .tac is executed.

 So I guess I'm violently agreeing with your conclusion that these calls
 aren't necessary ;-)

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1539#comment:3>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list