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

feasibility of porting to Python 3k #132

Closed
GoogleCodeExporter opened this issue Apr 4, 2015 · 8 comments
Closed

feasibility of porting to Python 3k #132

GoogleCodeExporter opened this issue Apr 4, 2015 · 8 comments
Assignees
Milestone

Comments

@GoogleCodeExporter
Copy link

At the moment, MDAnalysis will not run in Python 3.x.

With the move to only support Python 2.6+ (see Issue #130) it should become doable to find out how difficult it will be to make the library also run under Python 3.x.

For the foreseeable future, we will have to maintain a working library under 2.6+ but it would be useful to find out if any of the porting methods would work for us, e.g. maintaining a "conversion-ready" 2.x code base and then use the 2to3 tool to generate the 3.x code when needed.

If anyone wants to try this then let me know and I'll make you owner of this issue. We can maintain an experimental py3k branch in the repository.

-- Oliver

Original issue reported on code.google.com by orbeckst on 17 Apr 2013 at 5:35

@GoogleCodeExporter
Copy link
Author

I'll take this one

Original comment by [email protected] on 6 May 2013 at 8:02

@GoogleCodeExporter
Copy link
Author

Original comment by orbeckst on 6 May 2013 at 4:07

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 4 Feb 2015 at 12:08

  • Added labels: Milestone-Release1.0

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 5 Feb 2015 at 4:19

@GoogleCodeExporter
Copy link
Author

So apart from using print() and not using Swig, is there anything else that we 
need to keep in mind when writing new things so they're 2/3 compatible?

Original comment by richardjgowers on 6 Feb 2015 at 5:40

@GoogleCodeExporter
Copy link
Author

AFAIK Swig is python 3 compliant, so using it should be fine. I tend to prefer 
Cython because 1. the code if closer to Python, and 2. you just need one file 
where swig generates a few which is IMHO is cumbersome.
But basically using a couple of things from __future__ (print function, unicode 
litterals...) for Python and using Cython (good!) or Swig (not my cup of tea) 
for hardcore stuff should make things smooth for py3k.

Original comment by [email protected] on 6 Feb 2015 at 8:22

richardjgowers added a commit that referenced this issue Apr 9, 2015
Changed Universe._psf to Universe._topology

topology.base.TopologyReader now has keyword 'universe' which
gets saved as self._u.  This is then passed to Atoms on creation.

Atoms can now be passed their Universe as kwarg.

All '_things' renamed to 'things' in Universe._topology.

Renamed __is_guessed to _is_guessed in Bond (death to double
underscores)

Added absolute_import from future to all topology modules (Issues #132 #216)

Updated tests to reflect new names
@orbeckst orbeckst modified the milestone: 1.0 Apr 9, 2015
@orbeckst
Copy link
Member

See also #260.

@orbeckst
Copy link
Member

orbeckst commented Sep 6, 2015

The discussion around #260 (and in particular @kain88-de 's recent work) has established what needs to be done so I am closing this issue.

@orbeckst orbeckst closed this as completed Sep 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants