Skip to content

Commit

Permalink
Issue NASA-AMMOS#199 - Upgrade to Python 3.10
Browse files Browse the repository at this point in the history
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 NASA-AMMOS#199
  • Loading branch information
christianmkuss committed Dec 9, 2022
1 parent 654bc55 commit d8f3a05
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: python
python:
- "3.7"
- "3.10"

branches:
only:
Expand All @@ -12,4 +12,4 @@ env:
install:
- pip install .[tests]

script: python setup.py nosetests
script: pytest --ignore ait/dsn/bin/examples --cov=ait
2 changes: 1 addition & 1 deletion ait/dsn/bch/test/bch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import os
import unittest
import mock
from unittest import mock

import ait.core
from ait.dsn.bch.bch import BCH
Expand Down
6 changes: 3 additions & 3 deletions ait/dsn/encrypt/test/test_encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import unittest
import binascii

import nose.tools
import pytest
from unittest import mock

import ait.core.cfg as cfg
Expand Down Expand Up @@ -71,7 +71,7 @@ def test_factory(self):
encr = EncrypterFactory().get(null_classname)
assert isinstance(encr, NullEncrypter)

with nose.tools.assert_raises(ImportError):
with pytest.raises(ImportError):
EncrypterFactory().get(invalid_classname)

class TestNullEncrypter(unittest.TestCase):
Expand Down Expand Up @@ -144,7 +144,7 @@ def test_kmc_encrypter(self):
assert ait_result.has_errors

# Failed import of KMC lib results in a Name error
#with nose.tools.assert_raises(NameError):
#with pytest.raises(NameError):
# encr.connect()
encr.connect()
assert not encr.is_connected()
Expand Down
2 changes: 1 addition & 1 deletion ait/dsn/sle/test/frames_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import os
import unittest
import mock
from unittest import mock

import ait.core
from ait.dsn.sle.frames import AOSTransFrame, AOSConfig, AOSDataFieldType
Expand Down
Binary file added config/leapseconds.dat
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDDIR = build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(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/)
$(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/)
endif

# Internal variables.
Expand Down
Empty file modified doc/make.bat
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
formats:
- none
python:
version: 3.7
version: 3.10
pip_install: true
extra_requirements:
- docs
Expand Down
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name = 'ait-dsn',
version = '2.0.1-rc1',
version = '2.1.0',
description = description,
long_description = long_description,
long_description_content_type = 'text/x-rst',
Expand All @@ -38,8 +38,7 @@
namespace_packages = ['ait'],

install_requires = [
'greenlet==0.4.16',
'ait-core>=2.0.0',
'ait-core>=2.4.0',
'pyasn1',
'bitstring'
],
Expand All @@ -51,9 +50,8 @@
'sphinxcontrib-httpdomain'
],
'tests': [
'nose',
'coverage',
'mock',
'pytest',
'pytest-cov',
'pylint'
],
},
Expand Down

0 comments on commit d8f3a05

Please sign in to comment.