diff --git a/.appveyor.yml b/.appveyor.yml index 47cc8d6..174c6f3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,8 +1,8 @@ # To activate, change the Appveyor settings to use `.appveyor.yml`. install: - - python -m pip install --upgrade setuptools tox virtualenv + - C:\Python38-x64\python.exe -m pip install --upgrade setuptools tox virtualenv build: off test_script: - - python -m tox -e py27,py36,py37,dogfood + - C:\Python38-x64\python.exe -m tox -e py36,py37,dogfood diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ee5ccf..036190a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,26 +13,11 @@ after_script: - pip install codecov - codecov --token=7d117e6b-aab6-4283-ab19-166dafc38cf5 -pypy2: - image: pypy:2.7-7.2.0 - stage: test - script: tox -e pypy - pypy3: image: pypy:3.6-7.2.0 stage: test script: tox -e pypy3 -python2: - image: python:2.7 - stage: test - script: tox -e py27 - -python35: - image: python:3.5 - stage: test - script: tox -e py35 - python36: image: python:3.6 stage: test diff --git a/.travis.yml b/.travis.yml index 36d1a6a..5825520 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,18 +11,12 @@ notifications: matrix: include: - - python: 2.7 - env: TOXENV=py27 - - python: 3.5 - env: TOXENV=py35 - python: 3.6 env: TOXENV=py36 - python: 3.7 env: TOXENV=py37 - python: 3.8 env: TOXENV=py38 - - python: pypy - env: TOXENV=pypy - python: 3.7 env: TOXENV=readme - python: 3.7 diff --git a/docs/source/internal/releases.rst b/docs/source/internal/releases.rst index 0ed0ac9..03178a4 100644 --- a/docs/source/internal/releases.rst +++ b/docs/source/internal/releases.rst @@ -81,13 +81,11 @@ for users. Before releasing, the following tox test environments must pass: -- Python 2.7 (a.k.a., ``tox -e py27``) - - Python 3.6 (a.k.a., ``tox -e py36``) - Python 3.7 (a.k.a., ``tox -e py37``) -- PyPy (a.k.a., ``tox -e pypy``) +- PyPy 3 (a.k.a., ``tox -e pypy3``) - Linters (a.k.a., ``tox -e linters``) diff --git a/docs/source/plugin-development/registering-plugins.rst b/docs/source/plugin-development/registering-plugins.rst index 34b368a..d1718bf 100644 --- a/docs/source/plugin-development/registering-plugins.rst +++ b/docs/source/plugin-development/registering-plugins.rst @@ -56,7 +56,6 @@ like: "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance", diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index 3a7ffae..984ca54 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1,5 +1,4 @@ sphinx>=1.3.0,!=3.1.0 sphinx_rtd_theme sphinx-prompt -configparser flake8-polyfill diff --git a/docs/source/user/error-codes.rst b/docs/source/user/error-codes.rst index e74675f..9eab3f7 100644 --- a/docs/source/user/error-codes.rst +++ b/docs/source/user/error-codes.rst @@ -100,8 +100,6 @@ generates its own :term:`error code`\ s for ``pyflakes``: +------+---------------------------------------------------------------------+ | F811 | redefinition of unused ``name`` from line ``N`` | +------+---------------------------------------------------------------------+ -| F812 | list comprehension redefines ``name`` from line ``N`` | -+------+---------------------------------------------------------------------+ | F821 | undefined name ``name`` | +------+---------------------------------------------------------------------+ | F822 | undefined name ``name`` in ``__all__`` | @@ -116,9 +114,6 @@ generates its own :term:`error code`\ s for ``pyflakes``: | F901 | ``raise NotImplemented`` should be ``raise NotImplementedError`` | +------+---------------------------------------------------------------------+ -Note that some of these entries behave differently on Python 2 and Python 3, -for example F812 is specific to Python 2 only. - We also report one extra error: ``E999``. We report ``E999`` when we fail to compile a file into an Abstract Syntax Tree for the plugins that require it. diff --git a/docs/source/user/invocation.rst b/docs/source/user/invocation.rst index 099b72a..4c141fd 100644 --- a/docs/source/user/invocation.rst +++ b/docs/source/user/invocation.rst @@ -14,25 +14,25 @@ like so: Where you simply allow the shell running in your terminal to locate |Flake8|. In some cases, though, you may have installed |Flake8| for multiple versions -of Python (e.g., Python 2.7 and Python 3.5) and you need to call a specific +of Python (e.g., Python 3.8 and Python 3.9) and you need to call a specific version. In that case, you will have much better results using: .. prompt:: bash - python2.7 -m flake8 + python3.8 -m flake8 Or .. prompt:: bash - python3.5 -m flake8 + python3.9 -m flake8 Since that will tell the correct version of Python to run |Flake8|. .. note:: - Installing |Flake8| once will not install it on both Python 2.7 and - Python 3.5. It will only install it for the version of Python that + Installing |Flake8| once will not install it on both Python 3.8 and + Python 3.9. It will only install it for the version of Python that is running pip. It is also possible to specify command-line options directly to |Flake8|: diff --git a/docs/source/user/using-plugins.rst b/docs/source/user/using-plugins.rst index 3971578..eddb258 100644 --- a/docs/source/user/using-plugins.rst +++ b/docs/source/user/using-plugins.rst @@ -24,10 +24,8 @@ appropriate of: pip install pip3 install python -m pip install - python2.7 -m pip install python3 -m pip install - python3.4 -m pip install - python3.5 -m pip install + python3.9 -m pip install To install the plugin, where ```` is the package name on PyPI_. To verify installation use: diff --git a/example-plugin/setup.py b/example-plugin/setup.py index 2da68f6..80911a2 100644 --- a/example-plugin/setup.py +++ b/example-plugin/setup.py @@ -21,11 +21,9 @@ setuptools.setup( 'Framework :: Flake8', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', - '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.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', ], diff --git a/pytest.ini b/pytest.ini index 4a00d9a..a72e0e1 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,10 +1,4 @@ [pytest] norecursedirs = .git .* *.egg* old docs dist build addopts = -rw -filterwarnings = - error - # python3.4 raises this when importing setuptools - ignore:The value of convert_charrefs will become True in 3.5.*:DeprecationWarning - # python3 raises this when importing setuptools - ignore:the imp module is deprecated in favour of importlib.*:PendingDeprecationWarning - ignore:the imp module is deprecated in favour of importlib.*:DeprecationWarning +filterwarnings = error diff --git a/setup.cfg b/setup.cfg index 9103522..5ad0bb6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,10 +20,7 @@ classifiers = Intended Audience :: Developers License :: OSI Approved :: MIT License Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 @@ -44,13 +41,9 @@ install_requires= pyflakes >= 2.3.0, < 2.4.0 pycodestyle >= 2.7.0, < 2.8.0 mccabe >= 0.6.0, < 0.7.0 - enum34; python_version<"3.4" - typing; python_version<"3.5" - configparser; python_version<"3.2" - functools32; python_version<"3.2" importlib-metadata; python_version<"3.8" -python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* +python_requires = >=3.6 [options.packages.find] where = src diff --git a/tox.ini b/tox.ini index 85423ec..26a60d4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,9 @@ [tox] minversion=2.3.1 -envlist = py27,py35,py36,py37,py38,flake8,linters,docs +envlist = py36,py37,py38,flake8,linters,docs [testenv] deps = - mock>=2.0.0 pytest!=3.0.5,!=5.2.3 coverage commands = @@ -14,14 +13,8 @@ commands = # ensure 100% coverage of tests coverage report --fail-under 100 --include tests/* -[testenv:venv] -deps = - . -commands = {posargs} - # Dogfood our current master version [testenv:dogfood] -basepython = python3 skip_install = true deps = wheel @@ -33,7 +26,6 @@ commands = # Linters [testenv:flake8] -basepython = python3 skip_install = true deps = flake8 @@ -46,7 +38,6 @@ commands = flake8 src/flake8/ tests/ setup.py [testenv:pylint] -basepython = python3 skip_install = true deps = pyflakes @@ -55,7 +46,6 @@ commands = pylint src/flake8 [testenv:doc8] -basepython = python3 skip_install = true deps = sphinx @@ -64,14 +54,12 @@ commands = doc8 docs/source/ [testenv:pre-commit] -basepython = python3 skip_install = true deps = pre-commit commands = pre-commit run --all-files --show-diff-on-failure [testenv:bandit] -basepython = python3 skip_install = true deps = bandit @@ -79,7 +67,6 @@ commands = bandit -r src/flake8/ -c .bandit.yml [testenv:linters] -basepython = python3 skip_install = true deps = {[testenv:flake8]deps} @@ -96,7 +83,6 @@ commands = # Documentation [testenv:docs] -basepython = python3 deps = -rdocs/source/requirements.txt commands = @@ -104,7 +90,6 @@ commands = sphinx-build -E -W -c docs/source/ -b man docs/source/ docs/build/man [testenv:serve-docs] -basepython = python3 skip_install = true changedir = docs/build/html deps = @@ -112,7 +97,6 @@ commands = python -m http.server {posargs} [testenv:readme] -basepython = python3 deps = readme_renderer commands = @@ -120,7 +104,6 @@ commands = # Release tooling [testenv:build] -basepython = python3 skip_install = true deps = wheel @@ -129,7 +112,6 @@ commands = python setup.py -q sdist bdist_wheel [testenv:release] -basepython = python3 skip_install = true deps = {[testenv:build]deps}