Skip to content

Commit

Permalink
Remove python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
silentsokolov committed Oct 19, 2022
1 parent 69fade4 commit 8b1f332
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 51 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: 2.7
flask-version: "0.10.*"
- python-version: 2.7
flask-version: "0.11.*"

- python-version: 3.6
flask-version: "0.12.*"
- python-version: 3.6
Expand All @@ -29,25 +24,25 @@ jobs:
flask-version: "2.0.*"

- python-version: 3.7
flask-version: "1.0.*"
flask-version: "2.0.*"
- python-version: 3.7
flask-version: "1.1.*"
flask-version: "2.1.*"
- python-version: 3.7
flask-version: "2.0.*"
flask-version: "2.2.*"

- python-version: 3.8
flask-version: "1.0.*"
flask-version: "2.0.*"
- python-version: 3.8
flask-version: "1.1.*"
flask-version: "2.1.*"
- python-version: 3.8
flask-version: "2.0.*"
flask-version: "2.2.*"

- python-version: 3.9
flask-version: "1.0.*"
flask-version: "2.0.*"
- python-version: 3.9
flask-version: "1.1.*"
flask-version: "2.1.*"
- python-version: 3.9
flask-version: "2.0.*"
flask-version: "2.2.*"
coverage: true

steps:
Expand Down
4 changes: 0 additions & 4 deletions flask_thumbnails/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

__author__ = "Dmitriy Sokolov"
__version__ = "1.1.0"

Expand Down
4 changes: 0 additions & 4 deletions flask_thumbnails/storage_backends.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import errno
import os

Expand Down
4 changes: 0 additions & 4 deletions flask_thumbnails/thumbnail.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import os
from io import BytesIO

Expand Down
15 changes: 2 additions & 13 deletions flask_thumbnails/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import importlib
import os
import sys


def import_from_string(path):
Expand All @@ -30,10 +25,7 @@ def generate_filename(original_filename, *options):


def parse_size(size):
if sys.version_info < (3,):
integer_types = (int,)
else:
integer_types = (int,)
integer_types = (int,)

if isinstance(size, integer_types):
# If the size parameter is a single number, assume square aspect.
Expand All @@ -60,10 +52,7 @@ def parse_size(size):


def aspect_to_string(size):
if sys.version_info < (3,):
str_type = basestring # pylint: disable=undefined-variable
else:
str_type = str
str_type = str

if isinstance(size, str_type):
return size
Expand Down
4 changes: 0 additions & 4 deletions tests/core_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import os
import tempfile
import unittest
Expand Down
4 changes: 0 additions & 4 deletions tests/storage_backends_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import os
import shutil
import tempfile
Expand Down
4 changes: 0 additions & 4 deletions tests/utils_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import unittest

from flask_thumbnails.utils import (
Expand Down

0 comments on commit 8b1f332

Please sign in to comment.