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

use simple replacement rather than string formatting in format_kernel_cmd #4336

Merged
merged 1 commit into from Oct 3, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Oct 2, 2013

closes #4334

candidate for backport

pat = re.compile(r'\{([A-Za-z0-9_]+)\}')
def from_ns(match):
"""Get the key out of ns if it's there, otherwise no change."""
key = match.groups()[0]
Copy link
Member

Choose a reason for hiding this comment

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

match.group(1) is marginally neater.

@takluyver
Copy link
Member

Overall design looks fine, just a couple of nitpicks on details.

@minrk
Copy link
Member Author

minrk commented Oct 2, 2013

Thanks, that's cleaner.

@Carreau
Copy link
Member

Carreau commented Oct 3, 2013

Good, merging.

Carreau added a commit that referenced this pull request Oct 3, 2013
use simple replacement rather than string formatting in format_kernel_cmd

closes #4334
@Carreau Carreau merged commit 6ef833d into ipython:master Oct 3, 2013
@Carreau
Copy link
Member

Carreau commented Oct 3, 2013

Hum... apparently my proxy prevent me to use the backport-pr script ...

So not backported yet. Will try to do it by hand.

@Carreau
Copy link
Member

Carreau commented Oct 3, 2013

Can one of you backport for me ? Even manually I apparently cannot push on ipython/ipython from where I am now.

remote: Anonymous access to ipython/ipython.git denied.
fatal: Authentication failed for 'https://github.com/ipython/ipython.git/'

Carreau added a commit that referenced this pull request Oct 6, 2013
@Carreau
Copy link
Member

Carreau commented Oct 6, 2013

Ok, I acchieved to push on 1.x branch, but had to go through ssh. Hate that because then it does not ask me my password cause of keychain.

@minrk minrk deleted the kernel_cmd_format branch March 31, 2014 23:36
yarikoptic added a commit to yarikoptic/ipython that referenced this pull request May 2, 2014
* commit 'rel-1.1.0-7-gf5891e9':
  Backport PR ipython#4346: getpass() on Windows & Python 2 needs bytes prompt
  Backport PR ipython#4336: use simple replacement rather than string formatting in format_kernel_cmd
  Backport PR ipython#4316: underscore missing on notebook_p4
  Backport PR ipython#4257: fix unicode argv parsing
yarikoptic added a commit to yarikoptic/ipython that referenced this pull request May 2, 2014
* commit 'rel-1.1.0-7-gf5891e9': (70 commits)
  Backport PR ipython#4346: getpass() on Windows & Python 2 needs bytes prompt
  Backport PR ipython#4336: use simple replacement rather than string formatting in format_kernel_cmd
  Backport PR ipython#4316: underscore missing on notebook_p4
  Backport PR ipython#4257: fix unicode argv parsing
  Backport PR ipython#4209: Magic doc fixes
  Backport PR ipython#4204: remove some extraneous print statements from IPython.parallel
  back to dev
  release 1.1.0
  don't upload to GitHub in release script
  1.1 backport stats
  Backport PR ipython#4188: Allow user_ns trait to be None
  Backport PR ipython#4189: always fire LOCAL_IPS.extend(PUBLIC_IPS)
  Backport PR ipython#4174: various issues in markdown and rst templates
  Backport PR ipython#4181: nbconvert: Fix, sphinx template not removing new lines from headers
  Backport PR ipython#4043: don't 'restore_bytes' in from_JSON
  Backport PR ipython#4178: add missing data_javascript
  Backport PR ipython#4136: catch javascript errors in any output
  Backport PR ipython#4163: Fix for incorrect default encoding on Windows.
  Backport PR ipython#4171: add nbconvert config file when creating profiles
  Backport PR ipython#4159: don't split `.cell` and `div.cell` CSS
  ...
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
use simple replacement rather than string formatting in format_kernel_cmd

closes ipython#4334
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.

NotebookApp.webapp_settings static_url_prefix causes crash
3 participants