#1146 closed defect (fixed)

replace hardcoded 'allmydata-tahoe' with allmydata.__appname__

Reported by: zooko Owned by: somebody
Priority: normal Milestone: 1.10.1
Component: code Version: 1.7.1
Keywords: forward-compatibility backward-compatibility Cc:
Launchpad Bug:

Description


Attachments (1)

allmydata_appname.dpatch.txt (6.9 KB) - added by zooko at 2010-08-01T16:25:06Z.

Download all attachments as: .zip

Change History (7)

Changed at 2010-08-01T16:25:06Z by zooko

comment:1 Changed at 2010-08-01T16:25:21Z by zooko

  • Keywords review-needed added

comment:2 Changed at 2010-08-06T01:39:16Z by davidsarah

  • Keywords backward-compatibility added; review-needed removed
  • Milestone changed from 1.8β to undecided

See #1159 for why compatibly changing the appname is not easy. Since we can't change the appname until we've decided how to solve that, we should hold off on this patch for trunk (even though I don't think it causes any problem by itself).

comment:3 Changed at 2010-08-06T07:15:53Z by zooko

  • Keywords forward-compatibility added

Hm, there are four overlapping namespaces here.

One is the "appname" which is defined by us (the Tahoe-LAFS project) to distinguish different variants or forks of Tahoe-LAFS or independent implementations of the LAFS protocol. We agreed on how to do this versioning in this message to tahoe-dev. The appname is used in in allmydata/__init__.py to construct a variable named __full_version__, which is used in a few places such as storage/server.py. The appname for Tahoe-LAFS has been "allmydata-tahoe" for the last couple of years, and we would like to change the appname to "tahoe-lafs" someday.

Another namespace is the Python "distribution" namespace. (A "distribution" is what the Python world calls a package.) This is a global namespace where everyone on the planet is supposed to avoid choosing colliding names. An important central locus of this namespace is the Python Package Index (which I suppose ought to be called the "Python Distribution Index")—installers such as easy_install and pip, when asked to install a distribution named $DIST, will by default look for it at http://pypi.python.org/pypi/$DIST. The distribution name for Tahoe-LAFS has been "allmydata-tahoe" and we would like to change it to "tahoe-lafs".

The third namespace is the Python "package" namespace. (A "package" is what the Python world calls a directory containing an __init__.py file.) This namespace is global and is populated by all of the Python distributions that you install on your system. Collisions are silently resolved by a complicated algorithm involving your PYTHONPATH and a certain widely disliked hack due originally to setuptools (setuptool #53). The tahoe-client.tac file loads a package named allmydata. We would probably like to change that in the future to tahoe.

Now currently our build scripts ensure that the Python distribution name is always equal to the appname, and the create-node command adds pkg_resources.require(APPNAME) to the tahoe-client.tac file.

The fourth namespace is the scripts and executables in your system, where we currently create a file named tahoe.

One thing that we can do right away to ease this is change create-node to stop putting the call to pkg_resources.require() in the tahoe-client.tac.

Version 0, edited at 2010-08-06T07:15:53Z by zooko (next)

comment:4 Changed at 2010-08-06T07:26:10Z by zooko

That big comment:3 should have gone to #1159 instead of here.

comment:5 Changed at 2012-04-01T05:19:01Z by davidsarah

  • Priority changed from major to normal

comment:6 Changed at 2014-12-05T12:53:33Z by daira

  • Milestone changed from undecided to 1.11.0
  • Resolution set to fixed
  • Status changed from new to closed

All of the cases in allmydata_appname.dpatch.txt have since been fixed. There are a couple of cases still in comments, but they can be fixed as part of #2011.

Note: See TracTickets for help on using tickets.