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

bpo-1635741: Port time module to multiphase initialization (PEP 489) #19107

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

phsilva
Copy link
Contributor

@phsilva phsilva commented Mar 22, 2020

PyMODINIT_FUNC
PyInit_time(void)
static int
time_exec(PyObject *m)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use mod or module would be more exact than m ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, please this PR as an opportunity to replace m with module ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an impractical idea: Making an review robot to give some suggestions of normative problem automatically ;)

@shihai1991
Copy link
Member

cc @vstinner @corona10

ps: I don't know what happend with the gate of macOS(Looks like it have been broken several days.)

@corona10
Copy link
Member

@shihai1991
This is the known issue :)
https://bugs.python.org/issue40014

@shihai1991
Copy link
Member

@shihai1991
This is the known issue :)
https://bugs.python.org/issue40014

copy that, thanks ;0


error:
Py_DECREF(m);
return NULL;
Py_DECREF(module);
Copy link
Member

@vstinner vstinner Mar 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DECREF here is wrong. Replace "goto error" with "return -1" and remove the error label.

cc @corona10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started not wanting to refactor code but looks like a good chance for more cleaning. Thanks, already changed on latest push.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this time it LGTM. Thanks ;-)

@vstinner vstinner merged commit bd409bb into python:master Mar 23, 2020
@phsilva phsilva deleted the bpo-1635741 branch March 24, 2020 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants