Closed
Bug 1656412
Opened 4 years ago
Closed 4 years ago
./mach geckoview-junit won't work with Python 3
Categories
(Testing :: Mozbase, defect)
Tracking
(firefox81 fixed)
RESOLVED
FIXED
81 Branch
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
Attachments
(1 file)
after landing bug 1638963, geckoview-junit is python 3 compatible, but ./mach geckoview-junit becomes failure after it.
TypeError: cannot use a str to initialize an array with typecode 'B'
File "/mozilla/mobile/testing/mochitest/mach_commands.py", line 497, in run_junit
return mochitest.run_geckoview_junit_test(self._mach_context, **kwargs)
File "/mozilla/mobile/testing/mochitest/mach_commands.py", line 186, in run_geckoview_junit_test
return runjunit.run_test_harness(parser, options)
File "/mozilla/mobile/objdir/_tests/testing/mochitest/runjunit.py", line 534, in run_test_harness
runner = JUnitTestRunner(log, options)
File "/mozilla/mobile/objdir/_tests/testing/mochitest/runjunit.py", line 75, in __init__
self.server_init()
File "/mozilla/mobile/objdir/_tests/testing/mochitest/runjunit.py", line 97, in server_init
self.options.remoteWebServer = moznetwork.get_ip()
File "/mozilla/mobile/testing/mozbase/moznetwork/moznetwork/moznetwork.py", line 137, in get_ip
interfaces = _get_interface_list()
File "/mozilla/mobile/testing/mozbase/moznetwork/moznetwork/moznetwork.py", line 45, in _get_interface_list
names = array.array('B', '\0' * bytes)
This is 2 issues.
names = array.array('B', '\0' * bytes)
isn't compatible with Python 3.names.tostring()
returns byte array on Python 3.
Patch is coming soon.
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → m_kato
Assignee | ||
Comment 1•4 years ago
|
||
After landing bug 1638963, geckoview-junit is Python 3 compatible. But
moznetwork isn't still compatible with Python 3 although bug 1428711 is fixed.
According to https://docs.python.org/3/library/array.html,
names = array.array('B', '\0' * bytes)
isn't compatible with Python 3.names.tostring()
returns byte array on Python 3 and this is deprecated.
Comment 2•4 years ago
|
||
I didn't run into this in testing, likely because socket.gethostbyname_ex returns a single IP for me, so _get_interface_list is never called. Sorry!
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/952d83dcfb11 moznetwork isn't compatible with Python 3. r=ahal
Comment 4•4 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox81:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•