Skip to content

PythonInspector: Fix a deserialization issue #6036

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
wants to merge 1 commit into from

Conversation

mnonnenmacher
Copy link
Member

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.

@mnonnenmacher mnonnenmacher requested a review from a team as a code owner November 3, 2022 15:10
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 mnonnenmacher force-pushed the pip-empty-dependencies branch from 089be93 to 1ac3c74 Compare November 3, 2022 15:13
@mnonnenmacher mnonnenmacher enabled auto-merge (rebase) November 3, 2022 15:13
@@ -112,10 +116,19 @@ internal object PythonInspector : CommandLineTool, Logging {
@Serializable
internal data class Result(
@SerialName("files") val projects: List<Project>,
@SerialName("resolved_dependencies_graph") val resolvedDependenciesGraph: List<ResolvedDependency>,
@SerialName("resolved_dependencies_graph")
@Serializable(with = DependencyGraphDeserializer::class)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to do the changes in this file in a separate commit that can be cleanly reverted once the issue is fixed, but the changes to PipFunTest are kept?

@mnonnenmacher
Copy link
Member Author

The root cause was fixed in the meantime, I will replace this with a python-inspector upgrade.

auto-merge was automatically disabled November 7, 2022 08:25

Pull request was closed

@mnonnenmacher mnonnenmacher deleted the pip-empty-dependencies branch November 7, 2022 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants