Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Python3 setup.py install failiure #848

Merged
merged 2 commits into from

3 participants

@jenshnielsen

I have problems running python3 setup.py build on the latest git head using ubuntu 11.10.

2to3 fails with errors like:
Can't parse docstring in build/lib/IPython/core/usage.py line 195: ParseError: bad input: type=1, value='arg1', context=(' ', (195, 12))

This happens because of to different issues:
In IPython/parallel/client/view.py there is an unbalanced (

In IPython/core/usage.py the automagic docstrings are not valid python code (Thats the point I guess)
To fix this I changed the prompts from regular python prompts to ipython ones. But I guess the right fix should be to have 2to3 skip the parsing on these strings.

@takluyver
Owner

Odd, I'm building it semi regularly with Ubuntu 11.10, and I haven't had any problems.

@takluyver
Owner

OK, apparently it works differently outside a virtualenv for some reason. Not sure why, maybe it's a different version of distribute.

Anyway, these changes looks sensible. Thanks.

@fperez
Owner

I don't see a problem here, but @takluyver is our resident py3 expert, so I'd like to leave the final call on this one up to him. But as far as I can tell, it's good to go, thanks! (though as a note, I did test python3 setup.py build on ubuntu 11.10 just now, and didn't see any errors; but further cleanups won't hurt in any case).

@takluyver takluyver merged commit 52688c2 into ipython:master
@takluyver
Owner

Merged - thanks, Jens.

@fperez: It seems it works in a virtualenv, but not outside (at least for me). Maybe different versions of distribute are getting imported. Anyway, the changes make sense and don't break the test suite.

@fperez
Owner

Weird: I wasn't running in a virtualenv, just running 'in plain sight' :) But in any case, I agree with you; I just wanted your OK on it given the py3 focus. Thanks!

@ellisonbg ellisonbg referenced this pull request from a commit
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
Commits on Oct 9, 2011
  1. @jenshnielsen

    remove leftover (

    jenshnielsen authored
  2. @jenshnielsen
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 9 deletions.
  1. +8 −8 IPython/core/usage.py
  2. +1 −1  IPython/parallel/client/view.py
View
16 IPython/core/usage.py
@@ -192,15 +192,15 @@
1. Auto-parentheses
Callable objects (i.e. functions, methods, etc) can be invoked like
this (notice the commas between the arguments):
- >>> callable_ob arg1, arg2, arg3
+ In [1]: callable_ob arg1, arg2, arg3
and the input will be translated to this:
- --> callable_ob(arg1, arg2, arg3)
+ ------> callable_ob(arg1, arg2, arg3)
You can force auto-parentheses by using '/' as the first character
of a line. For example:
- >>> /globals # becomes 'globals()'
+ In [1]: /globals # becomes 'globals()'
Note that the '/' MUST be the first character on the line! This
won't work:
- >>> print /globals # syntax error
+ In [2]: print /globals # syntax error
In most cases the automatic algorithm should work, so you should
rarely need to explicitly invoke /. One notable exception is if you
@@ -220,16 +220,16 @@
2. Auto-Quoting
You can force auto-quoting of a function's arguments by using ',' as
the first character of a line. For example:
- >>> ,my_function /home/me # becomes my_function("/home/me")
+ In [1]: ,my_function /home/me # becomes my_function("/home/me")
If you use ';' instead, the whole argument is quoted as a single
string (while ',' splits on whitespace):
- >>> ,my_function a b c # becomes my_function("a","b","c")
- >>> ;my_function a b c # becomes my_function("a b c")
+ In [2]: ,my_function a b c # becomes my_function("a","b","c")
+ In [3]: ;my_function a b c # becomes my_function("a b c")
Note that the ',' MUST be the first character on the line! This
won't work:
- >>> x = ,my_function /home/me # syntax error
+ In [4]: x = ,my_function /home/me # syntax error
"""
interactive_usage_min = """\
View
2  IPython/parallel/client/view.py
@@ -786,7 +786,7 @@ class LoadBalancedView(View):
or targets can be specified, to restrict the potential destinations:
- >>> v = client.client.load_balanced_view(([1,3])
+ >>> v = client.client.load_balanced_view([1,3])
which would restrict loadbalancing to between engines 1 and 3.
Something went wrong with that request. Please try again.