From 40ee300605d84c29fd447c3b7e08d4bf8c3d5be8 Mon Sep 17 00:00:00 2001 From: Alexander Shadchin Date: Wed, 9 Dec 2020 03:45:14 +0300 Subject: [PATCH] Add support Python 3.9 --- .travis.yml | 1 + pycbrf/banks.py | 10 +++------- setup.py | 1 + tox.ini | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4744850..7b3749a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ dist: xenial language: python python: + - 3.9 - 3.8 - 3.7 - 3.6 diff --git a/pycbrf/banks.py b/pycbrf/banks.py index 8ca4149..b0a77df 100644 --- a/pycbrf/banks.py +++ b/pycbrf/banks.py @@ -14,11 +14,7 @@ LOG = getLogger(__name__) -class _BankBase(NamedTuple): - """Base from banks.""" - - -class BankLegacy(_BankBase, NamedTuple): +class BankLegacy(NamedTuple): """Represents bank entry in legacy format. Such objects will populate Banks().banks @@ -53,7 +49,7 @@ class BankLegacy(_BankBase, NamedTuple): swift: Optional[str] -class Bank(_BankBase, NamedTuple): +class Bank(NamedTuple): """Represents bank entry in current format. Such objects will populate Banks().banks @@ -217,7 +213,7 @@ def pick_value(in_dict): # Some fields may be missing in Bank/BankLegacy continue - if isinstance(value, _BankBase): + if isinstance(value, (BankLegacy, Bank)): value = pick_value(value._asdict()) elif isinstance(value, bool): diff --git a/setup.py b/setup.py index 4c3a1cc..c0d01ef 100644 --- a/setup.py +++ b/setup.py @@ -66,6 +66,7 @@ def get_version(): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'License :: OSI Approved :: BSD License', ], ) diff --git a/tox.ini b/tox.ini index 7bc7c07..93e5114 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # See http://tox.readthedocs.org/en/latest/examples.html for samples. [tox] -envlist = py{36,37,38} +envlist = py{36,37,38,39} skip_missing_interpreters = True