Skip to content

Commit d8f3a05

Browse files
Issue #199 - Upgrade to Python 3.10
Because of the strictly pinned versions this library would only work with Python 3.7, as stated in the documentation. Since the dependencies are well founded they provide support for newer versions of Python, including Python 3.10. By migrating to the newer versions this library will now support Python3.10 but drop support for other versions. Nose is no longer maintained and does not support 3.9+. This commit removes nose as a dependency in favor of pytest. Fixes #199
1 parent 654bc55 commit d8f3a05

9 files changed

Lines changed: 13 additions & 15 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: python
22
python:
3-
- "3.7"
3+
- "3.10"
44

55
branches:
66
only:
@@ -12,4 +12,4 @@ env:
1212
install:
1313
- pip install .[tests]
1414

15-
script: python setup.py nosetests
15+
script: pytest --ignore ait/dsn/bin/examples --cov=ait

ait/dsn/bch/test/bch_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import os
1616
import unittest
17-
import mock
17+
from unittest import mock
1818

1919
import ait.core
2020
from ait.dsn.bch.bch import BCH

ait/dsn/encrypt/test/test_encrypt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import unittest
1919
import binascii
2020

21-
import nose.tools
21+
import pytest
2222
from unittest import mock
2323

2424
import ait.core.cfg as cfg
@@ -71,7 +71,7 @@ def test_factory(self):
7171
encr = EncrypterFactory().get(null_classname)
7272
assert isinstance(encr, NullEncrypter)
7373

74-
with nose.tools.assert_raises(ImportError):
74+
with pytest.raises(ImportError):
7575
EncrypterFactory().get(invalid_classname)
7676

7777
class TestNullEncrypter(unittest.TestCase):
@@ -144,7 +144,7 @@ def test_kmc_encrypter(self):
144144
assert ait_result.has_errors
145145

146146
# Failed import of KMC lib results in a Name error
147-
#with nose.tools.assert_raises(NameError):
147+
#with pytest.raises(NameError):
148148
# encr.connect()
149149
encr.connect()
150150
assert not encr.is_connected()

ait/dsn/sle/test/frames_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import os
1616
import unittest
17-
import mock
17+
from unittest import mock
1818

1919
import ait.core
2020
from ait.dsn.sle.frames import AOSTransFrame, AOSConfig, AOSDataFieldType

config/leapseconds.dat

497 Bytes
Binary file not shown.

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BUILDDIR = build
99

1010
# User-friendly check for sphinx-build
1111
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12-
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/)
12+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/)
1313
endif
1414

1515
# Internal variables.

doc/make.bat

100644100755
File mode changed.

readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
formats:
22
- none
33
python:
4-
version: 3.7
4+
version: 3.10
55
pip_install: true
66
extra_requirements:
77
- docs

setup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
setup(
2828
name = 'ait-dsn',
29-
version = '2.0.1-rc1',
29+
version = '2.1.0',
3030
description = description,
3131
long_description = long_description,
3232
long_description_content_type = 'text/x-rst',
@@ -38,8 +38,7 @@
3838
namespace_packages = ['ait'],
3939

4040
install_requires = [
41-
'greenlet==0.4.16',
42-
'ait-core>=2.0.0',
41+
'ait-core>=2.4.0',
4342
'pyasn1',
4443
'bitstring'
4544
],
@@ -51,9 +50,8 @@
5150
'sphinxcontrib-httpdomain'
5251
],
5352
'tests': [
54-
'nose',
55-
'coverage',
56-
'mock',
53+
'pytest',
54+
'pytest-cov',
5755
'pylint'
5856
],
5957
},

0 commit comments

Comments
 (0)