Skip to content

Commit

Permalink
Enable support for Python 3.12
Browse files Browse the repository at this point in the history
All developer requirements (including for building documentation)
are now in dev-requirements.txt.

Also, cleaned up dependencies after Dagster removal.

Re #2522
  • Loading branch information
soininen committed May 16, 2024
1 parent 2e3ca53 commit 5afd5db
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 44 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/make_bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,7 +40,7 @@ jobs:
run: |
mkdir embedded-python
cd embedded-python
curl -o python.zip https://www.python.org/ftp/python/3.11.9/python-3.11.9-embed-amd64.zip
curl -o python.zip https://www.python.org/ftp/python/3.12.3/python-3.12.3-embed-amd64.zip
tar xf python.zip
del python.zip
- name: Build bundle
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/test_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [3.8, 3.9, "3.10", 3.11]
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
os: [windows-latest, ubuntu-22.04]
steps:
- uses: actions/checkout@v4
Expand All @@ -32,8 +32,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements.txt
pyproject.toml
requirements.txt
dev-requirements.txt
- name: Display Python version
run:
python -c "import sys; print(sys.version)"
Expand All @@ -48,16 +49,10 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r dev-requirements.txt
- name: List packages
run:
python -m pip list
- name: Install python3 kernelspecs
run: |
python -m pip install ipykernel
python -m ipykernel install --user
- name: Install coverage
run:
python -m pip install coverage[toml]
- name: Run tests
run: |
if [ "$RUNNER_OS" != "Windows" ]; then
Expand All @@ -75,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", 3.11]
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
os: [windows-latest, ubuntu-22.04]
# needs: unit-tests
steps:
Expand All @@ -86,8 +81,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements.txt
pyproject.toml
requirements.txt
dev-requirements.txt
- name: Install additional packages for Linux
if: runner.os == 'Linux'
run: |
Expand All @@ -99,6 +95,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r dev-requirements.txt
- name: List packages
run:
python -m pip list
Expand Down
17 changes: 7 additions & 10 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
black == 24.4.2
pre-commit == 2.0.1
PyYAML >= 5.4
pylint >= 2.3.0
setuptools >=64
setuptools_scm[toml] >= 6.2
build
wheel >=0.36.2
twine >= 3.4.1
coverage[toml]
black == 21.12b0
pre-commit == 2.0.1
pylint
pyperf
-r "docs/requirements.txt"
sphinx
sphinx_rtd_theme
sphinx-autoapi
recommonmark
8 changes: 0 additions & 8 deletions docs/requirements.txt

This file was deleted.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ classifiers = [
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
]
requires-python = ">=3.8.1, <3.12"
requires-python = ">=3.8.1"
dependencies = [
"pyside6 >= 6.5.0, != 6.5.3, != 6.6.3",
"pyside6 >= 6.5.0, != 6.5.3, != 6.6.3, != 6.7.0",
"jupyter-client >=6.0",
"qtconsole >=5.1",
"sqlalchemy >=1.3",
"spinedb_api>=0.31.1",
"spine_engine>=0.24.0",
"numpy >=1.20.2",
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-e git+https://github.com/spine-tools/Spine-Database-API.git#egg=spinedb_api
-e git+https://github.com/spine-tools/spine-engine.git#egg=spine_engine
-e git+https://github.com/spine-tools/spine-items.git#egg=spine_items
-e git+https://github.com/spine-tools/Spine-Database-API.git@toolbox_2522_enable_python_3.12#egg=spinedb_api
-e git+https://github.com/spine-tools/spine-engine.git@toolbox_2522_enable_python_3.12#egg=spine_engine
-e git+https://github.com/spine-tools/spine-items.git@2522_enable_python_3.12#egg=spine_items
-e .
14 changes: 7 additions & 7 deletions spinetoolbox/ui/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
################################################################################
## Form generated from reading UI file 'settings.ui'
##
## Created by: Qt User Interface Compiler version 6.7.0
## Created by: Qt User Interface Compiler version 6.6.3
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
Expand Down Expand Up @@ -406,8 +406,8 @@ def setupUi(self, SettingsForm):

self.line_3 = QFrame(self.groupBox_julia)
self.line_3.setObjectName(u"line_3")
self.line_3.setFrameShape(QFrame.Shape.VLine)
self.line_3.setFrameShadow(QFrame.Shadow.Sunken)
self.line_3.setFrameShape(QFrame.VLine)
self.line_3.setFrameShadow(QFrame.Sunken)

self.horizontalLayout_14.addWidget(self.line_3)

Expand Down Expand Up @@ -489,8 +489,8 @@ def setupUi(self, SettingsForm):

self.line = QFrame(self.groupBox_julia)
self.line.setObjectName(u"line")
self.line.setFrameShape(QFrame.Shape.HLine)
self.line.setFrameShadow(QFrame.Shadow.Sunken)
self.line.setFrameShape(QFrame.HLine)
self.line.setFrameShadow(QFrame.Sunken)

self.verticalLayout_10.addWidget(self.line)

Expand Down Expand Up @@ -543,8 +543,8 @@ def setupUi(self, SettingsForm):

self.line_2 = QFrame(self.groupBox_python)
self.line_2.setObjectName(u"line_2")
self.line_2.setFrameShape(QFrame.Shape.VLine)
self.line_2.setFrameShadow(QFrame.Shadow.Sunken)
self.line_2.setFrameShape(QFrame.VLine)
self.line_2.setFrameShadow(QFrame.Sunken)

self.horizontalLayout_5.addWidget(self.line_2)

Expand Down

0 comments on commit 5afd5db

Please sign in to comment.