[issue24086] Configparser interpolation is unexpected

2016-06-11 Thread Łukasz Langa

Łukasz Langa added the comment:

This is solved upstream in setuptools by disabling configparser interpolation.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-09-04 Thread Łukasz Langa

Changes by Łukasz Langa :


--
assignee:  -> lukasz.langa

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-06-10 Thread Jens Diemer

Jens Diemer added the comment:

IMHO i ran into the same bug, try to "./setup.py upload" with my new password 
in ~/.pypirc:

configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', 
found: "%foobar"

This is a limitation of the configparser... But what's about to validate this 
on the "set PyPi password view" ?

So that's impossible to set a PyPi password which can't be parsed by 
configparser ?

--
nosy: +jens

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-05-12 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-05-04 Thread Trevor Bekolay

Trevor Bekolay added the comment:

Thanks for the quick response! I can see the use case for using interpolation 
in .pypirc. Unfortunately for me, I push releases for both Python 2 and Python 
3, so having the double percent sign will cause problems for me on Python 2.

The exception that's being raised is at line 442 
(https://hg.python.org/cpython/file/default/Lib/configparser.py#l442). The 
message itself seems to have the right information, but setuptools seems to 
mangle it  (perhaps InterpolationSyntaxError needs a __repr__ or __str__?)

--

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-04-30 Thread Łukasz Langa

Łukasz Langa added the comment:

This is expected behaviour but I agree the error message should be improved. 
There are people using interpolation in .pypirc, if you don't want that, just 
use a double % sign and it will do the right thing. You don't have to change 
your password.

I'll leave that open to find what's the source of the exception and maybe add a 
more helpful message there.

--

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-04-30 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +lukasz.langa
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-04-30 Thread Trevor Bekolay

New submission from Trevor Bekolay:

I was having an issue installing a package in Python 3, which installed 
properly in Python 2. This is the error message I got:

Complete output from command python setup.py egg_info:
Traceback (most recent call last):

... snip unhelpful traceback ...

  File 
"/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/configparser.py",
 line 423, in _interpolate_some

"found: %r" % (rest,))

configparser.Interpolation


Command "python setup.py egg_info" failed with error code 1 in 
/private/var/folders/12/p4ngkfbx2pnb1ln81csjb19cgn/T/pip-build-6xhgg5x6/nengo

This wasn't a super helpful error message. I managed to figure out that Python 
3 (or setuptools?) was attempting to parse my ~/.pypirc file, which raised a 
configparser.InterpolationSyntaxError because my password contained a 
percent-sign. Configparser doesn't try to interpolate this string in Python 2, 
so it worked fine. As a workaround, I've changed my PyPI password, but this 
failure was quite surprising to me.

As for what I would expect to happen, I would not expect interpolation to 
happen if I don't want it to happen. All of the examples shown on in the docs 
use the syntax "%(key)s" or "${key}". If this is the only way to interpolate, 
then why is "%" ambiguous? Surely we can look forward one character, and if 
it's not "(" then "%" should be interpreted literally. Instead, configparser 
requires me to disambiguate with "%%". But, this would cause my string to be 
parsed incorrectly in Python 2's configparser, so I'm unable to make that 
change.

--
components: Library (Lib)
messages: 242283
nosy: tbekolay
priority: normal
severity: normal
status: open
title: Configparser interpolation is unexpected
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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