[mozinfo] distro.linux_platform has different output compared to platform.linux_distribution
Categories
(Testing :: Mozbase, defect, P3)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: egao, Assigned: egao)
References
Details
Attachments
(1 file)
With mozinfo 1.2.0
release the distro
package is now the primary method used to provide the value for linux_distribution
.
My assumption that it was a straight drop-in replacement was incorrect however. The output slightly differs as seen below:
>>> import platform
>>> platform.linux_distribution()
('debian', '10.1', '')
>>> import distro
>>> distro.linux_distribution()
(u'Debian GNU/Linux', u'10', u'buster')
Therefore it may be required to perform some or all of the following adjustments to the outputs:
- lowercase the output
- trim/prune
Additionally or alternatively:
- more tests should be written to catch this case.
- consider removing entirely the usage of
platform
module (even though python2.7 and python3.5 still supportsplatform
)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b4f0fb8292c streamline and sanitize output of distro/platform linux_distribution call in mozinfo r=jmaher
Comment 3•5 years ago
•
|
||
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=275944381&repo=autoland
https://treeherder.mozilla.org/logviewer.html#?job_id=275944405&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/f644542d11c15980eed8368d5b52539d571c35ce
Also these wpts: https://treeherder.mozilla.org/logviewer.html#?job_id=275944408&repo=autoland
Assignee | ||
Comment 4•5 years ago
|
||
Not sure why this would change those test results, that seems very strange and unexpected.
Updated•5 years ago
|
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3d5e40454c30 streamline and sanitize output of distro/platform linux_distribution call in mozinfo r=jmaher
Comment 7•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•