NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #474 most downloaded on PyPI
Abseil Python Common Libraries, see https://github.com/abseil/abseil-py.
Last release 3 months ago
03 Jul 2026
Release timing varies
gaps range from 2 weeks to 1.2 years
Most releases are documented
notes for 31 of 50 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
50 releases · first in 2017
(app) Add support for enabling Python profiling via the ABSL_PYTHON_PROFILE_FILE environment variable.
ABSL_PYTHON_PROFILE_FILE environment variable.--only_check_flags built-in flag to validate flag definitions without executing main().async test functions in @flagsaver.flagsaver.record_property and get_recorded_properties methods to absltest.TestCase.save_flag_values to prevent dictionary mutation flakiness.absl.logging functions to support standard logging arguments (exc_info, stack_info, stacklevel, extra).FlagHolder objects in app and absltest.DuplicateFlagError message.absltest.TestCase.create_file.One column per quarter.
Allow $PYTHONBREAKPOINT to affect runcall and post_mortem debugging.
$PYTHONBREAKPOINT to affect runcall and post_mortem debugging.**kwargs in conditional/rate-limited logging functions.absl.flags.get_help_width() implementation.MODULE.bazel.absltest.skipThisClass.(cleanup) Removed leftover code supporting Python < 3.8, as well as other references to older Python versions.
(testing) Add extension point for letting TestLoader specify a custom sharding scheme.
TestLoader specify a custompyproject.toml,hatch, and GitHub Actions.(testing) Added a new method absltest.TestCase.assertMappingEqual that tests equality of Mapping objects not requiring them to be dicts. Similar to as
absltest.TestCase.assertMappingEqual that tests equality of Mapping objects not requiring them to be dicts. Similar to assertSequenceEqual but for mappings.absltest.assertDictContainsSubset that checks that a dictionary contains a subset of keys and values. Similar to a removed method unittest.assertDictContainsSubset (existed until Python 3.11).(The change log also includes changes in 2.2.0 and 2.2.1.)
PiperOrigin-RevId: 740729100
PiperOrigin-RevId: 740729100
PiperOrigin-RevId: 738864064
PiperOrigin-RevId: 738864064
(flags) Added absl.flags.override_value function to provide FlagHolder with a construct to modify values. The new interface parallels absl.flags.FlagV
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.absltest.TestCase.assertDataclassEqual that tests equality of dataclass.dataclass objects with better error messages when the assert fails.absl.flags.argparse_flags.ArgumentParser now correctly inherits an empty instance of FlagValues to ensure that absl flags, such as --flagfile, --undefok are supported.foo no longer retains the value bar after FLAGS.foo = bar fails due to a validation error.absl-py no longer supports Python 3.6. It has reached end-of-life for more than a year now.
absl-py no longer supports Python 3.6. It has reached end-of-life for morelogging.exception can now take exc_info as argument, withTrue. Prior to this change setting exc_info would raiseKeyError, this change fixes this behaviour.absltest.TestCase.enter_contextunittest.TestCase.enterContext (when called via instance)unittest.TestCase.enterClassContext (when called via class) now. As a_cls_exit_stack attribute is notabsltest.TestCase and _exit_stack attribute is not defined onabsltest.TestCase.assertSameStructure() now uses the test case'sTestCase.addTypeEqualityFunc()) forabslTest.TestCase.fail() now names its arguments(self, msg=None, user_msg=None), and not (self, msg=None, prefix=None),DEFINE_enum, DEFINE_multi_enum, and EnumParser now raise errors whenenum_values is provided as a single string value. Additionally,EnumParser.enum_values is now stored as a list copy of the providedenum_values parameter.paramaterized.CoopTestCase() to use Python 3 metaclass__metaclass__absltest.TestCase.assertSequenceStartsWith now explicitly failMapping or Set object as the whole argument.(testing) Added @flagsaver.as_parsed : this allows saving/restoring flags using string values as if parsed from the command line and will also reflect
@flagsaver.as_parsed: this allows saving/restoring flags.present is set.logging.find_log_dir() now falls backtempfile.gettempdir() instead of /tmp/.short_name=) to DEFINE_multi_enum_classFlag object.(flags) Keyword access to flag_name arguments in the following functions is deprecated. This parameter will be renamed in a future 2.0.0 release.
absl.flags.set_default function that updates the flag
default for a provided FlagHolder. This parallels the
absl.flags.FlagValues.set_default interface which takes a flag name.FlagHolder instance(s) in
addition to flag name(s) as their first positional argument:
flags.register_validatorflags.validatorflags.register_multi_flags_validatorflags.multi_flags_validatorflags.mark_flag_as_requiredflags.mark_flags_as_requiredflags.mark_flags_as_mutual_exclusiveflags.mark_bool_flags_as_mutual_exclusiveflags.declare_key_flagassertRaisesWithPredicateMatch and
assertRaisesWithLiteralMatch now capture the raised Exception for
further analysis when used as a context manager.flag_name arguments in the following functions
is deprecated. This parameter will be renamed in a future 2.0.0 release.
flags.register_validatorflags.validatorflags.register_multi_flags_validatorflags.multi_flags_validatorflags.mark_flag_as_requiredflags.mark_flags_as_requiredflags.mark_flags_as_mutual_exclusiveflags.mark_bool_flags_as_mutual_exclusiveflags.declare_key_flagFixed a crash in Python 3.11 when TempFileCleanup.SUCCESS is used.
TempFileCleanup.SUCCESS is used.Flag instances now raise an error if used in a bool context. This prevents the occasional mistake of testing an instance for truthiness rather than te
Flag instances now raise an error if used in a bool context. This prevents the occasional mistake of testing an instance for truthiness rather than testing flag.value.absl-py no longer depends on six.absl-py no longer supports Python 2.7, 3.4, 3.5. All versions have reached end-of-life for more than a year now.
absl-py no longer supports Python 2.7, 3.4, 3.5. All versions have reached
end-of-life for more than a year now.vX.Y.Z instead of pypi-vX.Y.Z in the git
repo going forward.(testing) #128: When running bazel with its --test_filter= flag, it now treats the filters as unittest's -k flag in Python 3.7+.
--test_filter= flag, it now
treats the filters as unittest's -k flag in Python 3.7+.Top-level LICENSE file is now exported in bazel.
LICENSE file is now exported in bazel.### Fixed * #171: Creating argparse_flags.ArgumentParser with argument_default= no longer raises an exception when other absl.flags flags are defined.
argparse_flags.ArgumentParser with argument_default= no
longer raises an exception when other absl.flags flags are defined.absltest now correctly sets up test filtering and fail fast flags
when an explicit argv= parameter is passed to absltest.main.(app) Type annotations for public app interfaces.
app interfaces.@absltest.skipThisClass to indicate a class
contains shared functionality to be used as a base class for other
TestCases, and therefore should be skipped.flag_parser paramteter of run as keyword-only. This
keyword-only constraint will be enforced at runtime in a future release.(flags) Made EnumClassSerializer and EnumClassListSerializer public.
EnumClassSerializer and EnumClassListSerializer public.required: Optional[bool] = False parameter to DEFINE_*
functions.parameterized.product: Allows testing a method over cartesian
product of parameters values, specified as a sequences of values for each
parameter or as kwargs-like dicts of parameter values.--test_srcdir and --test_tmpdir.
Users should use absltest.TEST_SRCDIR.value and
absltest.TEST_TMPDIR.value instead of FLAGS.test_srcdir and
FLAGS.test_tmpdir.CsvListSerializer respect its delimiter argument.(testing) Surplus entries in AssertionError stack traces from absltest are now suppressed and no longer reported in the xml_reporter.
logging.fatal when logging
directories cannot be found.(testing) _TempDir and _TempFile now implement __fspath__ to satisfy os.PathLike
_TempDir and _TempFile now implement __fspath__ to satisfy
os.PathLike--logger_levels: allows specifying the log levels of loggers.FLAGS.validate_all_flags: a new method that validates all flags
and raises an exception if one fails.FLAGS.get_flags_for_module: Allows fetching the flags a module
defines.parameterized.TestCase: Supports async test definitions.--pdb flag: When true, uncaught exceptions will be
handled by pdb.post_mortem. This is an alias for --pdb_post_mortem.@parameterized.parameters now treats a single abc.Mapping as a
single test case, consistent with named_parameters. Previously the
abc.Mapping is treated as if only its keys are passed as a list of test
cases. If you were relying on the old inconsistent behavior, explicitly
convert the abc.Mapping to a list.DEFINE_enum_class and DEFINE_mutlti_enum_class accept a
case_sensitive argument. When False (the default), strings are mapped to
enum member names without case sensitivity, and member names are serialized
in lowercase form. Flag definitions for enums whose members include
duplicates when case is ignored must now explicitly pass
case_sensitive=True.present counter now correctly reflects command line usage.(testing) TestCase.enter_context: Allows using context managers in setUp and having them automatically exited when a test finishes.
TestCase.enter_context: Allows using context managers in setUp
and having them automatically exited when a test finishes.logging.debug(msg, stack_info=...) no longer throws an
exception in Python 3.8.(testing) absl.testing's pretty print reporter no longer buffers RUN/OK/FAILED messages.
absl.testing's pretty print reporter no longer buffers
RUN/OK/FAILED messages.create_tempfile will overwrite pre-existing read-only files.(testing) absltest.expectedFailureIf: a variant of unittest.expectedFailure that allows a condition to be given.
absltest.expectedFailureIf: a variant of
unittest.expectedFailure that allows a condition to be given.--incompatible_allow_python_version_transitions=true is set.bazel test --test_tag_filters=-python[23] to ignore the other version.assertTotallyOrdered no longer requires objects to implement
__hash__.absltest now integrates better with --pdb_post_mortem.xml_reporter now includes timestamps to testcases, test_suite,
test_suites elements.absl.logging no longer registers itself to logging.root at import
time.(flags) 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
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.@bazel_tools//tools/python:python_version for selecting the Python
version.(bazel) testonly=1 has been removed from the testing libraries, which allows their use outside of testing contexts.
Nothing published for this version
Tempfile management APIs for tests: read/write/manage tempfiles for test purposes easily and correctly. See TestCase.create_temp{file/dir} and the cor
Flags enum support: flags.DEFINE_enum_class allows using an Enum derived class to define the allowed values for a flag.
Enum derived
class to define the allowed values for a flag.Flags no long allow spaces in their names
argparse integration: absl-registered flags can now be accessed via argparse using absl.flags.argparse_flags: see that module for more information.
app.call_after_init: Register functions to be called after app.run() is called. Useful for program-wide initialization that library code may need.
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.ABSLLogger.findCaller(): allow stack_info arg and return value for PY2Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →