Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set minimum attrs version #1520

Closed
max-radin opened this issue Jan 10, 2025 · 0 comments · Fixed by #1521
Closed

Set minimum attrs version #1520

max-radin opened this issue Jan 10, 2025 · 0 comments · Fixed by #1521

Comments

@max-radin
Copy link
Contributor

I found that upgrading attrs to 23.2.0 or higher would resolve errors such as

  File "/Users/maxradin/anaconda3/lib/python3.11/functools.py", line 994, in __get__
    raise TypeError(msg) from None
TypeError: No '__dict__' attribute on 'CtrlSpec' instance to cache 'shapes' property.

when using qualtran. (See isi-usc-edu/pyLIQTR#35 for example code and full traceback.)

My guess is that this is because earlier versions of attrs did not support cached properties on slotted classes, as described in python-attrs/attrs#1200. I'd suggest updating qualtran's requirements to specify a minimum version of 23.2.0 for attrs.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant