Bump absl-py to version 0.7.0

New Features:
 * (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.

Bug Fixes:
 * (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.

Other Notable Changes:
 * (bazel) Now using the @bazel_tools http_archive rules instead of native
   new_http_archive rules; this also allows building with Bazel 0.2.0 without
   extra incompatibility disable flags.
 * (flags) Flag serialization is now deterministic: this improves Bazel build
   caching for tools that are affected by flag serialization.

PiperOrigin-RevId: 228895370
1 file changed
tree: 848c341ec875b1577c0d0a47ac011e1c216e8c7f
  1. absl/
  2. smoke_tests/
  3. third_party/
  4. AUTHORS
  5. CONTRIBUTING.md
  6. LICENSE
  7. README.md
  8. setup.py
  9. WORKSPACE
README.md

Abseil Python Common Libraries

This repository is a collection of Python library code for building Python applications. The code is collected from Google's own Python code base, and has been extensively tested and used in production.

Features

  • Simple application startup
  • Distributed commandline flags system
  • Custom logging module with additional features
  • Testing utilities

Getting Started

Installation

To install the package, simply run:

pip install absl-py

Or install from source:

python setup.py install

Running Tests

To run Abseil tests, you can clone the git repo and run bazel:

git clone https://github.com/abseil/abseil-py.git
cd abseil-py
bazel test absl/...

Example Code

Please refer to smoke_tests/sample_app.py as an example to get started.

Documentation

Full documentation is forthcoming on https://abseil.io. For now, please refer to the in-code Python docstrings.

Future Releases

The current repository includes an initial set of libraries for early adoption. More components and interoperability with Abseil C++ Common Libraries will come in future releases.

License

The Abseil Python library is licensed under the terms of the Apache license. See LICENSE for more information.