bndr / bndr/pipreqs

mysql_connector_repackaged==0.3.1 is totally wrong

Open
#261 4 comments 10 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.5k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

I installed and use [mysql-connector-python](https://pypi.org/project/mysql-connector-python/), which is the official mysql driver. But when use pipreqs to generate the requirement.txt I got the result which is totally wrong!

`mysql_connector_repackaged==0.3.1`

BTW, I just [pigar](https://github.com/Damnever/pigar) and it generated the correct result

```
➤ pigar
Writing requirements to ".../requirements.txt"
Requirements file has been overwritten, here is the difference:
- mysql_connector_repackaged==0.3.1
+ # Automatically generated by https://github.com/damnever/pigar.
+
+ # mysql-crash/crash_test.py: 3,4
+ mysql_connector_python == 8.0.25
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported generation using mysql-connector-python and compare pipreqs' output with the expected mysql_connector_python == 8.0.25 result. Trace the dependency-name resolution path used for imports and define done as generating the official package name and version instead of mysql_connector_repackaged==0.3.1.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.