#1287 closed defect (fixed)
tahoe --version or --version-and-path can show the wrong versions or paths
Reported by: | davidsarah | Owned by: | davidsarah |
---|---|---|---|
Priority: | critical | Milestone: | 1.8.2 |
Component: | code | Version: | 1.8.1 |
Keywords: | version setuptools reviewed news-needed | Cc: | |
Launchpad Bug: |
Description
Split from #1258.
At src/allmydata/__init__.py@4796#L227, the versions and paths obtained from pkg_resources.require take precedence over those obtained by importing modules. But in a case such as #1258 where the imported code is different from what pkg_resources attempted to put on the sys.path, the result of pkg_resources.require is the wrong thing to use.
This can cause the output of tahoe --version or tahoe --version-and-path to be incorrect, and it can also cause tests based on that output (such as test_path in src/allmydata/test/test_runner.py) to pass when they should fail.
Attachments (1)
Change History (17)
comment:1 Changed at 2011-01-01T11:39:21Z by davidsarah
- Keywords review-needed added
comment:2 Changed at 2011-01-01T11:39:32Z by davidsarah
- Owner changed from somebody to zooko
comment:3 Changed at 2011-01-01T11:53:26Z by davidsarah
- Keywords news-needed added
comment:4 Changed at 2011-01-01T20:03:52Z by zooko
- Status changed from new to assigned
The patch itself looks good. Now investigating what test we can use to judge this patch...
Changed at 2011-01-01T20:37:33Z by davidsarah
- allmydata/init.py: don't use pkg_resources.require to get versions and paths. Also change pyOpenSSL to pyopenssl since that is the package name. fixes #1287 * allmydata/_auto_deps.py: add a comment reminding to change init.py when dependencies are added or removed. Clarify a comment in init.py. refs #1287
comment:5 Changed at 2011-01-15T05:14:15Z by david-sarah@…
- Resolution set to fixed
- Status changed from assigned to closed
comment:6 Changed at 2011-01-15T05:14:15Z by david-sarah@…
comment:7 Changed at 2011-01-15T10:11:17Z by davidsarah
- Resolution fixed deleted
- Status changed from closed to reopened
Auto-close on a branch again.
comment:8 Changed at 2011-01-16T01:39:28Z by david-sarah@…
comment:20 Changed at 2011-01-16T02:46:13Z by david-sarah@…
comment:21 Changed at 2011-01-16T21:25:29Z by davidsarah
- Milestone changed from 1.9.0 to 1.8.2
comment:22 Changed at 2011-01-18T08:02:44Z by zooko
- Keywords reviewed added; review-needed removed
- Owner changed from zooko to davidsarah
- Status changed from reopened to new
[20110116021421-93fa1-8d6a72b8f66c1b818b13bda1639d322e793f164a]/ticket1306, [20110116010606-93fa1-27445f74ad733c9cb8cd4b24a99788fa0eca6c49]/ticket1306, [20110101200502-93fa1-cc889abf8cbc3ce244a6b7fb599c1acaf17f47fb]/ticket1306 look good to me.
[20110101110141-93fa1-3557bc2136f970fae05c1d20e336c32fec8e3d6d]/ticket1306 looks good to me modulo my reservations expressed in comment:26:ticket:1258.
comment:23 Changed at 2011-01-20T09:36:28Z by zooko
David-Sarah will merge into trunk.
comment:24 Changed at 2011-01-21T06:26:20Z by david-sarah@…
In 29336a09163cd3d5:
comment:25 Changed at 2011-01-21T17:13:09Z by warner
so, is that all the code that needs landing for this one? I can't quite tell from the comments on 29336a09163cd3d5. If the only thing left is NEWS, let's close this.
comment:26 Changed at 2011-01-21T22:40:09Z by davidsarah
- Resolution set to fixed
- Status changed from new to closed
comment:27 Changed at 2011-01-22T03:42:30Z by david-sarah@…
In f84f2aa98777c10d:
Although this change doesn't have its own test, it does cause test_path to start failing in the situation of #1258. A deterministic test that would provoke that situation is tricky, although zooko is working on one.