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

gpshead merged 2 commits into
python:mainfrom
hugovk:issue45173-deprecate-LegacyInterpolation

Conversation

@hugovk

@hugovk hugovk commented Jan 26, 2022 •

Copy link
Copy Markdown
Member

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 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.

@gvanrossum gvanrossum 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:main Apr 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

hugovk commented Apr 12, 2022

Copy link
Copy Markdown
Member Author

@tirkarthi Thanks, will check it!

@hugovk

hugovk commented Apr 12, 2022

Copy link
Copy Markdown
Member Author

Please see #91480.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants