You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clear and concise description of what the bug is.
😆
Ok, this one is gross: With the fix in #49, a direct dependency held on a parent module that was also held on a child module would be correctly placed into the common dependency set because it is needed directly by the parent. This is, unfortunately, only a first-order fix since this same situation can occur when the dependency is needed by a Third Party dependency held directly by the parent rather than a local child sub-module.
This is only a problem if the requirements list given to parse_requirements includes the transitive dependency that is only used by the Third Party dependency and is NOT used anywhere inside of the local library. This is a very unlikely circumstance, but it could conceivably arise if the Third party dependency has an open version range for the transitive dependency, but the local library needs to pin that version for some valid reason (like a security patch)..
Platform
Please provide details about the environment you are using, including the following:
Interpreter version:
Library version:
Sample Code
deftest_nested_deps():
"""Make sure that direct depencencies show up in requirements for nested modules """requirements, extras_require=parse_requirements(
["sample_lib", "PyYaml", "alchemy-logging"],
"direct_dep_nested",
["direct_dep_nested.nested", "direct_dep_nested.nested2"]
)
Expected behavior
The PyYaml dependency should be in the common requirements because it's needed transitively by sample_lib which is needed directly by the top-level direct_dep_nested module.
The PyYaml dependency is placed into the extras for direct_dep_nested.nested because it's held as an extra set and PyYaml is not allocated as a direct dependency of the top-level direct_dep_nested module.
Describe the bug
Ok, this one is gross: With the fix in #49, a
direct
dependency held on a parent module that was also held on a child module would be correctly placed into thecommon
dependency set because it is needed directly by theparent
. This is, unfortunately, only a first-order fix since this same situation can occur when the dependency is needed by a Third Party dependency held directly by the parent rather than a local child sub-module.This is only a problem if the
requirements
list given toparse_requirements
includes the transitive dependency that is only used by the Third Party dependency and is NOT used anywhere inside of the local library. This is a very unlikely circumstance, but it could conceivably arise if the Third party dependency has an open version range for the transitive dependency, but the local library needs to pin that version for some valid reason (like a security patch)..Platform
Please provide details about the environment you are using, including the following:
Sample Code
Expected behavior
The
PyYaml
dependency should be in the commonrequirements
because it's needed transitively bysample_lib
which is needed directly by the top-leveldirect_dep_nested
module.Observed behavior
The
PyYaml
dependency is placed into the extras fordirect_dep_nested.nested
because it's held as anextra
set andPyYaml
is not allocated as adirect
dependency of the top-leveldirect_dep_nested
module.Additional context
Discovered when trying to write a test case for #53 with @prashantgupta24
The text was updated successfully, but these errors were encountered: