consider switching from 'verlib' to 'packaging' for version checks #2502
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#2502
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?
dstufft: daira: you're using verlib? You probably want to use https://warehouse.python.org/project/packaging/
daira: dstufft: yes, it was what was available at the time
dstufft: yea makes sense
daira: is there a compelling reason to switch?
daira: I guess we could use https://pypi.python.org/pypi/packaging rather than copying the code as we did with verlib...
daira: except that how do we check the version of the 'packaging' dependency in that case?
daira: I think I'd rather leave this well alone
dstufft: daira: the reason you're getting a None [#2499]in is that verlib doesn't support PEP 440 and your version it was passing into it was a PEP 440 version
dstufft: that's the root cause of that error
daira: ah
daira: so that is potentially a good reason to switch
daira: if more packages are going to start using only-PEP-440-compatible versions
dstufft: packaging is designed to either be put as a dependency OR bundled directly
dstufft: it has no (and will never have) any dependencies of it's own, and is only pure python
dstufft: both pip and setuptools are using it now (bundled)
daira: I see
daira: I think we can bundle it then
daira: I'll file a ticket
dstufft: daira: if you're doing anything with version specifiers (like >=1.0) packaging has those too
dstufft: same implementation as both pip and setuptools is using now too
daira: Yes, we are
daira: so that's a very good reason to switch
Or we could just delete all that code :)
I think this this was prompted by #2499, which was prompted by my IRC-logged frustration when I was unable to test Tahoe against a locally-modified version of Foolscap, because Tahoe was being unnecessarily picky about versions. I spent half an hour fighting with a tool that should have merely said "I can't figure this out, sorry" instead of throwing exceptions and thwarting my efforts to get work done.
So let me propose a guideline: all changes to the version displaying/checking/freaking-out-ing code in Tahoe should monotonically decrease in SLOC count with each commit. (er, be non-increasing.. you know what I mean). If 'packaging' is smaller/simpler and less-makes-it-hard-to-get-work-done than 'verlib', great. But I'm not really convinced that runtime comparison of versions is so important that it should make development more difficult. The next version of Foolscap is likely to break something in Tahoe because I was unable to test them together before releasing, and that's a bummer, because as far as I can tell Tahoe is the only user of Foolscap :).