Make lcov_rewriter.py and its dependencies Python 3 compatible for importing as module

RESOLVED FIXED in Firefox 62

Status

RESOLVED FIXED
9 months ago
8 months ago

People

(Reporter: assiya.khuzyakhmetova, Assigned: assiya.khuzyakhmetova)

Tracking

unspecified
mozilla62
Points:
---

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

9 months ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180517113820

Steps to reproduce:

Downloaded the artifact from https://queue.taskcluster.net/v1/task/etuu0o82Tpy1L6yhaNhkWA/runs/0/artifacts/public/build/target.common.tests.zip, tried to import function from the lcov_rewriter.py module in Python 3.6 project. 


Actual results:

Import Error saying that urlparse library is not found because it is renamed from Python 3.4 to be urllib.parse.


Expected results:

The function should have been imported.
Group: core-security-release
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment hidden (mozreview-request)

Comment 2

9 months ago
mozreview-review
Comment on attachment 8985361 [details]
Bug 1468328 - Make import statement Python3 compatible.

https://reviewboard.mozilla.org/r/250998/#review257406

Looks good, thanks! Just a minor nit for the commit message.

::: commit-message-0344a:1
(Diff revision 1)
> +Bug 1468328  - Made import statement Python3 compatible. r=marco

Can you change the commit message to:
"Bug 1468328 - Make import statement Python 3 compatible. r=marco"

(1 space between the bug number and "-" and the verb  in the present tense)
Attachment #8985361 - Flags: review?(mcastelluccio) → review+
(Assignee)

Updated

9 months ago
Attachment #8985361 - Attachment description: Bug 1468328 - Made import statement Python3 compatible. → Bug 1468328 - Make import statement Python3 compatible.
Comment hidden (mozreview-request)

Comment 4

9 months ago
mozreview-review
Comment on attachment 8985361 [details]
Bug 1468328 - Make import statement Python3 compatible.

https://reviewboard.mozilla.org/r/250998/#review257440

Comment 5

9 months ago
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc997a4e045e
Make import statement Python3 compatible. r=marco

Comment 6

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/dc997a4e045e
Status: NEW → RESOLVED
Last Resolved: 9 months ago
status-firefox62: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Assignee: nobody → assiya.khuzyakhmetova
Comment hidden (mozreview-request)

Comment 8

9 months ago
mozreview-review
Comment on attachment 8985662 [details]
Bug 1468328 - Make other codecoverage import statements Python3 compatible.

https://reviewboard.mozilla.org/r/251198/#review257522

Are you sure these are the last instances? Does importing the module in Python 3 work now?

::: commit-message-77d19:1
(Diff revision 1)
> +Bug 1468328 - Make import statements Python3 compatible. r=marco

"Bug 1468328 - Make other codecoverage import statements Python3 compatible. r=marco"
Attachment #8985662 - Flags: review?(mcastelluccio) → review+
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: Make lcov_rewriter.py Python 3 compatible for importing as module → Make lcov_rewriter.py and its dependencies Python 3 compatible for importing as module
(Assignee)

Comment 9

9 months ago
(In reply to Marco Castelluccio [:marco] from comment #8)
> Comment on attachment 8985662 [details]
> Bug 1468328 - Make import statements Python3 compatible.
> 
> https://reviewboard.mozilla.org/r/251198/#review257522
> 
> Are you sure these are the last instances? Does importing the module in
> Python 3 work now?
> 
> ::: commit-message-77d19:1
> (Diff revision 1)
> > +Bug 1468328 - Make import statements Python3 compatible. r=marco
> 
> "Bug 1468328 - Make other codecoverage import statements Python3 compatible.
> r=marco"

Yep, I was able to use it with these changes in Python 3.6 crawler.
Comment hidden (mozreview-request)

Comment 11

9 months ago
mozreview-review
Comment on attachment 8985662 [details]
Bug 1468328 - Make other codecoverage import statements Python3 compatible.

https://reviewboard.mozilla.org/r/251198/#review257526
Attachment #8985361 - Flags: checked-in+
Keywords: checkin-needed

Comment 12

9 months ago
We're sorry - something has gone wrong while rewriting or rebasing your commits. The commits being pushed no longer match what was requested. Please file a bug.

Comment 13

9 months ago
We're sorry - something has gone wrong while rewriting or rebasing your commits. The commits being pushed no longer match what was requested. Please file a bug.
Keywords: checkin-needed

Comment 14

9 months ago
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44827df784b2
Make other codecoverage import statements Python3 compatible. r=marco

Comment 15

9 months ago
mozreview-review
Comment on attachment 8985662 [details]
Bug 1468328 - Make other codecoverage import statements Python3 compatible.

https://reviewboard.mozilla.org/r/251198/#review257584

::: python/mozbuild/mozpack/chrome/manifest.py:11
(Diff revision 2)
>  
>  import re
>  import os
> -from urlparse import urlparse
> +
> +try:
> +    import urlparse

I hadn't noticed, but there's actually a problem here.

You replaced `from urlparse import urlparse` with `import urlparse`.
Attachment #8985662 - Flags: review+ → review-

Comment 16

9 months ago
Backout by nerli@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/151566903ceb
Backed out changeset 44827df784b2 for bustages on builds/worker/workspace/build/src/python/mozbuild/mozpack/chrome/manifest.py on a CLOSED TREE
Flags: needinfo?(mcastelluccio)
Comment hidden (mozreview-request)

Comment 19

9 months ago
mozreview-review
Comment on attachment 8985755 [details]
Bug 1468328 - Make other codecoverage import statements Python3 compatible.

https://reviewboard.mozilla.org/r/251288/#review257618

Looks good, but could you squash the last two commits together?
Attachment #8985755 - Flags: review?(mcastelluccio)
Comment hidden (mozreview-request)
(Assignee)

Updated

9 months ago
Attachment #8985662 - Attachment is obsolete: true

Comment 21

9 months ago
mozreview-review
Comment on attachment 8985755 [details]
Bug 1468328 - Make other codecoverage import statements Python3 compatible.

https://reviewboard.mozilla.org/r/251288/#review257620
Attachment #8985755 - Flags: review?(mcastelluccio) → review+

Comment 22

9 months ago
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ee42b865a76
Make other codecoverage import statements Python3 compatible. r=marco

Comment 23

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3ee42b865a76
Status: REOPENED → RESOLVED
Last Resolved: 9 months ago9 months ago
Resolution: --- → FIXED
See Also: → bug 1474531
You need to log in before you can comment on or make changes to this bug.