This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: uuid._netbios_getnode() is outdated
Type: behavior Stage: resolved
Components: Library (Lib), Windows Versions: Python 3.2, Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: akuchling, brian.curtin, pitrou, python-dev, serhiy.storchaka, tim.golden
Priority: normal Keywords: needs review, patch

Created on 2012-10-01 17:33 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
uuid_netbios_getnode.patch serhiy.storchaka, 2012-10-22 11:52 review
Messages (7)
msg171736 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-10-01 17:33
Function uuid._netbios_getnode() in Lib/uuid.py is not properly ported from Python 2. At least it uses indexing on map result. Perhaps there are other errors. The function obviously not been tested for years.
msg173506 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-10-22 11:52
As I see in pywin32 sources status.adapter_address is bytes in Python 3.

Here is a trivial patch.
msg190265 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-05-29 02:04
This patch seems obviously correct to me, so it should be applied.  

It looks like there's already a test in test_uuid.py that exercises _netbios_getnode() if the netbios module is importable, so there's no test to add, though maybe we need a buildbot that has the module available.
msg190283 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-05-29 10:03
If noone has reported the issue in years (Google doesn't seem to report any occurrence), perhaps it means the code is simply not used anymore? In which case it should probably be removed.
msg190297 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-05-29 12:25
Any exceptions were silently dropped. And tests silently skipped (issue18094).
msg190869 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-06-09 18:10
New changeset 27f55ff12f41 by Serhiy Storchaka in branch '3.3':
Issue #16102: Make uuid._netbios_getnode() work again on Python 3.
http://hg.python.org/cpython/rev/27f55ff12f41

New changeset 4a0017722910 by Serhiy Storchaka in branch 'default':
Issue #16102: Make uuid._netbios_getnode() work again on Python 3.
http://hg.python.org/cpython/rev/4a0017722910
msg227961 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-09-30 17:34
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
History
Date User Action Args
2022-04-11 14:57:36adminsetgithub: 60306
2014-09-30 17:34:51python-devsetmessages: + msg227961
2013-06-09 18:23:12serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2013-06-09 18:10:47python-devsetnosy: + python-dev
messages: + msg190869
2013-05-29 12:25:12serhiy.storchakasetmessages: + msg190297
2013-05-29 11:13:41serhiy.storchakasetassignee: serhiy.storchaka
2013-05-29 10:03:31pitrousetnosy: + pitrou
messages: + msg190283
2013-05-29 02:04:36akuchlingsetnosy: + akuchling

messages: + msg190265
stage: patch review -> commit review
2013-04-05 23:42:19pitrousetnosy: + tim.golden, brian.curtin
2012-10-24 08:58:56serhiy.storchakasetkeywords: + needs review
stage: patch review
2012-10-22 11:52:34serhiy.storchakasetfiles: + uuid_netbios_getnode.patch
keywords: + patch
messages: + msg173506
2012-10-01 17:33:29serhiy.storchakacreate