bb799a
From 39a70cce69d9b08cc4d02b225114d556d5b59ada Mon Sep 17 00:00:00 2001
bb799a
From: Hugo van Kemenade <hugovk@users.noreply.github.com>
bb799a
Date: Wed, 19 Aug 2020 22:37:34 +0300
bb799a
Subject: [PATCH] Remove dependency on six to make package lighter (#331)
bb799a
bb799a
---
bb799a
 packaging/requirements.py | 8 +++++++-
bb799a
 setup.py                  | 2 +-
bb799a
 2 files changed, 8 insertions(+), 2 deletions(-)
bb799a
bb799a
diff --git a/packaging/requirements.py b/packaging/requirements.py
bb799a
index 91f81ed..2226e98 100644
bb799a
--- a/packaging/requirements.py
bb799a
+++ b/packaging/requirements.py
bb799a
@@ -5,16 +5,22 @@
bb799a
 
bb799a
 import string
bb799a
 import re
bb799a
+import sys
bb799a
 
bb799a
 from pyparsing import stringStart, stringEnd, originalTextFor, ParseException
bb799a
 from pyparsing import ZeroOrMore, Word, Optional, Regex, Combine
bb799a
 from pyparsing import Literal as L  # noqa
bb799a
-from six.moves.urllib import parse as urlparse
bb799a
 
bb799a
 from ._typing import TYPE_CHECKING
bb799a
 from .markers import MARKER_EXPR, Marker
bb799a
 from .specifiers import LegacySpecifier, Specifier, SpecifierSet
bb799a
 
bb799a
+if sys.version_info[0] >= 3:
bb799a
+    from urllib import parse as urlparse  # pragma: no cover
bb799a
+else:  # pragma: no cover
bb799a
+    import urlparse
bb799a
+
bb799a
+
bb799a
 if TYPE_CHECKING:  # pragma: no cover
bb799a
     from typing import List
bb799a
 
bb799a
diff --git a/setup.py b/setup.py
bb799a
index f533a7d..a14d926 100644
bb799a
--- a/setup.py
bb799a
+++ b/setup.py
bb799a
@@ -49,7 +49,7 @@
bb799a
     author=about["__author__"],
bb799a
     author_email=about["__email__"],
bb799a
     python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
bb799a
-    install_requires=["pyparsing>=2.0.2", "six"],  # Needed to avoid issue #91
bb799a
+    install_requires=["pyparsing>=2.0.2"],  # Needed to avoid issue #91
bb799a
     classifiers=[
bb799a
         "Development Status :: 5 - Production/Stable",
bb799a
         "Intended Audience :: Developers",