Author ssbarnea
Recipients dstufft, eric.araujo, ssbarnea
Date 2016-04-27.20:51:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461790285.78.0.75016384493.issue26872@psf.upfronthosting.co.za>
In-reply-to
Content
The ConfigParser issue with % (percent) is taking huge proportions because it does have serious implications downstream. One such example is the fact that in breaks virtualenv in such way the if you create a virtual env in a path that contains percent at some point you will endup with a virtualenv where you can install only about 50% of existing python packages (serious ones like numpy or pandas will fail to install or even to perform a simple python setup.py egg_info on them).

This is related to distutils which is trying to use the ConfigParser to load the python PATH (which now contains the percent). 

Switching to RawConfigParser does resolve the problem but this seems like an almost impossible attempt because the huge number of occurrences in the wild.

You will find the that only class that is able to load a value with percent inside is RawConfigParser and I don't think that this is normal.

Here is some code I created to exemplify the defective behaviour:
https://github.com/ssbarnea/test-configparser/blob/master/tests/test-configparser.py#L21

The code is executed by Travis with multiple version of python, see one result example: https://travis-ci.org/ssbarnea/test-configparser/jobs/126145032

My personal impression is that the decision to process the % (percent) and to change the behaviour between Python 2 and 3 was a very unfortunate one. Ini/Cfg file specification does not specify the percent as an escape character. Introduction of the %(VAR) feature sounds more like bug than a feature in this case.
History
Date User Action Args
2016-04-27 20:51:25ssbarneasetrecipients: + ssbarnea, eric.araujo, dstufft
2016-04-27 20:51:25ssbarneasetmessageid: <1461790285.78.0.75016384493.issue26872@psf.upfronthosting.co.za>
2016-04-27 20:51:25ssbarnealinkissue26872 messages
2016-04-27 20:51:25ssbarneacreate