diff --git a/.github/workflows/package-pypi.yml b/.github/workflows/package-pypi.yml index db8a8a46d4..6a03e7d992 100644 --- a/.github/workflows/package-pypi.yml +++ b/.github/workflows/package-pypi.yml @@ -72,7 +72,7 @@ jobs: fail-fast: false matrix: os: [macos-13, windows-2019] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2ee7cad371..1e0d3adc95 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,10 +9,7 @@ jobs: strategy: matrix: os: [macos-13, ubuntu-latest, windows-2019] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - include: - - os: macos-13 - python-version: '3.7' + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] env: CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} @@ -71,12 +68,13 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.7'] + python-version: ['3.8'] dependencies: [ + "PyQt5==5.15.11", "PyQt5==5.14.2", "PyQt5==5.13.2", "PyQt5==5.12.3", - "PyQt5==5.11.3 sip==4.19.8 mutagen==1.37", + "PyQt5==5.11.3 mutagen==1.37", ] steps: diff --git a/INSTALL.md b/INSTALL.md index f376390d85..2bc6dd3ea3 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,7 +8,7 @@ Before installing Picard from source, you need to check you have the following d Required: -* [Python 3.7 or newer](https://python.org/download) +* [Python 3.8 or newer](https://python.org/download) * [PyQt 5.11 or newer](https://riverbankcomputing.com/software/pyqt/download) * [Mutagen 1.37 or newer](https://mutagen.readthedocs.io/) * [PyYAML 5.1 or newer](https://pyyaml.org/) diff --git a/picard/util/webbrowser2.py b/picard/util/webbrowser2.py index 48915cd990..3ef1000192 100644 --- a/picard/util/webbrowser2.py +++ b/picard/util/webbrowser2.py @@ -29,12 +29,10 @@ It handles and displays errors in PyQt and also adds a utility function for opening Picard URLS. """ -from sys import version_info import webbrowser from PyQt5 import QtWidgets -from picard import log from picard.const import PICARD_URLS @@ -45,12 +43,3 @@ def open(url): webbrowser.open(url) except webbrowser.Error as e: QtWidgets.QMessageBox.critical(None, _("Web Browser Error"), _("Error while launching a web browser:\n\n%s") % (e,)) - except TypeError: - if version_info.major == 3 and version_info.minor == 7 and version_info.micro == 0: - # See https://bugs.python.org/issue31014, webbrowser.open doesn't - # work on 3.7.0 the first time it's called. The initialization code - # in it will be skipped after the first call, making it possibly to - # use it, although it might not accurately identify the users - # preferred browser. - log.info("Working around https://bugs.python.org/issue31014 - URLs might not be opened in the correct browser") - webbrowser.open(url) diff --git a/requirements.txt b/requirements.txt index 3481dc8e00..ea55650754 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,6 @@ mutagen~=1.37 PyJWT~=2.0 pyobjc-core>=6.2, <10; sys_platform == 'darwin' pyobjc-framework-Cocoa>=6.2, <10; sys_platform == 'darwin' -PyQt5-sip<=12.9.1; python_version < '3.7' PyQt5-sip<=12.15.0; python_version < '3.9' PyQt5~=5.11 python-dateutil~=2.7 diff --git a/setup.py b/setup.py index 51064830c2..6bc3ace77e 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ # required for PEP 517 sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) -from picard import ( +from picard import ( # noqa: E402 PICARD_APP_ID, PICARD_APP_NAME, PICARD_DESKTOP_NAME, @@ -75,8 +75,8 @@ ) -if sys.version_info < (3, 7): - sys.exit("ERROR: You need Python 3.7 or higher to use Picard.") +if sys.version_info < (3, 8): + sys.exit("ERROR: You need Python 3.8 or higher to use Picard.") PACKAGE_NAME = "picard" APPDATA_FILE = PICARD_APP_ID + '.appdata.xml' @@ -792,7 +792,7 @@ def _get_requirements(): }, 'scripts': ['scripts/' + PACKAGE_NAME], 'install_requires': _get_requirements(), - 'python_requires': '~=3.7', + 'python_requires': '~=3.8', 'classifiers': [ 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', 'Development Status :: 5 - Production/Stable', @@ -801,7 +801,6 @@ def _get_requirements(): 'Environment :: X11 Applications :: Qt', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10',