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

Make doctests compatible with expected enum changes in Python 3.11 #1048

Closed
jacobtylerwalls opened this issue Jun 30, 2021 · 5 comments
Closed

Comments

@jacobtylerwalls
Copy link
Member

fixDoctests() will need to account for the new repr() of enums in Python >=3.10, see python/cpython#22392.

Otherwise the test suite looks fine on Python 3.10b2.

@mscuthbert
Copy link
Member

Possibly the best thing to do in fixDocTests() for now is to temporarily change Enum.repr and Enum.str to the older versions, and then once 3.11 is out and most users are on 3.10+ to change Enum.repr and Enum.str on older versions to match 3.10+? This is hard to find.

@jacobtylerwalls
Copy link
Member Author

Looks like this will be reverted from the 3.10 beta and will need to wait for a PEP: https://bugs.python.org/issue44559

@mscuthbert
Copy link
Member

We can leave this open as an issue for "Make doctests compatible with Python 3.11"?

@jacobtylerwalls jacobtylerwalls changed the title Make doctests compatible with Python 3.10 Make doctests compatible with expected enum changes in Python 3.11 Jul 8, 2021
@jacobtylerwalls
Copy link
Member Author

The changes will be backed out of 3.11, also, since the PEP was rejected: https://mail.python.org/archives/list/[email protected]/message/RN3WCRZSTQR55DOHJTZ2KIO6CZPJPCU7/

@mscuthbert
Copy link
Member

Thanks. It's too bad, since the new Enum reprs were such an improvement. But the path to compatibility was really difficult. It'll have to happen another way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants