Skip to content

gh-144330: Initialize staticmethod/classmethod callables in tp_new#144364

Closed
Aniketsy wants to merge 32 commits into
python:mainfrom
Aniketsy:fix-144330
Closed

gh-144330: Initialize staticmethod/classmethod callables in tp_new#144364
Aniketsy wants to merge 32 commits into
python:mainfrom
Aniketsy:fix-144330

Conversation

@Aniketsy

Copy link
Copy Markdown
Contributor

@StanFromIreland

Copy link
Copy Markdown
Member

You need to update your branch to fix the CI, it is currently incompatible.

Comment thread Objects/funcobject.c
cm->cm_callable = Py_NewRef(Py_None);
cm->cm_dict = NULL;
return (PyObject *)cm;
}

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.

Move cm_new() before PyClassMethod_Type, so you don't need to declare it in advance (remove forward declaration line 1558).

Comment thread Objects/funcobject.c Outdated
sm->sm_callable = Py_NewRef(Py_None);
sm->sm_dict = NULL;
return (PyObject *)sm;
}

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.

Move sm_new() before PyStaticMethod_Type.

Comment thread Objects/funcobject.c Outdated
Comment thread Objects/funcobject.c Outdated
Comment thread Lib/test/test_descr.py Outdated
Comment thread Lib/test/test_descr.py Outdated
Comment thread Lib/test/test_descr.py Outdated
Aniketsy and others added 5 commits February 3, 2026 18:56
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
@Aniketsy

Aniketsy commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

@vstinner Thanks for the review, i'll update as per suggestions.

@vstinner

vstinner commented Feb 3, 2026

Copy link
Copy Markdown
Member

You didn't move cm_new() and sm_new().

Comment thread Lib/test/test_descr.py Outdated
@Aniketsy

Aniketsy commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

You didn't move cm_new() and sm_new().

sorry , I mean i will update, just need some time Thanks!

Aniketsy and others added 15 commits February 3, 2026 19:08
Co-authored-by: Victor Stinner <vstinner@python.org>
…15232)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
…rs specified (pythonGH-144324)

Treat "+" and "/" like other characters not in the alternative Base64
alphabet when both altchars and ignorechars are specified.
E.g. discard them if they are not in altchars but are in ignorechars,
and set error if they are not in altchars and not in ignorechars.
Only emit warnings if ignorechars is not specified.
…pythonGH-144391)

Revert "pythongh-144145: Track nullness of properties in the Tier 2 JIT optimizer (pythonGH-144122)"

This reverts commit 1dc12b2.
…onGH-144183)

- Pass -v to pip, so compiler output is visible
- Move the call ``spam.system(3)`` up so that error handling is tested
  right after it's added
- Use `PyUnicode_AsUTF8AndSize` as `PyUnicode_AsUTF8` is not in the
  Limited API.
- Add a footnote about embedded NULs.
@Aniketsy

Aniketsy commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

@vstinner Sorry I guess i messed up, I rebased it as there were merge conflict

@webknjaz

webknjaz commented Feb 3, 2026

Copy link
Copy Markdown
Member

This looks like a lot of unrelated changes. Please scope the patch to the declared PR title.

@Aniketsy

Aniketsy commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing this, will re-open , new one

@Aniketsy Aniketsy closed this Feb 3, 2026
@Aniketsy

Aniketsy commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

@webknjaz sorry, yes

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.