Merge pull request #2822 from RonnyPfannschmidt/nomore-py26

Nomore py26
This commit is contained in:
Ronny Pfannschmidt 2017-10-10 07:00:08 +02:00 committed by GitHub
commit dd45f8ba6c
6 changed files with 13 additions and 40 deletions

View File

@ -31,10 +31,6 @@ env:
matrix: matrix:
include: include:
- env: TOXENV=py26
python: '2.6'
- env: TOXENV=py33
python: '3.3'
- env: TOXENV=pypy - env: TOXENV=pypy
python: 'pypy-5.4' python: 'pypy-5.4'
- env: TOXENV=py35 - env: TOXENV=py35

View File

@ -4,7 +4,6 @@ python version compatibility code
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import sys import sys
import inspect import inspect
import types
import re import re
import functools import functools
import codecs import codecs
@ -120,16 +119,6 @@ def getfuncargnames(function, startindex=None, cls=None):
return tuple(argnames[startindex:]) return tuple(argnames[startindex:])
if sys.version_info[:2] == (2, 6):
def isclass(object):
""" Return true if the object is a class. Overrides inspect.isclass for
python 2.6 because it will return True for objects which always return
something on __getattr__ calls (see #1035).
Backport of https://hg.python.org/cpython/rev/35bf8f7a8edc
"""
return isinstance(object, (type, types.ClassType))
if _PY3: if _PY3:
imap = map imap = map
izip = zip izip = zip
@ -230,10 +219,7 @@ def getimfunc(func):
try: try:
return func.__func__ return func.__func__
except AttributeError: except AttributeError:
try: return func
return func.im_func
except AttributeError:
return func
def safe_getattr(object, name, default): def safe_getattr(object, name, default):

View File

@ -10,9 +10,7 @@ environment:
- TOXENV: "coveralls" - TOXENV: "coveralls"
# note: please use "tox --listenvs" to populate the build matrix below # note: please use "tox --listenvs" to populate the build matrix below
- TOXENV: "linting" - TOXENV: "linting"
- TOXENV: "py26"
- TOXENV: "py27" - TOXENV: "py27"
- TOXENV: "py33"
- TOXENV: "py34" - TOXENV: "py34"
- TOXENV: "py35" - TOXENV: "py35"
- TOXENV: "py36" - TOXENV: "py36"

1
changelog/2812.removal Normal file
View File

@ -0,0 +1 @@
remove support for the eol python versions 2.6 and 3.3

View File

@ -16,7 +16,7 @@ classifiers = [
'Topic :: Utilities', 'Topic :: Utilities',
] + [ ] + [
('Programming Language :: Python :: %s' % x) ('Programming Language :: Python :: %s' % x)
for x in '2 2.6 2.7 3 3.3 3.4 3.5 3.6'.split() for x in '2.7 3 3.4 3.5 3.6'.split()
] ]
with open('README.rst') as fd: with open('README.rst') as fd:
@ -50,12 +50,8 @@ def main():
install_requires.append('pluggy>=0.4.0,<0.5') install_requires.append('pluggy>=0.4.0,<0.5')
extras_require = {} extras_require = {}
if has_environment_marker_support(): if has_environment_marker_support():
extras_require[':python_version=="2.6"'] = ['argparse', 'ordereddict']
extras_require[':sys_platform=="win32"'] = ['colorama'] extras_require[':sys_platform=="win32"'] = ['colorama']
else: else:
if sys.version_info < (2, 7):
install_requires.append('argparse')
install_requires.append('ordereddict')
if sys.platform == 'win32': if sys.platform == 'win32':
install_requires.append('colorama') install_requires.append('colorama')
@ -69,9 +65,11 @@ def main():
url='http://pytest.org', url='http://pytest.org',
license='MIT license', license='MIT license',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
author='Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others', author=(
entry_points={'console_scripts': 'Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, '
['pytest=pytest:main', 'py.test=pytest:main']}, 'Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others'),
entry_points={'console_scripts': [
'pytest=pytest:main', 'py.test=pytest:main']},
classifiers=classifiers, classifiers=classifiers,
keywords="test unittest", keywords="test unittest",
cmdclass={'test': PyTest}, cmdclass={'test': PyTest},
@ -87,10 +85,13 @@ def main():
class PyTest(Command): class PyTest(Command):
user_options = [] user_options = []
def initialize_options(self): def initialize_options(self):
pass pass
def finalize_options(self): def finalize_options(self):
pass pass
def run(self): def run(self):
import subprocess import subprocess
PPATH = [x for x in os.environ.get('PYTHONPATH', '').split(':') if x] PPATH = [x for x in os.environ.get('PYTHONPATH', '').split(':') if x]

13
tox.ini
View File

@ -4,9 +4,7 @@ distshare = {homedir}/.tox/distshare
# make sure to update environment list in travis.yml and appveyor.yml # make sure to update environment list in travis.yml and appveyor.yml
envlist = envlist =
linting linting
py26
py27 py27
py33
py34 py34
py35 py35
py36 py36
@ -27,13 +25,6 @@ deps =
mock mock
requests requests
[testenv:py26]
# pinning mock to last supported version for python 2.6
deps =
hypothesis<3.0
nose
mock<1.1
[testenv:py27-subprocess] [testenv:py27-subprocess]
changedir = . changedir = .
deps = deps =
@ -54,7 +45,7 @@ deps =
pygments pygments
restructuredtext_lint restructuredtext_lint
commands = commands =
flake8 pytest.py _pytest testing flake8 pytest.py _pytest testing setup.py pytest.py
{envpython} scripts/check-rst.py {envpython} scripts/check-rst.py
[testenv:py27-xdist] [testenv:py27-xdist]
@ -174,7 +165,7 @@ usedevelop = True
deps = deps =
autopep8 autopep8
commands = commands =
autopep8 --in-place -r --max-line-length=120 --exclude=test_source_multiline_block.py _pytest testing autopep8 --in-place -r --max-line-length=120 --exclude=test_source_multiline_block.py _pytest testing setup.py pytest.py
[testenv:jython] [testenv:jython]
changedir = testing changedir = testing