-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[AIRFLOW-2973] Add Python 3.6 to Supported Prog Langs #3815
Conversation
Is it worth adding/changing Py 3.5 to Py 3.6 in Travis? (I don't think we want to have both py 3.5 and py 3.6 tests as not that much has changed and we don't want more runtime) but...? |
Agree with @ashb |
Codecov Report
@@ Coverage Diff @@
## master #3815 +/- ##
==========================================
+ Coverage 76.67% 77.34% +0.66%
==========================================
Files 199 203 +4
Lines 16186 15817 -369
==========================================
- Hits 12410 12233 -177
+ Misses 3776 3584 -192
Continue to review full report at Codecov.
|
@bolkedebruin @ashb Do you guys suggest to add Python 3.4 and Python 3.6 both to Travis? As currently just have py27 and py35 on Travis. |
This would give too much load on Travis. Apache infra paying for cpu hours. |
@Fokko Agree with that, so do you like to keep it as it is or changing py3.5 to py3.6 and keep py2.7 and py3.6 ? |
2.7 and 3.6 (and maybe 3.7 instead) |
@kaxil @Fokko I also put together a quick complementary PR #3816 adding / upgrading to 3.6 in all of the places. CI is still running so I may expect some test failures but hopefully nothing major. I would be happy to merge this into Kaxil's current PR or as a follow-on PR. Personally I would prefer Travis to run against 3.6 over 3.5. It's been out for a while now, and AFAIK we don't have a compelling reason to prefer 3.5 today. That said it would be nice if we could have some sort of nightly-ish build to run on all supported subversions for a very thorough test. |
@tedmiston I have merged the changes to this PR but as a follow-up to this PR, I suppose it would be great if you can test Python 3.7 and as Bolke mentioned, we can then replace 3.6 with 3.7 :) |
d80dd4c
to
959557d
Compare
The way CI works now with Docker, we will have to change bits on our Docker CI Image as well. I have pinged @gerardo on the Dockerised PR to help the case where we would have to run tests for multiple python versions. I am hence just keeping the scope of this PR to add 3.6 to setup.py, or we can close this PR entirely and have first sort out our CI pipeline and can add these changes over there? |
@gerardo This does not make sense to me. Why are we installing both 2 and 3 in the ci image? https://github.com/apache/incubator-airflow-ci/blob/master/Dockerfile Ideally we would have a Python 2 and Python 3 image, but this can become complicated quickly. |
@Fokko The only reason 2 versions are being installed is that I wanted to follow the CI process as close as it was before merging the docker-ci changes. At the time, the tox target and the python version to be used were being matched (run a python3 tox target and run tox under python3), although I never understood the reason. We only use the system python to install tox. I only remember coming across a single issue with a |
@gerado I already tried changing that, it says python3.6 interpreter not found. Here is the link to the Travis job: https://travis-ci.org/apache/incubator-airflow/builds/421714589 |
@kaxil mmm, it seems it needs to be installed in the system to be used: https://tox.readthedocs.io/en/latest/example/general.html#basepython-defaults-overriding And it seems the only python3 version available in Ubuntu Xenial is 3.5.1: https://packages.ubuntu.com/search?keywords=python3-dev&searchon=names&suite=xenial§ion=all It might be a matter of having a separate image (like @Fokko suggested) using a more recent Ubuntu ( |
Would you be able to do that if you have got time? |
@kaxil sure! I have time this week to work on this. |
@gerardo On the |
@kaxil Sure. Btw, I've started a 3.7 test branch currently living here - https://github.com/astronomerio/incubator-airflow/tree/python-3.7-experimental. It looks like the merge of #3816 into here yesterday was reverted. It sounds like this PR may be on hold until the Docker image is reworked to support multiple subversions of Python 3. Is that correct? @gerardo Can you tag me in that PR ^ when you're done? I'd like to make a similar change in my follow up PR to support Python 3.7 (perhaps with an optional flag for now so we don't burn Apache Infra CI time). |
That's awesome @gerardo . Looking forward for it. @tedmiston Great. Would love to see Py3.7 PR, I think #3816 can be converted to be a 3.7 Upgrade PR. So once 3.6 is fixed, you can probably overwrite it with 3.7. |
BTW, I hugely underestimated the amount of free time I had available 😂 Here's the PR that creates separate images for python2 and python3: apache/airflow-ci#4 @tedmiston Regarding python3.7, it's still not available to any Ubuntu version, not even through a PPA. Even cosmic cuttlefish, which hasn't been released yet, supports only 3.6. |
@gerardo When updating the CI, we run into problems since we need a to point the Python3 tests to the Python 3 image: https://travis-ci.org/Fokko/incubator-airflow I think we need to get rid of the I think updating to Python 3.7 doesn't make sense since a lot of companies are still on 3.6 (or even lower :-) |
@Fokko @kaxil @tedmiston
|
Give me some time to look into this. |
@@ -398,6 +398,7 @@ def do_setup(): | |||
'Programming Language :: Python :: 2.7', | |||
'Programming Language :: Python :: 3.4', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this line should be dropped since 3.4 is not tested in the CI process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disregard - this has been fixed in #4259
Hi @gerardo I did some looking into tests.operators.test_virtualenv_operator.test_string_args as well. Looking at the Python operator description string args is the only supported method of allowing configuration when the Python versions don't match between airflow and operator -- which would be why it does the test through these string arguments. It looks like if we want to make that test workable in CI then the Python 2 image needs Python 3 installed as well and vice versa just different default Pythons configured. |
Already the case https://github.com/apache/airflow/blob/master/setup.py#L429 👍 |
Make sure you have checked all steps below.
Jira
Description
I remember Fokko and Joy had tested Airflow on Python 3.6. Also, DigitalOcean has also been using Airflow with 3.6 as mentioned in the mailing list: https://lists.apache.org/thread.html/4b3ab976ad268f3da96c5317290d11120c26c7e0f92886eef5b8b50f@%3Cdev.airflow.apache.org%3E
Tests
Commits
Documentation
Code Quality
git diff upstream/master -u -- "*.py" | flake8 --diff