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

The library is not thread safe #6256

Closed
socketpair opened this issue Sep 2, 2021 · 1 comment · Fixed by #6272
Closed

The library is not thread safe #6256

socketpair opened this issue Sep 2, 2021 · 1 comment · Fixed by #6272

Comments

@socketpair
Copy link
Contributor

socketpair commented Sep 2, 2021

ObjectIdentifier::_name uses lazy import, which is not thread-safe.

Exactly the same issue: kjd/idna#106

I think, could be solved by using Threading.lock...or, better, reorganize code to eliminate circular imports.

Also, it would be nice to make the property public, i.e. remove underscore from beginning.

@reaperhulk
Copy link
Member

We don't intend to make this property public as we don't want to commit to the names as public surface. That said, moving _OID_NAMES into _oid.py will resolve the lazy import and should simplify the code anyway. If you want to submit a PR for that I'd be happy to review.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants