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

pip uses deprecated SafeConfigParser #5059

Closed
dchudz opened this issue Mar 8, 2018 · 12 comments · Fixed by #5931
Closed

pip uses deprecated SafeConfigParser #5059

dchudz opened this issue Mar 8, 2018 · 12 comments · Fixed by #5931
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: maintenance Related to Development and Maintenance Processes

Comments

@dchudz
Copy link

dchudz commented Mar 8, 2018

  • Pip version: 9.0.1
  • Python version: 3.6.1
  • Operating system: Mac OS X 10.12.4

Description:

With error::DeprecationWarning in PYTHONWARNINGS:

pip uninstall -y faker
/Users/davidchudzicki/.cache/hypothesis-build-runtimes/.tox/py36-full/lib/python3.6/site-packages/pip/pep425tags.py:260: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Exception:
Traceback (most recent call last):
  File "/Users/davidchudzicki/.cache/hypothesis-build-runtimes/.tox/py36-full/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Users/davidchudzicki/.cache/hypothesis-build-runtimes/.tox/py36-full/lib/python3.6/site-packages/pip/commands/uninstall.py", line 76, in run
    requirement_set.uninstall(auto_confirm=options.yes)
  File "/Users/davidchudzicki/.cache/hypothesis-build-runtimes/.tox/py36-full/lib/python3.6/site-packages/pip/req/req_set.py", line 346, in uninstall
    req.uninstall(auto_confirm=auto_confirm)
  File "/Users/davidchudzicki/.cache/hypothesis-build-runtimes/.tox/py36-full/lib/python3.6/site-packages/pip/req/req_install.py", line 732, in uninstall
    config = configparser.SafeConfigParser(**options)
  File "/Users/davidchudzicki/.cache/hypothesis-build-runtimes/versions/python3.6/lib/python3.6/configparser.py", line 1212, in __init__
    DeprecationWarning, stacklevel=2
DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
@pradyunsg
Copy link
Member

Hey @dchudz! Thanks for filing this issue!

I don't see this exact same line in master but there's definitely something similar to this in the codebase today.

@pradyunsg pradyunsg added good first issue A good item for first time contributors to work on type: maintenance Related to Development and Maintenance Processes labels Mar 9, 2018
@pradyunsg
Copy link
Member

This issue is a good starting point for anyone who wants to help out with pip's development -- it's simple and the process of fixing this should be a good introduction to pip's development workflow. :)

@brycepg
Copy link

brycepg commented Mar 13, 2018

This particular SafeConfigParser was removed in d64b871

There is however another one

src/pip/_internal/vcs/mercurial.py
36:        config = configparser.SafeConfigParser()

@dchudz
Copy link
Author

dchudz commented Mar 13, 2018

Ah thanks/sorry @brycepg! I should have checked master and not just the latest release.

@pradyunsg
Copy link
Member

There is however another one

Great! I guess that is still something that needs fixing. :)

@kaikulimu
Copy link

Could you move this to "In Progress" in https://github.com/orgs/pypa/projects/1 ?

@pradyunsg
Copy link
Member

Done! :)

xrmx added a commit to xrmx/pip that referenced this issue Oct 30, 2018
@pradyunsg
Copy link
Member

This is back in the open pool. The relevant line of code that needs to be updated is:

config = configparser.SafeConfigParser()

@abhyudaypratap
Copy link
Contributor

can I work on this issue?
I would like to help.

@pradyunsg
Copy link
Member

I think this got fixed at some point or there's an open PR for this.

@pradyunsg
Copy link
Member

@abhyudaypratap Thanks for volunteering! I'd forgotten to click the merge button on an existing PR for this.

Would you be willing to look at #6471, #6472 or #6473?

@abhyudaypratap
Copy link
Contributor

@pradyunsg Thank you, will look into the issues 👍

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants