-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[Py3] Remove package containing entry points names with colons #3434
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
Conversation
@montefra good catch. For the test, maybe the simplest would be to write a functional test like this one: pip/tests/functional/test_uninstall.py Lines 35 to 54 in b681665
Where you can define the |
@xavfernandez: thank you for the pointer. I should commit the test soon. |
I have added a test.
Python 3.5 failed with an error which is probably fault of pytest e.g.:
|
result = script.pip('install', pkg_path) | ||
result = script.pip('list') | ||
assert "ep-install (0.1)" in result.stdout | ||
script.pip('uninstall', 'ep_install', '-y', expect_stderr=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the expect_stderr=True
needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given your question, I guess no.
Who does it work? If expect_stderr=False
and there is standard error, raises an error?
In this case I remove it and recommit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If expect_stderr=False and there is standard error, raises an error?
Yes exactly, it was needed in the distutils case, because pip prints a warning in such case.
Yes the pytest issue is known: it is pinned to avoid this issue pytest-dev/pytest#1083 but would need to be bumped to work on python 3.5 ... |
Ok. Thank you for the pytest pointer. |
@xavfernandez : I've removed it. The test goes fine on my system. If you accept the PR, do I have to do something else (changelog, other file, ...)? |
Well a changelog would make my life easier ^^ The rebase is optional since there is no conflict. |
@xavfernandez : I'll add an entry under If I see that tomorrow there are conflicts, I'll rebase. Good night |
@montefra thanks :) |
@xavfernandez : done. I hope that everything is fine. |
if six.PY2: | ||
options = {} | ||
else: | ||
options = {"delimiters": ('=')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you meant ('=',)
.
Sorry I did not spot this before...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course... Me dumm! I'm not used to use tuples. Thank for spotting it. Committing
@xavfernandez I'm about to rebase and push the commit |
dc33b20
to
3c85765
Compare
@xavfernandez : rebase done |
[Py3] Remove package containing entry points names with colons
Thanks for your patience :) |
thank for accepting the PR and mostly thankd for pip. |
[Py3] Remove package containing entry points names with colons
Entry points names containing colons are legit, or at least
pkg_resources
can deal with them without any issue.Unfortunately, in python 3
pip uninstall
choke on them when removing a package.This is because ConfigParser supports by defaults also the "INI" format, in which the delimiter is a colon. This is not a problem for python 2.
This PR force the delimiter to be only
=
to fix this issue.I haven't add a test as now. I should have to dig into the test suite (which is huge).
In theory would be enough to add an entry point somewhere called e.g.:
If someone would be so kind as to point me to the correct place to add it, I would be very happy to add it and check if everything is fine.