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

Fix #5059: Replace SafeConfigParser with ConfigParser #5120

Closed
wants to merge 2 commits into from
Closed

Fix #5059: Replace SafeConfigParser with ConfigParser #5120

wants to merge 2 commits into from

Conversation

drunkwcodes
Copy link

@drunkwcodes drunkwcodes commented Mar 27, 2018

Fix #5059

Here's a local test result:

test_vcs.py ....................                                         [100%]

========================== 20 passed in 0.28 seconds ==========================

Notes:

class SafeConfigParser(ConfigParser):
    """ConfigParser alias for backwards compatibility purposes."""

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        warnings.warn(
            "The SafeConfigParser class has been renamed to ConfigParser "
            "in Python 3.2. This alias will be removed in future versions."
            " Use ConfigParser directly instead.",
            DeprecationWarning, stacklevel=2
        )

@drunkwcodes drunkwcodes changed the title Fix: Replace deprecated class SafeConfigParse with ConfigParser Fix #5059: Replace deprecated class SafeConfigParse with ConfigParser Mar 27, 2018
@drunkwcodes drunkwcodes changed the title Fix #5059: Replace deprecated class SafeConfigParse with ConfigParser Fix #5059: Replace SafeConfigParser with ConfigParser Mar 27, 2018
@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label May 11, 2018
@pradyunsg
Copy link
Member

Thanks for this PR @drunkwcodes!

Looking at the docs for SafeConfigParser on Py2, ConfigParser on Py2/3 and hgrc it seems to me that we'd want to use RawConfigParser on Py2 and ConfigParser(interpolation=None) on Py3.

https://www.mercurial-scm.org/doc/hgrc.5.html

@pradyunsg pradyunsg added type: enhancement Improvements to functionality S: awaiting response Waiting for a response/more information and removed S: needs triage Issues/PRs that need to be triaged labels Jun 19, 2018
@pradyunsg
Copy link
Member

Ping @drunkwcodes! :)

@drunkwcodes
Copy link
Author

Sorry. I changed my mind that this change maybe be held until 2020.

@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 31, 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 S: awaiting response Waiting for a response/more information type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip uses deprecated SafeConfigParser
2 participants