Skip to content

feat: support Python 3.10-3.14, drop 3.8/3.9, update plugin compatibility#386

Merged
wu-sheng merged 15 commits intomasterfrom
feat/python-3.12-3.14-support
Apr 11, 2026
Merged

feat: support Python 3.10-3.14, drop 3.8/3.9, update plugin compatibility#386
wu-sheng merged 15 commits intomasterfrom
feat/python-3.12-3.14-support

Conversation

@wu-sheng
Copy link
Copy Markdown
Member

@wu-sheng wu-sheng commented Apr 10, 2026

Summary

Support Python 3.10 through 3.14, drop end-of-life Python 3.8 and 3.9. Update plugin support_matrix and test services for newer library versions on 3.12+.

Supersedes #374.

Core agent fixes

  • Fix missing import importlib.util that caused NameError on Python 3.12+ (root cause of feat: bump up 3.12 and 3.13 #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)

Dependency updates

  • Python range: >=3.10, <3.15
  • Unpin psutil, packaging; loosen wrapt>=1.14, uvloop>=0.17
  • Remove uwsgi from dev deps (doesn't build on 3.12+)
  • Mark plugins/lint groups as optional; use >= ranges so poetry lock resolves on all Python versions
  • Upgrade pylint pin from 2.13.9 to >=2.13.9
  • Remove Poetry 1.5.1 pin on Linux (can't read Poetry 2.x lock files)

Plugin support_matrix updates for 3.12+

All hook points verified against new library versions:

Plugin >=3.10 >=3.12 >=3.13 >=3.14
bottle 0.12.23 0.12.23 0.13 0.13
django 3.2 3.2 5.1 5.1
flask 2.0 2.0 2.0 3.0
tornado 6.0, 6.1 6.0, 6.1 6.0, 6.1 6.4
pyramid 1.10, 2.0 2.1 2.1 2.1
kafka-python 2.0 2.3 2.3 2.3
pulsar-client 3.3.0 3.9.0 3.9.0 3.9.0
psycopg 3.0/3.1 3.1 3.2 3.2
httpx 0.22/0.23 0.22/0.23 0.23 0.28/0.23
happybase 1.2.0 1.3.0 1.3.0 1.3.0
urllib3 1.25/1.26 skipped skipped skipped
  • urllib3: skipped on 3.12+ — urllib3.request.RequestMethods was removed in urllib3 2.x, plugin needs code adaptation
  • happybase: upgraded to 1.3.0 for 3.12+ (thriftpy2 0.6.0 has cp312/cp313 wheels)

Test service fixes

  • Django test services: replace removed django.conf.urls.url with django.urls.path (compatible with Django 2.0+ through 5.1)
  • Fix testcontainers DockerCompose API for v4 compatibility (filepath -> context)

CI updates

  • Test matrix: Python 3.10/3.11/3.12/3.13/3.14 (dropped 3.8/3.9)
  • Fix test step: poetry install --without plugins,lint (avoids installing incompatible old plugin deps on host)
  • Replace unapproved getsentry/paths-filter with approved dorny/paths-filter
  • Exclude profiling_greenlet E2E on 3.14 (gevent doesn't have 3.14 wheels yet)

Docker & docs

  • Update docker/Makefile for 3.10-3.14
  • Update Container.md with version range and known limitations
  • Add CLAUDE.md and Claude Code skills for plugin development

Locally verified (with span data validation)

  • django==5.1 on Python 3.13 — PASSED
  • psycopg[binary]==3.2.* on Python 3.13 — PASSED
  • happybase==1.3.0 on Python 3.13 — PASSED
  • httpx==0.23.* on Python 3.13 — PASSED
  • requests==2.26/2.25 on Python 3.13 — PASSED
  • Agent loads all 35 plugins on Python 3.10/3.11/3.12/3.13/3.14

Test plan

  • All plugin tests pass on Python 3.10/3.11 (existing coverage)
  • All plugin tests pass on Python 3.12/3.13/3.14 (new)
  • All unit tests pass on 3.10-3.14
  • All E2E tests pass on 3.10-3.14 (except profiling_greenlet on 3.14 — excluded)
  • Docker images build for all variants
  • Lint and doc-gen checks pass

🤖 Generated with Claude Code

wu-sheng and others added 2 commits April 10, 2026 22:23
- 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>
@wu-sheng wu-sheng added this to the 1.3.0 milestone Apr 10, 2026
@wu-sheng wu-sheng added the enhancement New feature or request label Apr 10, 2026
wu-sheng and others added 11 commits April 10, 2026 22:30
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>
@wu-sheng wu-sheng changed the title feat: support Python 3.10-3.14, drop 3.8/3.9 feat: support Python 3.10-3.14, drop 3.8/3.9, update plugin compatibility Apr 11, 2026
kezhenxu94
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>
Copy link
Copy Markdown
Contributor

@CodePrometheus CodePrometheus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The practice of these kinds of skills may apply to all agent repos.

@wu-sheng
Copy link
Copy Markdown
Member Author

The practice of these kinds of skills may apply to all agent repos.

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.
Personally, I am focused on Claude as it is much faster and more powerful, from my experience.

@wu-sheng wu-sheng merged commit a70b2cc into master Apr 11, 2026
218 of 223 checks passed
@wu-sheng wu-sheng deleted the feat/python-3.12-3.14-support branch April 11, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants