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

bpo-46607: Add DeprecationWarning to LegacyInterpolation #30927

Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jan 26, 2022

LegacyInterpolation has been deprecated in docs since its introduction in Python 3.2:

class LegacyInterpolation(Interpolation):
    """Deprecated interpolation used in old versions of ConfigParser.
    Use BasicInterpolation or ExtendedInterpolation instead."""

Let's add a DeprecationWarning for a couple of releases before removal.

https://bugs.python.org/issue46607

@hugovk

This comment has been minimized.

@hugovk hugovk marked this pull request as draft January 27, 2022 09:20
@hugovk hugovk force-pushed the issue45173-deprecate-LegacyInterpolation branch from 80d4f4a to 2c616f3 Compare February 2, 2022 07:06
@hugovk hugovk changed the title bpo-45173: Add DeprecationWarning to LegacyInterpolation bpo-46607: Add DeprecationWarning to LegacyInterpolation Feb 2, 2022
@hugovk

This comment was marked as resolved.

@hugovk hugovk force-pushed the issue45173-deprecate-LegacyInterpolation branch from 2c616f3 to 850073b Compare February 2, 2022 18:45
@hugovk hugovk marked this pull request as ready for review February 2, 2022 18:55
@hugovk hugovk force-pushed the issue45173-deprecate-LegacyInterpolation branch from 850073b to 2aa86b8 Compare February 3, 2022 14:28
@hugovk

This comment was marked as resolved.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Let’s do this!

@gpshead gpshead merged commit 7528094 into python:main Apr 5, 2022
@hugovk hugovk deleted the issue45173-deprecate-LegacyInterpolation branch April 5, 2022 16:27
@tirkarthi
Copy link
Member

@hugovk The PR introduces deprecation warnings in tests that need to be handled :

PYTHONWARNINGS=always ./python -Wall -m test test_configparser
0:00:00 load avg: 2.29 Run tests sequentially
0:00:00 load avg: 2.29 [1/1] test_configparser
/home/karthikeyan/stuff/python/cpython/Lib/test/test_configparser.py:1031: DeprecationWarning: LegacyInterpolation has been deprecated since Python 3.2 and will be removed from the configparser module in Python 3.13. Use BasicInterpolation or ExtendedInterpolation instead.
  interpolation = configparser.LegacyInterpolation()

== Tests result: SUCCESS ==

1 test OK.

Total duration: 300 ms
Tests result: SUCCESS

@hugovk
Copy link
Member Author

hugovk commented Apr 12, 2022

@tirkarthi Thanks, will check it!

@hugovk
Copy link
Member Author

hugovk commented Apr 12, 2022

Please see #91480.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants