feat: Allow version latest for Maven, Git and PyPI locations#155
Open
feat: Allow version latest for Maven, Git and PyPI locations#155
Conversation
lfvjimisola
reviewed
Jan 10, 2025
| xml = resolver.requestor.request( | ||
| resolver.base + path, resolver._onFail, lambda r: etree.fromstring(r.content) | ||
| ) | ||
| all_versions = xml.xpath("/metadata/versioning/versions/version/text()") |
Contributor
There was a problem hiding this comment.
List[str] and no need to return Any?
lfvjimisola
reviewed
Jan 10, 2025
Contributor
There was a problem hiding this comment.
Not sure if it is ideal to use RequestException for everything. If we receive a list of versions but there is no stable version for example then is more of NoMatchingVersionException.
But, it works. So KISS for now.
|
|
||
| # os.remove(artifact.get_filename(dst_path)) | ||
| if resolved_artifact.version != version: | ||
| logging.debug(f"Resolved version '{version}' to: {resolved_artifact.version}") |
Contributor
There was a problem hiding this comment.
version is the resolved version, think this should be self.version or base_artifact.version
Contributor
|
Is there a reason why the methods provided by maven_artifact are not used?
https://github.com/hamnis/maven-artifact/blob/main/src/maven_artifact/resolver.py#L13 |
Contributor
|
Left:
|
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.
Add support for setting version = "latest" / "latest-stable" / "latest-unstable" for Maven, Git and PyPI locations.
I have added support for MavenLocation, seems to be working as intended.