Do not install aliases from future

Installing aliases from python-future is unreliable and slow.
This commit is contained in:
micbou 2017-03-09 15:57:27 +01:00
parent 6583da75bd
commit f3ccafe3ae
No known key found for this signature in database
GPG Key ID: C7E8FD1F3BDA1E05
34 changed files with 38 additions and 73 deletions

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from future.utils import iteritems

View File

@ -19,14 +19,13 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
import contextlib
import logging
import urllib.parse
import json
from future.moves.urllib.parse import urljoin, urlparse
from future.utils import native
from base64 import b64decode, b64encode
from ycm import vimsupport
@ -120,7 +119,7 @@ class BaseRequest( object ):
headers = dict( _HEADERS )
headers[ _HMAC_HEADER ] = b64encode(
CreateRequestHmac( ToBytes( method ),
ToBytes( urllib.parse.urlparse( request_uri ).path ),
ToBytes( urlparse( request_uri ).path ),
request_body,
BaseRequest.hmac_secret ) )
return headers
@ -263,8 +262,7 @@ def _ValidateResponseObject( response ):
def _BuildUri( handler ):
return native( ToBytes( urllib.parse.urljoin( BaseRequest.server_location,
handler ) ) )
return native( ToBytes( urljoin( BaseRequest.server_location, handler ) ) )
def MakeServerException( data ):

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.client.base_request import ( BaseRequest, BuildRequestData,

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.client.base_request import ( BaseRequest, BuildRequestData,

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycmd.utils import ToUnicode

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.client.base_request import ( BaseRequest, BuildRequestData,

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.client.base_request import ( BaseRequest, BuildRequestData,

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.client.completion_request import CompletionRequest

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.client.base_request import BaseRequest, HandleServerException

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
import time

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from future.utils import iterkeys, iteritems

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from future.utils import itervalues, iteritems

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
import vim

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
import os

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from future.utils import itervalues

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import MockVimModule

View File

@ -22,8 +22,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
import contextlib

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import ExtendedMock, MockVimModule

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from nose.tools import eq_

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from copy import deepcopy

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from mock import MagicMock

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import ( MockVimModule, MockVimBuffers, VimBuffer )

View File

@ -21,8 +21,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import ( CurrentWorkingDirectory, ExtendedMock,

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import MockVimModule

View File

@ -21,8 +21,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import ( CurrentWorkingDirectory, ExtendedMock,

View File

@ -21,11 +21,10 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from future.utils import PY2
from future.utils import PY2
from mock import patch, call
from nose.tools import eq_
from hamcrest import contains_string

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import MockVimModule

View File

@ -21,8 +21,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import MockVimModule

View File

@ -20,8 +20,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import MockVimModule

View File

@ -20,8 +20,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from mock import MagicMock, patch

View File

@ -21,8 +21,7 @@
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests import PathToTestFile

View File

@ -19,8 +19,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from ycm.tests.test_utils import ( ExtendedMock, MockVimBuffers, MockVimModule,

View File

@ -20,8 +20,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from future.utils import iterkeys

View File

@ -20,8 +20,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
# Not installing aliases from python-future; it's unreliable and slow.
from builtins import * # noqa
from future.utils import iteritems