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

copy self.config in update_config #249

Merged
merged 2 commits into from
Jun 27, 2016
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented Jun 24, 2016

protects IPython's CLI priority, which accidentally relies upon self.config being replaced during load_config_files.

for backport to 4.2.2

closes #248

@minrk minrk added this to the 4.2.2 milestone Jun 24, 2016
@minrk minrk changed the title copy self.config in update_config [WIP] copy self.config in update_config Jun 24, 2016
@minrk minrk changed the title [WIP] copy self.config in update_config copy self.config in update_config Jun 24, 2016
protects IPython's CLI priority,
which accidentally relies upon self.config being replaced during load_config_files.

for backport to 4.2.2
@@ -187,6 +187,10 @@ def _config_changed(self, change):

def update_config(self, config):
"""Update config and load the new values"""
Copy link
Member

Choose a reason for hiding this comment

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

Given these specific semantics (deepcopy first before update), I think it would be a good idea to extend a little bit the docstring with a note that indicates that's what happens, so it becomes clearly official that such semantics are the intended ones.

@fperez
Copy link
Member

fperez commented Jun 25, 2016

Other than my small and easy to address comments, +1 for merging.

@minrk
Copy link
Member Author

minrk commented Jun 27, 2016

Comment updated, let me know if I can do anything else to make the situation clearer.

it shouldn't be required, but we are doing it for backward-compatibility
@fperez
Copy link
Member

fperez commented Jun 27, 2016

Much better, thanks! I think that's clear enough, let's move forward.

@fperez fperez merged commit 74eef4d into ipython:master Jun 27, 2016
@minrk minrk deleted the cli-priority branch June 29, 2016 08:47
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.

Command line flag do not take precedence over config.
2 participants