[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2015-04-26 Thread Demian Brecht

Changes by Demian Brecht demianbre...@gmail.com:


--
nosy: +demian.brecht

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



[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2015-04-25 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag
stage:  - patch review
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

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



[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2011-12-10 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo, ezio.melotti
versions:  -Python 2.6, Python 3.1, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13567
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2011-12-09 Thread Pami Ketolainen

New submission from Pami Ketolainen pami.ketolai...@gmail.com:

In case of authentication error, HTTPError gets initialized without file object 
and constructor of addinfourl is not called. This means that url attribute is 
not set and geturl() (inherited from addinfourl) raises AttributeError.

geturl() is not documented as part of HTTPError interface, so I'm not sure if 
it is correct to expect it to work. And of course this can be worked around by 
using the HTTPError.filename which always contains the url passed to 
constructor.

How ever, I have made a simple patch to fix the missing attribute.


There is also Issue5286 with a patch, which makes the http_error_auth_reqed 
pass the fp to HTTPError making it a file-like object as stated in the 
documentation. So that would probably be the correct solution.

IMHO it's a bit bad design, when objects interface changes depending on how it 
was initialized.

--
components: Library (Lib)
files: httperror-geturl-fix-2.patch
keywords: patch
messages: 149106
nosy: Keto
priority: normal
severity: normal
status: open
title: HTTPError interface changes / breaks depending on what was passed to 
constructor
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file23892/httperror-geturl-fix-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13567
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13567] HTTPError interface changes / breaks depending on what was passed to constructor

2011-12-09 Thread Pami Ketolainen

Pami Ketolainen pami.ketolai...@gmail.com added the comment:

Patch adapted to 3.3

--
Added file: http://bugs.python.org/file23893/httperror-geturl-fix-3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13567
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com