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

Support Python 3 #161

Closed
2 tasks done
denisalevi opened this issue Sep 16, 2018 · 9 comments
Closed
2 tasks done

Support Python 3 #161

denisalevi opened this issue Sep 16, 2018 · 9 comments

Comments

@denisalevi
Copy link
Member

denisalevi commented Sep 16, 2018

TODOs that come to mind right now:

  • Turn implicit to explicit imports
  • from __future__ import division, print_function, absolte_import and replace integer division in code with '//'
@denisalevi
Copy link
Member Author

@moritzaugustin @mstimberg Thinking to release brian2CUDA without Python2 support. What do you think? I suppose many people will stick with deprecated Python2 for a while. Could leave the transition to Python3 to just before the release and have one Python2 compatible version (with the current brian2 release which is the last supporting Python2), but then there would be certainly bugs to be fixed for the Python2 version. So I think I would prefer cleaning up the code now and transitioning to Python3 for good. Comments?

@thesamovar
Copy link
Member

The last release of brian2 (2.3) will be the last with Python 2 support, and indeed we've just removed all Python 2 support from master, so I think it makes sense to only support Python 3.

@mstimberg
Copy link
Member

Yep, I agree that going Python 3-only (>=3.6) makes a lot of sense for Brian2CUDA.

@denisalevi
Copy link
Member Author

Great, will do so. Thanks for the comments. And @mstimberg why Python >= 3.6? Why not e.g. >= 3.5? (just out of curiosity)

@mstimberg
Copy link
Member

And @mstimberg why Python >= 3.6? Why not e.g. >= 3.5? (just out of curiosity)

We'll only support versions >=3.6 with the next release of Brian, mostly because 3.6 offers a number of features that we want to use (f-strings, for example), but also simply because 3.5 will reach its end-of-life in September this year.

@denisalevi
Copy link
Member Author

Brian2 PR that removes Python 2 support: brian-team/brian2#1147

@denisalevi
Copy link
Member Author

And previous brian2 PR which uses Python 3 comaptible Python 2 code: brian-team/brian2#1073

@denisalevi
Copy link
Member Author

And here is another PR, adding Python 3.8 compatibility: brian-team/brian2#1132

@denisalevi
Copy link
Member Author

Implemented in PR #236. Closing.

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

No branches or pull requests

3 participants