factory: Need better Enum library |
||||||||||||
Issue descriptionCurrently factory software is using a Enum (in type_utils) that is implemented from scratch, supporting only literals. Developers are requesting for more "real" or powerful Enums, for example auto-increasing numbers or values that is different from the name of Enum itself ( https://chromium-review.googlesource.com/#/c/363034 ). Part of the functions are already implemented in Python 3.4 'Enum' (with backport for 2.7 as enum34 - https://pypi.python.org/pypi/enum34 ). As the result, in comparison to building our complicated Enum, we should introduce enum34 into the factory software, and keep current factory_utils.Enum as a special case (or eliminate it someday).
,
Jul 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/ee68555f07e1150d700d555d1892d93f7dcb01b6 commit ee68555f07e1150d700d555d1892d93f7dcb01b6 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Jul 26 07:22:15 2016 make_par: Add external package 'enum' (enum34). The 'enum' is not a standard package in Python 2.7 and must be installed explicitly so we have to include it in PAR. BUG= chromium:631342 TEST=make test CQ-DEPEND=CL:363221 Change-Id: I93818840407da40a21e19660a9ee5f9fbe4e6a16 Reviewed-on: https://chromium-review.googlesource.com/363242 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org> [modify] https://crrev.com/ee68555f07e1150d700d555d1892d93f7dcb01b6/py/tools/make_par.py
,
Aug 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/2d22dcb1cc65391b39083d57eaa9b2e86758453f commit 2d22dcb1cc65391b39083d57eaa9b2e86758453f Author: Joel Kitching <kitching@google.com> Date: Wed Jul 27 23:20:49 2016 external: add symlink for enum34 library Also add an entry to deps.conf. Enum34 library can now be used as follows: from cros.factory.external import enum class MyColours(enum.Enum): RED = 'red' BLUE = 'blue GREEN = 'green BUG= chromium:609045 , chromium:631342 TEST=Manually checking import CQ-DEPEND=CL:363221 Change-Id: Ibd975251b68349b8e6a4cde50a52b7d900609890 Reviewed-on: https://chromium-review.googlesource.com/364030 Commit-Ready: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/2d22dcb1cc65391b39083d57eaa9b2e86758453f/py/tools/deps.conf [add] https://crrev.com/2d22dcb1cc65391b39083d57eaa9b2e86758453f/py/external/enum.py
,
Aug 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/e4fa502eea525e2aaa8e1fc44bfabb28316c9a47 commit e4fa502eea525e2aaa8e1fc44bfabb28316c9a47 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Jul 26 07:15:19 2016 enum34: upgraded package to upstream Upgraded dev-python/enum34 to version 1.1.6 on amd64 BUG= chromium:631342 TEST=sudo emerge enum34 Change-Id: I599ffcf3c6b5b68774fbad783ef8c56ff1e50e39 Reviewed-on: https://chromium-review.googlesource.com/363300 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/e4fa502eea525e2aaa8e1fc44bfabb28316c9a47/metadata/md5-cache/dev-python/enum34-1.1.6 [delete] https://crrev.com/1a8ebff2fb1ff2e89f6c081686909df24bd80f21/dev-python/enum34/enum34-1.0.4.ebuild [delete] https://crrev.com/1a8ebff2fb1ff2e89f6c081686909df24bd80f21/metadata/md5-cache/dev-python/enum34-1.0.4 [modify] https://crrev.com/e4fa502eea525e2aaa8e1fc44bfabb28316c9a47/dev-python/enum34/Manifest [modify] https://crrev.com/e4fa502eea525e2aaa8e1fc44bfabb28316c9a47/dev-python/enum34/metadata.xml [add] https://crrev.com/e4fa502eea525e2aaa8e1fc44bfabb28316c9a47/dev-python/enum34/enum34-1.1.6.ebuild
,
Aug 3 2016
,
Aug 29 2016
,
Oct 7 2016
,
Oct 10 2016
,
Nov 19 2016
,
Jan 21 2017
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Oct 14 2017
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by bugdroid1@chromium.org
, Jul 27 2016