[issue20754] distutils should use SafeConfigParser

2016-09-28 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Do the changes in issue20120 address this concern?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20754] distutils should use SafeConfigParser

2016-09-28 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, Alex. SafeConfigParser has been renamed to ConfigParser 
in Python 3.2 and distutils already uses ConfigParser in Python 3:

>From Distribution.parse_config_files():

...
parser = ConfigParser()

For 2.7, can you try it with setuptools? Perhaps we should keep 2.7 as-is and 
let setuptools do its magic.

--
nosy: +berker.peksag, jason.coombs
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20754] distutils should use SafeConfigParser

2014-02-24 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +eric.araujo, tarek
versions: +Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20754] distutils should use SafeConfigParser

2014-02-23 Thread Alex Brandt

New submission from Alex Brandt:

I first noticed this issue when configuring nose via setup.cfg and reported the 
behavior in this issue on their tracker: 
https://github.com/nose-devs/nose/issues/733

I'll repaste the important bits here:

When using a setup.cfg with the following contents (including minor variations):

[nosetests]
logging-format = %(lineno)d: %(process)d: %(message)s
With any setup.py file the following error is raised when trying to run 
setup.py (python2.7 used for example, error also occurs in 3.3):

alunduil@elijah margarine % python2.7 setup.py nosetests
Traceback (most recent call last):
  File "setup.py", line 108, in 
setup(**PARAMS)
  File "/usr/lib64/python2.7/distutils/core.py", line 125, in setup
dist.parse_config_files()
  File "/usr/lib64/python2.7/distutils/dist.py", line 397, in parse_config_files
val = parser.get(section,opt)
  File "/usr/lib64/python2.7/ConfigParser.py", line 623, in get
return self._interpolate(section, option, value, d)
  File "/usr/lib64/python2.7/ConfigParser.py", line 669, in _interpolate
option, section, rawval, e.args[0])
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
section: [nosetests]
option : logging-format
key: pathname
rawval : %(pathname)s:%(lineno)d: %(process)d: %(message)s

The suggested fix of using %% to pass the interpolation through to nose 
requires that distutils use SafeConfigParser rather than ConfigParser.

I've verified that this does indeed appear to work (at least fixing the 
distutils interaction).  The only place the change needs to be made is on lines 
378 and 386 in distutils/dist.py.

I can attach a patch or send a pull request with this fix if there are no 
objections to this solution.

--
components: Distutils
messages: 212048
nosy: alunduil
priority: normal
severity: normal
status: open
title: distutils should use SafeConfigParser
type: behavior
versions: Python 2.7, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com