# Changelog

All notable changes to this project will be documented in this file.

## [0.5.1] - 2025-11-11

### ⚙️ Miscellaneous Tasks

- Add test workflow for main branch and fix PR validation
- Remove static/docs from main branch

### 🐛 Bug Fixes

- Restore missing examples directories and fix numbering

### 📚 Documentation

- Change PyPI badge color to bright green
- Fix badges - remove PR CI, fix license badge, keep coverage badge
- Add centered documentation link to README

## [0.5.0] - 2025-11-10

### ⚙️ Miscellaneous Tasks

- Add Python 3.14 support and update CI
- Remove deprecated extras from pyproject.toml

### 🐛 Bug Fixes

- Correct PyPI package name in README badges and installation

### 📚 Documentation

- Update README to reflect current library capabilities

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

This changelog is automatically generated by [git-cliff](https://github.com/orhun/git-cliff).

## [0.1.1] - 2025-10-14

### Fixed

- **Critical**: Fixed anyio compatibility issues in cancellation sources
  - Removed `asyncio.create_task()` calls that were breaking anyio applications
  - Replaced `asyncio.CancelledError` with backend-agnostic exception handling
  - Fixed `TimeoutSource`, `ConditionSource`, and `CompositeSource` to work correctly with anyio
- **TimeoutSource**: Simplified implementation to avoid background task complexity
  - Now uses scope deadline directly for timeout handling
  - Improved reliability and reduced resource usage
- **ConditionSource**: Migrated to anyio task groups for background monitoring
  - Properly handles lifecycle management
  - Graceful cleanup even in nested cancellation scenarios
- **CompositeSource**: Migrated to anyio task groups for multi-source monitoring
  - Fixed background task management
  - Improved error handling during cleanup

### Technical Details

The library previously had critical bugs where it mixed asyncio and anyio primitives:
- `asyncio.create_task()` calls in `timeout.py:70`, `condition.py:66`, and `composite.py:57`
- `asyncio.CancelledError` catches in exception handlers

These bugs caused crashes when using `Cancelable.with_timeout()`, `Cancelable.with_condition()`,
or composite cancellation sources in pure anyio applications.

All 209 tests pass, including new anyio-specific validation tests.

### Breaking Changes

None - all changes are internal implementation fixes with no API changes.

<!-- When releases are made, the changelog will be populated here automatically -->
