feat: support Python 3.10-3.14, drop 3.8/3.9, update plugin compatibility#386
Merged
feat: support Python 3.10-3.14, drop 3.8/3.9, update plugin compatibility#386
Conversation
- Fix missing `import importlib.util` that caused NameError on Python 3.12+ (root cause of PR #374 failures) - Replace deprecated `find_module`/`load_module` with `find_spec`/`module_from_spec` in plugin loader and doc generator - Remove Python <3.8 `pkg_resources` fallback (dead code since 3.8 dropped) - Update CI matrix: test Python 3.10/3.11/3.12/3.13/3.14 - Fix CI test step: use `--without plugins,lint` to avoid installing incompatible old plugin test deps on newer Python versions (plugin tests run in Docker, host only needs pytest + testcontainers) - Mark plugins and lint dependency groups as optional - Change plugin dep pins from exact versions to `>=` ranges so poetry lock resolves on newer Python (actual test versions unchanged, controlled by support_matrix in each plugin + Docker) - Update deps: unpin psutil, loosen wrapt/uvloop/grpcio-tools constraints - Remove uwsgi from dev deps (doesn't build on 3.12+, tested via e2e) - Update testcontainers DockerCompose usage for v4 API compatibility - Replace unapproved getsentry/paths-filter with dorny/paths-filter - Update docker/Makefile and Container.md for 3.10-3.14 Verified: Docker images build and agent loads all 35 plugins successfully on Python 3.10, 3.11, 3.12, 3.13, and 3.14. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CLAUDE.md: project guide covering structure, plugin API, testing framework, build commands, and CI pipeline - .claude/skills/new-plugin: scaffolds a complete new instrumentation plugin (code, tests, docker-compose, expected data, services) - .claude/skills/plugin-test: runs plugin/unit tests locally across Python versions, mirroring CI pipeline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Poetry 1.5.1 cannot read lock files generated by Poetry 2.x, causing CI lint step to fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move imports to top of file and ensure 2 blank lines after function definition to satisfy flake8 rules. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pylint 2.13.9 incorrectly reports os.getenv as E1101 (no-member) on newer Python. Allow resolution to a newer version that fixes this. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add newer library versions that support Python 3.12+: - pyramid: add 2.1 for >=3.12 (requires_python>=3.10) - kafka-python: add 2.3 for >=3.12 (revived with 3.12/3.13 support) - pulsar-client: add 3.9.0 for >=3.12 (has cp312/cp313 wheels) - urllib3: add 2.0 for >=3.12 (2.x series supports 3.12+) - happybase: keep 1.2.0 for >=3.10 (pure Python, thriftpy2 dep may need investigation for 3.12+) Regenerate Plugins.md via make doc-gen. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gevent/greenlet does not have Python 3.14 wheels yet. Exclude the profiling_greenlet E2E test from the 3.14 matrix and document the limitation in Container.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add newer library versions for Python 3.13/3.14 compatibility: - bottle: add 0.13 for >=3.13 (0.12.x doesn't install on 3.13+) - django: add 4.2 for >=3.13 (3.2 EOL, doesn't support 3.13+) - flask: add 3.0 for >=3.14 (2.0 doesn't support 3.14) - tornado: add 6.4 for >=3.14 (6.0/6.1 don't support 3.14) - urllib3: remove 2.0 from 3.12+ (plugin needs adaptation for 2.x API), keep 1.x for >=3.10 only - happybase: add TODO for thriftpy2 build failure on 3.12+ Regenerate Plugins.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add empty version lists for >=3.12 so get_test_vector() returns [] and CI skips these tests on 3.12+: - urllib3: 1.x can't install on 3.12+, 2.x needs plugin adaptation - happybase: thriftpy2 fails to build on 3.12+ Both need follow-up work to support 3.12+. Regenerate Plugins.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- urllib3: skip on 3.12+ because urllib3 2.x removed urllib3.request.RequestMethods (plugin needs code adaptation) - happybase: test 1.3.0 on 3.12+ (thriftpy2 0.6.0 has 3.12+ wheels) Regenerate Plugins.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add documentation for permanent 502 / empty segments failures and local vs CI differences for plugin integration tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
django: - Add 5.1 for >=3.13 (4.2 doesn't support 3.13+) - Fix test services: replace removed django.conf.urls.url with django.urls.path (available since Django 2.0, works with 3.2+) - Verified locally: django==5.1 PASSED with span validation on 3.13 psycopg: - Add 3.2.* for >=3.13 (3.1.* has no cp313 binary wheels) - Verified locally: psycopg[binary]==3.2.* PASSED with span validation on 3.13 httpx: - Only test 0.23.* for >=3.13 (0.22.* can't install on 3.13+) Update plugin-test skill with proxy bypass guidance. Regenerate Plugins.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verified httpx 0.28.1 API compatibility: _client.Client.send, _client.AsyncClient.send, USE_CLIENT_DEFAULT all exist with same signatures. url.netloc remains bytes type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kezhenxu94
previously approved these changes
Apr 11, 2026
Update all documentation to reflect the new minimum Python version: - README.md - Installation.md - How-to-build-from-sources.md - Developer.md (also update pyenv example to 3.13.0) - How-to-use-with-gunicorn.md (remove obsolete Python 3.7 caveats) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add docs/en/contribution/Claude-Code-Skills.md covering: - CLAUDE.md scope (project context for Claude Code) - /new-plugin skill (scaffold new instrumentation plugins) - /plugin-test skill (run CI tests locally) Link from Developer.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CodePrometheus
approved these changes
Apr 11, 2026
Contributor
CodePrometheus
left a comment
There was a problem hiding this comment.
The practice of these kinds of skills may apply to all agent repos.
Member
Author
I did some for the main repo and Java agent. They are similar but not the same. Meanwhile, @hanahmily insists that BanyanDB wants things not Claude-specific, so I had to hold all for that. repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Support Python 3.10 through 3.14, drop end-of-life Python 3.8 and 3.9. Update plugin
support_matrixand test services for newer library versions on 3.12+.Supersedes #374.
Core agent fixes
import importlib.utilthat causedNameErroron Python 3.12+ (root cause of feat: bump up 3.12 and 3.13 #374 failures)find_module/load_modulewithfind_spec/module_from_specin plugin loader and doc generatorpkg_resourcesfallback (dead code)Dependency updates
>=3.10, <3.15psutil,packaging; loosenwrapt>=1.14,uvloop>=0.17uwsgifrom dev deps (doesn't build on 3.12+)>=ranges sopoetry lockresolves on all Python versions2.13.9to>=2.13.9Plugin support_matrix updates for 3.12+
All hook points verified against new library versions:
urllib3.request.RequestMethodswas removed in urllib3 2.x, plugin needs code adaptationTest service fixes
django.conf.urls.urlwithdjango.urls.path(compatible with Django 2.0+ through 5.1)testcontainersDockerCompose API for v4 compatibility (filepath->context)CI updates
poetry install --without plugins,lint(avoids installing incompatible old plugin deps on host)getsentry/paths-filterwith approveddorny/paths-filterprofiling_greenletE2E on 3.14 (gevent doesn't have 3.14 wheels yet)Docker & docs
Locally verified (with span data validation)
Test plan
🤖 Generated with Claude Code