diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 1fd1268d..a971fe91 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -125,7 +125,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: # may support pypy in the future - python-version: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ] + python-version: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] fail-fast: false env: BASE_PYTHON_IMAGE: ${{ matrix.python-version }} @@ -157,7 +157,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] test-path: ${{fromJson(needs.prep-plugin-and-unit-tests.outputs.matrix)}} fail-fast: false env: @@ -195,7 +195,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ] + python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] fail-fast: false env: BASE_PYTHON_IMAGE: ${{ matrix.python-image-variant }} @@ -226,7 +226,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ] + python-image-variant: [ "3.7-slim", "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim" ] case: - name: gRPC-single-process path: tests/e2e/case/grpc/single/e2e.yaml diff --git a/Makefile b/Makefile index 408d42b8..36dc5810 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ endif .PHONY: env env: poetry gen + poetry lock --no-update poetry install --all-extras poetry run pip install --upgrade pip diff --git a/docker/Makefile b/docker/Makefile index c900c8bc..d2b14ff0 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -21,7 +21,7 @@ D := docker P := grpc http kafka -TARGETS := py3.7 py3.8 py3.9 py3.10 py3.7-slim py3.8-slim py3.9-slim py3.10-slim +TARGETS := py3.7 py3.8 py3.9 py3.10 py3.7-slim py3.8-slim py3.9-slim py3.10-slim py3.11-slim py3.12-slim py3.7: BASE_PYTHON_IMAGE = python:3.7 py3.8: BASE_PYTHON_IMAGE = python:3.8 @@ -33,6 +33,7 @@ py3.8-slim: BASE_PYTHON_IMAGE = python:3.8-slim py3.9-slim: BASE_PYTHON_IMAGE = python:3.9-slim py3.10-slim: BASE_PYTHON_IMAGE = python:3.10-slim py3.11-slim: BASE_PYTHON_IMAGE = python:3.11-slim +py3.12-slim: BASE_PYTHON_IMAGE = python:3.12-slim push-py3.7: BASE_PYTHON_IMAGE = python:3.7 push-py3.8: BASE_PYTHON_IMAGE = python:3.8 @@ -44,6 +45,7 @@ push-py3.8-slim: BASE_PYTHON_IMAGE = python:3.8-slim push-py3.9-slim: BASE_PYTHON_IMAGE = python:3.9-slim push-py3.10-slim: BASE_PYTHON_IMAGE = python:3.10-slim push-py3.11-slim: BASE_PYTHON_IMAGE = python:3.11-slim +push-py3.12-slim: BASE_PYTHON_IMAGE = python:3.12-slim push-py3.7: BUILDER_PYTHON_IMAGE = python:3.7 push-py3.8: BUILDER_PYTHON_IMAGE = python:3.8 @@ -55,6 +57,7 @@ push-py3.8-slim: BUILDER_PYTHON_IMAGE = python:3.8 push-py3.9-slim: BUILDER_PYTHON_IMAGE = python:3.9 push-py3.10-slim: BUILDER_PYTHON_IMAGE = python:3.10 push-py3.11-slim: BUILDER_PYTHON_IMAGE = python:3.11 +push-py3.12-slim: BUILDER_PYTHON_IMAGE = python:3.12 PUSH_TARGETS := $(TARGETS:%=push-%) @@ -92,4 +95,4 @@ $(PUSH_TARGETS): -t $(HUB)/$(PROJECT):${AGENT_VERSION}-$$p-${version} \ . ; \ done - docker buildx rm skywalking_python_main_$(version) || true; + docker buildx rm skywalking_python_main_$(version) || true; \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index d0983077..6d4928cc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3729,5 +3729,5 @@ sync = ["kafka-python", "requests"] [metadata] lock-version = "2.0" -python-versions = ">=3.7, <3.12" +python-versions = ">=3.7" content-hash = "ae3cd5c63201383530bf2daac37be0ef9399bf4384dbe42048c81e945b70642a" diff --git a/pyproject.toml b/pyproject.toml index d0daf019..cc1c7ab0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ classifiers=[ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: System :: Monitoring', 'Topic :: Software Development', @@ -67,7 +68,7 @@ sw-python = 'skywalking.bootstrap.cli.sw_python:start' [tool.poetry.dependencies] -python = ">=3.7, <3.12" +python = ">=3.8, <4.0" grpcio = '*' grpcio-tools = '*' packaging = '*' @@ -75,7 +76,7 @@ wrapt = '*' psutil = '<=5.9.5' requests = { version = ">=2.26.0", optional = true } kafka-python = { version = "*", optional = true } -uvloop = { version = "^0.17.0", optional = true } +uvloop = { version = "^0.18.0", optional = true } aiokafka = { version = "^0.8.0", optional = true } aiohttp = { version = "^3.7.4", optional = true } @@ -125,7 +126,7 @@ requests = "*" [tool.poetry.group.plugins.dependencies] urllib3 = "1.26.7" aiohttp = "3.7.4" -celery = "5.1.2" +celery = "5.4.0" django = "3.2.8" elasticsearch = "7.15.1" flask = "2.0.2" diff --git a/skywalking/plugins/__init__.py b/skywalking/plugins/__init__.py index aa092bf8..cf367457 100644 --- a/skywalking/plugins/__init__.py +++ b/skywalking/plugins/__init__.py @@ -56,7 +56,7 @@ def install(): logger.info("plugin %s is disabled and thus won't be installed", modname) continue logger.debug('installing plugin %s', modname) - plugin = importer.find_module(modname).load_module(modname) + plugin = importer.find_spec(modname).loader.load_module() # todo: refactor the version checker, currently it doesn't really work as intended supported = pkg_version_check(plugin) diff --git a/tests/e2e/base/Dockerfile.e2e b/tests/e2e/base/Dockerfile.e2e index d646c0b1..a31db2fd 100644 --- a/tests/e2e/base/Dockerfile.e2e +++ b/tests/e2e/base/Dockerfile.e2e @@ -30,9 +30,7 @@ RUN cd /skywalking-python && apt-get update && apt-get install -y make && make i # Extra dependencies for e2e services RUN apt-get update \ && apt-get install -y --no-install-recommends gcc build-essential\ - && rm -rf /var/lib/apt/lists/* \ - && pip install uwsgi fastapi uvicorn aiohttp flask "Werkzeug<3" gunicorn \ - && apt-get purge -y --auto-remove gcc build-essential + && pip install uwsgi fastapi uvicorn aiohttp flask "Werkzeug<3" gunicorn # Entrypoint with agent attached WORKDIR /services