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

discontinue Python 2.5 support #130

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

discontinue Python 2.5 support #130

GoogleCodeExporter opened this issue Apr 4, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

After discussion on the dev mailing list [1] and no objections on the user list 
[2] we will drop Python 2.5 support for the 0.8 release.

This mainly means to update the docs and setup.py and make developers aware 
that we can use Python 2.6+ constructs.

In particular, feel free to update the existing code, for instance

- use context managers, especially for file I/O:

    with open(FILENAME) as f:
         for line in f:
           ...

  instead of

    f = open(FILENAME)
    try:
      for line in f:
        ...
    finally:
        f.close()

- use the collections standard library module

- remove the 'from __future__ import ...' lines

- with a view towards Python 3: switch string interpolation from % operator

   "The number is %f" % (3.1415,) 

  to format

   "The number is {0}".format(3.1415)

I'm sure I forgot a number of things: feel free to comment on this issue. 

We can close the issue once the docs and setup.py have been updated. 

[1] https://groups.google.com/d/msg/mdnalysis-devel/Kd_m5_d816g/QDya8O2OVc8J
[2] 
https://groups.google.com/d/msg/mdnalysis-discussion/QrhUX9lQ7FE/Iy9wKWysuXIJ

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

@GoogleCodeExporter
Copy link
Author

Original comment by orbeckst on 17 Apr 2013 at 5:35

@GoogleCodeExporter
Copy link
Author

Original comment by orbeckst on 26 Apr 2013 at 4:39

  • Changed state: Accepted
  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

A very helpful guide is "Porting to Python 3 - The Book Site" 
http://python3porting.com/differences.html

All classes have to inherit from object, for example. 

Original comment by [email protected] on 11 May 2013 at 9:29

@GoogleCodeExporter
Copy link
Author

Porting the python is relatively easy: basically, I ran 2to3 and corrected a 
few errors that it created (mostly due to some "print" that it didn't handle 
well).
Right now, I am struggling with the C/Cython extensions. Because of some API 
changes between Python 2 and 3, I have to tweak the code so it can be compiled 
and run with Python versions from 2.6 to 3.3.
Good news is once it's done, it will fix both this issue and issue 132.

Séb

Original comment by [email protected] on 12 May 2013 at 6:16

@GoogleCodeExporter
Copy link
Author

Hi, Sébastien
I'm very interested in MDAnalysis porting to Python 3.
Have you had any success with this task?
Please, let me know if I could somehow help you with this.

Best

Original comment by [email protected] on 22 Jun 2013 at 10:15

@GoogleCodeExporter
Copy link
Author

Hi,
I've been really busy lately so I didn't have time to go on.
The main problem, allow C extension to compile/work seamlessly with Python 2.6 
to 3.3 is still there.
I am afraid I won't have enough time to investigate this issue until August.
If you have experience with Python C API, you surely may help!

Cheers,

Séb

Original comment by [email protected] on 26 Jun 2013 at 12:44

@GoogleCodeExporter
Copy link
Author

I declare Python 2.5 support to be officially discontinued.

See commit 1e05654b23e2395586072ca3986b43d87e7bede . For the 2two3 conversion 
please continue the discussion with Issue 132.


Original comment by orbeckst on 3 Aug 2013 at 2:14

  • Changed state: Fixed

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

1 participant