diff --git a/CHANGELOG b/CHANGELOG index 9c5ed3f..1f02922 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ v0.6 (unreleased): +- Dropped support for end-of-life Python versions 2.6, 3.2, 3.3. (#199, #204) - Fixed not being considered a single-only tag. (#200) v0.5.1 (released March 3, 2018): diff --git a/docs/changelog.rst b/docs/changelog.rst index 064ffe2..9924fac 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,9 @@ v0.6 Unreleased (`changes `__): +- Dropped support for end-of-life Python versions 2.6, 3.2, 3.3. + (`#199 `, + `#204 `) - Fixed `` not being considered a single-only tag. (`#200 `) diff --git a/setup.py b/setup.py index cb2491f..8f84eb5 100644 --- a/setup.py +++ b/setup.py @@ -76,13 +76,13 @@ if fallback: tokenizer = Extension("mwparserfromhell.parser._tokenizer", sources=sorted(glob("mwparserfromhell/parser/ctokenizer/*.c")), - depends=glob("mwparserfromhell/parser/ctokenizer/*.h")) + depends=sorted(glob("mwparserfromhell/parser/ctokenizer/*.h"))) setup( name = "mwparserfromhell", packages = find_packages(exclude=("tests",)), ext_modules = [tokenizer] if use_extension else [], - test_suite = "tests.discover", + test_suite = "tests", version = __version__, author = "Ben Kurtovic", author_email = "ben.kurtovic@gmail.com", diff --git a/tests/_test_tokenizer.py b/tests/_test_tokenizer.py index 187f5eb..c314df8 100644 --- a/tests/_test_tokenizer.py +++ b/tests/_test_tokenizer.py @@ -109,7 +109,7 @@ class TokenizerTestCase(object): print(error.format(filename)) continue if data["input"] is None or data["output"] is None: - error = "Test '{0}' in '{1}' was ignored because it lacked an input or an output" + error = "Test '{}' in '{}' was ignored because it lacked an input or an output" print(error.format(data["name"], filename)) continue @@ -126,7 +126,7 @@ class TokenizerTestCase(object): def build(cls): """Load and install all tests from the 'tokenizer' directory.""" def load_file(filename, restrict=None): - with codecs.open(filename, "rU", encoding="utf8") as fp: + with codecs.open(filename, "r", encoding="utf8") as fp: text = fp.read() name = path.split(filename)[1][:-len(extension)] cls._load_tests(filename, name, text, restrict) diff --git a/tests/discover.py b/tests/discover.py deleted file mode 100644 index a41af83..0000000 --- a/tests/discover.py +++ /dev/null @@ -1,17 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -It appears the default distutils test suite doesn't play nice with -``setUpClass`` thereby making some tests fail. Using ``unittest2`` to load -tests seems to work around that issue. - -http://stackoverflow.com/a/17004409/753501 -""" - -import os.path - -import unittest - -def additional_tests(): - project_root = os.path.split(os.path.dirname(__file__))[0] - return unittest.defaultTestLoader.discover(project_root)