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

py3k support #81

Closed
wants to merge 9 commits into from
Closed

py3k support #81

wants to merge 9 commits into from

Conversation

jschueller
Copy link
Contributor

No description provided.

@@ -39,7 +39,7 @@ def _get_synapse_by_name(self, synapse_name):
"""
all_synapse = self.brain.brain_yaml
for el in all_synapse:
print el
print(el)
Copy link
Member

Choose a reason for hiding this comment

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

We use python 2 only. Parentheses are not necessary.

Copy link
Member

Choose a reason for hiding this comment

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

And also this print should not be here, it a debug print that should has been pushed into the logger.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm just allowing the code to not emit syntax errors here

Copy link
Member

Choose a reason for hiding this comment

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

In python 2 it's not a syntax error. My IDE doesn't alert me about any error anyway. Did you configure you IDE to use python 2.7 interpreter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The python3 interpreter does not allow this old syntax, this one is compatible with both python2 and python3.

@Sispheor
Copy link
Member

Thank you but we don't support python 3 and it is not in our scope so far.

@jschueller
Copy link
Contributor Author

this makes the code compatible with py3k (and still works on python2 of course)
imho it doesn't hurt to have these merged

@Sispheor
Copy link
Member

Yes, but only for this part it doesn't make sense. If we have to do it, we must do it for the whole code.

@jschueller
Copy link
Contributor Author

Which part did I miss ?

@Sispheor
Copy link
Member

I haven't check yet if there is another part that need to be converted.
And i'am not sure if all libs we are using are available in python 3.

@jschueller
Copy link
Contributor Author

I thinks it's all ok for the syntax fixes.

All packages are available for python3 except pygmail and jinja.
I'm investigating if it's possible to use jinja2, also there's a PR for pygmail for py3k support.

@Sispheor
Copy link
Member

An issue just fall about a problem with a lib on python 3...

@jschueller
Copy link
Contributor Author

jschueller commented Nov 20, 2016

Turns out it was jinja2 imported and not jinja, I updated the modules in setup.py accordingly (updated as well ipadress & ansible).
I can now import kalliope in python3! (Python2 install still works)

@jschueller jschueller changed the title Some fixes for py3k py3k support Nov 20, 2016
@Sispheor
Copy link
Member

I will test this on Python 3 soon . We need to check that everything is
still working.
Also, the main target of this PR is the installation review. I don't know
if we have to focus on this here.

Le 20 nov. 2016 10:41 PM, "Julien Schueller" notifications@github.com a
écrit :

Turns out it was jinja2 and not jinja1, all ok, I updated the modules in
setup.py.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#81 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACdEXXeNuL9EsJ5i0hsGQs-C6lAjVRw_ks5rAL6IgaJpZM4K3o8z
.

@jschueller
Copy link
Contributor Author

It was much easier for me to test in this branch, this change is very useful.
My changes should apply to master too, I can rebase to master if the branch gets merged (soon I hope).

'ansible==2.1.1.0',
'python2-pythondialog==3.4.0',
'jinja==1.2',
'ansible==2.2.0.0',
Copy link
Member

Choose a reason for hiding this comment

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

Not tested yet, and there is a lot of broken modules in this version. I follow the Ansible repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can revert this one and propose it once all is merged and you have a ci running.

@Sispheor
Copy link
Member

Currently, the entry point is broken, I have to fix this and then test everything is still working before merging.

Also, there is 2 other PR about neurons improvement which there will be merged before. This branch will to merge those changes.

Last thing, the pygmail lib is not python 3 ready. Did you try it?

@jschueller
Copy link
Contributor Author

I applied this patch against master: charlierguo/gmail#48 and at least the import is ok.

@Sispheor
Copy link
Member

Humm, ok. And so what is your proposition about that matter? To keep a version of this lib in our project? To propose a doc of how to patch the lib?
Because this patch is not present in the current release available from pip. And as I can see the PR is dated from 2014, we'll maybe never see it merged.

@jschueller
Copy link
Contributor Author

Yes, I guess the project is dead, but the first thing to do is email the author, maybe he'll give you the access to his repo. I'm clearly against including the lib into kalliope ; we may have to fork (there's a lot of work to review PRs, fix issues, and upload to pypi!).

@Sispheor
Copy link
Member

Ok, we'll see. As I said, Supporting Python 3 is totally out of our scope right now. This interpreter is only native in Fedora 23. And we already have a lot of thing to do on Kalliope.

@jschueller
Copy link
Contributor Author

I understand, at least it should be a link to the patch.

@LaMonF
Copy link
Member

LaMonF commented Nov 21, 2016

Hi,

Yes as @Sispheor just mentionned, Python 3 is not in the scope now. It will imply much reviews and lib checking (like Gmail).
Moreover Python 3 does not come as native in most of the Linux based OS.

Plus, I think we need to make an other branch to manage this improvement in the future. We can not interact with the feature on the "review_install" branch.

@jschueller
Copy link
Contributor Author

It doesn't hurt to have this preliminary work merged though ; this doesn't imply for kalliope to advertise for python3 support.
I'll rebase to master when the review_install branch is merged to master (hopefully soon!).

@Sispheor
Copy link
Member

It will not be merged soon. See #75

@jschueller jschueller closed this Nov 21, 2016
@Sispheor Sispheor mentioned this pull request Mar 29, 2017
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.

None yet

4 participants