- The build backend requirement is now
uv_build>=0.11.0,<1, so distributions and build frontends that ship a newer uv can build the sdist without waiting for a release. Every uv minor so far shipped without a breaking change to theuv_buildconfiguration, and CI builds with the current uv on every run. Prompted by @jeremycline in wolph/portalocker#155. - The development extras (
dev,tests,docsandtox) now require the versions the project is tested with (#48, #51, #55). The package itself still has no runtime dependencies.
- A two-track quickstart takes you from
pip installto a metric on a graph, with or without a local Python. - The local stack runs the official statsd daemon from
examples/statsd/config.js, andexamples/grafana/import/ships a dashboard that imports into an existing Grafana and asks for the datasource instead of assuming one. - Every module member carries a docstring, checked with pydocstyle, and the documentation links point at the stable version.
- The README reports CI, CodeQL and Coveralls coverage for the master branch through live badges, and lists the sponsorship options.
First release since 2.1.0 (2017). Full modernization of the project.
- Python >= 3.10 required. Python 2 support removed.
- Validation errors now raise real exceptions instead of
AssertionError.Timerstate misuse raisesRuntimeError, and non-numericGaugevalues raiseTypeError. Connection.sendonly swallowsOSError(returningFalse), so other exceptions now propagate.- The nose-specific
setup_package/teardown_packagehooks were removed from thestatsdpackage. statsd.__about__was removed. Usestatsd.__version__and the package metadata instead.- The statsd.compat module (Python 2 helpers) was removed.
- The
Timer.time()context manager now sends the metric even when the timed block raises an exception, matching the behavior ofwith Timer(...)and@timer.decorate. - Timer measurements use the monotonic
time.perf_counter()instead of the wall clock, so clock adjustments can't produce negative or wildly wrong timings. - Passing
bytesmetric names no longer crashes on Python 3. Raw.senddefault timestamps no longer rely on the non-portablestrftime('%s').Connection.__del__no longer raises when construction failed before the socket existed.Timer.time()now yields the inner timer instance (wasNone).
- Packaging:
pyproject.tomlwith theuv_buildbackend (setup.py/setup.cfgremoved). - Fully type annotated with a
py.typedmarker, checked with strict mypy, basedpyright, pyrefly and ty. - Tests: pytest with 100% line and branch coverage enforced, nose removed.
- Linting/formatting: ruff.
- CI: GitHub Actions (Travis removed) with releases published to PyPI via Trusted Publishing.
- Docs: sphinx + furo on readthedocs, with the README written in Markdown, a getting-started and user-guide tree, and every code sample in the README and the docs executed by the test suite.
- Repo: CodeQL, stale-issue and dependabot workflows, plus
CONTRIBUTING.mdandSECURITY.md.
For older releases, see the git history.