Closed Bug 1388340 Opened 7 years ago Closed 7 years ago

Vendor in six

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: davehunt, Assigned: davehunt)

References

Details

Attachments

(1 file)

To assist with having code that works in both Python 3.x and legacy Python 2.x, I'd like to vendor in the six package available at https://pypi.python.org/pypi/six
We already have a version of six vendored via the web-platform tests: http://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/six. If we just add six to third_party/python I suspect that we'll effectively be replacing the version used by wpt. What's the best way to proceed?
Flags: needinfo?(gps)
We also have six through urllib3 through requests (/third_party/python/requests/requests/packages/urllib3/packages/six.py)
If an existing vendored version of six is sufficient, we can add its path to build/virtualenv_packages.txt and call it a day. Ideally, yes, six would live in third_party/python/six and we wouldn't have redundant copies. The one in requests will go away, as requests stopped distributing 3rd party packages in 2.16. The WPT vendoring could likely also be updated to point to an in-tree copy. Needinfo jgraham to confirm. We could do that in this bug or just add testing/web-platform/tests/tools/six to build/virtualenv_packages.txt.
Flags: needinfo?(gps)
The wpt one is also needed upstream, so we can't just remove it. But I don't think it should block vendoring our own copy; it shouldn't matter to wpt which version is used.
Comment on attachment 8897814 [details] Bug 1388340 - Vendor in six package for Python 2 and 3 compatibility; https://reviewboard.mozilla.org/r/169110/#review174724
Attachment #8897814 - Flags: review?(gps) → review+
Comment on attachment 8897814 [details] Bug 1388340 - Vendor in six package for Python 2 and 3 compatibility; https://reviewboard.mozilla.org/r/169110/#review174726 Oh, this may also need to update tools/rewriting/ThirdPartyPaths.txt so it doesn't trigger various lints. I'm not sure why third_party/python isn't listed in its entirety. That's a question for Sylvestre.
Pushed by dhunt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/23c63df35860 Vendor in six package for Python 2 and 3 compatibility; r=gps
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Product: Core → Firefox Build System
Assignee: nobody → dave.hunt
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: