Repository navigation
Conversation
RPM has four weak dependency tags that this library did not recognise: Recommends, Suggests, Supplements and Enhances. They share the same syntax as Requires (a name with an optional version constraint), so they are parsed the same way and exposed as lists of Requirement on both the Spec and its subpackages. Tests cover parsing with and without a version, per-subpackage scope, and end-of-line comments (added to the existing parametrised comment test).
This branch has not been deployed
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.
What
Adds parsing for RPM's four weak dependency tags, which the library did not recognise before:
Recommends,Suggests,SupplementsandEnhances.How
They share the same syntax as
Requires(a name with an optional version constraint), so they go through the same parsing path and are exposed aslist[Requirement]on bothSpecand its subpackages, mirroringrequires/build_requires.Tests and checks
New tests cover:
Ran everything listed in
AGENTS.md:pytest: 51 passedmypy .(strict): cleanpylint --rcfile=.pylintrc pyrpm: 10.00/10black --line-length 130: cleanNote
I typed the new attributes as
list["Requirement"], since that is what the shared code path stores. The existingconflicts/obsoletes/providesare annotatedlist[str]but storeRequirementobjects too; I left that pre-existing inconsistency alone to keep this PR focused.