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

Remove Python Upper Bound Requirements #1506

Merged
merged 23 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a1929b1
initial draft for python 3.11 support
ravi-kumar-pilla Aug 22, 2023
f9ef71d
Merge branch 'main' into feature/support-python_3.11
ravi-kumar-pilla Aug 22, 2023
b635d21
Merge branch 'main' of https://github.com/kedro-org/kedro-viz into fe…
ravi-kumar-pilla Aug 24, 2023
ac4e74c
update release doc
ravi-kumar-pilla Aug 24, 2023
3846943
Merge branch 'feature/support-python_3.11' of https://github.com/kedr…
ravi-kumar-pilla Aug 24, 2023
4d8c3b7
add python warnings for e2e tests
ravi-kumar-pilla Aug 24, 2023
12aa54d
Merge branch 'main' into feature/support-python_3.11
noklam Aug 25, 2023
0c22e1b
modify e2e test
ravi-kumar-pilla Aug 25, 2023
8c46939
Merge branch 'feature/support-python_3.11' of https://github.com/kedr…
ravi-kumar-pilla Aug 25, 2023
39c206e
modify e2e test
ravi-kumar-pilla Aug 25, 2023
bda1597
test by removing lower req scenario
ravi-kumar-pilla Aug 25, 2023
a12e28c
skip e2e tests for lower bound requirement on python 3.11
ravi-kumar-pilla Aug 25, 2023
725f0d5
skip e2e tests for lower bound requirement on python 3.11
ravi-kumar-pilla Aug 25, 2023
f32c71e
remove python upperbounds initial draft
ravi-kumar-pilla Aug 25, 2023
a00931b
fix lint and format errors
ravi-kumar-pilla Aug 25, 2023
1875998
test remove upperbound warning
ravi-kumar-pilla Aug 26, 2023
f5eb44b
test lowerbound pandas install
ravi-kumar-pilla Aug 28, 2023
6318305
revert back pandas requirement
ravi-kumar-pilla Aug 28, 2023
58748f9
bump lower requirements for pandas
ravi-kumar-pilla Aug 28, 2023
fdafa72
remove upper bound clean up
ravi-kumar-pilla Aug 28, 2023
d39b10b
update release notes
ravi-kumar-pilla Aug 28, 2023
54d196d
fix PR comments
ravi-kumar-pilla Aug 29, 2023
35f11b8
resolve conflicts
ravi-kumar-pilla Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Please follow the established format:
## Bug fixes and other changes

- Fix to search for a '<lambda' Python function in the sidebar. (#1497)
- Remove python upper-bound requirements and add KedroVizPythonVersion warning. (#1506)

# Release 6.4.0

Expand Down
5 changes: 0 additions & 5 deletions package/features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ def before_scenario(context, scenario):
print(f"{scenario} will be skipped on Windows with Python 3.7")
scenario.skip()

# skip lower-bound scenario for python versions greater than 3.10
if sys.version_info >= (3, 11) and "lower-bound" in scenario.name:
print(f"{scenario} will be skipped for Python version greater than 3.10")
scenario.skip()

for step in scenario.steps:
if "I have installed kedro version" in step.name:
match = re.search(r"\b\d+\.\d+\.\d+\b", step.name)
Expand Down
2 changes: 1 addition & 1 deletion package/features/steps/lower_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ uvicorn[standard]==0.22.0
watchgod==0.8.2
plotly==4.0
pandas==1.3; python_version < '3.10'
pandas==1.4; python_version >= '3.10'
pandas==1.5; python_version >= '3.10'
sqlalchemy==1.4
strawberry-graphql==0.192.0
networkx==2.5
Expand Down
14 changes: 14 additions & 0 deletions package/kedro_viz/__init__.py
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,
)
2 changes: 1 addition & 1 deletion package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
long_description_content_type="text/markdown",
license="Apache Software License (Apache 2.0)",
url="https://github.com/kedro-org/kedro-viz",
python_requires=">=3.7, <3.12",
python_requires=">=3.7",
install_requires=requires,
keywords="pipelines, machine learning, data pipelines, data science, data engineering, visualisation",
author="Kedro",
Expand Down
19 changes: 19 additions & 0 deletions package/tests/test_import.py
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]
)