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

[Discussion]: Moving to python 3.5 #215

Open
mike820324 opened this issue Nov 3, 2016 · 4 comments
Open

[Discussion]: Moving to python 3.5 #215

mike820324 opened this issue Nov 3, 2016 · 4 comments
Labels

Comments

@mike820324
Copy link
Owner

It's an open discussion since I personally does not have any clue yet.

Python 3 has been more mature, and most linux distribution has python 3 available. I think we can consider start to support python 3.5. There are some advantages that we changed into python 3.5 or above.

Pros:

Here are some advantages that I think we can have when moving to python 3.

Python 2.7 end of life:

python 2.7 will be end of line after 3 years.
https://pythonclock.org/

More io loop implementation choices:

Since python 3.4, the asyncio module has become the builtin modules and python 3.5 also introduce the async/await syntax. If we move to python 3.5 and above, there would be more choices of event loop implementations.

  • asyncio + uvloop
  • curio

Some backport module no longer necessary:

Some of the modules that we depend on are already the builtin module in python 3.5. As a result, we can remove some redundant dependencies.

Type hint support:

Python 3.5 introduce the type hint (https://www.python.org/dev/peps/pep-0484/) and in Python 3.6 variable annotation will be introduced (https://www.python.org/dev/peps/pep-0526/). We can utilize this part and make our code more readable and maintainable.

Currently, mypy can help checking the type hint part.

Cons:

Moving to python 3.x support may also introduce some advantages,

Possible regression:

May have regressions especially the bytes, string and unicode part. Luckily, due to @chhsiao90 great work on unittest, I think these kind of regression can be easily found and fixed.

Code migration:

There will be huge amount of code modification in order to compatible with python 3.

As mentioned in the very begining of the title, I still have no clue whether or not to move to python 3. :)

@chhsiao90
Copy link
Collaborator

The first question is what we want to support

  • only 2.7
  • 2.7 and 3.X
  • only 3.X

My idea is that we could release a stable version that support 2.7 and 3.X
After that, drop 2.7 support!

@mike820324
Copy link
Owner Author

I totally agree with you.

The first public release would probably 0.5.0.
And after 0.5.0, we will drop 2.7 support.

@mike820324
Copy link
Owner Author

I'll create a github project to trackdown these python 3.x issues.

@mike820324
Copy link
Owner Author

Adding a project card to track down python 3.x related issue.
https://github.com/mike820324/microProxy/projects/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants