Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for future.utils.with_metaclass #7210

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

chadrik
Copy link
Contributor

@chadrik chadrik commented Jul 14, 2019

This util function has the same signature and basic behavior as six.with_metaclass.

Fixes #7193.

Copy link
Collaborator

@emmatyping emmatyping left a comment

Choose a reason for hiding this comment

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

A test might be good, but otherwise LGTM.

@chadrik
Copy link
Contributor Author

chadrik commented Jul 14, 2019

A test might be good, but otherwise LGTM.

Ah yeah, I missed the tests for six.with_metaclass. I'll just copy those.

@chadrik
Copy link
Contributor Author

chadrik commented Jul 15, 2019

So this is going to require stubs for future, which is going to be pretty complex, since there are a lot of very ambiguous cases to solve for, like backports of python3-compatible builtins like dict and list. I'll check back when it's ready.

@JelleZijlstra
Copy link
Member

For the purposes of mypy tests, you can probably put a basic stub in mypy/test-data somewhere with just what you need.

@ilevkivskyi
Copy link
Member

There is also a merge conflict now.

@chadrik
Copy link
Contributor Author

chadrik commented Aug 9, 2019 via email

Same function signature and basic behavior as six.with_metaclass
@chadrik chadrik force-pushed the future_with_metaclass branch from 27b07de to 2721ae4 Compare October 10, 2019 23:16
@chadrik
Copy link
Contributor Author

chadrik commented Oct 11, 2019

Added tests. This should be all ready to go!

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

TBH, this is a bit too much tests :-) Anyway, LGTM!

@ilevkivskyi ilevkivskyi merged commit d607245 into python:master Oct 11, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for future.utils.with_metaclass
4 participants