Skip to content
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

pipreqs requiring asposestorage==1.0.2 without reason #449

Open
aseganti opened this issue Jun 7, 2024 · 0 comments
Open

pipreqs requiring asposestorage==1.0.2 without reason #449

aseganti opened this issue Jun 7, 2024 · 0 comments

Comments

@aseganti
Copy link

aseganti commented Jun 7, 2024

Hello,
we found a bug in pipreqs: if we import a module called models, then it will create a requirements.txt file containing asposestorage==1.0.2.

To reproduce:

  1. Create a file called my_module.py containing this code:
import models

if __name__ == "__main__":
    pass
  1. run pipreqs . in the folder containing this module (you don't need to have a models.py file in the folder!).

Result: a requirements.txt file is created with this content:

asposestorage==1.0.2

Versions:
pipreqs --version --> 0.4.13
Python 3.11.7

Possible explanation:
this file contains a mapping: models --> asposestorage (

models:asposestorage
) not sure how it is used but I think that models is a quite common module names in these AI days so not sure there should be a default sketchy library imported for models.

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

No branches or pull requests

1 participant