Skip to content

Support Python 3.15 - #160

Merged
vrslev merged 1 commit into
mainfrom
python-3.15
Oct 16, 2026
Merged

vrslev merged 1 commit into
mainfrom
python-3.15

Conversation

@xfenix

@xfenix xfenix commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Motivation

Python 3.15 is out, but import microbootstrap fails on it:

ImportError: cannot import name '_MISSING_TYPE' from 'dataclasses'

microbootstrap.helpers imported the private dataclasses._MISSING_TYPE, which 3.15 removed: dataclasses.MISSING is now a sentinel object.

Changes

  • dataclass_to_dict_no_defaults compares fields with is dataclasses.MISSING. This is the public API and works on every supported version.
  • pyroscope-io has no 3.15 wheels yet and needs a Rust toolchain to build from source. It is now skipped on 3.15, same as on Windows. The import guard already makes the Pyroscope instrument report "not ready" in this case. The marker can go once upstream ships 3.15 wheels.
  • 3.15 is added to the CI matrix and the classifiers. README and CLAUDE.md are updated.

Testing

Locally with uv lock --upgrade, as just install runs in CI:

  • 3.15: 343 passed, 1 skipped (Pyroscope tests skip because the package is not installed)
  • 3.10: 345 passed, 1 skipped
  • ruff format --check, ruff check, mypy pass

dataclasses._MISSING_TYPE is gone in 3.15, so check fields against dataclasses.MISSING instead.
pyroscope-io has no 3.15 wheels yet and needs Rust to build, so skip it on 3.15 the same way as on Windows.
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 99.34% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
microbootstrap/helpers.py 98.33% <100.00%> (-0.03%) ⬇️
microbootstrap/instruments/pyroscope_instrument.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xfenix
xfenix requested review from lesnik512 and vrslev October 16, 2026 12:55
@vrslev
vrslev merged commit 6a00446 into main Oct 16, 2026
21 checks passed
@vrslev
vrslev deleted the python-3.15 branch October 16, 2026 13:11
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.

2 participants