Skip to content

Don't access other enum members from self#8332

Merged
jpakkane merged 1 commit intomesonbuild:masterfrom
hroncok:enum_cls
Feb 17, 2021
Merged

Don't access other enum members from self#8332
jpakkane merged 1 commit intomesonbuild:masterfrom
hroncok:enum_cls

Conversation

@hroncok
Copy link
Copy Markdown
Contributor

@hroncok hroncok commented Feb 12, 2021

This is deprecated in Python 3.10.
Instead, acces them from the class.

Fixes #8318

@dcbaker
Copy link
Copy Markdown
Member

dcbaker commented Feb 17, 2021

@jpakkane we should get this in sooner than later, as the existing code will probably stop working in 3.12 or 3.13

@jpakkane
Copy link
Copy Markdown
Member

I'll merge this as soon as #8362 is in and this can be rebased to rerun the tests.

@dcbaker
Copy link
Copy Markdown
Member

dcbaker commented Feb 17, 2021

@hroncok: could you rebase this, so we can get the unit tests working? I'd like to merge this ASAP

This is deprecated in Python 3.10.
Instead, acces them from the class.

Fixes mesonbuild#8318
@hroncok
Copy link
Copy Markdown
Contributor Author

hroncok commented Feb 17, 2021

Done.

@jpakkane jpakkane merged commit 756ea32 into mesonbuild:master Feb 17, 2021
@hroncok hroncok deleted the enum_cls branch February 17, 2021 23:43
@hroncok
Copy link
Copy Markdown
Contributor Author

hroncok commented Feb 17, 2021

Thanks!

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

Successfully merging this pull request may close these issues.

The TestProtocol enum does weird stuff in __str__, accessing other enum members via self

3 participants