We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upon upgrading to v24.1.0, I noticed that some of my code using fields with chained converters raises an AttributeError. Here is a MWE:
AttributeError
import attrs def foo(x): return x def bar(x): return x @attrs.define class MyClass: field = attrs.field(converter=[foo, bar]) x = MyClass(0) x.field = 1 print(x)
That code runs successfully with v23.2.0, but it raises with the following stack trace with v24.1.0:
Traceback (most recent call last): File "/home/leroyv/Documents/src/rayference/rtm/eradiate/playgrounds/bug_attrs_241.py", line 18, in <module> x.field = 1 File "/home/leroyv/miniforge3/envs/eradiate/lib/python3.9/site-packages/attr/_make.py", line 1057, in __setattr__ nval = hook(self, a, val) File "/home/leroyv/miniforge3/envs/eradiate/lib/python3.9/site-packages/attr/setters.py", line 23, in wrapped_pipe rv = setter(instance, attrib, rv) File "/home/leroyv/miniforge3/envs/eradiate/lib/python3.9/site-packages/attr/setters.py", line 66, in convert return c(new_value) AttributeError: __call__
The text was updated successfully, but these errors were encountered:
yeah this is really bad, #1328 should fix it
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Upon upgrading to v24.1.0, I noticed that some of my code using fields with chained converters raises an
AttributeError
. Here is a MWE:That code runs successfully with v23.2.0, but it raises with the following stack trace with v24.1.0:
The text was updated successfully, but these errors were encountered: