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
Replace packaging.LegacyVersion use with mozilla_version. Fixes #635 #638
Conversation
…rsion. Fixes mozilla#635 As packaging.LegacyVersion is gone, and packaging.Version produces too many errors, use the various version classes from mozilla_version.gecko when looking for the latest version of a supported application.
A possible fix for #635 that doesn't require maintaining version parsing code in this project. I ran tox locally before submitting. py37: SKIP (0.00 seconds)
Alternatively, please consider updating requirements.txt to only allow |
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.
Oh, I thought that I had fixed the pinning with #636. But as I notice now I only did that for the tests. :(
Thanks a lot for this suggestion! I didn't know yet that we even have such a package. That is great and I'm all for using it. Also because I'm not a fan of using protected like methods from a foreign library.
I just triggered the tests and those show a failure for Thunderbird version checks. Maybe you could have a look at it? Thanks!
That's odd, since I can't get it to fail locally after commenting out @pytest.mark.ci_only on those tests. I will look at it more tomorrow. |
Sounds fine. Let me know if you need any help. At least it happens for the test with |
Okay, I figured it out. mozilla_version expects that the old-fourth number of a release is strictly positive (> 0), and there was apparently a Thunderbird 2.0.0.0 which violates that rule. There was no Firefox 2.0.0.0, just a 2.0.0.1, so that explains why the error doesn't trigger for Firefox. There is code in mozilla_version meant to deal with exceptions, but it doesn't trigger until the end of the |
Thanks a lot. Please reference the issue here as well. I would be interested. Thanks! |
@jfx2006 do you have an update? If not I wonder if you could create a small PR which restricts the usage of packaging to the last supported version. I would happily review such a patch to get the tool working again. |
If you want to please also see #637 (comment) for an extra entry for Dependabot so that we do no longer get upgrade PRs. |
This is kind of ugly. :( It occurred to me, product-details might be a better place to check for "latest" versions. Candidate releases will still need to scrape, but the latest released versions will be in either "firefox_versions.json" or "thunderbird_versions.json". Some other day... |
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.
Thank you for the update! Just two small things to discuss/fix. Then it looks fine to me.
Also note that the mozilla-package
could easily stop using the future
package. I filed mozilla-releng/mozilla-version#102 to get rid of it. As such I'm fine with this approach.
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.
Looks fine to me now. Thanks a lot for the contribution!
As packaging.LegacyVersion is gone, and packaging.Version produces too many errors, use the various version classes from mozilla_version.gecko when looking for the latest version of a supported application.