forked from jsocol/pystatsd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop support for pythons <3.7 (including python 2). Since this makes it part of the standard library, replace `mock` with `unittest.mock` in tests. This also required replacing `nose` with `pytest` in tests This is because `nose` is not under active development[1], and the version specified fails to run on python3 (and newer versions fail to run on python3.10[2]): $ python -m nose Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details __import__(pkg_name) File "/home/mjh/src/pystatsd/.venv/lib/python3.10/site-packages/nose/__init__.py", line 1, in <module> from nose.core import collector, main, run, run_exit, runmodule File "/home/mjh/src/pystatsd/.venv/lib/python3.10/site-packages/nose/core.py", line 143 print "%s version %s" % (os.path.basename(sys.argv[0]), __version__) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? `pytest` is pinned at the lowest version supporting python3.10[3], similarly for coverage[4], `flake8` was also bump to a more recent version. [1] https://nose.readthedocs.io/en/latest/#note-to-users [2] nose-devs/nose#1122 [3] https://docs.pytest.org/en/7.1.x/changelog.html#pytest-6-2-5-2021-08-29 [4] https://coverage.readthedocs.io/en/6.4.1/changes.html#version-6-0-2021-10-03
- Loading branch information
1 parent
f3f304b
commit fafbe77
Showing
6 changed files
with
33 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "pypy" | ||
- "3.9" | ||
- "3.10" | ||
- "pypy3" | ||
dist: focal | ||
install: | ||
- pip install -q "flake8" | ||
- pip install -r requirements.txt | ||
script: | ||
- nosetests --with-coverage --cover-package=statsd | ||
- pytest statsd/tests.py | ||
- flake8 statsd/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
mock==1.0.1 | ||
nose==1.2.1 | ||
flake8==1.7.0 | ||
flake8>=4.0 | ||
pytest>=6.2.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters