replace _auto_deps with a pkg_resources API call #2283
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
4 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#2283
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?
In [setup.py]source:trunk/setup.py?annotate=blame&rev=7db853a777d5cecd39eeb7350ce45f4f34ff5095#L60 we use a separate file named [_auto_deps.py]source:trunk/src/allmydata/_auto_deps.py?annotate=blame&rev=7bb07fb5e28756fa13ba5190e6c39003c84d3e1e so that both the build system that is executing
setup.py
at build-time and the running Tahoe-LAFS app itself at run-time can both query what the requirements are, while respecting the DRY (Don't Repeat Yourself) principle.dstufft explained on IRC that you can get this information at run-time with:
That seems to work (that is, it gives a list of
Requirement
objects corresponding toinstall_requires
). So it's a valid alternative approach to what we have now, but I'm not sure it actually helps all that much. We Don't Repeat Ourselves already -- this would just mean we could choose to move the definition ofinstall_requires
tosetup.py
, say, which wouldn't by itself reduce complexity. (Theinstall_requires
definition is about half of_auto_deps.py
.)I like this, as I'd like to see that funky
execfile
in setup.py go away. I'd like to do this at the same time as #2749, and move the make-sure-we-have-what-we-think-we-need code into a separate diagnostic command (maybetahoe --check-versions
?).moving most tickets from 1.12 to 1.13 so we can release 1.12 with magic-folders
Would this really mean replacing a lot of the diagnostic "what version got installed, and does it meet our requirements?" code in
*init*.py
? I think that's the deeper problem. I agree with Daira that_auto_deps.py
isn't all that complicated (but I strongly feel that itsinstall_requires
contents should be moved intosetup.py
).What if we made a module named
allmydata.versioncheck
? We would move all the non-install_requires
stuff from_auto_deps.py
into there, we'd get rid of the deprecation-suppression and fix those warnings directly (I have to imagine that most of them are resolved by now), we'd move all the check-and-compare-versions stuff from*init*.py
into versioncheck too, make it a function, that gets called bytahoe --check-versions
, and then part of the troubleshooting process is to run this command, maybe do it automatically when you do something early, liketahoe --version
ortahoe create-client
.(https://github.com/tahoe-lafs/tahoe-lafs/pull/646)
In eb751ba/trunk: