Skip to content

Fix structuring of attrs class that inherit from typing/collections.abc generic type aliases #655

New issue

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

Merged

Conversation

anthrotype
Copy link
Contributor

Fixes #654

The first commit reproduces the error AttributeError: type object 'Iterable' has no attribute '__parameters__'.

I will follow up with the actual fix.

….abc types still works

This reproduces issue python-attrs#654: AttributeError: type object 'Iterable' has no attribute '__parameters__'
@Tinche
Copy link
Member

Tinche commented Jun 4, 2025

Don't forget to add a changelog entry, and I can release this as v25.1.1 soon.

@anthrotype
Copy link
Contributor Author

yes thanks, I can do in a bit after lunch.

@anthrotype anthrotype force-pushed the fix-generic-alias-no-parameters branch from 9d37a51 to 6346106 Compare June 4, 2025 13:55
@anthrotype
Copy link
Contributor Author

Don't forget to add a changelog entry

done

@Tinche
Copy link
Member

Tinche commented Jun 4, 2025

Great job on this. Please add a link to the issue too to the CHANGELOG and I will release this in the evening.

@anthrotype anthrotype force-pushed the fix-generic-alias-no-parameters branch from 6346106 to 3ca2b02 Compare June 4, 2025 14:09
@Tinche Tinche merged commit 7c67730 into python-attrs:main Jun 4, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: no __parameters__ when structuring subclass of generic alias types from collections.abc/typing
2 participants