ivanov / bipython

The indiscriminate bicurious interactive python interpreter (bpython + ipython)
BSD 3-Clause "New" or "Revised" License
99 stars 15 forks source link

Python 3 compatible? #7

Closed kseistrup closed 10 years ago

kseistrup commented 10 years ago

bipython installs fine on Python 3.3 here, however:

$ bipython
Traceback (most recent call last):
  File "/usr/local/bin/bipython", line 9, in <module>
    load_entry_point('bipython==0.1.2', 'console_scripts', 'bipython')()
  File "/usr/local/lib/python3.3/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.3/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.3/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python3.3/dist-packages/bipython/__init__.py", line 161
    print sys.exc_info()
            ^
SyntaxError: invalid syntax

Is bipython meant to be Python 3 compatible?

derekleverenz commented 10 years ago

I think I can figure this out today, at least to get syntax compatibility. Most of that stuff is low hanging fruit, and six can help.

kseistrup commented 10 years ago

The https://github.com/PythonCharmers/python-future module is great for 2/3 compatibility.

derekleverenz commented 10 years ago

Thanks, that looks useful. I think for this just using six is enough. I've gotten it to be syntactically valid, and fixed some encoding issues, but there's some other bugs I want to look into before it's stable. Plus I need to make sure it still works in python 2. I'll push up what I have an open a PR tomorrow if all goes well

ivanov commented 10 years ago

Thanks for the report. I just pushed some commits that make it work on python3. Let me know of anything else that needs attention, and sorry I beat you to the punch @coaxmetal - python-modernize makes it pretty trivial to do the conversion.

derekleverenz commented 10 years ago

oh nice, I hadn't heard of that

ryneeverett commented 9 years ago

It would be nice if 0.1.3 were bumped to stable on pipy since python3 compatibility still isn't shipping by default.

ivanov commented 9 years ago

oops, good idea @ryneeverett, thanks, I'll do that today