Skip to content

Add official support for python 3.9 - #687

Merged
eapolinario merged 29 commits into
masterfrom
python-3.9
Oct 19, 2021
Merged

eapolinario merged 29 commits into
masterfrom
python-3.9

Conversation

@eapolinario

@eapolinario eapolinario commented Oct 6, 2021

Copy link
Copy Markdown
Collaborator

Signed-off-by: Eduardo Apolinario eapolinario@users.noreply.github.com

TL;DR

Support python 3.9 officially.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

Handle the case where a call to isinstance might raise an exception in calls to isinstance.
isinstance raises an error if the base type is not a valid type in python 3.9, so we now handle a case in the type engine where one of the registered restricted types, namely NamedTuple, is now considered invalid (hence raising TypeError).

Tracking Issue

https://github.com/lyft/flyte/issues/

Follow-up issue

NA
OR
https://github.com/lyft/flyte/issues/

@samhita-alla

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Oct 8, 2021

Copy link
Copy Markdown

Codecov Report

Merging #687 (900d444) into master (6c03203) will increase coverage by 0.06%.
The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #687      +/-   ##
==========================================
+ Coverage   85.68%   85.74%   +0.06%     
==========================================
  Files         355      357       +2     
  Lines       29684    29746      +62     
  Branches     2426     2428       +2     
==========================================
+ Hits        25436    25507      +71     
+ Misses       3606     3600       -6     
+ Partials      642      639       -3     
Impacted Files Coverage Δ
tests/flytekit/unit/core/test_type_hints.py 95.88% <83.33%> (+0.02%) ⬆️
flytekit/core/type_engine.py 88.47% <90.00%> (+0.09%) ⬆️
flytekit/core/workflow.py 89.36% <0.00%> (-0.31%) ⬇️
flytekit/core/base_task.py 89.04% <0.00%> (ø)
flytekit/core/reference_entity.py 91.85% <0.00%> (ø)
tests/flytekit/unit/remote/test_remote.py 100.00% <0.00%> (ø)
tests/flytekit/unit/common_tests/test_promise.py 100.00% <0.00%> (ø)
tests/flytekit/unit/common_tests/test_utils.py 100.00% <0.00%> (ø)
...s/flytekit/unit/core/test_python_auto_container.py 100.00% <0.00%> (ø)
flytekit/core/context_manager.py 92.93% <0.00%> (+0.02%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c03203...900d444. Read the comment docs.

@eapolinario

Copy link
Copy Markdown
Collaborator Author

@samhita-alla , were you aware of any other issue that was blocking python 3.9?

@eapolinario

Copy link
Copy Markdown
Collaborator Author

For those who are wondering, we can't enable 3.10 yet because numpy wheels are missing across the board. According to numpy/numpy#20045 will have to wait for the next numpy release.

eapolinario and others added 17 commits October 7, 2021 18:18
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
* no node sync

Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>

* add param to wait

Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
* fix pandera regression

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* install plugin with pip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* fix pandera plugin tests

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* add spark flytekit plugin to papermill test_requires

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* add sqlalchemy to great expectations plugin

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* wip

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* plugins plugins plugins!

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>

* lint

Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Yes, this is needed, please see https://dev.to/hugovk/the-python-3-1-problem-85g.

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
This reverts commit 4d619d5.

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
This reverts commit bd6d694.

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
@samhita-alla

Copy link
Copy Markdown
Contributor

@samhita-alla , were you aware of any other issue that was blocking python 3.9?

Not really. The ones I sent were the blockers I had come across.

Comment thread tests/flytekit/unit/core/test_type_engine.py Outdated
Comment thread tests/flytekit/unit/core/test_type_hints.py Outdated
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
…-3.9

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Comment thread .github/workflows/pythonpublish.yml Outdated
Comment thread flytekit/core/type_engine.py Outdated
Comment thread flytekit/core/type_engine.py
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Comment thread flytekit/core/type_engine.py Outdated
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
@eapolinario eapolinario changed the title Enable python 3.9 in CI Add official support for python 3.9 Oct 19, 2021
@eapolinario
eapolinario merged commit ae15c4e into master Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants