Some Python 2 removals

This commit is contained in:
Dave Halter
2020-07-02 03:34:44 +02:00
parent 332631434c
commit 0790f376ca
4 changed files with 3 additions and 16 deletions

View File

@@ -18,11 +18,7 @@ Options:
"""
import time
try:
# For Python 2
import cProfile as profile
except ImportError:
import profile
import profile
import pstats
from docopt import docopt

View File

@@ -37,7 +37,6 @@ setup(name='jedi',
install_requires=install_requires,
extras_require={
'testing': [
# Pytest 5 doesn't support Python 2 anymore.
'pytest<6.0.0',
# docopt for sith doctests
'docopt',

View File

@@ -291,14 +291,6 @@ except ImportError as i_a:
i_a
#? ImportError()
i_a
try:
import math
except ImportError, i_b:
# TODO check this only in Python2
##? ['i_b']
i_b
##? ImportError()
i_b
class MyException(Exception):

View File

@@ -15,7 +15,7 @@ def test_folder_io_walk():
root, folder_ios, file_ios = next(iterator)
assert folder_ios
assert root.path == join(root_dir, 'ns2')
folder_ios[:] = [] # Not folder_ios.clear() because Python 2
folder_ios.clear()
assert next(iterator, None) is None
@@ -23,5 +23,5 @@ def test_folder_io_walk2():
root_dir = get_example_dir('namespace_package')
iterator = FolderIO(root_dir).walk()
root, folder_ios, file_ios = next(iterator)
folder_ios[:] = [] # Not folder_ios.clear() because Python 2
folder_ios.clear()
assert next(iterator, None) is None