Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:yarunachalam:branches:devel:languages:python
python-getmac
support-python3.9.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File support-python3.9.patch of Package python-getmac
From: Antonio Larrosa <alarrosa@suse.com> Index: getmac-0.8.2/getmac/getmac.py =================================================================== --- getmac-0.8.2.orig/getmac/getmac.py +++ getmac-0.8.2/getmac/getmac.py @@ -356,6 +356,10 @@ def _uuid_ip(ip): def _uuid_lanscan_iface(iface): # type: (str) -> Optional[str] + if sys.version_info >= (3,9): + # Python 3.9 removed uuid._find_mac + return None + from uuid import _find_mac # type: ignore if not PY2: Index: getmac-0.8.2/tests/test_getmac.py =================================================================== --- getmac-0.8.2.orig/tests/test_getmac.py +++ getmac-0.8.2/tests/test_getmac.py @@ -78,6 +78,8 @@ def test_uuid_ip(mocker): assert getmac._uuid_ip("en0") is None +@pytest.mark.skipif(sys.version_info >= (3, 9), + reason="uuid._find_mac was removed in Python 3.9") def test_uuid_lanscan_iface(mocker): mocker.patch("uuid._find_mac", return_value=2482700837424) assert getmac._uuid_lanscan_iface("en1") == "02:42:0C:80:62:30"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor