diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0c62682..44246e3 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -15,5 +15,5 @@ jobs: ci: uses: community-of-python/community-workflow/.github/workflows/preset.yml@main with: - python-version: '["3.10","3.11","3.12","3.13", "3.14"]' + python-version: '["3.10","3.11","3.12","3.13", "3.14", "3.15"]' secrets: inherit diff --git a/CLAUDE.md b/CLAUDE.md index e396fe9..2381517 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,5 +47,5 @@ Microbootstrap auto-wires production instrumentation (observability, logging, tr ### Key constraints - Strict mypy — all code must type-check cleanly -- Python 3.10–3.14 support required; avoid 3.11+ syntax +- Python 3.10–3.15 support required; avoid 3.11+ syntax - All instrument extras are optional deps; use `TYPE_CHECKING` guards where needed diff --git a/README.md b/README.md index 9d7d444..3bbc73f 100644 --- a/README.md +++ b/README.md @@ -547,7 +547,7 @@ To integrate Pyroscope, specify the `pyroscope_endpoint`. When both Pyroscope and OpenTelemetry are enabled, profile span IDs will be included in traces using [`pyroscope-otel`](https://github.com/grafana/otel-profiling-python) for correlation. -Note that Pyroscope integration is not supported on Windows. +Note that Pyroscope integration is not supported on Windows and Python 3.15 yet. ### Logging diff --git a/microbootstrap/helpers.py b/microbootstrap/helpers.py index 1cae380..1164b25 100644 --- a/microbootstrap/helpers.py +++ b/microbootstrap/helpers.py @@ -1,7 +1,6 @@ import dataclasses import re import typing -from dataclasses import _MISSING_TYPE from microbootstrap import exceptions @@ -20,10 +19,10 @@ def dataclass_to_dict_no_defaults(dataclass_to_convert: "_DataclassT") -> dict[s conversion_result: typing.Final = {} for dataclass_field in dataclasses.fields(dataclass_to_convert): value = getattr(dataclass_to_convert, dataclass_field.name) - if isinstance(dataclass_field.default, _MISSING_TYPE): + if dataclass_field.default is dataclasses.MISSING: conversion_result[dataclass_field.name] = value continue - if dataclass_field.default != value and isinstance(dataclass_field.default_factory, _MISSING_TYPE): + if dataclass_field.default != value and dataclass_field.default_factory is dataclasses.MISSING: conversion_result[dataclass_field.name] = value continue if value != dataclass_field.default and value != dataclass_field.default_factory(): # type: ignore[operator] diff --git a/microbootstrap/instruments/pyroscope_instrument.py b/microbootstrap/instruments/pyroscope_instrument.py index a2dc270..4d9ce66 100644 --- a/microbootstrap/instruments/pyroscope_instrument.py +++ b/microbootstrap/instruments/pyroscope_instrument.py @@ -9,7 +9,7 @@ try: import pyroscope # type: ignore[import-untyped] except ImportError: # pragma: no cover - pyroscope = None # Not supported on Windows + pyroscope = None # Not supported on Windows and Python 3.15 yet class PyroscopeConfig(BaseInstrumentConfig): diff --git a/pyproject.toml b/pyproject.toml index b29a08d..c21c55c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] dependencies = [ "eval-type-backport>=0.2", @@ -43,7 +44,7 @@ dependencies = [ "rich>=13", "sentry-sdk>=2.7", "structlog>=24", - "pyroscope-io>=1.0.0; platform_system != 'Windows'", + "pyroscope-io>=1.0.0; platform_system != 'Windows' and python_version < '3.15'", "opentelemetry-distro[otlp]>=0.54b1", "opentelemetry-instrumentation-aio-pika>=0.54b1", "opentelemetry-instrumentation-aiohttp-client>=0.54b1",