Skip to content

bpo-1635741: Port _random to the multi-phase init #23381

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
wants to merge 1 commit into from
Closed

bpo-1635741: Port _random to the multi-phase init #23381

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 18, 2020

Port the _random extension module to the multi-phase initialization
API (PEP 489).

  • Create Random_Type using PyType_FromModuleAndSpec().
  • Add get_random_state_from_type() function. It replaces the removed
    _randomstate_global macro.

https://bugs.python.org/issue1635741

Port the _random extension module to the multi-phase initialization
API (PEP 489).

* Create Random_Type using PyType_FromModuleAndSpec().
* Add get_random_state_from_type() function. It replaces the removed
  _randomstate_global macro.
@vstinner
Copy link
Member Author

@corona10 @shihai1991: Would you mind to review my PR? Especially the new get_random_state_from_type() function.

@tiran
Copy link
Member

tiran commented Nov 18, 2020

This PR is a duplicate of #23359

@vstinner
Copy link
Member Author

This PR is a duplicate of #23359

Oh, I missed your PR. I abandon mine and approved yours.

@vstinner vstinner closed this Nov 19, 2020
@vstinner vstinner deleted the random_multiphase branch November 19, 2020 07:44
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.

4 participants