Skip to content
This repository

reincarnate -V cmdline option #926

Closed
wants to merge 1 commit into from

3 participants

Yaroslav Halchenko Min RK Fernando Perez
Yaroslav Halchenko

please allow at least to check for version consistently with previous versions.
Since -V is not used by anything else, please let it stay. You could spit out
deprecation warning meanwhile to discourage its use, but it remains the only way
to check which version of ipython is actually available from the cmdline (might
be useful to scripts/mode wrappers for editors etc)

Yaroslav Halchenko allow for consistent version checking with previous releases of ipython
please allow at least to check for version consistently with previous versions.
Since -V is not used by anything else, please let it stay.  You could spit out
deprecation warning meanwhile to discourage its use, but it remains the only way
to check which version of ipython is actually available from the cmdline (might
be useful to scripts/mode wrappers for editors etc)
ae2a211
Min RK
Owner

Entirely sensible. Of course, as with most python packages, the following always works:

python -c "import IPython; print IPython.__version__"

Which you would have to do if you want your test to allow for 0.11, which lacks this fix.

Yaroslav Halchenko

grhm -- I feel silly now -- I should have indeed just relied on that ... feel free to 'close' without adopting/merging ;)

Min RK
Owner

No worries, I think it's still valid and tiny change. No need to have excessive incompatibility, especially for methods specifically for checking compatibility.

Fernando Perez
Owner

+1, merge away (with rebase to avoid recursive merge for a single commit). @yarikoptic, note also that at the cmd line, --version should also work..

Min RK minrk closed this pull request from a commit October 24, 2011
Yaroslav Halchenko restore '-V' cmdline option for printing version
Preserves compatibility with pre-0.11 call, which was broken unnecessarily.

closes gh-926
df951f4
Min RK minrk closed this in df951f4 October 25, 2011
Brian E. Granger ellisonbg referenced this pull request from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 24, 2011
Yaroslav Halchenko allow for consistent version checking with previous releases of ipython
please allow at least to check for version consistently with previous versions.
Since -V is not used by anything else, please let it stay.  You could spit out
deprecation warning meanwhile to discourage its use, but it remains the only way
to check which version of ipython is actually available from the cmdline (might
be useful to scripts/mode wrappers for editors etc)
ae2a211
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  IPython/config/application.py
2  IPython/config/application.py
@@ -393,7 +393,7 @@ def parse_command_line(self, argv=None):
393 393
             self.print_examples()
394 394
             self.exit(0)
395 395
 
396  
-        if '--version' in argv:
  396
+        if '--version' in argv or '-V' in argv:
397 397
             self.print_version()
398 398
             self.exit(0)
399 399
         
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.