From f3ccafe3aedee0dc2ec320e3121869785e730bb8 Mon Sep 17 00:00:00 2001 From: micbou Date: Thu, 9 Mar 2017 15:57:27 +0100 Subject: [PATCH 1/2] Do not install aliases from future Installing aliases from python-future is unreliable and slow. --- python/ycm/base.py | 3 +-- python/ycm/client/base_request.py | 10 ++++------ python/ycm/client/command_request.py | 3 +-- python/ycm/client/completer_available_request.py | 3 +-- python/ycm/client/completion_request.py | 3 +-- python/ycm/client/debug_info_request.py | 3 +-- python/ycm/client/event_notification.py | 3 +-- python/ycm/client/omni_completion_request.py | 3 +-- python/ycm/client/shutdown_request.py | 3 +-- python/ycm/client/ycmd_keepalive.py | 3 +-- python/ycm/diagnostic_filter.py | 3 +-- python/ycm/diagnostic_interface.py | 3 +-- python/ycm/omni_completer.py | 3 +-- python/ycm/paths.py | 3 +-- python/ycm/syntax_parse.py | 3 +-- python/ycm/tests/__init__.py | 3 +-- python/ycm/tests/base_test.py | 3 +-- python/ycm/tests/client/command_request_test.py | 3 +-- python/ycm/tests/client/completion_request_test.py | 3 +-- python/ycm/tests/client/debug_info_request_test.py | 3 +-- .../ycm/tests/client/omni_completion_request_tests.py | 3 +-- python/ycm/tests/command_test.py | 3 +-- python/ycm/tests/completion_test.py | 3 +-- python/ycm/tests/diagnostic_filter_test.py | 3 +-- python/ycm/tests/event_notification_test.py | 3 +-- python/ycm/tests/omni_completer_test.py | 5 ++--- python/ycm/tests/paths_test.py | 3 +-- python/ycm/tests/postcomplete_test.py | 3 +-- python/ycm/tests/syntax_parse_test.py | 3 +-- python/ycm/tests/test_utils.py | 3 +-- python/ycm/tests/vimsupport_test.py | 3 +-- python/ycm/tests/youcompleteme_test.py | 3 +-- python/ycm/vimsupport.py | 3 +-- python/ycm/youcompleteme.py | 3 +-- 34 files changed, 38 insertions(+), 73 deletions(-) diff --git a/python/ycm/base.py b/python/ycm/base.py index 4de4c0bf..4bfb3663 100644 --- a/python/ycm/base.py +++ b/python/ycm/base.py @@ -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 diff --git a/python/ycm/client/base_request.py b/python/ycm/client/base_request.py index 99067b68..c8660c65 100644 --- a/python/ycm/client/base_request.py +++ b/python/ycm/client/base_request.py @@ -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 ): diff --git a/python/ycm/client/command_request.py b/python/ycm/client/command_request.py index 5f728c92..fee5b2b3 100644 --- a/python/ycm/client/command_request.py +++ b/python/ycm/client/command_request.py @@ -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, diff --git a/python/ycm/client/completer_available_request.py b/python/ycm/client/completer_available_request.py index 37d53d88..d9b11e25 100644 --- a/python/ycm/client/completer_available_request.py +++ b/python/ycm/client/completer_available_request.py @@ -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, diff --git a/python/ycm/client/completion_request.py b/python/ycm/client/completion_request.py index 1325711d..76c969a0 100644 --- a/python/ycm/client/completion_request.py +++ b/python/ycm/client/completion_request.py @@ -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 diff --git a/python/ycm/client/debug_info_request.py b/python/ycm/client/debug_info_request.py index d7a5822b..e7eb0522 100644 --- a/python/ycm/client/debug_info_request.py +++ b/python/ycm/client/debug_info_request.py @@ -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, diff --git a/python/ycm/client/event_notification.py b/python/ycm/client/event_notification.py index e797ddb6..b46dd5e6 100644 --- a/python/ycm/client/event_notification.py +++ b/python/ycm/client/event_notification.py @@ -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, diff --git a/python/ycm/client/omni_completion_request.py b/python/ycm/client/omni_completion_request.py index 2bcb2911..7fc76594 100644 --- a/python/ycm/client/omni_completion_request.py +++ b/python/ycm/client/omni_completion_request.py @@ -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 diff --git a/python/ycm/client/shutdown_request.py b/python/ycm/client/shutdown_request.py index 31fd6c53..8bef0235 100644 --- a/python/ycm/client/shutdown_request.py +++ b/python/ycm/client/shutdown_request.py @@ -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 diff --git a/python/ycm/client/ycmd_keepalive.py b/python/ycm/client/ycmd_keepalive.py index ecf5fe39..a36d6998 100644 --- a/python/ycm/client/ycmd_keepalive.py +++ b/python/ycm/client/ycmd_keepalive.py @@ -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 diff --git a/python/ycm/diagnostic_filter.py b/python/ycm/diagnostic_filter.py index 78ab2972..e31e6e70 100644 --- a/python/ycm/diagnostic_filter.py +++ b/python/ycm/diagnostic_filter.py @@ -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 diff --git a/python/ycm/diagnostic_interface.py b/python/ycm/diagnostic_interface.py index e905b6ad..438942e7 100644 --- a/python/ycm/diagnostic_interface.py +++ b/python/ycm/diagnostic_interface.py @@ -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 diff --git a/python/ycm/omni_completer.py b/python/ycm/omni_completer.py index 2424ddd7..2587e088 100644 --- a/python/ycm/omni_completer.py +++ b/python/ycm/omni_completer.py @@ -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 diff --git a/python/ycm/paths.py b/python/ycm/paths.py index 292a2a17..c715154f 100644 --- a/python/ycm/paths.py +++ b/python/ycm/paths.py @@ -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 diff --git a/python/ycm/syntax_parse.py b/python/ycm/syntax_parse.py index 8bb3d711..964361a2 100644 --- a/python/ycm/syntax_parse.py +++ b/python/ycm/syntax_parse.py @@ -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 diff --git a/python/ycm/tests/__init__.py b/python/ycm/tests/__init__.py index b02d1204..40d4422d 100644 --- a/python/ycm/tests/__init__.py +++ b/python/ycm/tests/__init__.py @@ -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 diff --git a/python/ycm/tests/base_test.py b/python/ycm/tests/base_test.py index 3ce7ff2a..3b4fd4f0 100644 --- a/python/ycm/tests/base_test.py +++ b/python/ycm/tests/base_test.py @@ -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 diff --git a/python/ycm/tests/client/command_request_test.py b/python/ycm/tests/client/command_request_test.py index a205990d..854b498b 100644 --- a/python/ycm/tests/client/command_request_test.py +++ b/python/ycm/tests/client/command_request_test.py @@ -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 diff --git a/python/ycm/tests/client/completion_request_test.py b/python/ycm/tests/client/completion_request_test.py index 0c764522..c3bd1aed 100644 --- a/python/ycm/tests/client/completion_request_test.py +++ b/python/ycm/tests/client/completion_request_test.py @@ -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_ diff --git a/python/ycm/tests/client/debug_info_request_test.py b/python/ycm/tests/client/debug_info_request_test.py index 570e92e5..9ce2a433 100644 --- a/python/ycm/tests/client/debug_info_request_test.py +++ b/python/ycm/tests/client/debug_info_request_test.py @@ -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 diff --git a/python/ycm/tests/client/omni_completion_request_tests.py b/python/ycm/tests/client/omni_completion_request_tests.py index 02fb2e93..6b699622 100644 --- a/python/ycm/tests/client/omni_completion_request_tests.py +++ b/python/ycm/tests/client/omni_completion_request_tests.py @@ -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 diff --git a/python/ycm/tests/command_test.py b/python/ycm/tests/command_test.py index e894647b..25a2eb88 100644 --- a/python/ycm/tests/command_test.py +++ b/python/ycm/tests/command_test.py @@ -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 ) diff --git a/python/ycm/tests/completion_test.py b/python/ycm/tests/completion_test.py index f5fb958c..e16de3fa 100644 --- a/python/ycm/tests/completion_test.py +++ b/python/ycm/tests/completion_test.py @@ -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, diff --git a/python/ycm/tests/diagnostic_filter_test.py b/python/ycm/tests/diagnostic_filter_test.py index c24e4e0b..9ecff64b 100644 --- a/python/ycm/tests/diagnostic_filter_test.py +++ b/python/ycm/tests/diagnostic_filter_test.py @@ -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 diff --git a/python/ycm/tests/event_notification_test.py b/python/ycm/tests/event_notification_test.py index ee010fde..dde191d1 100644 --- a/python/ycm/tests/event_notification_test.py +++ b/python/ycm/tests/event_notification_test.py @@ -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, diff --git a/python/ycm/tests/omni_completer_test.py b/python/ycm/tests/omni_completer_test.py index 907066b9..3342768b 100644 --- a/python/ycm/tests/omni_completer_test.py +++ b/python/ycm/tests/omni_completer_test.py @@ -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 diff --git a/python/ycm/tests/paths_test.py b/python/ycm/tests/paths_test.py index 1c1c6fb9..4c2458e6 100644 --- a/python/ycm/tests/paths_test.py +++ b/python/ycm/tests/paths_test.py @@ -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 diff --git a/python/ycm/tests/postcomplete_test.py b/python/ycm/tests/postcomplete_test.py index 84b71b92..5b2c788a 100644 --- a/python/ycm/tests/postcomplete_test.py +++ b/python/ycm/tests/postcomplete_test.py @@ -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 diff --git a/python/ycm/tests/syntax_parse_test.py b/python/ycm/tests/syntax_parse_test.py index 0a8fb760..7c656633 100644 --- a/python/ycm/tests/syntax_parse_test.py +++ b/python/ycm/tests/syntax_parse_test.py @@ -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 diff --git a/python/ycm/tests/test_utils.py b/python/ycm/tests/test_utils.py index c8a4d497..652b0089 100644 --- a/python/ycm/tests/test_utils.py +++ b/python/ycm/tests/test_utils.py @@ -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 diff --git a/python/ycm/tests/vimsupport_test.py b/python/ycm/tests/vimsupport_test.py index db8dcc81..3fc5d362 100644 --- a/python/ycm/tests/vimsupport_test.py +++ b/python/ycm/tests/vimsupport_test.py @@ -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 diff --git a/python/ycm/tests/youcompleteme_test.py b/python/ycm/tests/youcompleteme_test.py index 27990bc5..7ee2c9ce 100644 --- a/python/ycm/tests/youcompleteme_test.py +++ b/python/ycm/tests/youcompleteme_test.py @@ -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, diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 3584d412..384dd9bc 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -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 diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index 3fa33846..4027f477 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -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 From 41fb6537e290256fc3ca585bcd54860e67f1d7e5 Mon Sep 17 00:00:00 2001 From: micbou Date: Sat, 18 Mar 2017 04:51:50 +0100 Subject: [PATCH 2/2] Update ycmd Changelog: - update Clang to 4.0.0; - startup improvement. --- third_party/ycmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/ycmd b/third_party/ycmd index 60c5bba4..e7096293 160000 --- a/third_party/ycmd +++ b/third_party/ycmd @@ -1 +1 @@ -Subproject commit 60c5bba489a24148afe501216a6a37d4fa669e15 +Subproject commit e709629389e7fe524e3c18e6896026956d968d16