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

bpo-41171: Added method "PyMetaType_FromSpec" to allow for specifying the metaclass for the type. #21238

Closed
wants to merge 7 commits into from

Conversation

WildCard65
Copy link
Contributor

@WildCard65 WildCard65 commented Jun 30, 2020

@WildCard65
Copy link
Contributor Author

Paging @vstinner for review.

}

PyObject *
PyType_FromModuleAndSpec(PyObject *module, PyType_Spec *spec, PyObject *bases)
PyMetaType_FromModuleAndSpec(PyObject *module, PyTypeObject *meta_type, PyType_Spec *spec, PyObject *bases)
Copy link
Member

Choose a reason for hiding this comment

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

I propose the name PyMetaType_FromSpec and remove PyMetaType_FromSpecWithBases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, you're suggesting renaming PyMetaType_FromSpecWithBases to just PyMetaType_FromSpec or just keeping the PyMetaType_FromSpec from above?

Copy link
Member

Choose a reason for hiding this comment

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

Rename PyMetaType_FromModuleAndSpec (4 parameters) to PyMetaType_FromSpec. And so remove the other PyMetaType_FromSpec (2 parameters).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I move the method out of "Py_LIMITED_API" then?

WildCard65 and others added 2 commits June 30, 2020 16:58
Added a note about 'PyMetaType_FromModuleAndSpec' in regards to 'tp_new'.
@WildCard65 WildCard65 requested review from vstinner and removed request for a team June 30, 2020 21:01
@WildCard65
Copy link
Contributor Author

@vstinner I performed the change you requested.

@WildCard65 WildCard65 changed the title bpo-41171: Added companion "FromSpec" methods prefixed with "PyMetaTy… bpo-41171: Added method "PyMetaType_FromSpec" to allow for specifying the metaclass for the type. Jun 30, 2020
@kumaraditya303
Copy link
Contributor

Superseded by #93012

@WildCard65 WildCard65 deleted the bpo-41171 branch November 30, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants