Closed cclauss closed 7 years ago
Bandwidth. We're happy to accept a pull request to add python 3 support.
Duplicate of https://github.com/openwhisk/openwhisk/issues/1184.
Closing as duplicate of above referenced issue.
Reopened because of https://github.com/openwhisk/openwhisk/pull/2094
@cclauss both python 2 and 3 are enable, any errors or pain using python 3?
What's the actionable item here?
@csantanapr it might be worth explaining and documenting why the python:default mode is python:2 not python:3 (as a result of @2094) - I suspect that's @cclauss' concern.
oh, yes If initial python support was done with python 3 instead of python 2, then having now default 3 would be fine.
But now we have users that written python 2 actions and have them in the system and using kind default, switching to python 3 as the default will cause them pain as there is high chance their code braking running on python 3 if they re-create/teardown-redeploy those actions.
So for now leaving python:2 as default and making clear in docs and other means to tell folks that now python 3 is available, that is recommended by the python community that python 3 is a better choice and that we are evaluating the option of making python 3 the default, so best practice and to protect your code be explicit which python you want when you create or update your action use python:2 and python:3 not default.
for posterity, let me add:
--kind python
continues to mean python:2
.
we added explicit kind options for python:2
and python:3
(via #1903).
note that we did not have python:default
until last week in master, so i don't think this is an issue (namely changing default to mean 2 vs 3).
instead, the real wrinkle is/was with respect to what kind does the CLI assume when creating python actions and no explicit kind is specified. in #1903, this was changed from python
(meaning python:2
) to python: default
.
I favored the more focused change of making that python:2
and leaving python:default
to mean python:3
. but this would have been inconsistent with stripping all kinds from the CLI and using only family:default
instead.
It will be useful to document the plan to change/bump the default from 2 to 3, and get it rolling.
Agreed. When Python 3 was released, the current version of Java was 6.0 and Swift and Node were not even released. Somehow OW defaults to Java 8 (~3 years old), Swift 3 (~6 months old), and Nodejs 6 (~6 months old) but does not default to a nine year old version of Python.
@csantanapr i'll re-open with the action item being: let's make python:default mean python:3. will you drive this? if not, can you enumerate the steps you'd like to see done so someone can drive it?
@rabbah I would like someone more verse in python than me to drive this.
What you think @rabbah can you drive this, anything else to add to the list?
@cclauss since you contributed the python 3 pr do you want to blog about it? If so we can mirror it on the openwhisk channel on medium.com.
As for python:default meaning 2 vs 3 I think this is a change we should just make. A brief discussion and quick vote on dev list should suffice. Because default for python didn't exist until a week ago.
I think we can then announce a date to change the inferred type from 2 to 3 - 1 month seems enough to me.
Yes. I will take that action.
Python 3 is more than 3,000 days old and more than 50% of the top 5,000 most used Python packages are Python 3 compatible, and Python 3.6 has great support of asyncio which is key to the Open Whisk approach.
100% of the packages in the Python execution environment have been ported to Python 3 with the exception of
enum34
andipaddress
which are built into the Python 3 standard library.