diff --git a/.gitignore b/.gitignore index 71e155a..4d2b37f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ env/ -venv/ +*venv*/ __pycache__/ .cache/ *.pyc diff --git a/.travis.yml b/.travis.yml index e41802a..6602daf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ python: - "3.4" - "3.5" - "3.6" + - "3.9" + - "3.10" before_install: - pip install pytest pytest-cov pytest-datafiles diff --git a/namedtupled/integrations.py b/namedtupled/integrations.py index 2032b92..106bc43 100644 --- a/namedtupled/integrations.py +++ b/namedtupled/integrations.py @@ -24,10 +24,10 @@ def load_json(data=None, path=None, name='NT'): def load_yaml(data=None, path=None, name='NT'): """ Map namedtuples with yaml data. """ if data and not path: - return mapper(yaml.load(data), _nt_name=name) + return mapper(yaml.full_load(data), _nt_name=name) if path and not data: with open(path, 'r') as f: - data = yaml.load(f) + data = yaml.full_load(f) return mapper(data, _nt_name=name) if data and path: raise ValueError('expected one source and received two') diff --git a/namedtupled/namedtupled.py b/namedtupled/namedtupled.py index bf8d590..a161007 100644 --- a/namedtupled/namedtupled.py +++ b/namedtupled/namedtupled.py @@ -1,6 +1,7 @@ from future import standard_library standard_library.install_aliases() -from collections import Mapping, namedtuple, UserDict +from collections import namedtuple, UserDict +from collections.abc import Mapping def mapper(mapping, _nt_name='NT'): diff --git a/requirements.txt b/requirements.txt index feb913e..9510828 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -future==0.15.2 -PyYAML==3.11 +future==0.18.2 +PyYAML==6.0 diff --git a/setup.py b/setup.py index b5dcc5b..ce43e0d 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ setup( name='namedtupled', packages=['namedtupled'], - version='0.3.3', + version='0.3.4', description='Lightweight namedtuple wrapper for attribute-style data access (a la JavaScript objects).', long_description=brief_description, classifiers=[ @@ -62,6 +62,9 @@ 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', ], author='brennv', author_email='brennan@beta.build', @@ -70,8 +73,8 @@ download_url='https://github.com/brennv/namedtupled/tarball/0.3.3', keywords='namedtupled namedtuple json yaml attribute style data access javascript objects', install_requires=[ - 'future', - 'pyyaml', + 'future==0.18.2', + 'pyyaml==6.0', ], include_package_data=True, zip_safe=False)