Skip to content

Commit

Permalink
Drop Python 3.6, test on 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Apr 28, 2022
1 parent 5eb1b81 commit f917fb4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Expand Up @@ -10,12 +10,10 @@ jobs:
fail-fast: false

matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
qt-lib: [pyqt5, pyqt6, pyside2, pyside6]
os: [ubuntu-20.04, windows-latest, macos-latest]
include:
- python-version: "3.6"
tox-env: "py36"
- python-version: "3.7"
tox-env: "py37"
- python-version: "3.8"
Expand All @@ -24,14 +22,22 @@ jobs:
tox-env: "py39"
- python-version: "3.10"
tox-env: "py310"
- python-version: "3.11-dev"
tox-env: "py311"
# https://bugreports.qt.io/browse/PYSIDE-1797
exclude:
- qt-lib: pyside6
os: macos-latest
python-version: "3.6"
python-version: "3.7"
- qt-lib: pyside6
os: macos-latest
os: ubuntu-20.04
python-version: "3.7"
# Not installable so far
- qt-lib: pyside6
python-version: "3.11-dev"
- qt-lib: pyside2
os: windows-latest
python-version: "3.11-dev"

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
@@ -1,6 +1,7 @@
UNRELEASED
----------

- ``pytest-qt`` now requires Python 3.7+.
- Improved PEP-8 aliases definition so they have a smaller call stack depth by one and better parameter suggestions in IDEs. (`#383`_). Thanks `@luziferius`_ for the PR.

.. _#383: https://github.com/pytest-dev/pytest-qt/pull/383
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.rst
Expand Up @@ -74,7 +74,7 @@ Features
Requirements
============

Since version 4.0.0, ``pytest-qt`` requires Python 3.6+.
``pytest-qt`` requires Python 3.7+.

Works with either PySide6_, PySide2_, PyQt6_ or PyQt5_, picking whichever
is available on the system, giving preference to the first one installed in
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -23,15 +23,14 @@
url="http://github.com/pytest-dev/pytest-qt",
use_scm_version={"write_to": "src/pytestqt/_version.py"},
setup_requires=["setuptools_scm"],
python_requires=">=3.6",
python_requires=">=3.7",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down
18 changes: 15 additions & 3 deletions tests/test_modeltest.py
@@ -1,3 +1,5 @@
import sys

import pytest

from pytestqt.qt_compat import qt_api
Expand Down Expand Up @@ -94,12 +96,22 @@ def data(
check_model(BrokenTypeModel(), should_pass=False)


xfail_py311_pyside2 = pytest.mark.xfail(
sys.version_info[:2] == (3, 11) and qt_api.pytest_qt_api == "pyside2",
reason="Fails to OR mask flags",
)


@pytest.mark.parametrize(
"role_value, should_pass",
[
(qt_api.QtCore.Qt.AlignmentFlag.AlignLeft, True),
(qt_api.QtCore.Qt.AlignmentFlag.AlignRight, True),
(0xFFFFFF, False),
pytest.param(
qt_api.QtCore.Qt.AlignmentFlag.AlignLeft, True, marks=xfail_py311_pyside2
),
pytest.param(
qt_api.QtCore.Qt.AlignmentFlag.AlignRight, True, marks=xfail_py311_pyside2
),
pytest.param(0xFFFFFF, False, marks=xfail_py311_pyside2),
("foo", False),
(object(), False),
],
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py{36,37,38,39,310}-{pyqt5,pyside2,pyside6,pyqt6}, linting
envlist = py{37,38,39,310}-{pyqt5,pyside2,pyside6,pyqt6}, linting

[testenv]
deps=
Expand Down

0 comments on commit f917fb4

Please sign in to comment.