docopt-ng
docopt-ng copied to clipboard
When docopt and docopt-ng are in the same venv, docopt takes precedence
If you install
pipenv install pipreqs pip-upgrader docopt-ng
Which sometimes happens, you can't put everything into system or pipx.
Then apps use the wrong docopt.
$ python
>>> import docopt
>>> docopt.__file__
'C:\\Users\\matth\\.virtualenvs\\demo_doc-j-5bRj6B\\lib\\site-packages\\docopt.py'
>>> exit()
$ pip install docopt-ng
Requirement already satisfied: docopt-ng in c:\users\matth\.virtualenvs\demo_doc-j-5brj6b\lib\site-packages (0.7.2)
In C# there was a way to handle this and ensure that two similarly named dlls weren't confused with each other, I don't know what the python way is to handle this scenario.
Thanks for this issue @matthewdeanmartin.
I feel like in hindsight, it would have been nice if the original forker had named the package (package meaning what you use with import docopt
) to something new and unique, even docopt2
. Now though, we might be a bit stuck with their choices. I'm open to working on fixing this, but I'm not exactly sure what the implications of renaming the package are. Anyone know any other moderately popular packages that have changed their package name? How they did it?
Renaming the distribution (eg what you use with pip install docopt-ng
) is easier to do and is backwards compatible, per https://github.com/simonw/pypi-rename, but that is less important that than the package name, which actually blocks certain installs.
All I can think of is leaving the old docopt-ng as is and publishing going forward with a new package name and new module name, e.g. pip install docopt2
and import docoptng
. Without something like .net's 4 part assembly names or other name clash strategies, this is a problem bigger than doctopt(-ng). I don't know which option is better, they are all bad options.
See the discussion I started on discuss.python.org. I emailed the listed docopt
maintainer for transferring the name of docopt
on PyPI.
You should do a pep 541 name request
See #48 for more info on PEP 541 name request.