Skip to content

Conversation

@Matthieu-LAURENT39
Copy link

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.

@github-actions

This comment was marked as outdated.

@svlandeg svlandeg added docs Improvements or additions to documentation p3 labels Mar 1, 2024
@svlandeg svlandeg marked this pull request as draft March 29, 2024 10:13
@svlandeg
Copy link
Member

svlandeg commented Mar 29, 2024

Thanks for the contribution! I'll update this with master and add a test to double check the behaviour 🙏

[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 😎

@svlandeg svlandeg changed the title Add StrEnum example for python 3.11+ 📝 Add StrEnum example for python 3.11+ Apr 2, 2024
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@svlandeg
Copy link
Member

svlandeg commented Apr 3, 2024

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!

@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Sep 1, 2025
@github-actions

This comment was marked as resolved.

@svlandeg svlandeg self-assigned this Sep 1, 2025
@github-actions github-actions bot removed the conflicts Automatically generated when a PR has a merge conflict label Sep 12, 2025
@github-actions

This comment was marked as outdated.

@svlandeg svlandeg changed the title 📝 Add StrEnum example for python 3.11+ 📝 Add StrEnum example for python 3.11+ Sep 12, 2025
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@svlandeg
Copy link
Member

Great, this now works:

image

Leaving this to Tiangolo for a final review!

@svlandeg svlandeg marked this pull request as ready for review September 29, 2025 12:10
@svlandeg svlandeg removed their assignment Sep 29, 2025
@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Nov 25, 2025
@github-actions

This comment was marked as resolved.

@svlandeg svlandeg self-assigned this Nov 25, 2025
@github-actions github-actions bot removed the conflicts Automatically generated when a PR has a merge conflict label Nov 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

@svlandeg svlandeg marked this pull request as draft November 26, 2025 11:39
@svlandeg svlandeg marked this pull request as ready for review November 26, 2025 12:16
@svlandeg svlandeg removed their assignment Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation p3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants