-
Notifications
You must be signed in to change notification settings - Fork 588
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
Guess unpinned versions in python requirements.txt #1966
Merged
Merged
Conversation
This file contains 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
Signed-off-by: manifestori <[email protected]>
Signed-off-by: manifestori <[email protected]>
…txt-parsing feat: make python requirements.txt parser more inclusive
…ntstxt-parsing Signed-off-by: Alex Goodman <[email protected]>
…tion Signed-off-by: Alex Goodman <[email protected]>
Benchmark Test ResultsBenchmark results from the latest changes vs base branch
|
wagoodman
force-pushed
the
feat-python-requirementstxt-parsing
branch
from
July 27, 2023 14:03
d1231b4
to
ad3926b
Compare
Note: depends on #1967 before reviewing / merging |
…ntstxt-parsing Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
# $ diff -C 2 ./schema/json/schema-9.0.2.json ./schema/json/schema-10.0.0.json
*** ./schema/json/schema-9.0.2.json0.2.jThu Jul 27 08:55:01 2023-10.0.0.json
--- ./schema/json/schema-10.0.0.json Thu Jul 27 11:30:14 2023
***************
*** 1,5 ****
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
! "$id": "anchore.io/schema/syft/json/9.0.2/document",
"$ref": "#/$defs/Document",
"$defs": {
--- 1,5 ----
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
! "$id": "anchore.io/schema/syft/json/10.0.0/document",
"$ref": "#/$defs/Document",
"$defs": {
***************
*** 1621,1630 ****
},
"markers": {
! "patternProperties": {
! ".*": {
! "type": "string"
! }
! },
! "type": "object"
}
},
--- 1621,1625 ----
},
"markers": {
! "type": "string"
}
},
***************
*** 1632,1639 ****
"required": [
"name",
! "extras",
! "versionConstraint",
! "url",
! "markers"
]
},
--- 1627,1631 ----
"required": [
"name",
! "versionConstraint"
]
},
|
wagoodman
added
breaking-change
Change is not backwards compatible
and removed
breaking-change
Change is not backwards compatible
labels
Jul 27, 2023
Signed-off-by: Alex Goodman <[email protected]>
wagoodman
added
the
changelog-ignore
Don't include this issue in the release changelog
label
Jul 27, 2023
spiffcs
approved these changes
Jul 27, 2023
wagoodman
removed
the
changelog-ignore
Don't include this issue in the release changelog
label
Jul 27, 2023
This was referenced Jul 31, 2023
This was referenced Aug 1, 2023
Closed
This was referenced Aug 15, 2023
Merged
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this pull request
Feb 19, 2024
* feat: python requirements.txt parsing inclusive Signed-off-by: manifestori <[email protected]> * refactor: parseVersion Signed-off-by: manifestori <[email protected]> * add python config for optional requirements version constraint resolution Signed-off-by: Alex Goodman <[email protected]> * fix tests Signed-off-by: Alex Goodman <[email protected]> * allow for python requirements metadata to be optional Signed-off-by: Alex Goodman <[email protected]> * restore cyclonedx dependency Signed-off-by: Alex Goodman <[email protected]> --------- Signed-off-by: manifestori <[email protected]> Signed-off-by: Alex Goodman <[email protected]> Signed-off-by: Alex Goodman <[email protected]> Co-authored-by: manifestori <[email protected]>
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.
Expands on #1597 by exposing a new
python.guess-unpinned-requirements
configuration, allowing loose requirements to be filled in with the lowest expressible version instead of dropping the package altogether. Note: since this is synthesizing version information this is an opt-in feature.This replaces the v10 schema changes in #1967 since they have not been released yet (a condition specifically allowed in the schema readme). The small change is to allow for some elements to be optional in the requirements metadata (everything except for name and version).