Skip to content

v2.1.0

Latest
Compare
Choose a tag to compare
@yilei yilei released this 16 Jan 22:16
· 28 commits to main since this release

Added

  • (flags) Added absl.flags.override_value function to provide FlagHolder with a construct to modify values. The new interface parallels absl.flags.FlagValues.__setattr__ but checks that the provided value conforms to the flag's expected type.
  • (testing) Added a new method absltest.TestCase.assertDataclassEqual that tests equality of dataclass.dataclass objects with better error messages when the assert fails.

Changed

  • (flags) absl.flags.argparse_flags.ArgumentParser now correctly inherits an empty instance of FlagValues to ensure that absl flags, such as --flagfile, --undefok are supported.
  • (testing) Do not exit 5 if tests were skipped on Python 3.12. This follows the CPython change in python/cpython#113856.

Fixed

  • (flags) The flag foo no longer retains the value bar after FLAGS.foo = bar fails due to a validation error.
  • (testing) Fixed an issue caused by this Python 3.12.1 change where the test reporter crashes when all tests are skipped.