Drop six dependency and Python 2 support

This commit is contained in:
Quantum 2022-01-27 22:30:01 -05:00
parent 4235472f93
commit c96ca2bce7
2 changed files with 5 additions and 10 deletions

View file

@ -2,7 +2,6 @@ import json
import sys import sys
import requests import requests
import six
from purge_static.utils import chunk from purge_static.utils import chunk
@ -24,17 +23,17 @@ class CloudFlareCDN(object):
self.api_token = credentials.get('api_token') self.api_token = credentials.get('api_token')
if self.api_token: if self.api_token:
if not isinstance(self.api_token, six.string_types): if not isinstance(self.api_token, str):
sys.exit('In credentials file: key "api_token" should map to a string') sys.exit('In credentials file: key "api_token" should map to a string')
self.email = self.api_key = None self.email = self.api_key = None
else: else:
self.email = credentials.get('email') self.email = credentials.get('email')
if not isinstance(self.email, six.string_types): if not isinstance(self.email, str):
sys.exit('In credentials file: key "email" should map to a string') sys.exit('In credentials file: key "email" should map to a string')
self.api_key = credentials.get('api_key') self.api_key = credentials.get('api_key')
if not isinstance(self.api_key, six.string_types): if not isinstance(self.api_key, str):
sys.exit('In credentials file: key "api_key" should map to a string') sys.exit('In credentials file: key "api_key" should map to a string')
self.zone = args.zone self.zone = args.zone

View file

@ -25,7 +25,7 @@ setup(
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
license='MIT', license='MIT',
keywords='cloudflare cdn static cache purge', keywords='cloudflare cdn static cache purge',
install_requires=['requests', 'six'], install_requires=['requests'],
classifiers=[ classifiers=[
'Development Status :: 3 - Alpha', 'Development Status :: 3 - Alpha',
'Environment :: Console', 'Environment :: Console',
@ -35,15 +35,11 @@ setup(
'Operating System :: POSIX', 'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows', 'Operating System :: Microsoft :: Windows',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Internet :: WWW/HTTP :: Site Management',
'Topic :: System :: Systems Administration', 'Topic :: System :: Systems Administration',
'Topic :: Utilities', 'Topic :: Utilities',