Skip to content

Commit ab0ea0e

Browse files
authored
Add support for python 3.12 (open-telemetry#2572)
1 parent 9762152 commit ab0ea0e

File tree

66 files changed

+149
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+149
-75
lines changed

.github/workflows/instrumentations_0.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ jobs:
1616
py39: 3.9
1717
py310: "3.10"
1818
py311: "3.11"
19+
py312: "3.12"
1920
pypy3: pypy-3.8
2021
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
2122
runs-on: ${{ matrix.os }}
2223
strategy:
2324
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
2425
matrix:
25-
python-version: [py38, py39, py310, py311, pypy3]
26+
python-version: [py38, py39, py310, py311, py312, pypy3]
2627
package:
2728
# Do not add more instrumentations here, add them in instrumentations_1.yml.
2829
# The reason for this separation of instrumentations into more than one YAML file is
@@ -80,6 +81,12 @@ jobs:
8081
package: "sklearn"
8182
- python-version: py311
8283
package: "sklearn"
84+
- python-version: py312
85+
package: "sklearn"
86+
- python-version: py312
87+
package: "boto"
88+
- python-version: py312
89+
package: "kafka-python"
8390
- python-version: pypy3
8491
package: "aiopg"
8592
- python-version: pypy3

.github/workflows/instrumentations_1.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ jobs:
1616
py39: 3.9
1717
py310: "3.10"
1818
py311: "3.11"
19+
py312: "3.12"
1920
pypy3: pypy-3.8
2021
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
2122
runs-on: ${{ matrix.os }}
2223
strategy:
2324
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
2425
matrix:
25-
python-version: [py38, py39, py310, py311, pypy3]
26+
python-version: [py38, py39, py310, py311, py312, pypy3]
2627
package:
2728
- "urllib"
2829
- "urllib3"
@@ -37,8 +38,6 @@ jobs:
3738
- "resource-detector-container"
3839
os: [ubuntu-20.04]
3940
exclude:
40-
- python-version: py311
41-
package: "prometheus-remote-write"
4241
- python-version: pypy3
4342
package: "prometheus-remote-write"
4443
steps:

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
1010

1111
jobs:
12-
lint-3_11:
12+
lint-3_12:
1313
strategy:
1414
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
1515
matrix:
@@ -75,10 +75,10 @@ jobs:
7575
steps:
7676
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
7777
uses: actions/checkout@v4
78-
- name: Set up Python 3.11
78+
- name: Set up Python 3.12
7979
uses: actions/setup-python@v5
8080
with:
81-
python-version: 3.11
81+
python-version: 3.12
8282
- name: Install tox
8383
run: pip install tox
8484
- name: Cache tox environment

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: 24.3.0
44
hooks:
55
- id: black
6-
language_version: python3.11
6+
language_version: python3.12
77
- repo: https://github.com/pycqa/isort
88
rev: 5.12.0
99
hooks:

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
- `opentelemetry-instrumentation-httpx` Ensure httpx.get or httpx.request like methods are instrumented
1818
([#2538](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2538))
19+
- Add Python 3.12 support
20+
([#2572](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2572))
1921

2022
## Version 1.25.0/0.46b0 (2024-05-31)
2123

@@ -47,7 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4749
([#2253](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2253))
4850
- `opentelemetry-instrumentation-pika` Instrumentation for `channel.consume()` (supported
4951
only for global, non channel specific instrumentation)
50-
([#2397](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2397)))
52+
([#2397](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2397))
5153
- `opentelemetry-processor-baggage` Initial release
5254
([#2436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2436))
5355
- `opentelemetry-processor-baggage` Add baggage key predicate
@@ -129,6 +131,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
129131
## Version 1.22.0/0.43b0 (2023-12-14)
130132

131133
### Added
134+
132135
- `opentelemetry-instrumentation-asyncio` Add support for asyncio
133136
([#1919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1943))
134137
- `opentelemetry-instrumentation` Added Otel semantic convention opt-in mechanism

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ You can run `tox` with the following arguments:
6363
- `tox` to run all existing tox commands, including unit tests for all packages
6464
under multiple Python versions
6565
- `tox -e docs` to regenerate the API docs
66-
- `tox -e py311-test-instrumentation-aiopg` to e.g. run the aiopg instrumentation unit tests under a specific
66+
- `tox -e py312-test-instrumentation-aiopg` to e.g. run the aiopg instrumentation unit tests under a specific
6767
Python version
6868
- `tox -e spellcheck` to run a spellcheck on all the code
6969
- `tox -e lint-some-package` to run lint checks on `some-package`

_template/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: 3.9",
2727
"Programming Language :: Python :: 3.10",
2828
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
2930
]
3031
dependencies = [
3132
"opentelemetry-api ~= 1.12",

exporter/opentelemetry-exporter-prometheus-remote-write/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ classifiers = [
2222
"Programming Language :: Python :: 3.8",
2323
"Programming Language :: Python :: 3.9",
2424
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
2527
]
2628
dependencies = [
2729
"protobuf ~= 4.21",

exporter/opentelemetry-exporter-richconsole/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.9",
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
2526
]
2627
dependencies = [
2728
"opentelemetry-api ~= 1.12",

instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.9",
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
2526
]
2627
dependencies = [
2728
"opentelemetry-api ~= 1.5",

0 commit comments

Comments
 (0)