Skip to content

Commit

Permalink
N/A: Remove deprecated python 3.4 support + fix tests in 2.7 (nvbn#1025)
Browse files Browse the repository at this point in the history
* N/A: Remove deprecated python 3.4 support

More details - https://www.python.org/downloads/release/python-3410/

* N/A: Remove Python 3.4 from appveyor config

* N/A: Fix UnicodeDecodeError with Python 2.7 and newer versions of py.test
  • Loading branch information
nvbn authored Dec 16, 2019
1 parent d10fc80 commit 60073be
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ matrix:
- python: "3.6-dev"
- python: "3.6"
- python: "3.5"
- python: "3.4"
- python: "2.7"
- os: osx
language: generic
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ build: false
environment:
matrix:
- PYTHON: "C:/Python27"
- PYTHON: "C:/Python34"
- PYTHON: "C:/Python35"
- PYTHON: "C:/Python36"
- PYTHON: "C:/Python37"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
print('thefuck requires Python version 2.7 or later' +
' ({}.{} detected).'.format(*version))
sys.exit(-1)
elif (3, 0) < version < (3, 4):
print('thefuck requires Python version 3.4 or later' +
elif (3, 0) < version < (3, 5):
print('thefuck requires Python version 3.5 or later' +
' ({}.{} detected).'.format(*version))
sys.exit(-1)

Expand Down
9 changes: 6 additions & 3 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,12 @@ def fail_on_warning(self):

@pytest.fixture(autouse=True)
def history(self, mocker):
return mocker.patch('thefuck.shells.shell.get_history',
return_value=['le cat', 'fuck', 'ls cat',
'diff x', 'nocommand x', u'café ô'])
mock = mocker.patch('thefuck.shells.shell.get_history')
# Passing as an argument causes `UnicodeDecodeError`
# with newer py.test and python 2.7
mock.return_value = ['le cat', 'fuck', 'ls cat',
'diff x', 'nocommand x', u'café ô']
return mock

@pytest.fixture(autouse=True)
def alias(self, mocker):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py34,py35,py36,py37,py38
envlist = py27,py35,py36,py37,py38

[testenv]
deps = -rrequirements.txt
Expand Down

0 comments on commit 60073be

Please sign in to comment.