Skip to content

Commit

Permalink
remove broken Python2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
a-detiste committed Nov 19, 2024
1 parent 3845ac2 commit c07686d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from setuptools import setup

HERE = os.path.dirname(os.path.abspath(__file__))
PY3 = sys.version_info[0] == 3


def get_version():
Expand Down Expand Up @@ -41,7 +40,6 @@ def get_version():
"password": ["passlib >= 1.6, < 2.0"],
"color": ["colour>=0.0.4"],
"i18n": ["SQLAlchemy-i18n >= 0.8.2"],
"ipaddress": ["ipaddr"] if not PY3 else [],
"timezone": ["python-dateutil"],
}

Expand Down
5 changes: 2 additions & 3 deletions tests/test_select_field.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from decimal import Decimal

import six
import sqlalchemy as sa
from wtforms_components import SelectField

Expand Down Expand Up @@ -69,11 +68,11 @@ def test_unicode_coerces_values_to_unicode_strings(self):
self.init(type_=sa.Unicode(255), info={"choices": choices})
form = self.form_class(MultiDict({"test_column": "2.0"}))
assert form.test_column.data == "2.0"
assert isinstance(form.test_column.data, six.text_type)
assert isinstance(form.test_column.data, str)

def test_unicode_text_coerces_values_to_unicode_strings(self):
choices = [("1.0", "1.0"), ("2.0", "2.0")]
self.init(type_=sa.UnicodeText, info={"choices": choices})
form = self.form_class(MultiDict({"test_column": "2.0"}))
assert form.test_column.data == "2.0"
assert isinstance(form.test_column.data, six.text_type)
assert isinstance(form.test_column.data, str)

0 comments on commit c07686d

Please sign in to comment.