from __future__ import absolute_import

# Monkeypatch pip.vendor.six into just six
try:
    import six
except ImportError:
    import sys
    from . import six

    sys.modules["six"] = six

from __future__ import absolute_import

# Monkeypatch pip.vendor.six into just six
#   This is kind of terrible, however it is the least bad of 3 bad options
#   #1 Ship pip with ``six`` such that it gets installed as a regular module
#   #2 Modify pip.vendor.html5lib so that instead of ``import six`` it uses
#       ``from pip.vendor import six``.
#   #3 This monkeypatch which adds six to the top level modules only when
#       pip.vendor.* is being used.
#
#   #1 involves pollutiong the globally installed packages and possibly
#   preventing people from using older or newer versions of the six library
#   #2 Means we've modified upstream which makes it more dificult to upgrade
#   in the future and paves the way for us to be in charge of maintaining it.
#   #3 Allows us to not modify upstream while only pollutiong the global
#   namespace when ``pip.vendor`` has been imported, which in typical usage
#   is isolated to command line evocations.
try:
    import six
except ImportError:
    import sys
    from . import six

    sys.modules["six"] = six

Document the reasons why we are monkeypatching six into sys.modules
Document the reasons why we are monkeypatching six into sys.modules

  from __future__ import absolute_import
  
  # Monkeypatch pip.vendor.six into just six
+ #   This is kind of terrible, however it is the least bad of 3 bad options
+ #   #1 Ship pip with ``six`` such that it gets installed as a regular module
+ #   #2 Modify pip.vendor.html5lib so that instead of ``import six`` it uses
+ #       ``from pip.vendor import six``.
+ #   #3 This monkeypatch which adds six to the top level modules only when
+ #       pip.vendor.* is being used.
+ #
+ #   #1 involves pollutiong the globally installed packages and possibly
+ #   preventing people from using older or newer versions of the six library
+ #   #2 Means we've modified upstream which makes it more dificult to upgrade
+ #   in the future and paves the way for us to be in charge of maintaining it.
+ #   #3 Allows us to not modify upstream while only pollutiong the global
+ #   namespace when ``pip.vendor`` has been imported, which in typical usage
+ #   is isolated to command line evocations.
  try:
      import six
  except ImportError:
      import sys
      from . import six
  
      sys.modules["six"] = six
  
Document the reasons why we are monkeypatching six into sys.modules
## Code Before:
from __future__ import absolute_import

# Monkeypatch pip.vendor.six into just six
try:
    import six
except ImportError:
    import sys
    from . import six

    sys.modules["six"] = six

## Instruction:
Document the reasons why we are monkeypatching six into sys.modules
## Code After:
from __future__ import absolute_import

# Monkeypatch pip.vendor.six into just six
#   This is kind of terrible, however it is the least bad of 3 bad options
#   #1 Ship pip with ``six`` such that it gets installed as a regular module
#   #2 Modify pip.vendor.html5lib so that instead of ``import six`` it uses
#       ``from pip.vendor import six``.
#   #3 This monkeypatch which adds six to the top level modules only when
#       pip.vendor.* is being used.
#
#   #1 involves pollutiong the globally installed packages and possibly
#   preventing people from using older or newer versions of the six library
#   #2 Means we've modified upstream which makes it more dificult to upgrade
#   in the future and paves the way for us to be in charge of maintaining it.
#   #3 Allows us to not modify upstream while only pollutiong the global
#   namespace when ``pip.vendor`` has been imported, which in typical usage
#   is isolated to command line evocations.
try:
    import six
except ImportError:
    import sys
    from . import six

    sys.modules["six"] = six
