-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Python Upper Bound Requirements (#1506)
* initial draft for python 3.11 support * update release doc * add python warnings for e2e tests * modify e2e test * modify e2e test * test by removing lower req scenario * skip e2e tests for lower bound requirement on python 3.11 * skip e2e tests for lower bound requirement on python 3.11 * remove python upperbounds initial draft * fix lint and format errors * test remove upperbound warning * test lowerbound pandas install * revert back pandas requirement * bump lower requirements for pandas * remove upper bound clean up * update release notes * fix PR comments --------- Co-authored-by: Nok Lam Chan <nok_lam_chan@mckinsey.com> Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
- Loading branch information
1 parent
d935065
commit 02a5073
Showing
6 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
"""Kedro plugin for visualising a Kedro pipeline""" | ||
import sys | ||
import warnings | ||
|
||
__version__ = "6.4.0" | ||
|
||
|
||
class KedroVizPythonVersionWarning(UserWarning): | ||
"""Custom class for warnings about incompatibilities with Python versions.""" | ||
|
||
|
||
if sys.version_info >= (3, 12): | ||
warnings.warn( | ||
"""Please be advised that Kedro Viz is not yet fully | ||
compatible with the Python version you are currently using.""", | ||
KedroVizPythonVersionWarning, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pytest | ||
|
||
import kedro_viz | ||
|
||
|
||
def test_import_kedro_viz_with_no_official_support_emits_warning(mocker): | ||
"""Test importing kedro Viz with python>=3.12 and controlled warnings should work""" | ||
mocker.patch("kedro_viz.sys.version_info", (3, 12)) | ||
|
||
# We use the parent class to avoid issues with `exec_module` | ||
with pytest.warns(UserWarning) as record: | ||
kedro_viz.__loader__.exec_module(kedro_viz) | ||
|
||
assert len(record) == 1 | ||
assert ( | ||
"""Please be advised that Kedro Viz is not yet fully | ||
compatible with the Python version you are currently using.""" | ||
in record[0].message.args[0] | ||
) |