From b014cdc791b5742ff08e7e7c8d07826c7b504eba Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Wed, 23 Jun 2021 08:56:22 -0300 Subject: [PATCH 1/2] Remove support for py2, py34, py35 --- .github/workflows/tests.yml | 19 ++++--------------- .gitignore | 4 +++- README.rst | 2 +- setup.py | 10 ++++------ tests/requirements.txt | 5 ----- tox.ini | 10 +++++++--- 6 files changed, 19 insertions(+), 31 deletions(-) delete mode 100644 tests/requirements.txt diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 817d824..1cc2a05 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,19 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - include: - - python-version: 2.7 - env: - TOXENV: py - - python-version: 3.5 - env: - TOXENV: py - - python-version: 3.6 - env: - TOXENV: py - - python-version: 3.7 - env: - TOXENV: py + python-version: [3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 @@ -31,8 +19,9 @@ jobs: - name: Run tests env: ${{ matrix.env }} run: | + pip install -U pip pip install -U tox - tox + tox -e py - name: Upload coverage report - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file + run: bash <(curl -s https://codecov.io/bash) diff --git a/.gitignore b/.gitignore index b0ab86a..c276bd1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ /dist /docs/_build /.coverage -.idea \ No newline at end of file +.idea +htmlcov/ +coverage.xml diff --git a/README.rst b/README.rst index 9bcd648..b86e11c 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ extracted as a stand-alone project. Quick facts: * Free software: BSD licensed -* Compatible with Python 2.7 and 3.4+ +* Compatible with Python 3.6+ * Latest documentation `on Read the Docs `_ * Source, issues and pull requests `on GitHub `_ diff --git a/setup.py b/setup.py index de7128d..3b53fcc 100644 --- a/setup.py +++ b/setup.py @@ -29,18 +29,16 @@ url='https://github.com/scrapy/cssselect', license='BSD', packages=['cssselect'], - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + python_requires='>=3.6', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7' + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], **extra_kwargs ) diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index 000d5f2..0000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -codecov -lxml;python_version!="3.4" -lxml<=4.3.5;python_version=="3.4" -pytest >=4.6, <4.7 # 4.7 drops support for Python 2.7 and 3.4 -pytest-cov \ No newline at end of file diff --git a/tox.ini b/tox.ini index 4fb1d7c..a9edacd 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,12 @@ envlist = py [testenv] -deps= - -r tests/requirements.txt +deps = + lxml>=4.4 + pytest-cov>=2.8 + pytest>=5.4 commands = - py.test --cov-report term --cov=cssselect + pytest --cov=cssselect \ + --cov-report=term-missing --cov-report=html --cov-report=xml \ + --verbose {posargs: cssselect tests} From 839df13ff9984aff661cf87620c0d193bcdf6067 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Wed, 23 Jun 2021 08:58:44 -0300 Subject: [PATCH 2/2] Remove unnecessary line from the CI config --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1cc2a05..799f52f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Run tests - env: ${{ matrix.env }} run: | pip install -U pip pip install -U tox