You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a refactoring of configparser raised from discussions on bpo-6517 and bpo-9876. It solves both issues and makes the code quite elegant. Best part is, it's fully backwards compatible [1].
In the patch I basically did:
a) move the interpolation functionality out of the parsers
b) deprecate RCP and CP in favor of SCP
c) refactor the resulting code to get rid of duplicates
This means that actually despite the generalization and introduction of deprecation warnings, configparser lost 22 lines in the process. The implementation is complete and unit tested.
WHAT'S LEFT TO DO
=================
Obviously the new interpolationinit argument needs docs. This includes the docstrings on *Interpolation classes that describe how the algorithms work.
ExtendedInterpolation class implementing the buildout syntax, that would satisfy the request from bpo-9876.
Once we have more interpolation implementations new test cases will be added to test_cfgparser.py.
Will do all three when I have any opinions on the current direction.
REVIEW HINTS
============
I need some thumbs up or advice on the design decisions made.
interpolation now takes a class, init instantiates an object on its own. Do tell if taking an object upfront would be a better approach.
*Interpolation classes have methods which take the parser as an argument. Do tell if making it an object attribute would be a better approach.
All other points of interest during a review naturally apply here too.
[1] Assuming _names are private and can be moved around when needed.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: