Tahoe 1.8.2b1 does not locate locally installed setuptools #1339
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1339
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Debian Squeeze (testing), x64.
Software versions:
$ tahoe start
STARTING '/home/$USERNAME/.tahoe'
But setuptools is installed.
Tahoe 1.8.1 was able to use the locally installed version. Additionally, Python is able to import the module.
Thank you for the bug report! Could you also please post the results of
python -c 'import pkg_resources;print pkg_resources.require("setuptools")'
?It looks like the behavior of stopping with an uncaught KeyError exception is due to a simple mistake -- would you be so kind as to apply the following patch and try again? If that patch works then it should emit a specific warning about the
setuptools
dependency but otherwise proceed to start-up. Thanks!(I'll also attach it as attachment:handle-missing-dep.patch.txt.)
Attachment handle-missing-dep.patch.txt (516 bytes) added
Thank you for the quick reply. :)
After applying the patch, tahoe 1.8.2b1 starts successfully and connects to the introducer on the I2P network.
If anything else would be helpful from my end, please let me know.
I reviewed handle-missing-dep.patch.txt and it looks correct.
Replying to killyourtv:
With the patch, this is now behaving exactly as designed. However, the specific case of "
import setuptools
" givingdistribute
faked to look like setuptools 0.6, is common enough (and reasonably harmless enough) that we should perhaps special-case it to suppress the warning. It would also be nice if the-version[-and-path]
output were to report that the imported setuptools is actually distribute.Note that fix-1339.darcs.patch would be instead of handle-missing-dep.patch.txt .
Attachment fix-1339.darcs.patch (34938 bytes) added
src/allmydata/init.py: fix #1339, give an indication in the --version[-and-path] output of when the imported setuptools is distribute, and use a separate element in _vers_and_locs_list tuples for information other than the package name and location. This also changes slightly how the sqlite version is reported. [this version of the patch rather than the previous version, which was missing a line of code.]Use
Attachment fix-to-test.darcs.patch (29738 bytes) added
src/allmydata/test/test_version.py: update to take into account change from pairs to triples in versions-and-locations list. refs #1339
In changeset:c71a19b9ed3bafe9:
reviewed by me
In a new ticket #1341, killyourtv wrote:
Sorry, I'm back again.
After applying the patch in changeset:4994, the tests fail with the following output:
This is my fault -- sorry! I didn't run the tests after reviewing changeset:c71a19b9ed3bafe9 and before committing it to trunk, and I didn't notice, in my review, that there were tests which were testing the previous behavior of this code (which manipulates a name, location, and version but not a name, location, version, and comment).
(Also I forgot that no changes at all were supposed to be applied to trunk without the Release Manager's approval.)
I will push a patch to trunk to fix the tests.
In changeset:6f84f1b869baa9f8:
Just to follow up:
Thanks for the help. :)
Sorry, I should have combined fix-to-test.darcs.patch into the other patch, to make it clearer that they both needed to be committed.
The changeset:6f84f1b869baa9f8 changeset that zooko pushed to fix this isn't quite right because the comment field would normally be None rather than "" (although
check_requirement
doesn't look at that field other than to report modules that couldn't be imported).Attachment improve-1339-test.darcs.patch (31471 bytes) added
Change tests for check_requirement to ensure that it accepts None in the comment field of a (version, location, comment) triple, and add a test that it raises ImportError when a module couldn't be imported. Also fix typo in a comment. refs #1339
In changeset:d318122cd25591cb: