Skip to content

Commit

Permalink
Drop support for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed May 5, 2019
1 parent 25efcd0 commit 76c6155
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Full documentation is available at https://marshmallow.readthedocs.io/ .
Requirements
============

- Python >= 2.7 or >= 3.5
- Python >= 3.5

marshmallow has no external dependencies outside of the Python standard library, although `python-dateutil <https://pypi.python.org/pypi/python-dateutil>`_ is recommended for robust datetime deserialization.

Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Installation
============

**marshmallow** requires Python >= 2.7 or >= 3.5. It has no external dependencies other than the Python standard library.
**marshmallow** requires Python >= 3.5. It has no external dependencies other than the Python standard library.

.. note::

Expand Down
8 changes: 0 additions & 8 deletions tests/test_deserialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,14 +1013,6 @@ def test_field_deserialization_with_custom_error_message(self):
field.deserialize('invalid')
assert 'Bad value.' in str(excinfo)

def test_field_deserialization_with_non_utf8_value(self):
non_utf8_char = '\xc8'
field = fields.String()
# This exception only happens in Python version <= 2.7
if isinstance(non_utf8_char, bytes):
with pytest.raises(ValidationError) as excinfo:
field.deserialize(non_utf8_char)
assert excinfo.value.args[0] == 'Not a valid utf-8 string.'

# No custom deserialization behavior, so a dict is returned
class SimpleUserSchema(Schema):
Expand Down
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ deps = pre-commit~=1.14
skip_install = true
commands = pre-commit run --all-files

[testenv:py27]
commands = pytest --ignore=tests/test_py3/ {posargs}

[testenv:docs]
deps = -rdocs/requirements.txt
extras =
Expand Down

0 comments on commit 76c6155

Please sign in to comment.