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