Skip to content

Commit 0b53b0c

Browse files
committed
feat: stop supporting python 3.8
1 parent d608cf9 commit 0b53b0c

28 files changed

+25
-876
lines changed

.github/workflows/dependencies-management.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
timeout-minutes: 20
2323
strategy:
2424
matrix:
25-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
25+
python-version: ['3.9', '3.10', '3.11', '3.12']
2626
os: [ubuntu-latest]
2727
permissions:
2828
contents: write

.github/workflows/overall-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
55+
python-version: ['3.9', '3.10', '3.11', '3.12']
5656
os: [ubuntu-latest, windows-latest, macos-13]
5757
pipfile-version: ['min', 'max']
5858
runs-on: ${{ matrix.os }}
@@ -80,7 +80,7 @@ jobs:
8080
strategy:
8181
fail-fast: false
8282
matrix:
83-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
83+
python-version: ['3.9', '3.10', '3.11', '3.12']
8484
os: [ubuntu-latest, windows-latest, macos-13]
8585
orchestrator: ['orchestrator_dispatcher', 'standalone']
8686
pipfile-version: ['min', 'max']

.github/workflows/packaging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
timeout-minutes: 30
2121
strategy:
2222
matrix:
23-
python-versions: [ '3.8', '3.9', '3.10', '3.11', '3.12']
23+
python-versions: ['3.9', '3.10', '3.11', '3.12']
2424
os: [ubuntu-latest, macos-13, windows-latest]
2525

2626
runs-on: ${{ matrix.os }}

.github/workflows/partial-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
26+
python-version: ['3.9', '3.10', '3.11', '3.12']
2727
os: [ubuntu-latest, windows-latest, macos-13]
2828
runs-on: ${{ matrix.os }}
2929
steps:
@@ -143,7 +143,7 @@ jobs:
143143
strategy:
144144
fail-fast: false
145145
matrix:
146-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
146+
python-version: ['3.9', '3.10', '3.11', '3.12']
147147
os: [ubuntu-latest, windows-latest, macos-13]
148148
runs-on: ${{ matrix.os }}
149149
steps:
@@ -186,7 +186,7 @@ jobs:
186186
strategy:
187187
fail-fast: false
188188
matrix:
189-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
189+
python-version: ['3.9', '3.10', '3.11', '3.12']
190190
os: [ubuntu-latest, windows-latest, macos-13]
191191
runs-on: ${{ matrix.os }}
192192
steps:

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-python@v5
1717
with:
18-
python-version: 3.8
18+
python-version: 3.9
1919

2020
- name: Extract Github Tag Version
2121
id: vars
@@ -104,7 +104,7 @@ jobs:
104104
timeout-minutes: 30
105105
strategy:
106106
matrix:
107-
python-versions: ['3.8','3.9','3.10', '3.11', '3.12']
107+
python-versions: ['3.9','3.10', '3.11', '3.12']
108108
os: [ubuntu-latest,windows-latest,macos-13]
109109
runs-on: ${{ matrix.os }}
110110
steps:

INSTALLATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ There are different ways to install Taipy, depending on how you plan to use it.
55
If your goal is to look into the code, modify and improve it, go straight
66
to the [source installation](#installing-for-development) section.
77

8-
Taipy needs your system to have Python 3.8 or above installed.
8+
Taipy needs your system to have Python 3.9 or above installed.
99

1010
## Installing from PyPI
1111

Pipfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ name = "pypi"
66
[packages]
77
apispec = {extras = ["yaml"], version = "==6.3"}
88
apispec-webframeworks = "==0.5.2"
9-
"backports.zoneinfo" = {version="==0.2.1", markers="python_version < '3.9'", extras=["tzdata"]}
109
cookiecutter = "==2.1.1"
1110
deepdiff = "==6.7.1"
1211
flask = "==3.0.0"

doc/gui/extension/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This section explains how to build the custom extension library.
4545

4646
To complete the build of the extension library, we need the following tools:
4747

48-
- Python 3.8 or higher;
48+
- Python 3.9 or higher;
4949
- Taipy GUI 2.2 or higher;
5050
- [Node.js](https://nodejs.org/en/) 18.0 or higher: a JavaScript runtime.<br/>
5151
This embeds [npm](https://www.npmjs.com/), the Node Package Manager.

doc/gui/extension/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ version = "1.0.0"
77
authors = [ { name = "Taipy" } ]
88
description = "A Taipy GUI extension library example."
99
readme = { file = "README.md", content-type = "text/markdown" }
10-
requires-python = ">=3.8"
10+
requires-python = ">=3.9"
1111
keywords = [ "taipy" ]
1212
license = { text = "Apache License 2.0" }
1313
classifiers = [
1414
"Intended Audience :: Developers",
1515
# "License :: OSI Approved :: Apache Software License",
1616
"Natural Language :: English",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "taipy"
77
description = "A 360° open-source platform from Python pilots to production-ready web apps."
88
readme = "package_desc.md"
9-
requires-python = ">=3.8"
9+
requires-python = ">=3.9"
1010
license = {text = "Apache License 2.0"}
1111
authors = [{name = "Avaiga", email = "[email protected]"}]
1212
keywords = ["taipy"]
@@ -15,7 +15,6 @@ classifiers = [
1515
"License :: OSI Approved :: Apache Software License",
1616
"Natural Language :: English",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",

taipy/config/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "taipy-config"
77
description = "A Taipy package dedicated to easily configure a Taipy application."
88
readme = "package_desc.md"
9-
requires-python = ">=3.8"
9+
requires-python = ">=3.9"
1010
license = {text = "Apache License 2.0"}
1111
authors = [{name = "Avaiga", email = "[email protected]"}]
1212
keywords = ["taipy-config"]
@@ -15,7 +15,6 @@ classifiers = [
1515
"License :: OSI Approved :: Apache Software License",
1616
"Natural Language :: English",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",

taipy/core/_entity/_dag.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
99
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1010
# specific language governing permissions and limitations under the License.
11+
1112
import math
12-
from functools import reduce
1313
from typing import Any, Dict, List, Tuple
1414

1515
import networkx as nx
@@ -60,7 +60,7 @@ def __compute_grid_size(self) -> Tuple[int, int]:
6060
if self._width == 1:
6161
grd_wdt = 1
6262
else:
63-
grd_wdt = self.__lcm(*[len(i) + 1 if len(i) != self._width else len(i) - 1 for i in self._sorted_nodes]) + 1
63+
grd_wdt = math.lcm(*[len(i) + 1 if len(i) != self._width else len(i) - 1 for i in self._sorted_nodes]) + 1
6464
return len(self._sorted_nodes), grd_wdt
6565

6666
def __compute_nodes(self) -> Dict[str, _Node]:
@@ -81,11 +81,3 @@ def __compute_nodes(self) -> Dict[str, _Node]:
8181

8282
def __compute_edges(self, dag) -> List[_Edge]:
8383
return [_Edge(self.nodes[edge[0].id], self.nodes[edge[1].id]) for edge in dag.edges()]
84-
85-
@staticmethod
86-
def __lcm(*integers) -> int:
87-
# Function math.lcm is only implemented for Python 3.9+
88-
# For compatibility with Python 3.8 it has been re implemented.
89-
if 0 in integers:
90-
return 0
91-
return reduce(lambda x, y: (x * y) // math.gcd(x, y), integers)

taipy/core/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "taipy-core"
77
description = "A Python library to build powerful and customized data-driven back-end applications."
88
readme = "package_desc.md"
9-
requires-python = ">=3.8"
9+
requires-python = ">=3.9"
1010
license = {text = "Apache License 2.0"}
1111
authors = [{name = "Avaiga", email = "[email protected]"}]
1212
keywords = ["taipy-core"]
@@ -15,7 +15,6 @@ classifiers = [
1515
"License :: OSI Approved :: Apache Software License",
1616
"Natural Language :: English",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",

taipy/gui/INSTALLATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ you plan to use it:
1212
- [Debugging the JavaScript bundle](#debugging-the-javascript-bundle)
1313
- [Running the tests](#running-the-tests)
1414

15-
Taipy GUI needs your system to have **Python 3.8** or above installed.
15+
Taipy GUI needs your system to have **Python 3.9** or above installed.
1616

1717
## Installing the latest release
1818

taipy/gui/builder/_element.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
import ast
1515
import copy
1616
import inspect
17-
import io
1817
import re
19-
import sys
2018
import typing as t
2119
import uuid
2220
from abc import ABC, abstractmethod
@@ -25,9 +23,6 @@
2523

2624
from .._warnings import _warn
2725
from ..utils import _getscopeattr
28-
29-
if sys.version_info < (3, 9):
30-
from ..utils.unparse import _Unparser
3126
from ._context_manager import _BuilderContextManager
3227
from ._factory import _BuilderFactory
3328
from ._utils import _LambdaByName, _python_builtins, _TransformVarToValue
@@ -129,13 +124,7 @@ def __parse_lambda_property(self, key: str, value: t.Any) -> t.Any:
129124
]
130125
tree = _TransformVarToValue(self.__calling_frame, args + targets + _python_builtins).visit(lambda_fn)
131126
ast.fix_missing_locations(tree)
132-
if sys.version_info < (3, 9): # python 3.8 ast has no unparse
133-
string_fd = io.StringIO()
134-
_Unparser(tree, string_fd)
135-
string_fd.seek(0)
136-
lambda_text = string_fd.read()
137-
else:
138-
lambda_text = ast.unparse(tree)
127+
lambda_text = ast.unparse(tree)
139128
lambda_name = f"__lambda_{uuid.uuid4().hex}"
140129
self._lambdas[lambda_name] = lambda_text
141130
return f'{{{lambda_name}({", ".join(args)})}}'

taipy/gui/package_desc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ you plan to use it:
3535
- [Debugging the JavaScript bundle](#debugging-the-javascript-bundle)
3636
- [Running the tests](#running-the-tests)
3737

38-
Taipy GUI needs your system to have **Python 3.8** or above installed.
38+
Taipy GUI needs your system to have **Python 3.9** or above installed.
3939

4040
### Installing the latest release
4141

taipy/gui/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "taipy-gui"
77
description = "Low-code library to create graphical user interfaces on the Web for your Python applications."
88
readme = "package_desc.md"
9-
requires-python = ">=3.8"
9+
requires-python = ">=3.9"
1010
license = {text = "Apache License 2.0"}
1111
authors = [{name = "Avaiga", email = "[email protected]"}]
1212
keywords = ["taipy-gui"]
@@ -15,7 +15,6 @@ classifiers = [
1515
"License :: OSI Approved :: Apache Software License",
1616
"Natural Language :: English",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",

0 commit comments

Comments
 (0)