Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Issue 545433002: mojo: Generate top level enums for python bindings. (Closed)

Created:
6 years, 3 months ago by qsr
Modified:
6 years, 3 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, tburkard
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

mojo: Generate top level enums for python bindings. R=pkl@chromium.org,cmasone@chromium.org Committed: https://crrev.com/c03bfd9f1a1e7a48dc2f3498b4e4d653aaf109d5 Cr-Commit-Position: refs/heads/master@{#294144}

Patch Set 1 #

Patch Set 2 : Fix gyp dependencies #

Patch Set 3 : Fx gn dependencies #

Patch Set 4 : Fix copyright notice. #

Patch Set 5 : Follow sdefresne suugestions. #

Total comments: 2

Patch Set 6 : Make enums frozen. #

Total comments: 2

Patch Set 7 : Pre-compute enum values #

Patch Set 8 : Remove unhelpful conditional #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -15 lines) Patch
M mojo/mojo.gyp View 1 3 chunks +17 lines, -0 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/sample_import.mojom View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/python/BUILD.gn View 1 2 2 chunks +16 lines, -1 line 0 comments Download
A + mojo/public/python/mojo/bindings/__init__.py View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A mojo/public/python/mojo/bindings/reflection.py View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 1 comment Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/mojom_java_generator.py View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/mojom_js_generator.py View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/mojom_python_generator.py View 1 2 3 4 5 6 7 4 chunks +57 lines, -10 lines 0 comments Download
M mojo/public/tools/bindings/generators/python_templates/module.py.tmpl View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/data.py View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 2 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/module.py View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
A mojo/python/tests/bindings_enums_unittest.py View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
qsr
6 years, 3 months ago (2014-09-04 11:03:43 UTC) #1
qsr
CC: +tburkard
6 years, 3 months ago (2014-09-04 15:17:21 UTC) #2
Chris Masone
https://chromiumcodereview.appspot.com/545433002/diff/100001/mojo/public/python/mojo/bindings/reflection.py File mojo/public/python/mojo/bindings/reflection.py (right): https://chromiumcodereview.appspot.com/545433002/diff/100001/mojo/public/python/mojo/bindings/reflection.py#newcode33 mojo/public/python/mojo/bindings/reflection.py:33: if isinstance(key, str) and isinstance(enum_value, int): This latter isinstance() ...
6 years, 3 months ago (2014-09-04 17:20:32 UTC) #3
pkl (ping after 24h if needed)
lgtm https://chromiumcodereview.appspot.com/545433002/diff/80001/mojo/public/python/mojo/bindings/reflection.py File mojo/public/python/mojo/bindings/reflection.py (right): https://chromiumcodereview.appspot.com/545433002/diff/80001/mojo/public/python/mojo/bindings/reflection.py#newcode34 mojo/public/python/mojo/bindings/reflection.py:34: class_members[key], current_enum_value = enum_value, enum_value + 1 This ...
6 years, 3 months ago (2014-09-04 18:07:20 UTC) #4
qsr
+viettrungluu@ -> Trung -> Can you take a look at the changed in the mojom ...
6 years, 3 months ago (2014-09-05 11:46:02 UTC) #6
viettrungluu
Hrm, we really should rewrite/refactor everything in pylib/mojom/generate/. It's an opaque mess (with dubious error-checking ...
6 years, 3 months ago (2014-09-05 17:05:30 UTC) #7
viettrungluu
On 2014/09/05 17:05:30, viettrungluu wrote: > Hrm, we really should rewrite/refactor everything in pylib/mojom/generate/. It's ...
6 years, 3 months ago (2014-09-05 17:05:47 UTC) #8
qsr
https://codereview.chromium.org/545433002/diff/140001/mojo/public/tools/bindings/pylib/mojom/generate/data.py File mojo/public/tools/bindings/pylib/mojom/generate/data.py (right): https://codereview.chromium.org/545433002/diff/140001/mojo/public/tools/bindings/pylib/mojom/generate/data.py#newcode106 mojo/public/tools/bindings/pylib/mojom/generate/data.py:106: raise Exception('Unable to resolve expression: %r' % value[1]) On ...
6 years, 3 months ago (2014-09-08 09:06:09 UTC) #9
qsr
Chris, Trung, gentle ping? pkl is not a commiter yet.
6 years, 3 months ago (2014-09-09 08:00:21 UTC) #10
qsr
+sdefresne
6 years, 3 months ago (2014-09-09 08:19:59 UTC) #12
sdefresne
lgtm https://codereview.chromium.org/545433002/diff/140001/mojo/public/python/mojo/bindings/reflection.py File mojo/public/python/mojo/bindings/reflection.py (right): https://codereview.chromium.org/545433002/diff/140001/mojo/public/python/mojo/bindings/reflection.py#newcode23 mojo/public/python/mojo/bindings/reflection.py:23: '__new__': None, nit: you probably want to keep ...
6 years, 3 months ago (2014-09-09 08:46:10 UTC) #13
viettrungluu
lgtm
6 years, 3 months ago (2014-09-09 22:12:07 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qsr@chromium.org/545433002/140001
6 years, 3 months ago (2014-09-10 07:27:54 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:140001) as 405af2f62c2629187f64e5b98fd73b01f0b54da9
6 years, 3 months ago (2014-09-10 08:23:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qsr@chromium.org/545433002/140001
6 years, 3 months ago (2014-09-10 09:01:47 UTC) #19
commit-bot: I haz the power
Failed to apply patch for mojo/public/python/mojo/bindings/__init__.py: While running git apply --index -p1; error: mojo/public/python/mojo/bindings/__init__.py: already ...
6 years, 3 months ago (2014-09-10 09:02:17 UTC) #21
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 10:56:07 UTC) #22
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/c03bfd9f1a1e7a48dc2f3498b4e4d653aaf109d5
Cr-Commit-Position: refs/heads/master@{#294144}

Powered by Google App Engine
This is Rietveld 408576698