Skip to content

bpo-46607: Add DeprecationWarning to LegacyInterpolation - #30927

Merged
gpshead merged 2 commits into
python:mainfrom
hugovk:issue45173-deprecate-LegacyInterpolation
Apr 5, 2022
Merged

bpo-46607: Add DeprecationWarning to LegacyInterpolation#30927
gpshead merged 2 commits into
python:mainfrom
hugovk:issue45173-deprecate-LegacyInterpolation

Conversation

@hugovk

@hugovkhugovk commented Jan 26, 2022

Copy link
Copy Markdown
Member

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

classLegacyInterpolation(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
hugovkforce-pushed the issue45173-deprecate-LegacyInterpolation branch from 80d4f4a to 2c616f3CompareFebruary 2, 2022 07:06
@hugovkhugovk changed the title bpo-45173: Add DeprecationWarning to LegacyInterpolationbpo-46607: Add DeprecationWarning to LegacyInterpolationFeb 2, 2022
@hugovk

This comment was marked as resolved.

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

This comment was marked as resolved.

@gvanrossumgvanrossum left a comment

Copy link
Copy Markdown
Member

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:mainApr 5, 2022
@hugovk
hugovk deleted the issue45173-deprecate-LegacyInterpolation branch April 5, 2022 16:27
@tirkarthi

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

@tirkarthi Thanks, will check it!

@hugovk

Copy link
Copy Markdown
MemberAuthor

Please see #91480.

Sign up for freeto 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

@hugovk@tirkarthi@gpshead@gvanrossum@the-knights-who-say-ni@bedevere-bot