📝 Add StrEnum example for python 3.11+#745
📝 Add StrEnum example for python 3.11+#745Matthieu-LAURENT39 wants to merge 29 commits intofastapi:masterfrom
StrEnum example for python 3.11+#745Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Thanks for the contribution! I'll update this with [UPDATE] something seems up with the docs-building part of the CI (unrelated to this PR) - we'll look into that first. [UPDATE 2] CI fixed 😎 |
…to upstream_ml_docs
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Quick update: we'll pause this PR for a bit, as we want to put a mechanism in place first to have source examples for different Python versions, as well as corresponding tests that require specific Python versions too. We'll get back to this PR once we've taken care of that! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
StrEnum example for python 3.11+
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
I think that this new format of supporting multiple versions of the same script in the docs with the {* *} syntax might not yet be supporting Python 3.11. Will look into this and get back to this PR afterwards.
Update: this needs tiangolo/markdown-include-variants#28 to be merged & released first.
📝 Docs previewLast commit 095f456 at: https://18193885.typertiangolo.pages.dev Modified Pages |
Python 3.11 added StrEnum, that can replace using
MyEnum(str, Enum).This adds that usage to the Enum parameter type docs, while also keeping the old usage for users on older versions of Python.