Skip to content
Snippets Groups Projects
Commit 3b8e44ef authored by Jonas Haag's avatar Jonas Haag
Browse files

Drop six

parent ad3920ac
No related branches found
No related tags found
No related merge requests found
FROM alpine:edge
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk add --no-cache uwsgi-python3 git ctags py3-six py3-markupsafe py3-pygments \
apk add --no-cache uwsgi-python3 git ctags py3-markupsafe py3-pygments \
py3-dulwich py3-humanize py3-flask py3-flask-markdown py3-docutils
RUN apk add --no-cache python3-dev py3-pip gcc musl-dev && \
......
from six.moves import filter
try:
# Python < 3
from itertools import ifilter as filter
except ImportError:
pass
from pygments import highlight
from pygments.lexers import (
......
......@@ -8,7 +8,6 @@ import mimetypes
import locale
import warnings
import subprocess
import six
try:
import chardet
......@@ -136,7 +135,12 @@ def decode_from_git(b):
def force_unicode(s):
"""Do all kinds of magic to turn `s` into unicode"""
# It's already unicode, don't do anything:
if isinstance(s, six.text_type):
try:
# Python < 3
text_type = unicode
except NameError:
text_type = str
if isinstance(s, text_type):
return s
last_exc = None
......
......@@ -16,7 +16,6 @@ def install_data_files_hack():
install_data_files_hack()
requires = [
"six",
"flask",
"Werkzeug>=0.15.0",
"pygments",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment