diff --git a/matplotlib_scalebar/scalebar.py b/matplotlib_scalebar/scalebar.py index d4c7917..f89eb04 100644 --- a/matplotlib_scalebar/scalebar.py +++ b/matplotlib_scalebar/scalebar.py @@ -111,11 +111,15 @@ def _validate_legend_loc(loc): } ) + +_all_deprecated = getattr(matplotlib, "_all_deprecated", {}) + + # Recreate the validate function matplotlib.rcParams.validate = dict( (key, converter) for key, (default, converter) in defaultParams.items() - if key not in matplotlib._all_deprecated + if key not in _all_deprecated ) # Dimension lookup diff --git a/setup.py b/setup.py index 450c0a4..b188976 100644 --- a/setup.py +++ b/setup.py @@ -35,10 +35,15 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Topic :: Scientific/Engineering :: Visualization", ], packages=find_packages(), package_data={}, + python_requires='~=3.7', install_requires=["matplotlib"], zip_safe=True, cmdclass=versioneer.get_cmdclass(),