Skip to content

Commit

Permalink
Upgrade PyQt5 and supported Python versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosperate committed Dec 26, 2023
1 parent c38a539 commit 2056d87
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 42 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-latest, windows-2019, windows-latest]
python-version: ['3.5', '3.6', '3.7', '3.8']
exclude:
# Python 3.5 and 3.6 not available in the latest Ubuntu runners
- os: ubuntu-latest
python-version: '3.5'
- os: ubuntu-latest
python-version: '3.6'
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
fail-fast: false
runs-on: ${{ matrix.os }}
name: Test Py ${{ matrix.python-version }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python info
Expand Down Expand Up @@ -100,7 +94,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
docker-tag: ['stretch-2018-03-13', 'buster-2021-05-28', 'buster-legacy-2022-04-07']
docker-tag: ['buster-2021-05-28', 'buster-legacy-2022-04-07', 'bullseye-2022-04-07']
fail-fast: false
services:
rpios:
Expand All @@ -112,7 +106,7 @@ jobs:
- name: Wait 2m30s for the docker image to start up QEMU and Raspberry Pi OS
run: sleep 150
- name: Clone project & setup it as the bash entry directory
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
Expand All @@ -129,15 +123,15 @@ jobs:
# As Pi OS stretch is no longer supported the repository URL was moved and is no longer updated
- name: Update Stretch sources.list
if: ${{ matrix.docker-tag == 'stretch-2018-03-13' }}
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
password: raspberry
port: ${{ job.services.rpios.ports[5022] }}
script: echo "deb http://legacy.raspbian.org/raspbian/ stretch main contrib non-free rpi" | sudo tee /etc/apt/sources.list
- name: Install Mu extra apt dependencies
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
Expand All @@ -147,7 +141,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y python3-virtualenv
- name: Create venv and install Python dependencies
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
Expand All @@ -162,7 +156,7 @@ jobs:
python -m pip list
python -m pip install ."[dev]"
- name: Environment info
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
Expand All @@ -175,7 +169,7 @@ jobs:
python3 -m pip --version
python3 -m pip list
- name: Run tests
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.0
with:
host: rpios
username: pi
Expand Down
11 changes: 3 additions & 8 deletions mu/wheels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,9 @@ class WheelsBuildError(WheelsError):
("flask", ("flask==2.0.3", "Werkzeug<3.0.0")),
# The version of ipykernel here should match to the version used by
# qtconsole at the version specified in setup.py
# FIXME: ipykernel max ver added for macOS 10.13 compatibility, min taken
# from qtconsole 4.7.7. This is mirrored in setup.py
("ipykernel", ("ipykernel>=4.1,<6",)),
# FIXME: ipykernel<6 depends on ipython_genutils, but it isn't explicitly
# declared as a dependency. It also depends on traitlets, which
# incidentally brought ipython_genutils, but in v5.1 it was dropped, so as
# a workaround we need to manually specify it here
("ipython_genutils", ("ipython_genutils>=0.2.0",)),
# ipykernel max ver added for macOS 10.13 compatibility, min taken
# from setup.py. This is version has to mirror the one from setup.py
("ipykernel", ("ipykernel>=5.5.6,<6",)),
]


Expand Down
30 changes: 11 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,18 @@
# The core 'install_requires' should only be things
# which are needed for the main editor to function.
#
"PyQt5==5.13.2"
"PyQt5==5.15.10"
+ ';"arm" not in platform_machine and "aarch" not in platform_machine',
"QScintilla==2.11.3"
"QScintilla==2.14.1"
+ ';"arm" not in platform_machine and "aarch" not in platform_machine',
"PyQtChart==5.13.1"
"PyQtChart==5.15.6"
+ ';"arm" not in platform_machine and "aarch" not in platform_machine',
# FIXME: jupyter-client added for Py3.5 compatibility, to be dropped after
# Mu v1.1 release. So, qtconsole < 5 and jupyter-client < 6.2 (issue #1444)
"jupyter-client>=4.1,<6.2",
# FIXME: ipykernel max added for macOS 10.13 compatibility, min taken from
# qtconsole 4.7.7. Full line can be removed after Mu v1.1 release.
# Dependency mirrored for user venv in mu/wheels/__init__.py
"ipykernel>=4.1,<6",
# FIXME: ipykernel<6 depends on ipython_genutils, but it isn't explicitly
# declared as a dependency. It also depends on traitlets, which
# incidentally brought ipython_genutils, but in v5.1 it was dropped, so as
# a workaround we need to manually specify it here.
"ipython_genutils>=0.2.0",
"qtconsole==4.7.7",
#
# ipykernel has to be < v6 for macOS 10.13 compatibility (v6 depends on
# debugpy package), v5.5.6 resolves issue ipython/ipykernel#759.
# Full line can be removed after Mu v1.3 release as PyQt6 drops old macOS.
# ipykernel version has to be mirrored in mu/wheels/__init__.py
"ipykernel>=5.5.6,<6",
"qtconsole~=5.4",
# adafruit-board-toolkit is used to find serial ports and help identify
# CircuitPython boards in the CircuitPython mode.
"adafruit-board-toolkit~=1.1",
Expand All @@ -58,7 +50,7 @@
"flake8 >= 3.8.3",
# Clamp click max version to workaround incompatibility with black<22.1.0
"click<=8.0.4",
"black>=19.10b0,<22.1.0;python_version>'3.5'",
"black>=19.10b0,<22.1.0",
"platformdirs>=2.0.0,<3.0.0",
"semver>=2.8.0",
# virtualenv vendors pip, we need at least pip v19.3 to install some
Expand Down Expand Up @@ -128,7 +120,7 @@
"mu.modes.api",
"mu.wheels",
],
python_requires=">=3.5,<3.9",
python_requires=">=3.7",
install_requires=install_requires,
extras_require=extras_require,
package_data={"mu.wheels": ["*.whl", "*.zip"]},
Expand Down
1 change: 1 addition & 0 deletions tests/interface/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ def test_EditorPane_toggle_comments_handle_crlf_newline():
"""
ep = mu.interface.editor.EditorPane(None, "test\r\nline 2\n")
ep.hasSelectedText = mock.MagicMock(return_value=False)
ep.setCursorPosition(0,0)
ep.toggle_comments()
assert ep.text() == "# test\nline 2\n"
assert ep.selectedText() == "# test"
Expand Down

0 comments on commit 2056d87

Please sign in to comment.