mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-19 01:24:13 +08:00
Remove force_unicode
This commit is contained in:
@@ -18,7 +18,7 @@ import weakref
|
||||
from functools import partial
|
||||
from threading import Thread
|
||||
|
||||
from jedi._compatibility import is_py3, force_unicode, \
|
||||
from jedi._compatibility import is_py3, \
|
||||
pickle_dump, pickle_load, GeneralizedPopen
|
||||
from jedi import debug
|
||||
from jedi.cache import memoize_method
|
||||
@@ -236,10 +236,6 @@ class CompiledSubprocess(object):
|
||||
if self.is_crashed:
|
||||
raise InternalError("The subprocess %s has crashed." % self._executable)
|
||||
|
||||
if not is_py3:
|
||||
# Python 2 compatibility
|
||||
kwargs = {force_unicode(key): value for key, value in kwargs.items()}
|
||||
|
||||
data = inference_state_id, function, args, kwargs
|
||||
try:
|
||||
pickle_dump(data, self._get_process().stdin, PICKLE_PROTOCOL)
|
||||
@@ -389,9 +385,8 @@ class AccessHandle(object):
|
||||
if name in ('id', 'access') or name.startswith('_'):
|
||||
raise AttributeError("Something went wrong with unpickling")
|
||||
|
||||
# if not is_py3: print >> sys.stderr, name
|
||||
# print('getattr', name, file=sys.stderr)
|
||||
return partial(self._workaround, force_unicode(name))
|
||||
return partial(self._workaround, name)
|
||||
|
||||
def _workaround(self, name, *args, **kwargs):
|
||||
"""
|
||||
|
||||
@@ -4,7 +4,7 @@ import os
|
||||
import re
|
||||
import inspect
|
||||
|
||||
from jedi._compatibility import find_module, cast_path, force_unicode, \
|
||||
from jedi._compatibility import find_module, cast_path, \
|
||||
all_suffixes
|
||||
from jedi.inference.compiled import access
|
||||
from jedi import debug
|
||||
@@ -44,7 +44,7 @@ def get_module_info(inference_state, sys_path=None, full_name=None, **kwargs):
|
||||
|
||||
|
||||
def get_builtin_module_names(inference_state):
|
||||
return list(map(force_unicode, sys.builtin_module_names))
|
||||
return sys.builtin_module_names
|
||||
|
||||
|
||||
def _test_raise_error(inference_state, exception_type):
|
||||
|
||||
Reference in New Issue
Block a user