[issue28009] core logic of uuid.getnode() is broken for netstat

2019-02-14 Thread Indra Talip


Indra Talip  added the comment:

The current code and proposed changes use 'netstat -ia' to find the node 
however if netstat needs to perform a reverse DNS query to resolve some 
interfaces this makes using uuid1 *really* slow especially when reverse DNS 
queries aren't set up correctly or timeout.
   mac = _find_mac_netstat('netstat', '-ia', b'Address', lambda i: i)

Would it be possible to change the netstat call to add 'n' to the nestat 
options, i.e. _find_mac_netstat('netstat', '-ian', ...) to prevent netstat from 
attempting to resolve addresses?

--
nosy: +italip

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-26 Thread Indra Talip

Indra Talip added the comment:

Ah sorry you are right the tests didn't test the specific case of someone 
overriding the OpenerDirector. The intent was to demonstrate that adding a 
default timeout to Request didn't break things.

I think you are right about how much of an issue this is. I agree that if you 
are overriding open you probably should be replicating it's functionality and 
doing something sane about the timeout parameter.

Reading the code and the online docs I think that the more pertinent issue here 
is that it isn't documented how the timeout is passed to the handlers. That is 
if someone implements a new handler that could timeout just from reading the 
documentation it isn't clear how the timeout is passed to the handler. Given 
that open adds the timeout to the Request object perhaps the issue should be 
that the timeout attribute should be added to the public api of the Request and 
the docs modified to suit, thus making it explicit how handlers get the 
expected timeout. That does uglify the api though as you would have two places 
where you could set the timeout (on the Request and via open) and currently 
calling open with a Request, with a non-default timeout, means that open would 
override the timeout on the Request with whatever was set on the call to open.

So overall I'm fairly ambivalent about how much of an issue the original report 
was. I think the larger issue is that how timeouts are handled/passed to 
handlers/processors should probably be documented.

--

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-22 Thread Indra Talip

Indra Talip added the comment:

patch adds regressions tests to ensure timeout value from OpenerDirector is 
honoured and a failing test for a default value for Request.timeout that passes 
when the patch that initialises Request.timeout is applied.

--
Added file: http://bugs.python.org/file31003/issue-4079-tests-1.patch

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-10 Thread Indra Talip

Changes by Indra Talip indra.ta...@gmail.com:


--
nosy: +ncoghlan

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



[issue15415] Add temp_dir() and change_cwd() to test.support

2013-07-08 Thread Indra Talip

Indra Talip added the comment:

cleaning up patch so that it will apply cleanly after applying patch from 
issue15494

--
nosy: +italip
Added file: http://bugs.python.org/file30858/issue-15415-4.patch

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



[issue15403] Refactor package creation support code into a common location

2013-07-08 Thread Indra Talip

Indra Talip added the comment:

updated patch to apply on top of patch from issue15494

--
nosy: +italip
Added file: http://bugs.python.org/file30870/issue-15403-3.patch

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-08 Thread Indra Talip

Indra Talip added the comment:

patch initializes the 'timeout' attribute on urllib2.Request.__init__()

--
keywords: +patch
nosy: +italip
versions: +Python 3.4 -Python 2.6
Added file: http://bugs.python.org/file30873/issue-4079-1.patch

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



[issue15494] Move test/support.py into a test.support subpackage

2013-07-07 Thread Indra Talip

Indra Talip added the comment:

as per Nick's direction the attached patch moves test/support.py to 
test/support/__init__.py and includes small fixes for some of the tests that 
break as a consequence.

--
keywords: +patch
nosy: +italip
Added file: http://bugs.python.org/file30850/move_test_support.patch

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