-
Notifications
You must be signed in to change notification settings - Fork 14
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
FawltyDeps fails on s3transfer package #429
Comments
I downloaded s3transfer to have a closer look. In the current version, the relevant lines from extras_require={
'crt': 'botocore[crt]>=1.33.2,<2.0a.0',
}, We expect the values in that dict to be a list of requrement strings, and then we iterate over that, we end up instead iterating over the single characters in the string. To figure out what should be our desired behavior here, I installed s3transfer with the
This line in particular shows that
So, I agree that the ideal outcome here is that FalwtyDeps handles |
As described in issue #429, the s3transfer package comes with setup.py where the `extras_require` dictionary does not map to a list of strings (extra requirements), but instead map to a string directly. When s3transfer is installed with this extra (e.g. `pip install s3transfer[crt]`), the setuptools machinery handles this variation gracefully, i.e. it interprets the string as if it was a single-element list containing the same string. An experiment reveals that the same interpretation occurs if a string is passed directly in the `install_requires` argument. This commit teaches FawltyDeps to do the same. Also, if parse_one_req() fails to parse a requirement string, catch that exception (likely an `InvalidRequirement` or some other subclass of ValueError), and convert it into a DependencyParsingError, which is handled more gracefully (i.e. print a warning message and continue).
As described in issue #429, the s3transfer package comes with setup.py where the `extras_require` dictionary does not map to a list of strings (extra requirements), but instead map to a string directly. When s3transfer is installed with this extra (e.g. `pip install s3transfer[crt]`), the setuptools machinery handles this variation gracefully, i.e. it interprets the string as if it was a single-element list containing the same string. An experiment reveals that the same interpretation occurs if a string is passed directly in the `install_requires` argument. This commit teaches FawltyDeps to do the same. Also, if parse_one_req() fails to parse a requirement string, catch that exception (likely an `InvalidRequirement` or some other subclass of ValueError), and convert it into a DependencyParsingError, which is handled more gracefully (i.e. print a warning message and continue).
As described in issue #429, the s3transfer package comes with setup.py where the `extras_require` dictionary does not map to a list of strings (extra requirements), but instead map to a string directly. When s3transfer is installed with this extra (e.g. `pip install s3transfer[crt]`), the setuptools machinery handles this variation gracefully, i.e. it interprets the string as if it was a single-element list containing the same string. An experiment reveals that the same interpretation occurs if a string is passed directly in the `install_requires` argument. This commit teaches FawltyDeps to do the same. Also, if parse_one_req() fails to parse a requirement string, catch that exception (likely an `InvalidRequirement` or some other subclass of ValueError), and convert it into a DependencyParsingError, which is handled more gracefully (i.e. print a warning message and continue).
Describe the bug
FalwtyDeps fails when run on s3transfer package.
The problem is with the way dependencies are declared in setup.py.
Minimal not-working example of setup.py:
To Reproduce
Download s3transfer package and run:
from arbitrary environment.
Expected behavior
Minimal expectation: FawltyDeps informs of the problem and does not crash.
Ideal outcome: FalwtyDeps handles
setup.py
cases like the above.Environment
Additional context
The text was updated successfully, but these errors were encountered: