Skip to content

Drop py27 and py34 support #5318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,28 @@ install:
jobs:
include:
# OSX tests - first (in test stage), since they are the slower ones.
- &test-macos
os: osx
- os: osx
# NOTE: (tests with) pexpect appear to be buggy on Travis,
# at least with coverage.
# Log: https://travis-ci.org/pytest-dev/pytest/jobs/500358864
osx_image: xcode10.1
language: generic
# Coverage for:
# - py2 with symlink in test_cmdline_python_package_symlink.
env: TOXENV=py27-xdist PYTEST_COVERAGE=1
before_install:
- python -V
- test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 27
- <<: *test-macos
env: TOXENV=py37-pexpect,py37-xdist PYTEST_COVERAGE=1
env: TOXENV=py37-xdist PYTEST_COVERAGE=1
before_install:
- which python3
- python3 -V
- ln -sfn "$(which python3)" /usr/local/bin/python
- python -V
- test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 37

# Full run of latest (major) supported versions, without xdist.
- env: TOXENV=py27
python: '2.7'
# Full run of latest supported version, without xdist.
- env: TOXENV=py37
python: '3.7'

# Coverage tracking is slow with pypy, skip it.
- env: TOXENV=pypy-xdist
python: 'pypy'
- env: TOXENV=pypy3-xdist
python: 'pypy3'

- env: TOXENV=py34-xdist
python: '3.4'
- env: TOXENV=py35-xdist
python: '3.5'

Expand All @@ -62,12 +51,6 @@ jobs:
# Empty PYTEST_ADDOPTS to run this non-verbose.
- env: TOXENV=py37-lsof-numpy-xdist PYTEST_COVERAGE=1 PYTEST_ADDOPTS=

# Specialized factors for py27.
- env: TOXENV=py27-nobyte-numpy-xdist
python: '2.7'
- env: TOXENV=py27-pluggymaster-xdist
python: '2.7'

# Specialized factors for py37.
# Coverage for:
# - test_sys_breakpoint_interception (via pexpect).
Expand All @@ -81,12 +64,7 @@ jobs:
if: type = cron

- stage: baseline
# Coverage for:
# - _pytest.unittest._handle_skip (via pexpect).
env: TOXENV=py27-pexpect,py27-twisted PYTEST_COVERAGE=1
python: '2.7'
# Use py36 here for faster baseline.
- env: TOXENV=py36-xdist
env: TOXENV=py36-xdist
python: '3.6'
- env: TOXENV=linting,docs,doctesting PYTEST_COVERAGE=1
cache:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Features
- Can run `unittest <https://docs.pytest.org/en/latest/unittest.html>`_ (or trial),
`nose <https://docs.pytest.org/en/latest/nose.html>`_ test suites out of the box;

- Python 2.7, Python 3.4+, PyPy 2.3, Jython 2.5 (untested);
- Python 3.5+ and PyPy3;

- Rich plugin architecture, with over 315+ `external plugins <http://plugincompat.herokuapp.com>`_ and thriving community;

Expand Down
41 changes: 1 addition & 40 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ trigger:

variables:
PYTEST_ADDOPTS: "--junitxml=build/test-results/$(tox.env).xml -vv"
python.needs_vc: False
COVERAGE_FILE: "$(Build.Repository.LocalPath)/.coverage"
COVERAGE_PROCESS_START: "$(Build.Repository.LocalPath)/.coveragerc"
PYTEST_COVERAGE: '0'
Expand All @@ -16,44 +15,10 @@ jobs:
vmImage: "vs2017-win2016"
strategy:
matrix:
py27:
python.version: '2.7'
tox.env: 'py27'
py27-nobyte-lsof-numpy:
python.version: '2.7'
tox.env: 'py27-lsof-nobyte-numpy'
# Coverage for:
# - test_supports_breakpoint_module_global
# - test_terminal_reporter_writer_attr (without xdist)
# - "if write" branch in _pytest.assertion.rewrite
# - numpy
# - pytester's LsofFdLeakChecker (being skipped)
PYTEST_COVERAGE: '1'
py27-twisted:
python.version: '2.7'
tox.env: 'py27-twisted'
python.needs_vc: True
py27-pluggymaster-xdist:
python.version: '2.7'
tox.env: 'py27-pluggymaster-xdist'
# Coverage for:
# - except-IOError in _attempt_to_close_capture_file for py2.
# Also seen with py27-nobyte (using xdist), and py27-xdist.
# But no exception with py27-pexpect,py27-twisted,py27-numpy.
PYTEST_COVERAGE: '1'
# -- pypy2 and pypy3 are disabled for now: #5279 --
# pypy:
# python.version: 'pypy2'
# tox.env: 'pypy'
# -- pypy3 disabled for now: #5279 --
# pypy3:
# python.version: 'pypy3'
# tox.env: 'pypy3'
py34-xdist:
python.version: '3.4'
tox.env: 'py34-xdist'
# Coverage for:
# - _pytest.compat._bytes_to_ascii
PYTEST_COVERAGE: '1'
py35-xdist:
python.version: '3.5'
tox.env: 'py35-xdist'
Expand Down Expand Up @@ -87,10 +52,6 @@ jobs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: choco install vcpython27
condition: eq(variables['python.needs_vc'], True)
displayName: 'Install VC for py27'

- script: python -m pip install --upgrade pip && python -m pip install tox
displayName: 'Install tox'

Expand Down
1 change: 1 addition & 0 deletions doc/en/_templates/globaltoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
<li><a href="{{ pathto('changelog') }}">Changelog</a></li>
<li><a href="{{ pathto('contributing') }}">Contributing</a></li>
<li><a href="{{ pathto('backwards-compatibility') }}">Backwards Compatibility</a></li>
<li><a href="{{ pathto('py27-py34-deprecation') }}">Python 2.7 and 3.4 Support</a></li>
<li><a href="{{ pathto('license') }}">License</a></li>
<li><a href="{{ pathto('contact') }}">Contact Channels</a></li>
</ul>
Expand Down
3 changes: 1 addition & 2 deletions doc/en/example/markers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ its test methods:
This is equivalent to directly applying the decorator to the
two test functions.

To remain backward-compatible with Python 2.4 you can also set a
``pytestmark`` attribute on a TestClass like this:
Due to legacy reasons, it is possible to set the ``pytestmark`` attribute on a TestClass like this:

.. code-block:: python

Expand Down
4 changes: 2 additions & 2 deletions doc/en/getting-started.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Installation and Getting Started
===================================

**Pythons**: Python 2.7, 3.4, 3.5, 3.6, 3.7, Jython, PyPy-2.3
**Pythons**: Python 3.5, 3.6, 3.7, PyPy3

**Platforms**: Unix/Posix and Windows
**Platforms**: Linux and Windows

**PyPI package name**: `pytest <https://pypi.org/project/pytest/>`_

Expand Down
3 changes: 1 addition & 2 deletions doc/en/goodpractices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Good Integration Practices
Install package with pip
-------------------------------------------------

For development, we recommend you use venv_ for virtual environments
(or virtualenv_ for Python 2.7) and
For development, we recommend you use venv_ for virtual environments and
pip_ for installing your application and any dependencies,
as well as the ``pytest`` package itself.
This ensures your code and dependencies are isolated from your system Python installation.
Expand Down
2 changes: 1 addition & 1 deletion doc/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Features

- Can run :ref:`unittest <unittest>` (including trial) and :ref:`nose <noseintegration>` test suites out of the box;

- Python 2.7, Python 3.4+, PyPy 2.3, Jython 2.5 (untested);
- Python Python 3.5+ and PyPy 3;

- Rich plugin architecture, with over 315+ `external plugins <http://plugincompat.herokuapp.com>`_ and thriving community;

Expand Down
14 changes: 3 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[metadata]

name = pytest
description = pytest: simple powerful testing with Python
long_description = file: README.rst
Expand All @@ -23,13 +22,11 @@ classifiers =
Topic :: Software Development :: Testing
Topic :: Software Development :: Libraries
Topic :: Utilities
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
platforms = unix, linux, osx, cygwin, win32

[options]
Expand All @@ -43,8 +40,7 @@ packages =
_pytest.mark

py_modules = pytest
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*

python_requires = >=3.5

[options.entry_points]
console_scripts =
Expand All @@ -59,13 +55,9 @@ all_files = 1
[upload_sphinx]
upload-dir = doc/en/build/html

[bdist_wheel]
universal = 1

[check-manifest]
ignore =
_pytest/_version.py


[devpi:upload]
formats = sdist.tgz,bdist_wheel
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
"six>=1.10.0",
"packaging",
"attrs>=17.4.0",
'more-itertools>=4.0.0,<6.0.0;python_version<="2.7"',
'more-itertools>=4.0.0;python_version>"2.7"',
"more-itertools>=4.0.0",
"atomicwrites>=1.0",
'funcsigs>=1.0;python_version<"3.0"',
'pathlib2>=2.2.0;python_version<"3.6"',
'colorama;sys_platform=="win32"',
"pluggy>=0.12,<1.0",
Expand All @@ -30,9 +28,9 @@ def main():
"testing": [
"argcomplete",
"hypothesis>=3.56",
"mock",
"nose",
"requests",
"mock;python_version=='2.7'",
],
},
# fmt: on
Expand Down
Loading