Skip to content

Support subclasses of datetime, date, time #86

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
merged 4 commits into from
Jul 24, 2023

Conversation

nick-merrill
Copy link

@nick-merrill nick-merrill commented May 17, 2023

Fixes #56

Users should be able to subclass datetimes and still have their datetime converted to the proper Graphene type.

I wanted to apply the issubclass logic to all types, but I'm holding off since my main goal is to fix compatibility with date mocking libraries like Freezegun.

Testing

I ran poetry run pytest locally with all 40 tests passing.

@nick-merrill
Copy link
Author

Thanks for the approval @necaris!

It looks like the pipeline (including other PRs) is having some issues with Poetry. Is there anything you'd like me to to fix up the PR, or will you just merge it when you get a chance to cut the next version?

@necaris necaris merged commit 45ac9e9 into graphql-python:v0.4.0 Jul 24, 2023
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.

2 participants