diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2bf8b4f..8a0b252 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,16 +11,16 @@ jobs: if: github.repository == 'pytest-dev/pytest-selenium' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false - name: Build and Check Package - uses: hynek/build-and-inspect-python-package@v1 + uses: hynek/build-and-inspect-python-package@v2 - name: Download Package - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Packages path: dist diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef4cc7b..bca3c46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,8 +5,8 @@ on: branches: - master -# schedule: -# - cron: '0 18 * * *' # Run daily at 14:00 UTC + schedule: + - cron: '0 18 * * *' # Run daily at 18:00 UTC pull_request: @@ -19,12 +19,12 @@ jobs: if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'pytest-dev/pytest-selenium') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install dependencies run: | @@ -35,28 +35,20 @@ jobs: run: tox -e linting test: - name: ubuntu-latest - ${{ matrix.tox-env || matrix.python-version }} + name: ubuntu-latest - ${{ matrix.tox-env }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - include: - - os: ubuntu-latest - python-version: pypy3.9 - tox-env: py3.9 - - - os: ubuntu-latest - python-version: 3.12 - tox-env: devel + tox-env: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10", "devel"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.tox-env == 'devel' && 3.12 || matrix.tox-env }} # default is for devel - name: Install tox run: | @@ -67,43 +59,32 @@ jobs: run: docker/start - name: Cache tox environments - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: .tox - key: tox-ubuntu-latest-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'tox.ini') }} + key: ubuntu-latest-tox-${{ matrix.tox-env }}-${{ hashFiles('pyproject.toml', 'tox.ini') }} restore-keys: | - tox-ubuntu-latest-${{ matrix.python-version }}- - - - name: Set tox variable - shell: bash - run: | - echo "python-version: ${{ matrix.python-version }}" - echo "tox-env: ${{ matrix.tox-env }}" - if [[ -n "${{ matrix.tox-env }}" ]]; then - echo "tox=${{ matrix.tox-env }}" >> "$GITHUB_ENV" - else - echo "tox=py${{ matrix.python-version }}" >> "$GITHUB_ENV" - fi + ubuntu-latest-tox-${{ matrix.tox-env }}- - name: Test - run: tox -e "${{ env.tox }}" + run: tox -e ${{ matrix.tox-env }} - name: Archive report.html if: failure() - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: - name: report.html.${{ matrix.os }}-${{ env.tox }}.zip - path: .tox/${{ env.tox }}/log/report.html + name: report.html-${{ matrix.tox-env }}.zip + path: .tox/${{ matrix.tox-env }}/log/report.html docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install dependencies run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ba5a96..4b7b6fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,19 @@ repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.1.1 hooks: - id: black args: [--safe, --quiet] language_version: python3 - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 7.0.0 hooks: - id: flake8 exclude: docs diff --git a/docs/installing.rst b/docs/installing.rst index 973edf6..a01892b 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -4,7 +4,7 @@ Installation Requirements ------------ -pytest-selenium will work with Python >=3.7. +pytest-selenium will work with Python >=3.8. Install pytest-selenium ----------------------- diff --git a/docs/news.rst b/docs/news.rst index 365dd76..bb98449 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,13 @@ Release Notes ============= +4.1.0 (2024-02-01) +------------------ + +* Support pytest 8.0 + + * Thanks to `@sandre35 `_ for reporting the issue and the PR. + 4.0.2 (2023-11-20) ------------------ diff --git a/pyproject.toml b/pyproject.toml index 99a87e2..a006d5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ name = "pytest-selenium" description = "pytest plugin for Selenium" readme = "README.rst" license = "MPL-2.0" -requires-python = ">=3.7" +requires-python = ">=3.8" keywords = [ "pytest", "selenium", @@ -27,16 +27,16 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: Pytest", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Natural Language :: English", "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Quality Assurance", diff --git a/src/pytest_selenium/pytest_selenium.py b/src/pytest_selenium/pytest_selenium.py index 44fbe7f..c8eb13f 100644 --- a/src/pytest_selenium/pytest_selenium.py +++ b/src/pytest_selenium/pytest_selenium.py @@ -400,7 +400,7 @@ def pytest_addoption(parser): parser.addini( "selenium_exclude_debug", help="debug to exclude from capture", - default=os.getenv("SELENIUM_EXCLUDE_DEBUG"), + default=os.getenv("SELENIUM_EXCLUDE_DEBUG", ""), ) _auth_choices = ("none", "token", "hour", "day") diff --git a/tox.ini b/tox.ini index 8252bb1..02362f7 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py{3.7, 3.8, 3.9, 3.10, 3.11, py3.9}, docs, linting +envlist = py{3.8, 3.9, 3.10, 3.11, 3.12, py3.10}, docs, linting isolated_build = True [testenv]