Drop Python 2.7 support
* remove 2/3-compatibility code
* remove six dependency
* remove 2.7 testing
Markus Gerstel
2 years ago
11 | 11 |
sudo: true
|
12 | 12 |
- python: 3.6
|
13 | 13 |
- python: 3.5
|
14 | |
- python: 2.7
|
15 | 14 |
- python: pypy
|
16 | 15 |
- os: osx
|
17 | 16 |
language: generic
|
|
25 | 24 |
- os: osx
|
26 | 25 |
language: generic
|
27 | 26 |
env: CONDA=3.5 TOXENV=py35
|
28 | |
- os: osx
|
29 | |
language: generic
|
30 | |
env: CONDA=2.7 TOXENV=py27
|
31 | 27 |
|
32 | 28 |
allow_failures:
|
33 | 29 |
- env: OPTIONAL=1
|
101 | 101 |
2. If the pull request adds functionality, the docs should be updated. Put
|
102 | 102 |
your new functionality into a function with a docstring, and add the
|
103 | 103 |
feature to the list in README.rst.
|
104 | |
3. The pull request should work for Python 2.7, 3.5, 3.6, 3.7, 3.8, and for PyPy. Check
|
|
104 |
3. The pull request should work for supported CPython versions, and for PyPy. Check
|
105 | 105 |
https://travis-ci.org/DiamondLightSource/python-procrunner/pull_requests
|
106 | 106 |
and make sure that the tests pass for all supported Python versions.
|
107 | 107 |
|
0 | 0 |
=======
|
1 | 1 |
History
|
2 | 2 |
=======
|
|
3 |
|
|
4 |
2.0.0
|
|
5 |
-----
|
|
6 |
|
|
7 |
* Python 3.5+ only, support for Python 2.7 has been dropped
|
|
8 |
|
3 | 9 |
|
4 | 10 |
1.1.0 (2019-11-04)
|
5 | 11 |
------------------
|
2 | 2 |
from __future__ import absolute_import, division, print_function
|
3 | 3 |
|
4 | 4 |
import codecs
|
|
5 |
import io
|
5 | 6 |
import logging
|
6 | 7 |
import os
|
7 | 8 |
import select
|
8 | |
import six
|
9 | 9 |
import subprocess
|
10 | 10 |
import sys
|
11 | 11 |
import time
|
|
111 | 111 |
|
112 | 112 |
def __init__(self, stream, output=True, debug=False, notify=None, callback=None):
|
113 | 113 |
"""Creates and starts a thread which reads from a stream."""
|
114 | |
self._buffer = six.BytesIO()
|
|
114 |
self._buffer = io.BytesIO()
|
115 | 115 |
self._closed = False
|
116 | 116 |
self._closing = False
|
117 | 117 |
self._debug = debug
|
|
300 | 300 |
)
|
301 | 301 |
return command
|
302 | 302 |
|
303 | |
if not command or not isinstance(command[0], six.string_types):
|
|
303 |
if not command or not isinstance(command[0], str):
|
304 | 304 |
return command
|
305 | 305 |
|
306 | 306 |
try:
|
2 | 2 |
flake8==3.7.8
|
3 | 3 |
mock==3.0.5
|
4 | 4 |
pip==19.1.1
|
5 | |
pytest==4.5.0 # pyup: <5.0 # for Python 2.7 support
|
|
5 |
pytest==4.5.0
|
6 | 6 |
pytest-runner==5.1
|
7 | |
six==1.12.0
|
8 | |
Sphinx==1.8.5 # pyup: <2.0 # for Python 2.7 support
|
|
7 |
Sphinx==1.8.5
|
9 | 8 |
tox==3.13.1
|
10 | 9 |
twine==1.13.0
|
11 | 10 |
watchdog==0.9.0
|
10 | 10 |
history = history_file.read()
|
11 | 11 |
|
12 | 12 |
requirements = [
|
13 | |
"six",
|
14 | 13 |
'pywin32; sys_platform=="win32"',
|
15 | 14 |
]
|
16 | 15 |
|
|
30 | 29 |
"License :: OSI Approved :: BSD License",
|
31 | 30 |
"Natural Language :: English",
|
32 | 31 |
"Operating System :: OS Independent",
|
33 | |
"Programming Language :: Python :: 2",
|
34 | |
"Programming Language :: Python :: 2.7",
|
35 | 32 |
"Programming Language :: Python :: 3",
|
36 | 33 |
"Programming Language :: Python :: 3.5",
|
37 | 34 |
"Programming Language :: Python :: 3.6",
|
|
49 | 46 |
keywords="procrunner",
|
50 | 47 |
name="procrunner",
|
51 | 48 |
packages=find_packages(include=["procrunner"]),
|
|
49 |
python_requires=">=3.5",
|
52 | 50 |
setup_requires=setup_requirements,
|
53 | 51 |
test_suite="tests",
|
54 | 52 |
tests_require=test_requirements,
|
0 | 0 |
[tox]
|
1 | |
envlist = py27, py35, py36, py37, py38, flake8
|
|
1 |
envlist = py35, py36, py37, py38, flake8
|
2 | 2 |
|
3 | 3 |
[travis]
|
4 | 4 |
python =
|
|
6 | 6 |
3.7: py37
|
7 | 7 |
3.6: py36
|
8 | 8 |
3.5: py35
|
9 | |
2.7: py27
|
10 | 9 |
|
11 | 10 |
[testenv:flake8]
|
12 | 11 |
basepython = python
|