Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Oct 26, 2017

Copy link
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

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

The actual change looks good to me, but there's a now outdated comment that needs to be adjusted to match the new implementation (we know that the -X options will have been processed by the time Py_IsInitialized() returns true.

Python/import.c Outdated
Py_XDECREF(mod);

/* XOptions is initialized after first some imports.
* So we can't have negative cache.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment still true? The check for Py_IsInitialized() below means that there now is a negative cache for ximporttime == 0.

@warsaw
Copy link
Member

warsaw commented Nov 2, 2017

Please double check, but I think I've resolved the conflicts. I did not remove the comment that @ncoghlan pointed out, but I agree it should probably be removed.

Try to resolve conflicts correctly.
Resolving conflicts in GH web ui is hard!
@ncoghlan
Copy link
Contributor

ncoghlan commented Nov 3, 2017

If we don't fix the comment in this PR, I suspect the odds of fixing it later are pretty low :)

@warsaw
Copy link
Member

warsaw commented Nov 3, 2017

Agreed! I tried to keep my change narrowly focused on resolving the conflict. @serhiy-storchaka I'm happy to make this last change if you want, or you can do it since it's your branch :)

@serhiy-storchaka serhiy-storchaka merged commit 088929c into python:master Nov 7, 2017
@serhiy-storchaka serhiy-storchaka deleted the x-importtime-caching branch November 7, 2017 06:55
embray pushed a commit to embray/cpython that referenced this pull request Nov 9, 2017
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.

5 participants