[issue29895] Distutils blows up with an incorrect pypirc, should be caught

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
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



[issue29895] Distutils blows up with an incorrect pypirc, should be caught

2017-05-17 Thread Tommy Carpenter

Tommy Carpenter added the comment:

Hi,

I think option B might be best, because the issue was that I didn't know at 
first that the problem was in my .pypirc. I think this stack trace is not the 
most elegant way for the user to figure that out. Maybe catching this and then 
presenting a human readable error to the user would be better.

--

___
Python tracker 

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



[issue29895] Distutils blows up with an incorrect pypirc, should be caught

2017-05-14 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, Tommy. I think the configparser exception is pretty 
descriptive here. You had a .pypirc file like the following:

[distutils]
index-servers = 
  pypi
  global

[pypi]
username:spam
password:eggs

You passed -r global and you got:

Traceback (most recent call last):
  ...
ConfigParser.NoSectionError: No section: 'global'

Which says you don't have a section named 'global' in your .pypirc.

There are three options here:

a) do nothing
b) catch configparser.NoSectionError and raise a distutils exception with 
better wording. Since we don't have DistutilsConfigError, I'm not sure which 
one is more appropriate here.
c) ignore configparser.NoSectionError if server name cannot be found in 
sections in PyPIRCCommand._read_pypirc(). IMO this is the worst option.

Here is a test case to demonstrate the problem described at the SO question.

--
keywords: +patch
nosy: +berker.peksag
versions: +Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46863/issue29895_test.diff

___
Python tracker 

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



[issue29895] Distutils blows up with an incorrect pypirc, should be caught

2017-03-24 Thread Tommy Carpenter

New submission from Tommy Carpenter:

Full details and stacktrace are at: 
http://stackoverflow.com/questions/43001446/python-pypi-configparser-blowing-up-when-pointing-to-certain-repo/43001770#43001770

Essentially, I had an index-servers section that listed a repo, that was not 
listed in the remainder of the .pypirc file. Instead of distutils catching 
this, it blows up in an obscure ConfigParsing error.

--
components: Distutils
messages: 290090
nosy: Tommy Carpenter, dstufft, merwok
priority: normal
severity: normal
status: open
title: Distutils blows up with an incorrect pypirc, should be caught
type: behavior
versions: Python 2.7

___
Python tracker 

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