Skip to content
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

hint: alternative version parsing implementation #33

Open
mara004 opened this issue Jun 26, 2023 · 0 comments
Open

hint: alternative version parsing implementation #33

mara004 opened this issue Jun 26, 2023 · 0 comments

Comments

@mara004
Copy link

mara004 commented Jun 26, 2023

There are some problems with the current version parser, like the version object sorting not handling some edge cases correctly (RC releases are considered higher than alpha releases, but for pdfbox v3 it seems to be the other way round).
There are some more minor problems, e.g. calling pkg_resources.parse_version twice (see #29), and pkg_resources being deprecated.

I've written a recipe with an (I think) smarter / more robust implementation that groups by major version and then sorts by date:
https://gist.github.com/mara004/881d0c5a99b8444fd5d1d21a333b70f8
It doesn't use an HTML parser, but direct regex, which appeared easier / more flexible here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant