diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ecd919c7..0c91a27a2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.11.1" + ".": "3.11.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index fe4702828..67352df90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ [1]: https://pypi.org/project/google-cloud-logging/#history +## [3.11.2](https://github.com/googleapis/python-logging/compare/v3.11.1...v3.11.2) (2024-08-15) + + +### Bug Fixes + +* **deps:** Require google-cloud-appengine-logging>=0.1.3 ([550abca](https://github.com/googleapis/python-logging/commit/550abca2846218d114a6b4b42cb165489e630374)) +* **deps:** Require google-cloud-audit-log >= 0.2.4 ([550abca](https://github.com/googleapis/python-logging/commit/550abca2846218d114a6b4b42cb165489e630374)) +* **deps:** Require opentelemetry-api>=1.9.0 ([550abca](https://github.com/googleapis/python-logging/commit/550abca2846218d114a6b4b42cb165489e630374)) +* Fixed type hinting issue with specifying Transport class ([#930](https://github.com/googleapis/python-logging/issues/930)) ([e2875d6](https://github.com/googleapis/python-logging/commit/e2875d664c153a4328bd42790dfb7b4ac36a9048)) + ## [3.11.1](https://github.com/googleapis/python-logging/compare/v3.11.0...v3.11.1) (2024-08-06) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f5be18c3d..4d4b79d75 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.8 -- -k + $ nox -s system-3.12 -- -k .. note:: - System tests are only configured to run under Python 3.8. + System tests are only configured to run under Python 3.12. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local diff --git a/google/cloud/logging/gapic_version.py b/google/cloud/logging/gapic_version.py index f897ec818..d60f7f6c0 100644 --- a/google/cloud/logging/gapic_version.py +++ b/google/cloud/logging/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.11.1" # {x-release-please-version} +__version__ = "3.11.2" # {x-release-please-version} diff --git a/google/cloud/logging_v2/gapic_version.py b/google/cloud/logging_v2/gapic_version.py index f897ec818..d60f7f6c0 100644 --- a/google/cloud/logging_v2/gapic_version.py +++ b/google/cloud/logging_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.11.1" # {x-release-please-version} +__version__ = "3.11.2" # {x-release-please-version} diff --git a/google/cloud/logging_v2/handlers/handlers.py b/google/cloud/logging_v2/handlers/handlers.py index 5b11bfe30..ea84bb3cc 100644 --- a/google/cloud/logging_v2/handlers/handlers.py +++ b/google/cloud/logging_v2/handlers/handlers.py @@ -18,7 +18,7 @@ import json import logging -from typing import Optional, IO +from typing import Optional, IO, Type from google.cloud.logging_v2.handlers.transports import ( BackgroundThreadTransport, @@ -157,7 +157,7 @@ def __init__( client, *, name: str = DEFAULT_LOGGER_NAME, - transport: Transport = BackgroundThreadTransport, + transport: Type[Transport] = BackgroundThreadTransport, resource: Resource = None, labels: Optional[dict] = None, stream: Optional[IO] = None, diff --git a/noxfile.py b/noxfile.py index 65e583ec2..8a410531a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -52,7 +52,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -419,6 +419,7 @@ def prerelease_deps(session, protobuf_implementation): session.install(*constraints_deps) prerel_deps = [ + "google-cloud-audit-log", "protobuf", # dependency of grpc "six", diff --git a/owlbot.py b/owlbot.py index f1a5b697e..54e5ab5a6 100644 --- a/owlbot.py +++ b/owlbot.py @@ -67,8 +67,7 @@ def place_before(path, text, *before_text, escape=None): s.move([library], excludes=[ "**/gapic_version.py", "setup.py", - "testing/constraints-3.7.txt", - "testing/constraints-3.8.txt", + "testing/constraints*.txt", "README.rst", "google/cloud/logging/__init__.py", # generated types are hidden from users "google/cloud/logging_v2/__init__.py", @@ -95,6 +94,7 @@ def place_before(path, text, *before_text, escape=None): "google-cloud-testutils", "opentelemetry-sdk" ], + system_test_python_versions=["3.12"], unit_test_external_dependencies=["flask", "webob", "django"], samples=True, ) @@ -110,6 +110,13 @@ def place_before(path, text, *before_text, escape=None): "README.rst", # This repo has a customized README ], ) +s.replace("noxfile.py", +"""prerel_deps = \[ + "protobuf",""", +"""prerel_deps = [ + "google-cloud-audit-log", + "protobuf",""", +) # adjust .trampolinerc for environment tests s.replace(".trampolinerc", "required_envvars[^\)]*\)", "required_envvars+=()") diff --git a/samples/generated_samples/snippet_metadata_google.logging.v2.json b/samples/generated_samples/snippet_metadata_google.logging.v2.json index 263c808b8..0f640c540 100644 --- a/samples/generated_samples/snippet_metadata_google.logging.v2.json +++ b/samples/generated_samples/snippet_metadata_google.logging.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-logging", - "version": "3.11.1" + "version": "3.11.2" }, "snippets": [ { diff --git a/setup.py b/setup.py index 1e214751d..67ae0f70c 100644 --- a/setup.py +++ b/setup.py @@ -40,11 +40,11 @@ # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0dev,!=2.24.0,!=2.25.0", - "google-cloud-appengine-logging>=0.1.0, <2.0.0dev", - "google-cloud-audit-log >= 0.1.0, < 1.0.0dev", + "google-cloud-appengine-logging>=0.1.3, <2.0.0dev", + "google-cloud-audit-log >= 0.2.4, < 1.0.0dev", "google-cloud-core >= 2.0.0, <3.0.0dev", "grpc-google-iam-v1 >=0.12.4, <1.0.0dev", - "opentelemetry-api >= 1.0.0", + "opentelemetry-api >= 1.9.0", "proto-plus >= 1.22.0, <2.0.0dev", "proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'", "protobuf>=3.20.2,<6.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt index ed7f9aed2..981d37ac6 100644 --- a/testing/constraints-3.10.txt +++ b/testing/constraints-3.10.txt @@ -2,5 +2,15 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth proto-plus protobuf +google-cloud-core +google-cloud-appengine-logging +google-cloud-audit-log +grpc-google-iam-v1 +opentelemetry-api + +# optional dependencies +django +flask diff --git a/testing/constraints-3.11.txt b/testing/constraints-3.11.txt index ed7f9aed2..981d37ac6 100644 --- a/testing/constraints-3.11.txt +++ b/testing/constraints-3.11.txt @@ -2,5 +2,15 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth proto-plus protobuf +google-cloud-core +google-cloud-appengine-logging +google-cloud-audit-log +grpc-google-iam-v1 +opentelemetry-api + +# optional dependencies +django +flask diff --git a/testing/constraints-3.12.txt b/testing/constraints-3.12.txt index ed7f9aed2..981d37ac6 100644 --- a/testing/constraints-3.12.txt +++ b/testing/constraints-3.12.txt @@ -2,5 +2,15 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth proto-plus protobuf +google-cloud-core +google-cloud-appengine-logging +google-cloud-audit-log +grpc-google-iam-v1 +opentelemetry-api + +# optional dependencies +django +flask diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index fa18c36c0..d3ab26cf2 100644 --- a/testing/constraints-3.7.txt +++ b/testing/constraints-3.7.txt @@ -9,6 +9,10 @@ google-auth==2.14.1 proto-plus==1.22.0 protobuf==3.20.2 google-cloud-core==2.0.0 +google-cloud-appengine-logging==0.1.3 +google-cloud-audit-log==0.2.4 +grpc-google-iam-v1==0.12.4 +opentelemetry-api==1.9.0 # Lower bound testing for optional dependencies django==3.2 diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt index 3f3078987..443e69ae2 100644 --- a/testing/constraints-3.8.txt +++ b/testing/constraints-3.8.txt @@ -2,5 +2,21 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core==2.14.0 -proto-plus -protobuf +google-auth==2.14.1 +proto-plus==1.22.0 +protobuf==4.21.6 +google-cloud-core==2.0.0 +google-cloud-appengine-logging==0.1.3 +google-cloud-audit-log==0.2.4 +grpc-google-iam-v1==0.12.4 +opentelemetry-api==1.9.0 + +# Lower bound testing for optional dependencies +django==3.2 + +# Need specific versions of Flask dependencies for Flask 1.0 to work +flask==1.0.0 +jinja2==2.10.1 +markupsafe==2.0.1 +itsdangerous==2.0.1 +werkzeug==1.0.1 diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index ed7f9aed2..10c5cba87 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -2,5 +2,21 @@ # This constraints file is required for unit tests. # List all library dependencies and extras in this file. google-api-core +google-auth proto-plus protobuf +google-cloud-core +google-cloud-appengine-logging +google-cloud-audit-log +grpc-google-iam-v1 +opentelemetry-api==1.9.0 + +# Lower bound testing for optional dependencies +django==3.2 + +# Need specific versions of Flask dependencies for Flask 1.0 to work +flask==1.0.0 +jinja2==2.10.1 +markupsafe==2.0.1 +itsdangerous==2.0.1 +werkzeug==1.0.1