• PyServeX v0.9.0
    Some checks failed
    Run Tests / test (3.12) (push) Successful in 1m10s
    Run Tests / test (3.13) (push) Successful in 1m9s
    CI/CD Pipeline / lint (push) Successful in 0s
    Build and Release / build (push) Successful in 41s
    CI/CD Pipeline / test (push) Has been skipped
    CI/CD Pipeline / build-and-release (push) Has been skipped
    Build and Release / release (push) Successful in 5s
    CI/CD Pipeline / notify (push) Successful in 1s
    Lint Code / lint (push) Failing after 38s
    Stable

    Ghost released this 2025-12-03 09:59:50 +00:00 | 12 commits to main since this release

    What's new in this version

    New Features

    • Cython Path Matcher: Added high-performance Cython module for path matching operations
      • FastMountedPath class for optimized ASGI mount path matching
      • FastMountManager for efficient mount lookup with longest-prefix matching
      • Utility functions: path_matches_prefix, strip_path_prefix, match_and_modify_path
      • Performance improvement: 1.5x-7.5x faster path matching operations
      • Automatic fallback to pure Python implementation if Cython is not available

    Bug Fixes

    • Fixed mypy type checking for optional dependencies (a2wsgi, asgiref, django)

    Technical Changes

    • New build system for Cython extensions (scripts/build_cython.py)
    • Updated Makefile with new commands:
      • make build-cython - Build Cython extensions only
      • make benchmark - Run performance benchmarks
    • Clean command now removes Cython artifacts (*.c, *.so, *.pyd, *.html)
    • Lint and format commands exclude .pyx files
    • Added comprehensive test suite for path matcher (28 tests)
    • Added benchmark suite in benchmarks/bench_path_matcher.py

    Dependencies

    • Added cython>=3.0.0 to dev dependencies
    • Added setuptools>=80.0.0 to dev dependencies
    • Updated build-system requires in pyproject.toml

    Full Changelog: https://git.pyserve.org/Shifty/pyserveX/compare/v0.8.0...v0.9.0

    Installation

    pip install pyserve==0.9.0
    

    Usage

    pyserve --help
    

    Building with Cython (Optional)

    For maximum performance, build the Cython extensions:

    make build-cython
    

    Or manually:

    python scripts/build_cython.py build_ext --inplace
    

    Benchmark Results

    Operation Pure Python Cython Speedup
    Single path match ~130 ns ~70 ns 1.9x
    Mount manager lookup (10 mounts) ~660 ns ~200 ns 3.3x
    No match (fast fail) ~660 ns ~90 ns 7.5x
    Downloads