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

attrs: 23.2.0 built in Fedora Linux 40 with Python 3.13.0a3 cause this test failure: ``` ____________ TestUpdateAbstractMethods.test_remain_abstract[False] _____________ self = slots = False def test_remain_abstract(self, slots): """ If an attrs...

Bug
Good for New Contributors

We've got a bunch of failing tests; all in the sphere of exceptions and warnings: https://github.com/python-attrs/attrs/actions/runs/7759031210

Good for New Contributors

Let's start with a regular class: ```python class A: @cached_property def x(self): return self.y @property def y(self): raise AttributeError("Message") a = A() print(a.x) # AttributeError: Message ``` Just as expected....

Bug

In Python 3.13, compiler strips indents from docstrings. See https://github.com/python/cpython/issues/81283 ``` _______________________ TestDundersUnnamedClass.test_ne ________________________ self = def test_ne(self): """ __ne__ docstring and qualified name should be well behaved. """ method...

Documentation
Good for New Contributors

Hi 👋 In the last days, I noticed some inconsistent behavior of `deep_iterable` and `deep_mapping`. Some of the problems have already been mentioned in other issues (links provided below) but...

Hard coding `retain_collection_types=True` in `attrs.asdict` means that you can no longer convert objects that contain sets of other objects. Reproducer: ``` #!/usr/bin/env python # -*- coding: utf-8 -*- import attr...

According to the Pylance developers attrs deviates from PEP 681 in the way it treats `kw_only` in field override https://github.com/microsoft/pylance-release/issues/4670

Typing
dataclasses

I finally got to testing PyPI orgs and I liked them for grouping things. (When Ee announced them, I applied for a Company-type and that still doesn't work so it...

Meta

I'd like to validate that a field can be of several types, one of which is an iterator. ```py from attrs.validator import instance_of @define class C: x: A | B...

Feature

Because `attr.Attributes` causes the type it contains to be invariant, `Literal` types like `Literal[1]` to be incompatible with `attr.Attributes[int]` ```py from __future__ import annotations from attr import Attribute from attrs...

Typing