Skip to content

Commit 3f2926b

Browse files
authored
Add support for python 3.11 (#285)
* Add support for python 311 * Fix for plugins
1 parent 6aa24fb commit 3f2926b

File tree

10 files changed

+110
-91
lines changed

10 files changed

+110
-91
lines changed

.github/workflows/CI.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ jobs:
6767
# set outputs for other jobs to access for if conditions
6868
name: Check Changes
6969
runs-on: ubuntu-latest
70-
needs: [ license-and-lint, plugin-doc-check ]
7170
# To prevent error when there's no base branch
7271
if: github.event_name != 'schedule'
7372
timeout-minutes: 10
@@ -127,7 +126,7 @@ jobs:
127126
runs-on: ubuntu-latest
128127
strategy:
129128
matrix: # may support pypy in the future
130-
python-version: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim" ]
129+
python-version: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ]
131130
fail-fast: false
132131
env:
133132
BASE_PYTHON_IMAGE: ${{ matrix.python-version }}
@@ -159,7 +158,7 @@ jobs:
159158
timeout-minutes: 30
160159
strategy:
161160
matrix:
162-
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
161+
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
163162
test-path: ${{fromJson(needs.prep-plugin-and-unit-tests.outputs.matrix)}}
164163
fail-fast: false
165164
env:
@@ -197,7 +196,7 @@ jobs:
197196
timeout-minutes: 10
198197
strategy:
199198
matrix:
200-
python-image-variant: [ "3.7", "3.7-slim" ]
199+
python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ]
201200
fail-fast: false
202201
env:
203202
BASE_PYTHON_IMAGE: ${{ matrix.python-image-variant }}
@@ -228,7 +227,7 @@ jobs:
228227
timeout-minutes: 20
229228
strategy:
230229
matrix:
231-
python-image-variant: [ "3.7", "3.7-slim" ]
230+
python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ]
232231
case:
233232
- name: gRPC
234233
path: tests/e2e/case/grpc/e2e.yaml
@@ -254,7 +253,7 @@ jobs:
254253
- name: Load docker images
255254
run: find docker-images -name "*.tar" -exec docker load -i {} \;
256255
- name: Run E2E Tests
257-
uses: apache/skywalking-infra-e2e@964ede199fe199e166920169dc5f8c9b214cfac5
256+
uses: apache/skywalking-infra-e2e@2f20482135ba3a933bc0bb48c41f538ad1aa3048
258257
with:
259258
log-dir: /tmp/e2e-logs
260259
e2e-file: ${{ matrix.case.path }}
@@ -271,7 +270,7 @@ jobs:
271270
timeout-minutes: 60
272271
# wait upon them regardless of success or skipped or failure
273272
if: ${{ always() }}
274-
needs: [ license-and-lint, changes, plugin-and-unit-tests, e2e-tests, plugin-doc-check ]
273+
needs: [ license-and-lint, changes, plugin-and-unit-tests, plugin-doc-check, e2e-tests ]
275274
steps:
276275
- name: Merge Requirement
277276
# check license, lint, plugin and e2e tests, then naturally exits 0

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### 1.0.0
44

55
- **Important Note and Breaking Changes:**
6-
- Python 3.6 is no longer supported and may not function properly.
6+
- Python 3.6 is no longer supported and may not function properly, Python 3.11 support is added and tested.
77
- A number of common configuration options (environment variables) are renamed to follow the convention of Java agent,
88
please check with the latest official documentation before upgrading. (#273, #282)
99

@@ -12,6 +12,7 @@
1212

1313

1414
- Feature:
15+
- Add support for Python 3.11 (#285)
1516
- Add MeterReportService (gRPC, Kafka reporter) (default:enabled) (#231, #236, #241, #243)
1617
- Add reporter for PVM runtime metrics (default:enabled) (#238, #247)
1718
- Add Greenlet profiler (#246)

docker/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ D := docker
1818

1919
P := grpc http kafka
2020

21-
TARGETS := py3.7 py3.8 py3.9 py3.10 py3.7-slim py3.8-slim py3.9-slim py3.10-slim
21+
TARGETS := py3.7 py3.8 py3.9 py3.10 python3.11 py3.7-slim py3.8-slim py3.9-slim py3.10-slim python3.11-slim
2222

2323
py3.7: BASE_PYTHON_IMAGE = python:3.7
2424
py3.8: BASE_PYTHON_IMAGE = python:3.8
2525
py3.9: BASE_PYTHON_IMAGE = python:3.9
2626
py3.10: BASE_PYTHON_IMAGE = python:3.10
27+
py3.11: BASE_PYTHON_IMAGE = python:3.11
2728
py3.7-slim: BASE_PYTHON_IMAGE = python:3.7-slim
2829
py3.8-slim: BASE_PYTHON_IMAGE = python:3.8-slim
2930
py3.9-slim: BASE_PYTHON_IMAGE = python:3.9-slim
3031
py3.10-slim: BASE_PYTHON_IMAGE = python:3.10-slim
32+
py3.11-slim: BASE_PYTHON_IMAGE = python:3.11-slim
3133

3234
PUSH_TARGETS := $(TARGETS:%=push-%)
3335

docs/en/setup/Container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
source**
55

66
This image hosts the SkyWalking Python agent package on top of official Python base images (full & slim) providing support from
7-
Python 3.7 - 3.10.
7+
Python 3.7 - 3.11.
88

99
## How to use this image
1010

docs/en/setup/Plugins.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ or a limitation of SkyWalking auto-instrumentation (welcome to contribute!)
1818
| [aiormq](https://pypi.org/project/aiormq/) | Python >=3.7 - ['6.3', '6.4']; | `sw_aiormq` |
1919
| [amqp](https://pypi.org/project/amqp/) | Python >=3.7 - ['2.6.1']; | `sw_amqp` |
2020
| [asyncpg](https://github.com/MagicStack/asyncpg) | Python >=3.7 - ['0.25.0']; | `sw_asyncpg` |
21-
| [bottle](http://bottlepy.org/docs/dev/) | Python >=3.7 - ['0.12.21']; | `sw_bottle` |
21+
| [bottle](http://bottlepy.org/docs/dev/) | Python >=3.7 - ['0.12.23']; | `sw_bottle` |
2222
| [celery](https://docs.celeryq.dev) | Python >=3.7 - ['5.1']; | `sw_celery` |
2323
| [confluent_kafka](https://www.confluent.io/) | Python >=3.7 - ['1.5.0', '1.7.0', '1.8.2']; | `sw_confluent_kafka` |
2424
| [django](https://www.djangoproject.com/) | Python >=3.7 - ['3.2']; | `sw_django` |
2525
| [elasticsearch](https://github.com/elastic/elasticsearch-py) | Python >=3.7 - ['7.13', '7.14', '7.15']; | `sw_elasticsearch` |
26-
| [hug](https://falcon.readthedocs.io/en/stable/) | Python >=3.10 - ['2.5', '2.6']; Python >=3.7 - ['2.4.1', '2.5', '2.6']; | `sw_falcon` |
26+
| [hug](https://falcon.readthedocs.io/en/stable/) | Python >=3.11 - NOT SUPPORTED YET; Python >=3.10 - ['2.5', '2.6']; Python >=3.7 - ['2.4.1', '2.5', '2.6']; | `sw_falcon` |
2727
| [fastapi](https://fastapi.tiangolo.com) | Python >=3.7 - ['0.89.*', '0.88.*']; | `sw_fastapi` |
2828
| [flask](https://flask.palletsprojects.com) | Python >=3.7 - ['2.0']; | `sw_flask` |
2929
| [happybase](https://happybase.readthedocs.io) | Python >=3.7 - ['1.2.0']; | `sw_happybase` |
@@ -33,7 +33,7 @@ or a limitation of SkyWalking auto-instrumentation (welcome to contribute!)
3333
| [kafka-python](https://kafka-python.readthedocs.io) | Python >=3.7 - ['2.0']; | `sw_kafka` |
3434
| [loguru](https://pypi.org/project/loguru/) | Python >=3.7 - ['0.6.0']; | `sw_loguru` |
3535
| [mysqlclient](https://mysqlclient.readthedocs.io/) | Python >=3.7 - ['2.1.*']; | `sw_mysqlclient` |
36-
| [psycopg[binary]](https://www.psycopg.org/) | Python >=3.7 - ['3.0']; | `sw_psycopg` |
36+
| [psycopg[binary]](https://www.psycopg.org/) | Python >=3.11 - ['3.1.*']; Python >=3.7 - ['3.0.18', '3.1.*']; | `sw_psycopg` |
3737
| [psycopg2-binary](https://www.psycopg.org/) | Python >=3.10 - NOT SUPPORTED YET; Python >=3.7 - ['2.9']; | `sw_psycopg2` |
3838
| [pymongo](https://pymongo.readthedocs.io) | Python >=3.7 - ['3.11.*']; | `sw_pymongo` |
3939
| [pymysql](https://pymysql.readthedocs.io/en/latest/) | Python >=3.7 - ['1.0']; | `sw_pymysql` |
@@ -50,6 +50,9 @@ or a limitation of SkyWalking auto-instrumentation (welcome to contribute!)
5050
- The celery server running with "celery -A ..." should be run with the HTTP protocol
5151
as it uses multiprocessing by default which is not compatible with the gRPC protocol implementation
5252
in SkyWalking currently. Celery clients can use whatever protocol they want.
53+
- While Falcon is instrumented, only Hug is tested.
54+
Hug is believed to be abandoned project, use this plugin with a bit more caution.
55+
Instead of Hug, plugin test should move to test actual Falcon.
5356
- The websocket instrumentation only traces client side connection handshake,
5457
the actual message exchange (send/recv) is not traced since injecting headers to socket message
5558
body is the only way to propagate the trace context, which requires customization of message structure

0 commit comments

Comments
 (0)