Back to Explore

python-attrs/attrs

GitHub
1 updates · last 90 days1 watchersOpen source

Last release: 2 months ago

attrs is a Python package for building classes with less boilerplate. It provides decorators and declarative attribute definitions, generating common object behaviors like initialization, readable repr, and equality checks, so you can write concise, correct class code without dull dunder method work.

Project status

  • Actively maintained: Upstream has a very recent GitHub push (2026-05-11), and the project has continued to publish updates through 26.1.0 (2026-03-19), indicating ongoing development rather than maintenance-only mode.
  • Update cadence (approx.): There are several updates within 2025 (25.1.0, 25.2.0, 25.3.0) and at least one later major update in 2025-10 (25.4.0), followed by 2026-03 (26.1.0). Overall, the cadence looks intermittent but clearly active over the last 12 to 18 months.

AI summary generated 2 weeks ago

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 26.1.0

    2 months ago

    attrs 26.1.0 introduces a change to field transformers so default field aliases are resolved before calling `field_transformer`, and transformers can use a new `Attribute.alias_is_default` flag. The release also expands API ergonomics by allowing `attrs.fields()` to accept both classes and attrs instances, plus several smaller validator and setter related fixes.

    BreakingFeatures
  • 25.4.0

    7 months ago

    attrs 25.4.0 introduces early support for Python 3.14 (and PEP 749), plus a set of behavioral fixes around initialization, validators, and performance of asdict and astuple. It also changes class keyword-only behavior to match dataclasses more closely, and adds an experimental attrs.inspect() for inspecting the effective construction parameters.

    BreakingFeatures
  • 25.3.0

    3/13/2025

    Release 25.3.0 is a small maintenance update that focuses on field transformation behavior. The release notes state it restores support for generator-based `field_transformer`s.

  • 25.2.0

    3/12/2025

    attrs 25.2.0 focuses on speeding up class generation, described as 30-50% faster due to compiling methods only once and related codegen optimizations. The release notes also mention improved attribute order checking after the field transformer, Unicode class names in make_class, and clearer error messages.

    BreakingFeatures
  • 25.1.0

    1/25/2025

    Release 25.1.0 is documented as a PyPI licensing metadata correction only. However, the diff shows additional repository-level changes affecting documentation build/test workflows, linting tooling versions, and some test/developer configuration.

  • 24.3.0

    12/16/2024

    attrs 24.3.0 is primarily maintenance work, adding Python 3.13 support for `copy.replace`, and improving typing around `attrs.NothingType` and `instance_of`. It also contains fixes related to converters and frozen exception mutability.

    BreakingFeatures
  • 24.2.0

    8/6/2024

    attrs 24.2.0 focuses on restoring correctness around converter usage with on_setattr (including converter pipes) and adding compatibility work for Python 3.14’s evolving annotation behavior (PEP 649/749 support). It also updates deprecation messaging around the legacy `hash` argument.

  • 24.1.0

    8/3/2024

    attrs 24.1.0 adds new capabilities around converters (including access to the current instance and field) and introduces a new hook, __attrs_init_subclass__ for replacing __init_subclass__. The release also includes multiple bug fixes and performance improvements, notably faster generated __eq__ methods.

    BreakingFeatures
  • 23.2.0

    12/31/2023

    Release 23.2.0 focuses primarily on typing-related fixes, including switching stubs to the standard typing.dataclass_transform API. It also includes behavioral workarounds for slotted classes, plus a new attrs.make_class argument to attach additional attributes to dynamically created classes.

    Features
  • 23.1.0

    4/16/2023

    attrs 23.1.0 includes several API improvements (notably around generics handling, filters, and typing support), plus a packaging and platform change dropping Python 3.6. The release notes focus on documented behavior and typing enhancements, but the code diff also reveals changes around module metadata exposure.

    BreakingFeatures