[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Roundup Robot added the comment: New changeset f9cd915410d2 by Georg Brandl in branch '3.2': Issue #19855: uuid.getnode() on Unix now looks on the PATH for the https://hg.python.org/cpython/rev/f9cd915410d2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Roundup Robot added the comment: New changeset 72951ffbdc76 by Serhiy Storchaka in branch '2.7': Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with http://hg.python.org/cpython/rev/72951ffbdc76 New changeset a5c26e57f429 by Serhiy Storchaka in branch '3.3': Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with http://hg.python.org/cpython/rev/a5c26e57f429 New changeset efd0e6d675ff by Serhiy Storchaka in branch 'default': Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with http://hg.python.org/cpython/rev/efd0e6d675ff -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Serhiy Storchaka added the comment: Thank you Kent for your contribution. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Zachary Ware added the comment: This seems to have broken 64-bit Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3472/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/1288/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/940/steps/test/logs/stdio -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Serhiy Storchaka added the comment: Thank you Zachary for your report. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Serhiy Storchaka added the comment: Fixed in issue19804. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Kent Frazier added the comment: Serhiy, I signed the form. Let me know if you need anything else. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - patch review type: crash - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Serhiy Storchaka added the comment: Kent, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
New submission from Kent Frazier kentfraz...@gmail.com: If a virtual interface is present in the system, such as if the user is connected to a VPN, then there may be entries in ifconfig that do not conform to the expected `HWAddr 01:23:45:67:89:ab` MAC address format expected by uuid._find_mac. For instance, under Ubuntu 10.10 on my Acer Eee 1005HA, using Cisco's AnyConnect VPN client, I have the following entry in ifconfig: cscotun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 Not only is this more than 6 bytes long, it also uses dashes as a delimiter rather than the colons used by MAC address. After reading the relevant parts of RFC4122's definition of the algorithm for UUID1, I think we probably should be ignoring these virtual interfaces, since I doubt they are guaranteed to be unique. The attached patch assumes that it is correct to ignore these entries. If this is not appropriate, it might be better to strip all colons and dashes before the int conversion. I tried to write a test to demonstrate this issue, but had difficulty figuring out how to make it work. The import of `os` is at the function level rather than at the top of the uuid module, so mocking out the module didn't seem feasible. I also tried replacing the call to ifconfig with a call to echo with the appropriate strings to emulate this result, but echo is typically not within any of the hard-coded list of directories that _find_mac looks in. If anyone has a good idea of how to write a test for this issue, I would be happy to write one with some guidance, but I was stumped. This is my first patch submission to CPython, so if I did anything incorrectly, please let me know and I will try to correct my error. -- components: Library (Lib) files: uuid_ValueError_fix.diff keywords: patch messages: 130892 nosy: kfrazier priority: normal severity: normal status: open title: Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux type: crash versions: Python 3.3 Added file: http://bugs.python.org/file21136/uuid_ValueError_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Changes by Kent Frazier kentfraz...@gmail.com: Removed file: http://bugs.python.org/file21136/uuid_ValueError_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux
Kent Frazier kentfraz...@gmail.com added the comment: I was mistaken about the issues with mocking. I am submitting a new patch with a test included. -- Added file: http://bugs.python.org/file21143/uuid_ValueError_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11508 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com