Skip to content
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

Teach st.from_type() about remaining generic types #2654

Closed
3 tasks done
Zac-HD opened this issue Oct 29, 2020 · 0 comments · Fixed by #2655
Closed
3 tasks done

Teach st.from_type() about remaining generic types #2654

Zac-HD opened this issue Oct 29, 2020 · 0 comments · Fixed by #2655
Assignees
Labels
enhancement it's not broken, but we want it to be better

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Oct 29, 2020

While working through the list of types in PEP 585 for #2653, I discovered some generic types that we don't currently have registered strategies for. While they're rarely used and nobody has every complained, it would be nice to add them! Note that this applies to every version of Python we support via the typing module equivalents; they're not new in 3.9.

master...Zac-HD:register-more-types has my current progress. Still to do:

  • work out how dict_items is added to the strategy for collections.abc.Set[T] (which breaks because the elements are tuples, not the requested type), and stop that.
  • write tests against the typing module versions which work on all supported Pythons.
  • get collections.abc.Generator working.

Coroutine, AsyncGenerator, and contextlib.AbstractAsyncContextManager are hereby ruled out of scope though, since (a) nobody has asked for them and (b) testing them would be a complete pain because we don't currently have any async tests (see here for how that would work).

@Zac-HD Zac-HD added the enhancement it's not broken, but we want it to be better label Oct 29, 2020
@Zac-HD Zac-HD self-assigned this Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant