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

Deprecating PyUnicodeTranslateError_Create #85271

Closed
methane opened this issue Jun 24, 2020 · 3 comments
Closed

Deprecating PyUnicodeTranslateError_Create #85271

methane opened this issue Jun 24, 2020 · 3 comments
Labels
3.10 only security fixes topic-C-API

Comments

@methane
Copy link
Member

methane commented Jun 24, 2020

BPO 41099
Nosy @methane

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-06-24.08:51:17.585>
labels = ['expert-C-API', '3.10']
title = 'Deprecating PyUnicodeTranslateError_Create'
updated_at = <Date 2020-06-26.01:56:53.518>
user = 'https://github.com/methane'

bugs.python.org fields:

activity = <Date 2020-06-26.01:56:53.518>
actor = 'methane'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['C API']
creation = <Date 2020-06-24.08:51:17.585>
creator = 'methane'
dependencies = []
files = []
hgrepos = []
issue_num = 41099
keywords = []
message_count = 3.0
messages = ['372242', '372401', '372403']
nosy_count = 1.0
nosy_names = ['methane']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue41099'
versions = ['Python 3.10']

@methane
Copy link
Member Author

methane commented Jun 24, 2020

PyUnicodeTranslateError_Create marked as Py_DEPRECATED since it receives Py_UNICODE* as an argument.
But it is not deprecated in the document.

On the other hand, we have alternative private API which accepts Unicode object: _PyUnicodeTranslateError_Create. Should we make it public?

Otherwise, we can recommend PyObject_CallFunction(PyExc_UnicodeTranslateError, ...) as an alternative.

@methane methane added 3.10 only security fixes topic-C-API labels Jun 24, 2020
@methane
Copy link
Member Author

methane commented Jun 26, 2020

I prefer PyObject_CallFunction(PyExc_UnicodeTranslateError, ...) because UnicodeTranslateError is not so popular for third party libraries.
I don't think we should provide public stable API for convenient.

@methane
Copy link
Member Author

methane commented Jun 26, 2020

I added deprecated directive in #65361.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@methane methane closed this as completed May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes topic-C-API
Projects
None yet
Development

No branches or pull requests

1 participant