module 'types' has no attribute 'UnionType' #1239
Labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
priority: high
High Priority
status: todo
This issue needs work
Summary
A conditional check in enums.py is causing Python versions <3.10 to crash.
Reproduction Steps
Minimal Reproducible Code
In my case, this error occurs when defining any slash command using the Option parameter:
Expected Results
The code to run, as it did under b5.
Actual Results
Crash with:
module 'types' has no attribute 'UnionType'
Intents
All
System Information
Checklist
Additional Context
Line 672 of enums.py makes a check to see if datatype is of type: types.UnionType. UnionType is not part of the types built-in for Python versions below 3.10, causing: module 'types' has no attribute 'UnionType'.
Judging by the conditional check to begin with, I assume the intention is not to make 3.10+ a requirement to use this library.
The text was updated successfully, but these errors were encountered: