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

Req: Warn and stop install if pip is about to clobber over existing files #5030

Closed
bobpaul opened this issue Feb 16, 2018 · 1 comment
Closed
Labels
C: error messages Improving error messages type: enhancement Improvements to functionality UX User experience related

Comments

@bobpaul
Copy link

bobpaul commented Feb 16, 2018

  • Pip version: 9.0.1
  • Python version: 3.6.4
  • Operating system: Linux 4.14.12 on ArchLinux

Description:

Recently I found pyserial and serial packages install to the same paths. While this is outside pip's control/scope, it seems like pip should at least halt installation if it sees files are about to be clobbered.

What I've run:

# pip install serial
... no errors or warnings...
$ python -c 'import serial; print(serial.__doc__, serial.__file__)'
``serial`` is an object serialization/deserialization library intended to facilitate authoring of API models which are
readable and introspective, and to expedite code and data validation and testing. ``serial`` supports JSON, YAML, and
XML.
 /usr/lib/python3.6/site-packages/serial/__init__.py
# pip install pyserial
... no errors or warnings ...
$ python -c 'import serial; print(serial.__doc__, serial.__file__)'
None /usr/lib/python3.6/site-packages/serial/__init__.py
# pip uninstall pyserial
$ python -c 'import serial; print(serial.__doc__, serial.__file__)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'serial' has no attribute '__file__'

What I expected

During pip install pyserial I expected pip to warn me that /usr/lib/python3.6/site-packages/serial/__init__.py and other files already existed.

@pradyunsg pradyunsg added the type: enhancement Improvements to functionality label Feb 17, 2018
@pradyunsg pradyunsg added this to the Print Better Error Messages milestone Feb 17, 2018
@nlhkabu nlhkabu added C: error messages Improving error messages UX User experience related labels Jul 28, 2020
@nlhkabu nlhkabu removed this from the Print Better Error Messages milestone Jul 29, 2020
@pradyunsg
Copy link
Member

Duplicate of #4625

@pradyunsg pradyunsg marked this as a duplicate of #4625 Dec 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: error messages Improving error messages type: enhancement Improvements to functionality UX User experience related
Projects
None yet
Development

No branches or pull requests

3 participants