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

Drop py2 on the 1st of December 2016 #605

Closed
drvinceknight opened this issue May 31, 2016 · 12 comments
Closed

Drop py2 on the 1st of December 2016 #605

drvinceknight opened this issue May 31, 2016 · 12 comments

Comments

@drvinceknight
Copy link
Member

On a few issues now the discussion around dropping support for python 2 has come up (for example #457), I thought it would be good to consider that as an issue in it's own right and figure out a timeline for it.

Note that I'd also like to include our view point/plan here: http://python3statement.github.io/

My feeling, from the conversations so far is that I'm the main person that is nervous about leaving py2 behind. This is probably more nervousness than rational thought. I am actually only this summer converting my first year python course to py3, perhaps that's why it's a bit of a hurdle in my mind 😕 .

My thoughts are the following:

  1. There are obviously only positives to gain from moving to py3 only (various modules could be simplified).
  2. The library has always made sure to have a very low barrier to entry, I am nervous that py3 could become a constraint.

Less and less I feel that that second point is valid. Indeed, it's probably more responsible at this point to encourage newcomers to the language to go to py3. Also, the library has evolved from a small github project/game to a mature research tool.

I wouldn't want us to just drop it from one day to the next (again: perhaps just my cautiousness being a pain for everyone). Perhaps something like announcing we'll be dropping py2 support on the 1st of September?

What does everyone else think? :)

@meatballs
Copy link
Member

If your first year course will be Python3 next year, then the start of the next academic year sounds like a good time to drop Python2 support.

@marcharper
Copy link
Member

That's fine with me. I didn't realize that you had an explicit need for Py2 compatibility.

@drvinceknight
Copy link
Member Author

So... is that the plan then? py2 till the first of September?

(I don't actually teach with the library on that course, yet! but I've used it with individual students to talk about stuff and get them involved :))

@langner
Copy link
Member

langner commented May 31, 2016

Why is it continuing Python 2 support problematic? I'm probably missing
something...
On May 31, 2016 07:20, "Vince Knight" [email protected] wrote:

So... is that the plan then? py2 till the first of September?

(I don't actually teach with the library on that course, yet! but I've
used it with individual students to talk about stuff and get them involved
:))


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#605 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAtZEj2xeXJyLHB-jP69AJtsAy5VXmEjks5qHEOigaJpZM4IqQWH
.

@drvinceknight
Copy link
Member Author

Why is it continuing Python 2 support problematic? I'm probably missing
something...

I asked the same question a while back but I'm beginning to see the point (I think):

  • Various minor things that would be easier if we did not have to worry about py2 (for example caching and type hints)
  • A general community consensus that it's the future of the language. This website is a list of a variety of scientific packages and a declaration of when they will be leaving py2: http://python3statement.github.io/

I'm sure there's a nicer/more succinct way of putting that.

A small anecdote: I've been watching the videos from PyConUS and the biggest cheer from a crowd I've heard so far was when the pijion project said they were only supporting py3 from the outset... Not terribly important or relevant as an anecdote and not at all suggesting we're doing this because it's the cool thing to do but made me smile when I watched that talk...

@marcharper
Copy link
Member

marcharper commented Jun 1, 2016

My reasons for dropping Python 2:

  • It's been 7.5 years since Python 3 was released. 7.5 years!
  • We have no Python 2 only dependencies
  • Python 3 is a better and more consistent language in many ways, and has some useful features, as well as improvements that are not being backported, and more standard libraries
  • Some Python 2/3 compatibility issues are getting to be cumbersome (such as iterators and dictionary views). I don't like the extra cognitive overhead. Look at what we had to do to get our tests working, literally rewrite parts of the random module -- gross.
  • try-except imports, next versus __next__ versus .next(), from __future__ import print_function, division, absolute_import, range is a generator, etc.

@langner
Copy link
Member

langner commented Jun 3, 2016

Yeah, those are all valid reasons. My only counterargument is that print
looks much better as a statement :)

On Tue, May 31, 2016 at 10:13 PM, Marc Harper [email protected]
wrote:

My reasons for dropping Python 2:

  • It's been 7.5 years since Python 3 was released. 7.5 years!
  • We have no Python 2 only dependencies
  • Python 3 is a better and more consistent language in many ways, and
    has some useful features, as well as improvements that are not being
    backported, and more standard libraries
  • Some Python 2/3 compatibility issues are getting to be cumbersome
    (such as iterators and dictionary views). I don't like the extra cognitive
    overhead. Look at what we had to do to get our tests working, literally
    rewrite parts of the random module -- gross.
  • try-except imports, next versus next versus .next(),from future
    import print_function, division, absolute_import,range` is a
    generator, etc.


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

@drvinceknight
Copy link
Member Author

Can I suggest we announce and drop support for py2 on the first of December (a Christmas present for @marcharper :))?

My only reservation about doing it beforehand is that our paper just got published and it mentions support for py2. :)

@drvinceknight
Copy link
Member Author

I have opened python3statement/python3statement.github.io#50 which will add us to: https://python3statement.github.io/

Once that's merged in I suggest we 'announce' dropping py3. Perhaps add it to the readme?

@drvinceknight
Copy link
Member Author

It's official now: https://twitter.com/axelrodpython/status/781089843749199872

I'm going to change the name of this issue also.

@drvinceknight drvinceknight changed the title Dropping python 2 discussion Drop py2 on the 1st of December Sep 28, 2016
@drvinceknight drvinceknight changed the title Drop py2 on the 1st of December Drop py2 on the 1st of December 2016 Sep 28, 2016
@souravsingh
Copy link
Contributor

@drvinceknight I can work on porting Axelrod to Python 3

@drvinceknight
Copy link
Member Author

@drvinceknight I can work on porting Axelrod to Python 3

Thanks for the offer @souravsingh. Axelrod already runs on py3, this issue is mainly dropping support for py2. Which will allow us to clean up various things and generally simplify development.

Once the 1st of December comes along we will basically drop py2 from our CI runs. There are then various things that will be cleaned up (for example we currently force float division in various places and also have to be careful with the random module). Dropping py2 will make our lives easier.

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

5 participants