r/Python • • Jan 16 '19

#10YearChallenge

Post image
1.4k Upvotes

96 comments sorted by

View all comments

Show parent comments

3

u/james_pic Jan 17 '19

I don't disagree with you, but clients gonna want what clients gonna want. They're currently looking very hard at what plan B looks like.

I'd also say that "new code should be written compatible with 3" sounds like a solution in theory. We tried it. But when we had a spike when we converted one of the smaller services completely to Python 3, we found that a lot of the "Python 3 compatible" code didn't actually work in Python 3 as its authors intended. If code isn't actually running in Python 3, it's probably not Python 3 compatible.

2

u/ForgottenWatchtower Jan 17 '19

Almost like you should be writing your tests for both 2.7 and 3

3

u/strange-humor Jan 17 '19

And running them on a CI system that uses both.

1

u/james_pic Jan 17 '19

Tox is great for this