diff --git a/absl/BUILD b/absl/BUILD index 623ad776..733e735d 100644 --- a/absl/BUILD +++ b/absl/BUILD @@ -36,7 +36,7 @@ config_setting( py_library( name = "_enum_module", srcs = ["_enum_module.py"], - visibility = ["//absl:__subpackages__"], + visibility = [":__subpackages__"], deps = [ "@six_archive//:six", ] + select({ diff --git a/absl/CHANGELOG.md b/absl/CHANGELOG.md new file mode 100644 index 00000000..d935c9d6 --- /dev/null +++ b/absl/CHANGELOG.md @@ -0,0 +1,109 @@ +# Python Absl Changelog + +All notable changes to Python Absl are recorded here. + +The format is based on [Keep a Changelog](https://keepachangelog.com). + +## Unreleased + +### Added + +* `flags.mark_bool_flags_as_mutual_exclusive`: convenience function to check + that only one, or at most one, flag among a set of boolean flags are True. + +## 0.7.0 (2019-01-11) + +### Added + +* (bazel) testonly=1 has been removed from the testing libraries, which allows + their use outside of testing contexts. +* (flags) Multi-flags now accept any Iterable type for the default value + instead of only lists. Strings are still special cased as before. This + allows sets, generators, views, etc to be used naturally. +* (flags) DEFINE_multi_enum_class: a multi flag variant of enum_class. +* (testing) Most of absltest is now type-annotated. +* (testing) Made AbslTest.assertRegex available under Python 2. This allows + Python 2 code to write more natural Python 3 compatible code. (Note: this + was actually released in 0.6.1, but unannounced) +* (logging) logging.vlog_is_on: helper to tell if a vlog() call will actually + log anything. This allows avoiding computing expansive inputs to a logging + call when logging isn't enabled for that level. + +### Fixed + +* (flags) Pickling flags now raises an clear error instead of a cryptic one. + Pickling flags isn't supported; instead use flags_into_string to serialize + flags. +* (flags) Flags serialization works better: the resulting serialized value, + when deserialized, won't cause --help to be invoked, thus ending the + process. +* (flags) Several flag fixes to make them behave more like the Absl C++ flags: + empty --flagfile is allowed; --nohelp and --help=false don't display help +* (flags) An empty --flagfile value (e.g. "--flagfile=" or "--flagfile=''" + doesn't raise an error; its not just ignored. This matches Abseil C++ + behavior. +* (bazel) Building with Bazel 0.2.0 works without extra incompatiblity disable + build flags. + +### Changed + +* (flags) Flag serialization is now deterministic: this improves Bazel build + caching for tools that are affected by flag serialization. + +## 0.6.0 (2018-10-22) + +### Added + +* Tempfile management APIs for tests: read/write/manage tempfiles for test + purposes easily and correctly. See TestCase.create_temp{file/dir} and the + corresponding commit for more info. + +## 0.5.0 (2018-09-17) + +### Added + +* Flags enum support: flags.DEFINE_enum_class allows using an `Enum` derived + class to define the allowed values for a flag. + +## 0.4.1 (2018-08-28) + +### Fixed + +* Flags no long allow spaces in their names + +### Changed + +* XML test output is written at the end of all test execution. +* If the current user's username can't be gotten, fallback to uid, else fall + back to a generic 'unknown' string. + +## 0.4.0 (2018-08-14) + +### Added + +* argparse integration: absl-registered flags can now be accessed via argparse + using absl.flags.argparse_flags: see that module for more information. +* TestCase.assertSameStructure now allows mixed set types. + +### Changed + +* Test output now includes start/end markers for each test ran. This is to + help distinguish output from tests clearly. + +## 0.3.0 (2018-07-25) + +### Added + +* `app.call_after_init`: Register functions to be called after app.run() is + called. Useful for program-wide initialization that library code may need. +* `logging.log_every_n_seconds`: like log_every_n, but based on elapsed time + between logging calls. +* `absltest.mock`: alias to unittest.mock (PY3) for better unittest drop-in + replacement. For PY2, it will be available if mock is importable. + +### Fixed + +* `ABSLLogger.findCaller()`: allow stack_info arg and return value for PY2 +* Make stopTest locking reentrant: this prevents deadlocks for test frameworks + that customize unittest.TextTestResult.stopTest. +* Make --helpfull work with unicode flag help strings.