-
Notifications
You must be signed in to change notification settings - Fork 439
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
Support new X | Y union syntax of Python 3.10 (PEP 604) #758
base: master
Are you sure you want to change the base?
Conversation
This isn't properly tested yet, I ran out of time today. Will during the weekend or next week. |
@intgr Did you test it back then properly after your initial comments? |
fc8c6d6
to
7d3748f
Compare
Heh this is awkward. I was actually using drf-spectacular, but submitted a PR for the wrong project. So I never finished this. I have rebased and pushed my latest changes, but the tests are still failing, so someone else should finalize this. |
@intgr thanks for this, it's really helpful. The remaining tasks include adding some tests for a python3.10 environment that uses the union syntax and to add the version to the tox file. I'm going to add the help wanted and first issue labels to entice some contributors. |
I already added some tests, but they fail when running with Python 3.10. So some additional changes are needed to the logic. I don't know where it goes wrong. |
This is used, for example, when inspecting the result type of
SerializerMethodField
.