Skip to content

fix: Don't filter out extras for a pip dependency.#377

Merged
feanil merged 1 commit intomasterfrom
feanil/fix_update_py_sh_script
Aug 7, 2023
Merged

fix: Don't filter out extras for a pip dependency.#377
feanil merged 1 commit intomasterfrom
feanil/fix_update_py_sh_script

Conversation

@feanil
Copy link
Copy Markdown
Contributor

@feanil feanil commented Aug 7, 2023

Before this change, the function was dropping extra dependencies. For
example:

If you had a requirements file like the following:

Xblock[django]

It will output: Xblock

The correct output should be Xblock[django]

This drops the extras which may have further constraint requirements or
more packages that are required. In the example, the package would need
Django but that dependency would not be visible upstream correctly.

@feanil feanil requested review from a team and rgraber August 7, 2023 14:41
@feanil feanil force-pushed the feanil/fix_update_py_sh_script branch from 303a9e4 to ad307cf Compare August 7, 2023 14:48
Copy link
Copy Markdown
Contributor

@rgraber rgraber left a comment

Choose a reason for hiding this comment

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

We should update python-template/setup.py as well so new repos get the correct regex.
Also can you document the tests you ran and what the difference was in output between the old and the new scripts?

Before this change, the function was dropping extra dependencies. For
example:

If you had a requirements file like the following:
```
Xblock[django]
```

It will output: `Xblock`

The correct output should be `Xblock[django]`

This drops the extras which may have further constraint requirements or
more packages that are required. In the example, the package would need
Django but that dependency would not be visible upstream correctly.
@feanil feanil force-pushed the feanil/fix_update_py_sh_script branch from ad307cf to c340961 Compare August 7, 2023 14:59
@feanil
Copy link
Copy Markdown
Contributor Author

feanil commented Aug 7, 2023

@rgraber I made the update to setup.py, for testing, I updated the description and commit message to make it more clear what the test looks like. The example is from the test I actually ran, let me know if you are looking for something else or if that's sufficient documentation of testing.

@feanil feanil requested a review from rgraber August 7, 2023 15:01
Copy link
Copy Markdown
Contributor

@rgraber rgraber left a comment

Choose a reason for hiding this comment

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

LGTM

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