[moztest] Add support for Python 3
Categories
(Testing :: Mozbase, enhancement, P3)
Tracking
(firefox72 wontfix, firefox78 fixed)
People
(Reporter: whimboo, Assigned: egao, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(3 files, 1 obsolete file)
Updated•7 years ago
|
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Hello, I would like to work on this issue
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to clairebitterness from comment #2)
Hello, I would like to work on this issue
Sure, feel free to get started. Once you uploaded the first patch, the bug will be assigned to you.
Comment 4•6 years ago
|
||
Since a patch has not yet been uploaded, I wonder if I can also work on this one? If not, I'll appreciate if you could please suggest a good-first-issue for me.
Thanks!
Reporter | ||
Updated•6 years ago
|
Comment 5•6 years ago
|
||
(In reply to Pooja Gadige (:pgadige__)(:pooja) from comment #4)
Since a patch has not yet been uploaded, I wonder if I can also work on this one?
Yes, as stated in comment 3 we will assign this once a patch has been submitted.
Comment 6•6 years ago
|
||
Without dropping support for legacy Python, need to add support for Python 3 to moztest.
Comment 7•6 years ago
|
||
Hello @davehunt,
I'm an Outreachy Applicant and started working on this bug, I have uploaded a partial patch, kindly review and let me know if I'm working in the right direction. Also, I couldn't figure out the fix to the following error, could use some help here.
I changed-
import __builtin__
toimport builtins
[1]b: getattr(__builtin__, b)
tob: getattr(__builtins__, b)
[2]
Error- https://pastebin.com/raw/XWgkkURV
[1] https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/configure/__init__.py#7
[2] https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/configure/__init__.py#283
Comment 8•6 years ago
|
||
(In reply to Vrinda Singhal from comment #7)
Hello @davehunt,
I'm an Outreachy Applicant and started working on this bug, I have uploaded a partial patch, kindly review and let me know if I'm working in the right direction. Also, I couldn't figure out the fix to the following error, could use some help here.
I changed-
import __builtin__
toimport builtins
[1]b: getattr(__builtin__, b)
tob: getattr(__builtins__, b)
[2]Error- https://pastebin.com/raw/XWgkkURV
[1] https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/configure/__init__.py#7
[2] https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/configure/__init__.py#283
Hi @ahal,
Could you please help me out here? Thanks!
Comment 9•5 years ago
•
|
||
Hi Vrinda,
Really sorry, it looks like Dave and I both missed your comments here. For future reference you need to use the needinfo
feature to get someone's attention, using @
doesn't cause any notifications or anything (and it is very easy to miss bug comments in our e-mail).
I know it's been awhile and the Outreachy term is long gone, but is there any chance you are still interested in working on this? If I don't hear back within a few days I'll assume the answer is no :)
Comment 11•5 years ago
|
||
I am new to Mozilla and i have recently started contributing to it. I have the entire firefox environment set. I would like to work on this bug while using some mentoring. Please do let me know if i can start working on this..!
Comment 12•5 years ago
|
||
Hi Tejaswi , Thanks for your interest, I guess bug 1428711 will be a good start for you. Let us know if you need any help.
Comment 13•5 years ago
|
||
Hi shivam , thanks for giving me a chance for " bug 1428711 " . i am going to start it and if i need any help then i ping you a message .
Comment 14•5 years ago
|
||
Hi Shivam , please assign bug 1428711 to so that I start work on it
Comment 15•5 years ago
|
||
Tejaswi , we assign the bug once you raised a patch for it.
Assignee | ||
Comment 16•5 years ago
•
|
||
:ahal - given that there is nothing using moztest
in-tree at this point, and the mozbase documentation at this link doesn't even mention moztest
, is it worth keeping this in-tree?
EDIT: I spoke too soon, there are a couple of places it's being used outside of the moztest
module itself.
For whoever that works on this (if no one does, I'll just go ahead and make the change to strike this one off the list) tests all pass on python2/3 currently, and a good starting point might the patch that's been left up.
Reporter | ||
Comment 18•5 years ago
|
||
I can see quiet a good amount of usage for this package:
https://searchfox.org/mozilla-central/search?q=from+moztest&case=false®exp=false&path=
Comment 19•5 years ago
|
||
I think the initial intent of moztest
was to provide a generic test framework (that uses all the various components of mozbase), that other test frameworks could inherit from. But that never ended up happening.
Instead it is basically just a utility module now.
Assignee | ||
Comment 20•5 years ago
|
||
Assignee | ||
Comment 21•5 years ago
|
||
Updated•5 years ago
|
Comment 22•5 years ago
|
||
Comment 23•5 years ago
|
||
bugherder |
Reporter | ||
Comment 24•5 years ago
|
||
Only half of the patch set landed yet.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 25•5 years ago
|
||
Comment 26•5 years ago
|
||
bugherder |
Assignee | ||
Comment 27•5 years ago
|
||
Here's the current state of things, to reduce confusion for whoever that reads this in the future (like myself after a few weeks):
Bug 1599261 is blocking the enabling of test_resolve.py
. This is because both the test and resolve.py
imports many modules from mozbuild
which is not yet python3 compatible at the time of writing.
Once the imported mozbuild modules have python3 compatibility, test_resolve.py
can be worked on and fixed for python3.
After that, bump either the bugfix or minor version up, release to pypi and this bug can be closed.
Comment 28•4 years ago
|
||
I noticed one more moztest issue in bug 1638993: sorting an array of dict is
poorly defined on py2 and not tolerated on py3; adding the lambda clarifies
the behavior. With this resolved, I think we can bump the moztest version and
close this bug.
Updated•4 years ago
|
Comment 30•4 years ago
|
||
Comment 31•4 years ago
|
||
bugherder |
Comment 32•4 years ago
|
||
Updated•4 years ago
|
Updated•3 years ago
|
Description
•