Skip to content

Inconsistent type of resolvedDependenciesGraph #94

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

Closed
mnonnenmacher opened this issue Nov 3, 2022 · 3 comments · Fixed by #95
Closed

Inconsistent type of resolvedDependenciesGraph #94

mnonnenmacher opened this issue Nov 3, 2022 · 3 comments · Fixed by #95
Assignees
Labels
bug Something isn't working

Comments

@mnonnenmacher
Copy link

With the fix for #86 the type of the resolvedDependenciesGraph property is now inconsistent. Usually the property is an array, but if the dependency graph is empty it is an empty object {} instead of an empty array:

https://github.com/nexB/python-inspector/blob/0da2e84124fa10de7b2b005240b8de38c0095286/tests/data/setup/no-direct-dependencies-setup.py-expected.json#L84

This makes the deserialization unnecessarily complex.

mnonnenmacher added a commit to oss-review-toolkit/ort that referenced this issue Nov 3, 2022
If a project defines no dependencies python-inspector returns an empty
object instead of an empty array [1]. Create a custom deserializer as a
workaround to not fail during deserialization.

[1]: aboutcode-org/python-inspector#94

Signed-off-by: Martin Nonnenmacher <[email protected]>
mnonnenmacher added a commit to oss-review-toolkit/ort that referenced this issue Nov 3, 2022
If a project defines no dependencies python-inspector returns an empty
object instead of an empty array [1]. Create a custom deserializer as a
workaround to not fail during deserialization.

[1]: aboutcode-org/python-inspector#94

Signed-off-by: Martin Nonnenmacher <[email protected]>
@TG1999 TG1999 self-assigned this Nov 3, 2022
@TG1999 TG1999 added the bug Something isn't working label Nov 3, 2022
@TG1999
Copy link
Contributor

TG1999 commented Nov 3, 2022

@mnonnenmacher thanks for raising this, I am having a look on this.

TG1999 added a commit that referenced this issue Nov 3, 2022
TG1999 added a commit that referenced this issue Nov 4, 2022
@TG1999 TG1999 closed this as completed in #95 Nov 4, 2022
TG1999 added a commit that referenced this issue Nov 4, 2022
Return empty list for resolved dependencies graph in case no dependencies are found #94
@TG1999
Copy link
Contributor

TG1999 commented Nov 4, 2022

This is fixed in https://pypi.org/project/python-inspector/0.9.2/ , please check and let us know.

mnonnenmacher added a commit to oss-review-toolkit/ort that referenced this issue Nov 7, 2022
For the release notes see [1]. This version fixes a deserialization
issue so upgrade the minimum required version as well [2].

[1]: https://github.com/nexB/python-inspector/blob/main/CHANGELOG.rst#v092
[2]: aboutcode-org/python-inspector#94

Signed-off-by: Martin Nonnenmacher <[email protected]>
@mnonnenmacher
Copy link
Author

Thanks @TG1999, the fix works.

mnonnenmacher added a commit to oss-review-toolkit/ort that referenced this issue Nov 7, 2022
For the release notes see [1]. This version fixes a deserialization
issue so upgrade the minimum required version as well [2].

[1]: https://github.com/nexB/python-inspector/blob/main/CHANGELOG.rst#v092
[2]: aboutcode-org/python-inspector#94

Signed-off-by: Martin Nonnenmacher <[email protected]>
pombredanne added a commit that referenced this issue Apr 1, 2025
Add support for new OS versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants