attrs icon indicating copy to clipboard operation
attrs copied to clipboard

Python Classes Without Boilerplate

Results 198 attrs issues
Sort by recently updated
recently updated
newest added

[This issue](https://github.com/python-attrs/attrs/issues/1102) was closed but the args are passed in as positional arguments which isn't very helpful for my use case where there are a lot of fields and I...

```python from functools import cached_property from attrs import define @define class Bob: @cached_property def howdy(self): return 3 class Sup(Bob): def __getattr__(self, name): raise AttributeError(name) b = Sup() # reaches __getattr__...

First of all thanks a lot for the awesome library! I just recently discovered it and it saved me so many headaches. Recently I was trying to do something of...

Feature

When using one of the mentioned filter functions in `attrs.as_dict` or `as_tuple` on frozen nodes that have attributes with `attrs.validators.in_` set as their validator, the following TypeError is thrown: ```pytb...

Python 3.9 added the ability to generate per-attribute docstrings on attributes in slots that are parsed by `inspect.getdoc()` and `help` by passing a `dict` to `__slots__`. Since attrs can create...

Feature

# Summary Fix https://github.com/python-attrs/attrs/issues/1288 Method `__getattribute__()` is [documented][1] as the "way to to actually get total control over attribute access" so we change the implementation of slotted classes with cached...

`attrs,Nothing` is intended to be used as `typing.Literal[NOTHING]` as denoted in `attr._make._Nothing`. As of pyright version 1.1.371, this no longer works. As per https://github.com/microsoft/pyright/discussions/8820, this is an intentional change, and...

Typing

It's been very much overdue.

This question is related to issue https://github.com/python-attrs/attrs/issues/1332, where I needed an `__init_subclass__ ` to be run only once for subclasses of an attrs base class. The issue with using built-in...

Hello, thanks for the great work! My question/issue is related to `__attrs_init_subclass__` that was recently added. PEP 487 allows for passing arguments (not sure whether that's the proper name) at...

Feature