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

PyThread_xxx() not available when using limited API #83304

Closed
VZ mannequin opened this issue Dec 23, 2019 · 2 comments
Closed

PyThread_xxx() not available when using limited API #83304

VZ mannequin opened this issue Dec 23, 2019 · 2 comments
Labels
3.8 only security fixes topic-C-API type-feature A feature request or enhancement

Comments

@VZ
Copy link
Mannequin

VZ mannequin commented Dec 23, 2019

BPO 39123
Nosy @encukou, @nanjekyejoannah

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 = <Date 2021-06-22.14:38:28.821>
created_at = <Date 2019-12-23.14:23:44.914>
labels = ['expert-C-API', 'type-feature', '3.8']
title = 'PyThread_xxx() not available when using limited API'
updated_at = <Date 2021-06-22.14:38:28.820>
user = 'https://bugs.python.org/VZ'

bugs.python.org fields:

activity = <Date 2021-06-22.14:38:28.820>
actor = 'petr.viktorin'
assignee = 'none'
closed = True
closed_date = <Date 2021-06-22.14:38:28.821>
closer = 'petr.viktorin'
components = ['C API']
creation = <Date 2019-12-23.14:23:44.914>
creator = 'VZ'
dependencies = []
files = []
hgrepos = []
issue_num = 39123
keywords = []
message_count = 2.0
messages = ['358813', '396342']
nosy_count = 3.0
nosy_names = ['VZ', 'petr.viktorin', 'nanjekyejoannah']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue39123'
versions = ['Python 3.8']

@VZ
Copy link
Mannequin Author

VZ mannequin commented Dec 23, 2019

These functions (e.g. PyThread_allocate_lock() etc) are not declared inside

#if !defined(Py_LIMITED_API)

in pythread.h, yet they're not exported from python3.lib.

IMHO, ideal would be to just provide these functions in the library, as they exist since basically always, but if the intention is to not make them part of the limited API, a guard around their declarations in the header should be added so that using them at least results in link-time errors instead of compile-time ones when using limited API.

@VZ VZ mannequin added 3.8 only security fixes topic-C-API type-feature A feature request or enhancement labels Dec 23, 2019
@encukou
Copy link
Member

encukou commented Jun 22, 2021

In Python 3.10, the functions:
PyThread_allocate_lock, PyThread_exit_thread, PyThread_free_lock, PyThread_get_stacksize, PyThread_get_thread_ident, PyThread_get_thread_native_id, PyThread_init_thread, PyThread_release_lock, PyThread_set_stacksize, PyThread_start_new_thread

are exported as part of the stable ABI. They were added in bpo-42545 and bpo-43795 (PEP-652).
Sorry for the delay.

@encukou encukou closed this as completed Jun 22, 2021
@encukou encukou closed this as completed Jun 22, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 only security fixes topic-C-API type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant