Skip to content

PySequence_In is not documented #127896

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

Closed
koyuki7w opened this issue Dec 13, 2024 · 5 comments · Fixed by #127979
Closed

PySequence_In is not documented #127896

koyuki7w opened this issue Dec 13, 2024 · 5 comments · Fixed by #127979
Labels
docs Documentation in the Doc dir easy topic-C-API

Comments

@koyuki7w
Copy link
Contributor

koyuki7w commented Dec 13, 2024

Documentation

PySequence_In is part of the limited C-API, and has no document. PEP 3100 ( https://peps.python.org/pep-3100/ ) says this function is "To be removed," but it has not been removed in the latest version, so documentation seems to be needed.

Linked PRs

@koyuki7w koyuki7w added the docs Documentation in the Doc dir label Dec 13, 2024
@ZeroIntensity
Copy link
Member

New applications shouldn't use it, we just keep it for the limited API. I'm not sure we need to encourage more usage by documenting it.

@encukou
Copy link
Member

encukou commented Dec 13, 2024

It's exactly equivalent to PySequence_Contains.

The docs should mention that it's deprecated, and show the preferred spelling.

@encukou encukou added the easy label Dec 13, 2024
@koyuki7w
Copy link
Contributor Author

koyuki7w commented Dec 13, 2024

If this function is deprecated, should we add Py_DEPRECATED to the declaration?
https://github.com/python/cpython/blob/main/Include/abstract.h#L773

@ZeroIntensity
Copy link
Member

No idea what the precedent is here, but I suspect that it should be soft deprecated for compatibility reasons.

@skirpichev
Copy link
Member

The docs should mention that it's deprecated, and show the preferred spelling.

Formally, it's not deprecated yet;)

I suspect that it should be soft deprecated for compatibility reasons.

Maybe not. Search on the Github shows only few projects, which use this. On another hand, support this has 0 maintenance burden.

encukou pushed a commit that referenced this issue Dec 16, 2024
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy topic-C-API
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

5 participants