mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Some Python 2 removals
This commit is contained in:
@@ -18,10 +18,6 @@ Options:
|
||||
"""
|
||||
|
||||
import time
|
||||
try:
|
||||
# For Python 2
|
||||
import cProfile as profile
|
||||
except ImportError:
|
||||
import profile
|
||||
import pstats
|
||||
|
||||
|
||||
1
setup.py
1
setup.py
@@ -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',
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user