[Distutils] setup.cfg - to interpolate or not to interpolate

Nick Coghlan ncoghlan at gmail.com
Thu Jul 27 23:30:13 EDT 2017


On 28 July 2017 at 01:32, Jason R. Coombs <jaraco at jaraco.com> wrote:
> I’d like feedback, in either ticket, about whether this change is worth the
> trouble and if so if there are any ways to mitigate the risks of introducing
> such a change.

The one way I can see of doing this with a graceful transition period
would be to implement it like this:

1. Switch to raw parsing with no interpolation as the default
2. Check the result for any field values containing either "%(<text>)s" or "%%"
3. If you find any, print a suitable deprecation warning and parse it
again with interpolation enabled

(I'm assuming the current interpolation support is the mod-formatting
style one supported by default in Py2, rather than the braces based
variant now available in Py3)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list