[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread SpaceOne

SpaceOne added the comment:

Nice that you investigate again into this issue. Could you please test if this 
still happens on python 2.7.10 as I unfortunately have no environment with that 
version. This would be very kind of you!

--

___
Python tracker 

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread R. David Murray

R. David Murray added the comment:

Christian: it looks like, unlike the original report, this one involves only 
stdlib code.  So maybe there really is a bug here.

--

___
Python tracker 

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread Christian Heimes

Christian Heimes added the comment:

You get advice on the Python user mailing list, 
https://mail.python.org/mailman/listinfo/python-list . The bug tracker is not a 
support/help forum.

--
nosy: +christian.heimes
stage:  -> resolved

___
Python tracker 

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread SpaceOne

SpaceOne added the comment:

Hello,
The resolution of this bug is "not a bug". If that is the case can you please 
add information how to fix/workaround this.
I have got the following valid-seeming code:
"""
import cookielib
import urllib
import urllib2
cookie = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie))
opener.open('https://www.google.com', timeout=2)
"""

Which results in:
Traceback (most recent call last):
  File "httplib_context_bug.py", line 6, in 
opener.open('https://www.google.com', timeout=2)
  File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1166, in do_open
h = http_class(host, timeout=req.timeout, **http_conn_args)
TypeError: __init__() got an unexpected keyword argument 'context'

$ python 
Python 2.7.9 (default, Mar  1 2015, 12:57:24)
$ cat /etc/issue
Debian GNU/Linux 8 \n \l

--
nosy: +spaceone

___
Python tracker 

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-02-23 Thread Douman

Douman added the comment:

Just to up issue.
It seems that there is some changes in 2.7.9 that breaks usage of 
urllib2.urlopen()

--

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-01-15 Thread Douman

Douman added the comment:

I made additional experiments and now i'm confused
When i tried to execute urlopen in python interpeter it worked fine.
But it fails for me when i attempt to do so via some helper function in search 
engine of qBittorent it throw exception

https://github.com/qbittorrent/qBittorrent/blob/master/src/searchengine/nova/helpers.py

What is curious... all exceptions should be passed without notices, but for 
some reason python does throw exception even though all are catched and passed

--
Added file: http://bugs.python.org/file37715/callstack_urllib2_full

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-01-15 Thread Douman

Douman added the comment:

Yes, i checked what is http_class. It is passed as httplib.HTTPSConnection
Before submitting this issue i checked httplib.py in my installation of py2 and 
there https://hg.python.org/cpython/file/2.7/Lib/httplib.py

HTTPSConnection has argument context.

Btw, it would be nice to update comments in urllib2 so that it would be more 
accurate

--

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-01-15 Thread Douman

Douman added the comment:

It seems to be this one
https://hg.python.org/cpython/rev/1882157b298a

--

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-01-15 Thread Douman

Douman added the comment:

Btw, i also tried to replace **kwargs with usual argument and it didn't throw 
exception

--

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-01-15 Thread Douman

Douman added the comment:

Also according to documentation this class was specifically updated with 
context in 2.7.9
I guess then there should commit related to adding of context to 
HTTPSConnection

--

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-01-15 Thread R. David Murray

R. David Murray added the comment:

More likely http_class isn't what you think it is (ie: it might be an 
HTTPSConnection subclass that hasn't been updated to deal with 2.7.9.  Can you 
check that?

--
components: +Library (Lib) -Extension Modules
nosy: +alex, r.david.murray
type: compile error - behavior

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



[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2015-01-14 Thread Douman

New submission from Douman:

I get strange callstack from urllib2

It seems that python thinks that HTTPSConnection doesn't have context argument.
Which is entirely incorrect. 
I have suspicions that this is related to the way how context argument is 
passed(kwargs)
This happens starting from python 2.7.9

--
components: Extension Modules
files: callstack_urllib2
messages: 234055
nosy: Douman
priority: normal
severity: normal
status: open
title: urllib2: urlopen() gets exception(kwargs bug?)
type: compile error
versions: Python 2.7
Added file: http://bugs.python.org/file37713/callstack_urllib2

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