Skip to content
This repository was archived by the owner on Dec 27, 2018. It is now read-only.

Python 3 Compatibility #8

Open
rpcope1 opened this issue Sep 2, 2015 · 3 comments
Open

Python 3 Compatibility #8

rpcope1 opened this issue Sep 2, 2015 · 3 comments

Comments

@rpcope1
Copy link
Owner

rpcope1 commented Sep 2, 2015

I have no idea if this works well (if at all) with Python 3, as I have only verified it against Python 2.6, 2.7. I (or someone else) should build and run this on a Python 3 instance, or make the changes necessary to ensure Python 3 future compatibility.

@ytjohn
Copy link

ytjohn commented Mar 5, 2016

I've started on this path, going to put a few notes here.

  1. setup.py needs a change to the author variable, as python3 won't be able to string format. Make it a single string instead of 2 cojoined strings.

__author__ = 'Robert Cope, Pushrod Technology'

  1. After that change, setup.py does build and install an egg. But importing it fails with not finding the api.

At this point, I'm a bit stumped. I'll look around though. I'm hoping to use this library with errbot.io which is python3 only.

>>> from PythonConfluenceAPI import ConfluenceAPI
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/hogenj/projects/PythonConfluenceAPI/PythonConfluenceAPI/__init__.py", line 3, in <module>
    from api import ConfluenceAPI, all_of
ImportError: No module named 'api'

@rpcope1
Copy link
Owner Author

rpcope1 commented Mar 5, 2016

I'll see if I can't figure it out. I've never checked Python 3
compatibility with this library, but I'd agree that's a rather important
thing to have, and I'd like to help you make use of it.

On Sat, Mar 5, 2016 at 10:26 AM, John Hogenmiller [email protected]
wrote:

I've started on this path, going to put a few notes here.

  1. setup.py needs a change to the author variable, as python3 won't
    be able to string format. Make it a single string instead of 2 cojoined
    strings.

author = 'Robert Cope, Pushrod Technology'

  1. After that change, setup.py does build and install an egg. But
    importing it fails with not finding the api.

At this point, I'm a bit stumped. I'll look around though. I'm hoping to
use this library with errbot.io which is python3 only.

from PythonConfluenceAPI import ConfluenceAPI
Traceback (most recent call last):
File "", line 1, in
File "/Users/hogenj/projects/PythonConfluenceAPI/PythonConfluenceAPI/init.py", line 3, in
from api import ConfluenceAPI, all_of
ImportError: No module named 'api'


Reply to this email directly or view it on GitHub
#8 (comment)
.

@ytjohn
Copy link

ytjohn commented Mar 5, 2016

PR generated. All minor changes. I added some future imports that weren't absolutely necessary, but will help us keep the code python3 compatible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants