remove obsolete dependency on "pycrypto" #2873
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#2873
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?
Tahoe currently declares a dependency on pycrypto, despite not using it directly (the only reference is a
from Crypto import Util
in test_sftp.py, used to check whether we think SFTP is available). We should remove this.(note: this ticket is not about removing
pycryptopp
, the minimal python wrapper that zooko initially wrote for the high-quality C++ library known as Crypto++. #2322 is about doing that)We added this dependency years ago when twisted.conch (which powers our SFTP frontend) needed it for various crypto purposes. At that time, I considered the SFTP frontend to be "optional", and didn't want to impose additional dependencies on users who didn't want it. So I made the SFTP unit tests conditional on whether we could import
Crypto
or not, thinking that it was the one thing that might not be present (the rest of twisted.conch shows up "for free" as part of Twisted).Later, we (maybe Daira, who did a lot of work on SFTP) decided to simplify the set of possibilities, and make all dependencies mandatory.
Since then, twisted.conch has switched from pycrypto to (pyca)
cryptography
.The right way to express this dependency is by depending upon
twistedconch
(probably ontwistedtls,conch
if we need both).(also see #2766, about removing other unnecessary dependencies)
I'm playing with this on a branch.. it's a 3-line fix.
But switching to
twistedtls,conch
causes thecheck_all_requirements()
in our _auto_deps.py to break, I think because it doesn't know how to parse the comma-separated list of extras:I'm glad that the error was at least fairly straightforward ("could not understand requirement"), but again (#2749, #1872) I want to delete that code. We should not be duplicating the work of setuptools, especially when our function cannot do the job as well as setuptools.
This is possibly sad but maybe irrelevant because https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2740 means we should not actually declare a dependency on
twistedconch
, apparently.Leaving out that part of the diff, I think this change is uncontroversial and I'm going to put it up for CI to play with.
FWIW, Twisted 16.6.0 removes the gmpy dependency entirely. So bumping the Twisted minimum version to that would make it okay to declare
twistedconch
as a dependency. Then someone just has to deal with the problem warner encountered above - ideally, I would hope, by largely removing_auto_deps.py
and relying on pip to figure out what the install requires. I have not yet internalized all of the purpose/functionality of_auto_deps.py
so I'm not ready to do that myself.As y'all know, I'm inclined to delete
_auto_deps.py
and the entire contents of*init*.py
, and move all the dependency data intosetup.py
. Back before setuptools became good, we had a lot of defensive code to double-check that all the dependencies we actually installed, and those checks needed to know the full list of dependencies (from "inside" the codebase), so they were stored in_auto_deps.py
so they could be shared with "outside" the codebase (wheresetup.py
could use them).I think Daira was the last defender of this arrangement, and I don't know if she still has an opinion about it. I'd just delete it.
Fixed in https://github.com/tahoe-lafs/tahoe-lafs/commit/1c24c643ec0e2974d75050d0dfe0fb3a72021511