diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index aa909250ad8..0c06f8b741f 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -7,14 +7,14 @@ on: jobs: sdk-benchmarks: env: - py311: "3.11" + py312: "3.12" RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-sdk-${{ matrix.os }} runs-on: self-hosted strategy: # Ensures the entire test matrix is run, even if one permutation fails fail-fast: false matrix: - python-version: [py311] + python-version: [py312] os: [ubuntu-20.04, windows-2019] steps: - name: Checkout Core Repo @ SHA - ${{ github.sha }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 47339d80579..696232b5558 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,7 @@ jobs: py39: 3.9 py310: "3.10" py311: "3.11" + py312: "3.12" pypy3: pypy-3.8 RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }} @@ -38,7 +39,7 @@ jobs: strategy: fail-fast: false # ensures the entire test matrix is run, even if one permutation fails matrix: - python-version: [py38, py39, py310, py311, pypy3] + python-version: [py38, py39, py310, py311, py312, pypy3] package: - "api" - "sdk" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cbdffe129b2..b01b7ce4d7b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: rev: 24.3.0 hooks: - id: black - language_version: python3.11 + language_version: python3.12 - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index 242e82a3240..2c495129ea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Add Python 3.12 to tox + ([#3616](https://github.com/open-telemetry/opentelemetry-python/pull/3616)) + ## Version 1.25.0/0.46b0 (2024-05-30) - Fix class BoundedAttributes to have RLock rather than Lock diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec155c5e72c..3b085e95033 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,7 +54,7 @@ You can run `tox` with the following arguments: under multiple Python versions - `tox -e docs` to regenerate the API docs - `tox -e opentelemetry-api` and `tox -e opentelemetry-sdk` to run the API and SDK unit tests -- `tox -e py311-opentelemetry-api` to e.g. run the API unit tests under a specific +- `tox -e py312-opentelemetry-api` to e.g. run the API unit tests under a specific Python version - `tox -e spellcheck` to run a spellcheck on all the code - `tox -e lint` to run lint checks on all code diff --git a/docs/examples/error_handler/error_handler_0/pyproject.toml b/docs/examples/error_handler/error_handler_0/pyproject.toml index 7869303c110..fb8c889e61f 100644 --- a/docs/examples/error_handler/error_handler_0/pyproject.toml +++ b/docs/examples/error_handler/error_handler_0/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "opentelemetry-sdk ~= 1.3", diff --git a/docs/examples/error_handler/error_handler_1/pyproject.toml b/docs/examples/error_handler/error_handler_1/pyproject.toml index b2e04d4a676..5f72ff58480 100644 --- a/docs/examples/error_handler/error_handler_1/pyproject.toml +++ b/docs/examples/error_handler/error_handler_1/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "opentelemetry-sdk ~= 1.3", diff --git a/exporter/opentelemetry-exporter-opencensus/pyproject.toml b/exporter/opentelemetry-exporter-opencensus/pyproject.toml index 98a2b49cc0d..04af7aca18e 100644 --- a/exporter/opentelemetry-exporter-opencensus/pyproject.toml +++ b/exporter/opentelemetry-exporter-opencensus/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml index 8adb298346e..a9bdec583b2 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-common/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "opentelemetry-proto == 1.26.0.dev", diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml index db4639e6016..3f1735799ac 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "Deprecated >= 1.2.6", diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml index ab56683b8bd..47a7ceae847 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "Deprecated >= 1.2.6", diff --git a/exporter/opentelemetry-exporter-otlp/pyproject.toml b/exporter/opentelemetry-exporter-otlp/pyproject.toml index 9493120a7ae..04967c702a3 100644 --- a/exporter/opentelemetry-exporter-otlp/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/exporter/opentelemetry-exporter-prometheus/pyproject.toml b/exporter/opentelemetry-exporter-prometheus/pyproject.toml index 969b5067092..914a848caf9 100644 --- a/exporter/opentelemetry-exporter-prometheus/pyproject.toml +++ b/exporter/opentelemetry-exporter-prometheus/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "opentelemetry-api ~= 1.12", diff --git a/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml b/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml index f2657001e22..70b4f72ea48 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin-json/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml index 4795ce04250..3ece52427ff 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/exporter/opentelemetry-exporter-zipkin/pyproject.toml b/exporter/opentelemetry-exporter-zipkin/pyproject.toml index fc9e3e4ee96..fce1da40e30 100644 --- a/exporter/opentelemetry-exporter-zipkin/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/opentelemetry-api/pyproject.toml b/opentelemetry-api/pyproject.toml index ade38a1ceef..d6946e69def 100644 --- a/opentelemetry-api/pyproject.toml +++ b/opentelemetry-api/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/opentelemetry-proto/pyproject.toml b/opentelemetry-proto/pyproject.toml index 0e0c1331196..c8af4c5797d 100644 --- a/opentelemetry-proto/pyproject.toml +++ b/opentelemetry-proto/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "protobuf>=3.19, < 5.0", diff --git a/opentelemetry-sdk/pyproject.toml b/opentelemetry-sdk/pyproject.toml index 6ba709e629c..30b1c00de06 100644 --- a/opentelemetry-sdk/pyproject.toml +++ b/opentelemetry-sdk/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/opentelemetry-semantic-conventions/pyproject.toml b/opentelemetry-semantic-conventions/pyproject.toml index eb7dbcbfa16..ef6c56597b9 100644 --- a/opentelemetry-semantic-conventions/pyproject.toml +++ b/opentelemetry-semantic-conventions/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ diff --git a/propagator/opentelemetry-propagator-b3/pyproject.toml b/propagator/opentelemetry-propagator-b3/pyproject.toml index 1f158285e5b..f8abf0bc3ce 100644 --- a/propagator/opentelemetry-propagator-b3/pyproject.toml +++ b/propagator/opentelemetry-propagator-b3/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/propagator/opentelemetry-propagator-jaeger/pyproject.toml b/propagator/opentelemetry-propagator-jaeger/pyproject.toml index 9586fdf4745..9bdf0513b02 100644 --- a/propagator/opentelemetry-propagator-jaeger/pyproject.toml +++ b/propagator/opentelemetry-propagator-jaeger/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/shim/opentelemetry-opencensus-shim/pyproject.toml b/shim/opentelemetry-opencensus-shim/pyproject.toml index 02485dcade9..b4fdfb6e9f8 100644 --- a/shim/opentelemetry-opencensus-shim/pyproject.toml +++ b/shim/opentelemetry-opencensus-shim/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/shim/opentelemetry-opentracing-shim/pyproject.toml b/shim/opentelemetry-opentracing-shim/pyproject.toml index a9869f57f7d..0345178f903 100644 --- a/shim/opentelemetry-opentracing-shim/pyproject.toml +++ b/shim/opentelemetry-opentracing-shim/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ] dependencies = [ diff --git a/tests/opentelemetry-test-utils/pyproject.toml b/tests/opentelemetry-test-utils/pyproject.toml index b56e274f422..74314eb542a 100644 --- a/tests/opentelemetry-test-utils/pyproject.toml +++ b/tests/opentelemetry-test-utils/pyproject.toml @@ -22,6 +22,8 @@ classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ "asgiref ~= 3.0", diff --git a/tox.ini b/tox.ini index 7c18460b19a..312e217fdae 100644 --- a/tox.ini +++ b/tox.ini @@ -5,80 +5,80 @@ skip_missing_interpreters = True envlist = ; Environments are organized by individual package, allowing ; for specifying supported Python versions per package. - py3{8,9,10,11}-opentelemetry-api + py3{8,9,10,11,12}-opentelemetry-api pypy3-opentelemetry-api ; The numbers at the end of the environment names ; below mean these dependencies are being used: ; 0: protobuf==3.20.3 ; 1: protobuf==4.25.3 - py3{8,9,10,11}-opentelemetry-protobuf-{0,1} + py3{8,9,10,11,12}-opentelemetry-protobuf-{0,1} pypy3-opentelemetry-protobuf-{0,1} - py3{8,9,10,11}-opentelemetry-sdk + py3{8,9,10,11,12}-opentelemetry-sdk pypy3-opentelemetry-sdk - py3{8,9,10,11}-opentelemetry-semantic-conventions + py3{8,9,10,11,12}-opentelemetry-semantic-conventions pypy3-opentelemetry-semantic-conventions ; docs/getting-started - py3{8,9,10,11}-opentelemetry-getting-started + py3{8,9,10,11,12}-opentelemetry-getting-started pypy3-opentelemetry-getting-started - py3{8,9,10,11}-opentelemetry-opentracing-shim + py3{8,9,10,11,12}-opentelemetry-opentracing-shim pypy3-opentelemetry-opentracing-shim - py3{8,9,10,11}-opentelemetry-opencensus-shim + py3{8,9,10,11,12}-opentelemetry-opencensus-shim ; opencensus-shim intentionally excluded from pypy3 (grpcio install fails) - py3{8,9,10,11}-opentelemetry-exporter-opencensus + py3{8,9,10,11,12}-opentelemetry-exporter-opencensus ; exporter-opencensus intentionally excluded from pypy3 ; The numbers at the end of the environment names ; below mean these dependencies are being used: ; 0: protobuf==3.20.3 ; 1: protobuf==4.25.3 - py3{8,9,10,11}-opentelemetry-exporter-otlp-proto-common-{0,1} + py3{8,9,10,11,12}-opentelemetry-exporter-otlp-proto-common-{0,1} pypy3-opentelemetry-exporter-otlp-proto-common-{0,1} ; opentelemetry-exporter-otlp - py3{8,9,10,11}-opentelemetry-exporter-otlp-combined + py3{8,9,10,11,12}-opentelemetry-exporter-otlp-combined ; intentionally excluded from pypy3 ; The numbers at the end of the environment names ; below mean these dependencies are being used: ; 0: protobuf==3.20.3 ; 1: protobuf==4.25.3 - py3{8,9,10,11}-opentelemetry-exporter-otlp-proto-grpc-{0,1} + py3{8,9,10,11,12}-opentelemetry-exporter-otlp-proto-grpc-{0,1} ; intentionally excluded from pypy3 ; The numbers at the end of the environment names ; below mean these dependencies are being used: ; 0: protobuf==3.20.3 ; 1: protobuf==4.25.3 - py3{8,9,10,11}-opentelemetry-exporter-otlp-proto-http-{0,1} + py3{8,9,10,11,12}-opentelemetry-exporter-otlp-proto-http-{0,1} pypy3-opentelemetry-exporter-otlp-proto-http-{0,1} - py3{8,9,10,11}-opentelemetry-exporter-prometheus + py3{8,9,10,11,12}-opentelemetry-exporter-prometheus pypy3-opentelemetry-exporter-prometheus ; opentelemetry-exporter-zipkin - py3{8,9,10,11}-opentelemetry-exporter-zipkin-combined + py3{8,9,10,11,12}-opentelemetry-exporter-zipkin-combined pypy3-opentelemetry-exporter-zipkin-combined - py3{8,9,10,11}-opentelemetry-exporter-zipkin-proto-http + py3{8,9,10,11,12}-opentelemetry-exporter-zipkin-proto-http pypy3-opentelemetry-exporter-zipkin-proto-http - py3{8,9,10,11}-opentelemetry-exporter-zipkin-json + py3{8,9,10,11,12}-opentelemetry-exporter-zipkin-json pypy3-opentelemetry-exporter-zipkin-json - py3{8,9,10,11}-opentelemetry-propagator-b3 + py3{8,9,10,11,12}-opentelemetry-propagator-b3 pypy3-opentelemetry-propagator-b3 - py3{8,9,10,11}-opentelemetry-propagator-jaeger + py3{8,9,10,11,12}-opentelemetry-propagator-jaeger pypy3-opentelemetry-propagator-jaeger - py3{8,9,10,11}-opentelemetry-test-utils + py3{8,9,10,11,12}-opentelemetry-test-utils pypy3-opentelemetry-test-utils lint