mirror of https://github.com/dbcli/pgcli
Remove leftovers of Python 2 support
This commit is contained in:
parent
5e34e0b557
commit
1c071770bb
|
@ -26,7 +26,7 @@ def keyring_initialize(keyring_enabled, *, logger):
|
|||
|
||||
try:
|
||||
keyring = importlib.import_module("keyring")
|
||||
except Exception as e: # ImportError for Python 2, ModuleNotFoundError for Python 3
|
||||
except ModuleNotFoundError as e:
|
||||
logger.warning("import keyring failed: %r.", e)
|
||||
|
||||
|
||||
|
|
|
@ -70,10 +70,7 @@ from .__init__ import __version__
|
|||
|
||||
click.disable_unicode_literals_warning = True
|
||||
|
||||
try:
|
||||
from urlparse import urlparse
|
||||
except ImportError:
|
||||
from urllib.parse import urlparse
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from getpass import getuser
|
||||
|
||||
|
|
|
@ -3,10 +3,7 @@ import pexpect
|
|||
from pgcli.main import COLOR_CODE_REGEX
|
||||
import textwrap
|
||||
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
from io import StringIO
|
||||
from io import StringIO
|
||||
|
||||
|
||||
def expect_exact(context, expected, timeout):
|
||||
|
|
Loading…
Reference in New Issue