pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-attrs



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Oct 12 17:11:01 UTC 2025

Modified Files:
        pkgsrc/devel/py-attrs: Makefile distinfo

Log Message:
py-attrs: update to 25.4.0.

## [25.4.0]

### Backwards-incompatible Changes

- Class-level `kw_only=True` behavior is now consistent with `dataclasses`.

  Previously, a class that sets `kw_only=True` makes all attributes keyword-only, including those from base classes.
  If an attribute sets `kw_only=False`, that setting is ignored, and it is still made keyword-only.

  Now, only the attributes defined in that class that doesn't explicitly set `kw_only=False` are made keyword-only.

  This shouldn't be a problem for most users, unless you have a pattern like this:

  ```python
  @attrs.define(kw_only=True)
  class Base:
      a: int
      b: int = attrs.field(default=1, kw_only=False)

  @attrs.define
  class Subclass(Base):
      c: int
  ```

  Here, we have a `kw_only=True` *attrs* class (`Base`) with an attribute that sets `kw_only=False` and has a default (`Base.b`), and then create a subclass (`Subclass`) with required arguments 
(`Subclass.c`).
  Previously this would work, since it would make `Base.b` keyword-only, but now this fails since `Base.b` is positional, and we have a required positional argument (`Subclass.c`) following another 
argument with defaults.

### Changes

- Values passed to the `__init__()` method of `attrs` classes are now correctly passed to `__attrs_pre_init__()` instead of their default values (in cases where *kw_only* was not specified).
- Added support for Python 3.14 and [PEP 749]
- `attrs.validators.deep_mapping()` now allows to leave out either *key_validator* xor *value_validator*.
- `attrs.validators.deep_iterator()` and `attrs.validators.deep_mapping()` now accept lists and tuples for all validators and wrap them into a `attrs.validators.and_()`.
- Added a new **experimental** way to inspect classes:

  `attrs.inspect(cls)` returns the _effective_ class-wide parameters that were used by *attrs* to construct the class.

  The returned class is the same data structure that *attrs* uses internally to decide how to construct the final class.
- Fixed annotations for `attrs.field(converter=...)`.
  Previously, a `tuple` of converters was only accepted if it had exactly one element.
- The performance of `attrs.asdict()` has been improved by 45–260%.
- The performance of `attrs.astuple()` has been improved by 49–270%.
- The type annotation for `attrs.validators.or_()` now allows for different types of validators.

  This was only an issue on Pyright.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 pkgsrc/devel/py-attrs/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/devel/py-attrs/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-attrs/Makefile
diff -u pkgsrc/devel/py-attrs/Makefile:1.32 pkgsrc/devel/py-attrs/Makefile:1.33
--- pkgsrc/devel/py-attrs/Makefile:1.32 Thu Mar 13 15:07:34 2025
+++ pkgsrc/devel/py-attrs/Makefile      Sun Oct 12 17:11:01 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.32 2025/03/13 15:07:34 adam Exp $
+# $NetBSD: Makefile,v 1.33 2025/10/12 17:11:01 wiz Exp $
 
-DISTNAME=      attrs-25.3.0
+DISTNAME=      attrs-25.4.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=a/attrs/}

Index: pkgsrc/devel/py-attrs/distinfo
diff -u pkgsrc/devel/py-attrs/distinfo:1.22 pkgsrc/devel/py-attrs/distinfo:1.23
--- pkgsrc/devel/py-attrs/distinfo:1.22 Thu Mar 13 15:07:34 2025
+++ pkgsrc/devel/py-attrs/distinfo      Sun Oct 12 17:11:01 2025
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.22 2025/03/13 15:07:34 adam Exp $
+$NetBSD: distinfo,v 1.23 2025/10/12 17:11:01 wiz Exp $
 
-BLAKE2s (attrs-25.3.0.tar.gz) = 73245e3bf9cd75d7d867bccc3d7ad77e3062e95df460c5482342dbb23e914d3a
-SHA512 (attrs-25.3.0.tar.gz) = acf34c38865157c49ba4070b35a162f0eb976ded0a8b8f74afe4c7e7238b8418af6108954cfc92c9721a090505e73ae193225a73a02352ab3bba0d9ace189059
-Size (attrs-25.3.0.tar.gz) = 812032 bytes
+BLAKE2s (attrs-25.4.0.tar.gz) = cfef3c51647e5333b29fb586823dd6fd0498a14e3c484b295b87d6a4bef7095b
+SHA512 (attrs-25.4.0.tar.gz) = 945ea1766adf7e8c8cc8b8f8c63c3dca652553522cede6a09d479f9919a41d43539819da2fe6fdc0e0b42822e353c7cb04b79fb9cecfd54bde5e301574a82341
+Size (attrs-25.4.0.tar.gz) = 934251 bytes



Home | Main Index | Thread Index | Old Index