Skip to content

Disable upgrades to existing python modules which were not installed via pip #5605

@nehaljwani

Description

@nehaljwani

What's the problem this feature will solve?

pip lets me upgrade python modules installed by the system package manager

Describe the solution you'd like

pip should not touch packages not installed by it ;-)

$ rpm -qf /usr/lib64/python2.7/site-packages/nacl
python2-pynacl-1.2.0-2.fc28.x86_64

$ pip freeze
cffi==1.11.5
ply==3.9
pycparser==2.14
PyNaCl==1.2.0
six==1.11.0

$ sudo pip install --upgrade pynacl
...
Successfully installed pycparser-2.18 pynacl-1.2.1

Alternative Solutions

🤔

Additional context

I initially posted it here. For starters, I have opened a PR to make pip_installed_by_pip() function more generic so that it can be used by whoever implements this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions