Skip to content

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

Closed
WildCard65 wants to merge 7 commits into
python:mainfrom
WildCard65:bpo-41171
Closed

bpo-41171: Added method "PyMetaType_FromSpec" to allow for specifying the metaclass for the type.#21238
WildCard65 wants to merge 7 commits into
python:mainfrom
WildCard65:bpo-41171

Conversation

@WildCard65

@WildCard65WildCard65 commented Jun 30, 2020

Copy link
Copy Markdown
Contributor

@WildCard65

Copy link
Copy Markdown
ContributorAuthor

Paging @vstinner for review.

Comment threadObjects/typeobject.c Outdated

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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?

WildCard65and 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 teamJune 30, 2020 21:01
@WildCard65

Copy link
Copy Markdown
ContributorAuthor

@vstinner I performed the change you requested.

@WildCard65WildCard65 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
Copy Markdown
Contributor

Superseded by #93012

@WildCard65
WildCard65 deleted the bpo-41171 branch November 30, 2022 16:12
Sign up for freeto 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

@WildCard65@kumaraditya303@vstinner@the-knights-who-say-ni@ezio-melotti@bedevere-bot