Closed
Bug 1388019
Opened 8 years ago
Closed 8 years ago
[mozlog] Add support for Python 3
Categories
(Testing :: Mozbase, enhancement)
Tracking
(firefox59 fixed)
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: emorley, Assigned: vedantc98)
References
Details
Attachments
(1 file)
Without dropping support for legacy Python, we need to add support for Python 3 to mozlog. Since mozlog depends on mozfile, we likely need to fix bug 1388018 first too.
Amongst other things, this will help Treeherder switch to Python 3 (mozlog is the only mozbase package it uses).
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
Hey, I've added a patch with a few initial changes that are required to add py3 support.
Please let me know what else is required.
I'm unable to use python-test to test the module because it gives me an error as follows :
OSError: [Errno 62] Too many levels of symbolic links: '/Users/vedantc98/src/firefox/obj-x86_64-apple-darwin16.7.0/_virtualenv/bin/python'
I'm running macOS.
Thanks.
Flags: needinfo?(emorley)
Please see bug 1416924 which might help you to get the error fixed.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•8 years ago
|
||
I've fixed the problem with python-test, and so I've fixed the error.
Further, I've run the code through a py2 and py3 linter using `mach lint -l py2 -l py3 testing/mozbase/mozlog/ `.
Since the updated review request returns no errors on the linter as well as python-test, mozlog should be ready for python 3 after Bug 1388018 is resolved.
Reporter | ||
Comment 6•8 years ago
|
||
Comment on attachment 8936759 [details]
Bug 1388019 - Adding Python 3 support for mozlog.
Hi! Thank you for the patch. I trust Henrik to review this more than me :-)
Flags: needinfo?(emorley)
Attachment #8936759 -
Flags: review?(emorley) → review?(hskupin)
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → vedantc98
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•8 years ago
|
||
I'm sorry about the review flag, please could you set it back to Henrik? This patch was pushed by accident..
Reporter | ||
Comment 9•8 years ago
|
||
Comment on attachment 8936759 [details]
Bug 1388019 - Adding Python 3 support for mozlog.
No problem - restoring now :-)
Attachment #8936759 -
Flags: review?(emorley) → review?(hskupin)
Attachment #8936759 -
Flags: review?(hskupin) → review?(wlachance)
I'm barely around until early next year and William helped you already with other patches. So he is better suited to review this one. Thanks for working on it Verdant!
Status: NEW → ASSIGNED
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8936759 [details]
Bug 1388019 - Adding Python 3 support for mozlog.
https://reviewboard.mozilla.org/r/207480/#review214478
::: testing/mozbase/mozlog/mozlog/unstructured/loglistener.py
(Diff revision 3)
> # You can obtain one at http://mozilla.org/MPL/2.0/.
>
> from __future__ import absolute_import
>
> -import SocketServer
> +from six.moves import socketserver
> -import socket
I think we still need 'socket' here, since we still catch an exception from it below.
::: testing/mozbase/mozlog/setup.py:27
(Diff revision 3)
> author_email='tools@lists.mozilla.org',
> url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
> license='MPL 1.1/GPL 2.0/LGPL 2.1',
> packages=find_packages(),
> zip_safe=False,
> - install_requires=["blessings>=1.3"],
> + install_requires=deps,
I don't see a need to break deps into a variable here, I think it's more clear just to define them inline.
::: testing/mozbase/mozlog/setup.py
(Diff revision 3)
> 'Intended Audience :: Developers',
> 'License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)',
> 'Operating System :: OS Independent',
> - 'Topic :: Software Development :: Libraries :: Python Modules',
> + 'Topic :: Software Development :: Libraries :: Python Modules'],
> - 'Programming Language :: Python :: 2.7',
> - 'Programming Language :: Python :: 2 :: Only'],
Could you set the version classifiers as we did for mozprofile and mozfile?
Attachment #8936759 -
Flags: review?(wlachance) → review-
Comment hidden (mozreview-request) |
Assignee | ||
Comment 13•8 years ago
|
||
Added the changes, plus a couple that i had missed earlier.
Thanks!
Reporter | ||
Comment 14•8 years ago
|
||
Comment on attachment 8936759 [details]
Bug 1388019 - Adding Python 3 support for mozlog.
Reassigning since Will did the previous review round :-)
Attachment #8936759 -
Flags: review?(emorley) → review?(wlachance)
Comment 15•8 years ago
|
||
mozreview-review |
Comment on attachment 8936759 [details]
Bug 1388019 - Adding Python 3 support for mozlog.
https://reviewboard.mozilla.org/r/207480/#review215138
Looks pretty close here too! I'll trigger another try run.
::: testing/mozbase/mozlog/setup.py:25
(Diff revision 4)
> packages=find_packages(),
> zip_safe=False,
> - install_requires=["blessings>=1.3"],
> - tests_require=['mozfile'],
> + install_requires=['blessings >= 1.3',
> + 'six >= 1.10.0'],
> + tests_require=['mozfile',
> + 'six>=1.10.0'
Since you specified six in install_requires, you shouldn't need to specify it again in tests_require.
Attachment #8936759 -
Flags: review?(wlachance) → review-
Comment hidden (mozreview-request) |
Assignee | ||
Comment 17•8 years ago
|
||
I've made the changes and pushed them.
Comment 18•8 years ago
|
||
mozreview-review |
Comment on attachment 8936759 [details]
Bug 1388019 - Adding Python 3 support for mozlog.
https://reviewboard.mozilla.org/r/207480/#review215542
looks good now, thank you!
Attachment #8936759 -
Flags: review?(wlachance) → review+
Comment 19•8 years ago
|
||
Pushed by wlachance@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ba4c8c662479
Adding Python 3 support for mozlog. r=wlach
Comment 20•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Blocks: 1428714
Blocks: 1428711
Blocks: 1428708
Blocks: 1428706
You need to log in
before you can comment on or make changes to this bug.
Description
•