commit | d53895d2028af11d390d6a4f4a799bd07fab3f62 | [log] [tgz] |
---|---|---|
author | Richard Levasseur <rlevasseur@google.com> | Mon Sep 30 12:41:17 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Sep 30 12:41:38 2019 -0700 |
tree | 6fbc23fee3ea16a6813a5354a95c55bc6083dd63 | |
parent | e393adbdd83feec13df90a45aedd9501568b50d9 [diff] |
Make `TempDir.create_file` chmod read-only files to be writable to initialize them. The file path passed to `TempDir.create_file()` may already exist when a file path is given. If it already exists, its file permissions may not mean it is writable (prior test or code-under-test logic may have made it read-only), which will break the truncate-on-create initialization logic. Fixed by checking if it exists and is writable and chmod'ing it appropriately. This is only done if a file name is given (random file names shouldn't exist, by definition). PiperOrigin-RevId: 272042456 Change-Id: I225c3d2ee6e76826585ebf2253905edce67510d0
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.
To install the package, simply run:
pip install absl-py
Or install from source:
python setup.py install
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/...
Please refer to smoke_tests/sample_app.py as an example to get started.
See the Abseil Python Developer Guide.
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.
The Abseil Python library is licensed under the terms of the Apache license. See LICENSE for more information.