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
As noted by suggestions by @benlangmuir the presets are actually
duplicated. Therefore, they can safely be removed and not "merged".
Python 3's
[configparser](https://docs.python.org/3/library/configparser.html) does
not parse in the same way that Python 2's did. Specifically, Python 3's
does not allow duplicate sections (or in Swift parlance presets).
Python 3 does provide a "strict" property that can be sent to the
constructor to return to the behavior of Python 2 (e.g., `config =
ConfigParser.SafeConfigParser(substitutions, allow_no_value=True,
strict=False)`). However, this provides it's own set of complications in
that the Python 2 version of the constructor does not.
Therefore, instead of having a conditional in the runtime to detect
which version of Python and build the correct initializer this patch
normalizes the presets configuration file such that there are no more
duplicates. This should work in both Python 2 and 3.
Also worth noting: this patch is insufficient by itself to make the
build scripts work with Python 3. This patch is written with the
"Incremental Development" theory in mind and in preparation for other
patches currently in progress.
0 commit comments