Remove Python 2 references

This commit is contained in:
Ülgen Sarıkavak 2022-02-07 17:55:01 +03:00
parent 7c874b2477
commit c1a2f1b5a8
2 changed files with 1 additions and 9 deletions

View File

@ -69,10 +69,6 @@ def convert_choices_to_named_enum_with_descriptions(name, choices):
def description(self): def description(self):
return named_choices_descriptions[self.name] return named_choices_descriptions[self.name]
if named_choices == []:
# Python 2.7 doesn't handle enums with lists with zero entries, but works okay with empty sets
named_choices = set()
return Enum(name, named_choices, type=EnumWithDescriptionsType) return Enum(name, named_choices, type=EnumWithDescriptionsType)

View File

@ -19,8 +19,7 @@ tests_require = [
"coveralls", "coveralls",
"mock", "mock",
"pytz", "pytz",
"django-filter<2;python_version<'3'", "django-filter>=2",
"django-filter>=2;python_version>='3'",
"pytest-django>=3.3.2", "pytest-django>=3.3.2",
] + rest_framework_require ] + rest_framework_require
@ -45,10 +44,7 @@ setup(
"Development Status :: 3 - Alpha", "Development Status :: 3 - Alpha",
"Intended Audience :: Developers", "Intended Audience :: Developers",
"Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"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 :: Implementation :: PyPy", "Programming Language :: Python :: Implementation :: PyPy",