Age | Commit message (Collapse) | Author |
|
This version dropped the support of Python 2.7, 3.4, 3.5. All these three versions have reached end-of-life for more than a year now.
PiperOrigin-RevId: 408735139
Change-Id: I82abec68e1336d44cae8228145d62170e070072f
|
|
end-of-life for more than a year now.
PiperOrigin-RevId: 405511743
Change-Id: Id0f78693a6de9474576c3cfa879caf2cc177d8f6
|
|
PiperOrigin-RevId: 404282150
Change-Id: I3600a465b46e634e1f20fb7d33e49bc4280f7a29
|
|
PiperOrigin-RevId: 400032919
Change-Id: I3dc54cac0c98f0d3a64f8471a35f2bfea5cf24bd
|
|
PiperOrigin-RevId: 398077931
Change-Id: I8e6633cd3fea910cc31ac2bbe6e4c97a08b25b9b
|
|
PiperOrigin-RevId: 379349640
Change-Id: Id2e4cf0c1aff39194978b54a5f836feda1bb99bb
|
|
PiperOrigin-RevId: 361632901
Change-Id: Ic102ad3537096dd25fac85c09854f02f4c2712d1
|
|
PiperOrigin-RevId: 347058128
Change-Id: I69c1933a07531c8730b57702cccd23efc24a29f5
|
|
PiperOrigin-RevId: 339298457
Change-Id: I5d99150a42492bd60077225e5c4eabc7ead70818
|
|
PiperOrigin-RevId: 333113018
Change-Id: I6930c8ae1d7785a663ba9b3c3cdc0af56a285b2e
|
|
PiperOrigin-RevId: 327465554
Change-Id: I352f1db0ce220aed63b102af033c78e7eac7f06f
|
|
PiperOrigin-RevId: 286008946
Change-Id: I1bd0c601cbe42ee2361b568ddb0764c5fa0d1e4e
|
|
PiperOrigin-RevId: 273576233
Change-Id: If2e853dc290d29da9b6fea3b974623de9d71d91c
|
|
Changelog:
### Fixed
* (testing) `absl.testing`'s pretty print reporter no longer buffers
RUN/OK/FAILED messages.
* (testing) `create_tempfile` will overwrite pre-existing read-only files.
PiperOrigin-RevId: 273549059
Change-Id: I41f73089c8978c744d2e9fa0793186bc731700e0
|
|
Changelog:
### Added
* (testing) `absltest.expectedFailureIf`: a variant of
`unittest.expectedFailure` that allows a condition to be given.
### Changed
* (bazel) Tests now pass when bazel
`--incompatible_allow_python_version_transitions=true` is set.
* (bazel) Both Python 2 and Python 3 versions of tests are now created. To
only run one major Python version, use
`bazel test --test_tag_filters=-python[23]` to ignore the other version.
* (testing) `assertTotallyOrdered` no longer requires objects to implement
`__hash__`.
* (testing) `absltest` now integrates better with `--pdb_post_mortem`.
* (testing) `xml_reporter` now includes timestamps to testcases, test_suite,
test_suites elements.
### Fixed
* #99: `absl.logging` no longer registers itself to `logging.root` at import
time.
* #108: Tests now pass with Bazel 0.28.0 on macOS.
PiperOrigin-RevId: 265519766
Change-Id: Ie80c838f2436cd0c7407f29ca29e74e0abe4c4da
|
|
Added:
* (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
True.
Changed:
* (bazel) Bazel 0.23+ or 0.22+ is now required for building/testing.
Specifically, a Bazel version that supports
`@bazel_tools//tools/python:python_version` for selecting the Python
version.
Fixed:
* #94: LICENSE files are now included in sdist.
* #93: Change log added.
PiperOrigin-RevId: 238053201
|
|
LICENSE files are required when distributing.
The latest version (~40.8, I think) of setuptools includes licenses by
default however, since we can't rely on such a new version of setuptools
being used, just use MANIFEST.in instead.
Resolves #94
PiperOrigin-RevId: 235938402
|
|
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
|
|
A few recent OS distros (RHEL 7, CentOS, both ~ year old) use _very_ old
setuptools versions (e.g. 0.9.8), which don't support the "environment marker"
(e.g., "depname; python_version < X") install_requires syntax, which was
introduced in setuptools 36.2.
While the best fix is for users to use more recent setuptools versions, that
isn't always possible or very inconvenient. While building wheels might be
another solution, it would be a larger change to more pieces I'm even less
familiar with.
To fix, manually compute the dependency requirement when running under
earlier setuptools versions. This works because we use sdist, which means
setup.py is run directly on the host installing absl.
Fixes #79
Manually tested on the following (see issue for details):
* RHEL 7.4 (Google Cloud), Python 2.7.5, pip 8.1.2, setuptools 0.9.8
* CentOS 7 (Google Cloud), Python 2.7.5, pip 8.1.2, setuptools 0.9.8
* Debian/Ubuntu, Python 3.6.6, pip 18.1, setuptools 40.4.3
* Debian/Ubuntu, Python 2.7.15, pip 18.1, setuptools 0.9.8
* Debian/Ubuntu, Python 2.7.15, pip 18.1, setuptools 40.4.3
PiperOrigin-RevId: 218904912
|
|
New Features:
* 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.
Bug Fixes:
* Just minor doc typo fixes
PiperOrigin-RevId: 218197620
|
|
This adds two methods to absltest.TestCase: create_tempfile() and
create_tempdir(), which allow easy and correct creation of tempfiles and
tempdirs in tests.
Creating tempfiles in tests has a variety of subtleties that these methods take
care of. Notable subtlties are platform compatibility, passing
FLAGS.test_tmpdir around correctly, passing the right arguments to mkstemp,
mkdtemp, and NamedTemporaryFile, cleanup of files, Python 2/3 API differences
in file/path functions, and ensuring file isolation between tests, among other
difficulties.
To aid debugging, cleanup of files/dirs can be controlled by the
class/instance level, by setting tempfile_cleanup, or at the
`create_temp{file,dir}()` call level by passing the `cleanup` arg.
The net effect is that tempfile setup/teardown is reduced from ~20 lines to ~3
lines, and the previously mentioned problems are taken care of by the test
framework.
New Dependencies:
* enum34: Required under Python 2.7. Under Bazel, it is always required,
but is not used under Python 3.
Other changes:
* Some unrelated lines had type annotations added; this was necessary to make
pytype happy.
PiperOrigin-RevId: 215751711
|
|
New Features
* Flags enum support: flags.DEFINE_enum_class allows using an `Enum` derived
class to define the allowed values for a flag.
PiperOrigin-RevId: 213371946
|
|
Bug Fixes / Changes:
* Flags no long allow spaces in their names
* 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.
PiperOrigin-RevId: 210570173
|
|
New Features
* argparse integration: absl-registered flags can now be accessed
via argparse using absl.flags.argparse_flags: see that module
for more information.
* Test output now includes start/end markers for each test ran. This
is to help distinguish output from tests clearly.
Bug fixes:
* TestCase.assertSameStructure now allows mixed set types.
PiperOrigin-RevId: 208748719
|
|
New Features
* 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.
Bug Fixes:
* 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.
PiperOrigin-RevId: 206010154
|
|
PiperOrigin-RevId: 197581517
|
|
This is so that the PyPi page shows more information.
PiperOrigin-RevId: 197420038
|
|
PiperOrigin-RevId: 196875659
|
|
PiperOrigin-RevId: 193245524
|
|
PiperOrigin-RevId: 190695793
|
|
PiperOrigin-RevId: 189793750
|
|
PiperOrigin-RevId: 188054207
|
|
PiperOrigin-RevId: 183858091
|
|
PiperOrigin-RevId: 182117865
|
|
PiperOrigin-RevId: 181396181
|
|
PiperOrigin-RevId: 179457085
|
|
PiperOrigin-RevId: 177838291
|
|
PiperOrigin-RevId: 176402664
|
|
PiperOrigin-RevId: 175060425
|
|
PiperOrigin-RevId: 173162842
|
|
PiperOrigin-RevId: 172362454
|
|
PiperOrigin-RevId: 171591353
|
|
PiperOrigin-RevId: 170767439
|
|
PiperOrigin-RevId: 169720771
|
|
|