views/status: stop depending on packaging.version.LegacyVersion#2366
Draft
kiritofeng wants to merge 1 commit into
Draft
views/status: stop depending on packaging.version.LegacyVersion#2366kiritofeng wants to merge 1 commit into
packaging.version.LegacyVersion#2366kiritofeng wants to merge 1 commit into
Conversation
Member
Author
|
Edit: this fails with Traceback (most recent call last):
File "venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "site/judge/views/status.py", line 106, in version_matrix
languages = sorted(languages, key=lambda lang: version.parse(lang.name))
File "site/judge/views/status.py", line 106, in <lambda>
languages = sorted(languages, key=lambda lang: version.parse(lang.name))
File "venv/lib/python3.11/site-packages/packaging/version.py", line 56, in parse
return Version(version)
File "venv/lib/python3.11/site-packages/packaging/version.py", line 202, in __init__
raise InvalidVersion(f"Invalid version: {version!r}")
Exception Type: InvalidVersion at /runtimes/matrix/
Exception Value: Invalid version: 'Ada' |
Contributor
languages = sorted(languages, key=lambda lang: version.parse(lang.name))the code is written like this because or you can unsupport java and just use |
What's the harm in just having |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2116.