1
0
Fork 0

Remove leftovers of Python 2 support

This commit is contained in:
Damien Baty 2023-03-18 10:22:12 +01:00
parent 5e34e0b557
commit 1c071770bb
3 changed files with 3 additions and 9 deletions

View File

@ -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)

View File

@ -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

View File

@ -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):