Skip to content

feat: bump up 3.12 and 3.13#374

Draft
kezhenxu94 wants to merge 10 commits intomasterfrom
py12
Draft

feat: bump up 3.12 and 3.13#374
kezhenxu94 wants to merge 10 commits intomasterfrom
py12

Conversation

@kezhenxu94
Copy link
Copy Markdown
Member

  • If this pull request closes/resolves/fixes an existing issue, replace the issue url. Closes:

@kezhenxu94 kezhenxu94 closed this May 26, 2025
@kezhenxu94 kezhenxu94 reopened this May 26, 2025
@kezhenxu94 kezhenxu94 force-pushed the py12 branch 15 times, most recently from 3db5f5d to 8d867da Compare May 28, 2025 04:17
wu-sheng added a commit that referenced this pull request Apr 10, 2026
- 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>
wu-sheng added a commit that referenced this pull request Apr 11, 2026
…lity (#386)

## 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 #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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant