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

Support new X | Y union syntax of Python 3.10 (PEP 604) #758

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

intgr
Copy link

@intgr intgr commented Dec 10, 2021

This is used, for example, when inspecting the result type of SerializerMethodField.

@intgr
Copy link
Author

intgr commented Dec 10, 2021

This isn't properly tested yet, I ran out of time today. Will during the weekend or next week.

@JoelLefkowitz JoelLefkowitz added help wanted Help wanted 1.22.x Release target in 1.22.x Incomplete labels Jul 17, 2022
@JoelLefkowitz JoelLefkowitz changed the base branch from master to 1.21.x July 17, 2022 16:38
@JoelLefkowitz JoelLefkowitz marked this pull request as ready for review July 17, 2022 17:45
@JoelLefkowitz JoelLefkowitz added 1.23.x Release target in 1.23.x and removed 1.22.x Release target in 1.22.x labels Jul 17, 2022
@creyD
Copy link

creyD commented Jul 20, 2022

@intgr Did you test it back then properly after your initial comments?

@intgr intgr force-pushed the support-pep604-union-syntax branch from fc8c6d6 to 7d3748f Compare July 20, 2022 15:52
@intgr
Copy link
Author

intgr commented Jul 20, 2022

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.

@JoelLefkowitz
Copy link
Collaborator

JoelLefkowitz commented Jul 20, 2022

@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.

@intgr
Copy link
Author

intgr commented Jul 20, 2022

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.

@JoelLefkowitz JoelLefkowitz deleted the branch axnsan12:master October 17, 2024 11:55
@JoelLefkowitz JoelLefkowitz reopened this Oct 17, 2024
@JoelLefkowitz JoelLefkowitz changed the base branch from 1.21.x to master October 17, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.23.x Release target in 1.23.x help wanted Help wanted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants