New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: drop dependency to packaging, use tuples to parse and compare version numbers #3604
Conversation
c2e3dfb
to
7bc71a3
Compare
@@ -357,20 +355,6 @@ class h5py_imports: | |||
_name = "h5py" | |||
_err = None | |||
|
|||
def __init__(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropping this completely because setup.cfg requires h5py >= 3.1 anyway
7bc71a3
to
7b4f669
Compare
7b4f669
to
a8bf2c4
Compare
f3b8841
to
7a67f0f
Compare
@yt-fido test this please |
Considering how little version comparisons happen in the codebase, is there really a major speedup here? It seems like the packaging import makes the code nicely readable, and I don't see the verbosity a downside in this case. |
definitely not, sorry if this wasn't clear.
Matters of opinions on this point I guess. I find that tuple comparison is at least as readable, as well as more consistent with the idiomatic way to check Python's version at runtime using Historically, we used to rely on I figure, having one simple internal function to maintain looks more and more like an easier choice than aiming for the moving target that is version parsing in the ecosystem. |
7a67f0f
to
6cf9e5e
Compare
I don't want this to be interpreted as suggesting we not do this PR, but I want to put out there that I am pretty ambivalent to changes like this. I'm not opposed, but like @munkm , I don't always understand the priority of it, and I think that maybe it's okay to let things like this slide. |
Well this isn't a hill worth dying on. If you guys don't see value in this I'll just close it. |
I mean, that really wasn't what I was getting at. |
It's fine. I have more open PRs than I can decently handle anyway, and this one wasn't going to be mergeable for at least a couple weeks. I'll consider reopening it if packaging bothers me again |
Could I use your P.S. I think you were on to something here, after pypa/packaging#465. Removing the reliance on |
Hi @tony, thanks for asking. I'm happy to contribute this function to libtmux, I'll open a PR or join the discussion there if I need any guidance. |
PR Summary
replaces #3600. Addionally to reducing duplicated code:
keeping this as a draft for now, conflicting PRs should be prioritised over this one: