Skip to content

Commit c13572e

Browse files
committed
Version bump to v3.0.0-beta.39
+ Fix Windows pipe mode + Using relative imports
1 parent 91bad29 commit c13572e

5 files changed

Lines changed: 9 additions & 13 deletions

File tree

‎SublimeCodeIntel.py‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,9 @@
2929
from __future__ import absolute_import, unicode_literals, print_function
3030

3131
NAME = "SublimeCodeIntel"
32-
VERSION = "3.0.0-beta.38"
32+
VERSION = "3.0.0-beta.39"
3333

3434
import os
35-
import sys
36-
__file__ = os.path.normpath(os.path.abspath(__file__))
37-
__path__ = os.path.dirname(__file__)
38-
python_sitelib_path = os.path.join(os.path.normpath(__path__), 'libs')
39-
if python_sitelib_path not in sys.path:
40-
sys.path.insert(0, python_sitelib_path)
41-
4235
import re
4336
import logging
4437
import textwrap
@@ -48,7 +41,7 @@
4841
import sublime
4942
import sublime_plugin
5043

51-
from codeintel import CodeIntel, CodeIntelBuffer, logger as codeintel_logger, logger_level as codeintel_logger_level
44+
from .libs.codeintel import CodeIntel, CodeIntelBuffer, logger as codeintel_logger, logger_level as codeintel_logger_level
5245
from .settings import Settings, SettingTogglerCommandMixin
5346

5447
logger_name = 'CodeIntel'

‎libs/__init__.py‎

Whitespace-only changes.

‎libs/codeintel.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def cleanup(self):
323323

324324

325325
if sys.platform.startswith("win"):
326-
from win32_named_pipe import Win32Pipe
326+
from .win32_named_pipe import Win32Pipe
327327

328328
class _PipeConnection(Win32Pipe):
329329
"""This is a wrapper around our Win32Pipe class to expose the expected
@@ -585,7 +585,7 @@ def find_command(self):
585585
return codeintel_command
586586

587587
def init_child(self):
588-
import process
588+
from . import process
589589
assert threading.current_thread().name != "MainThread", \
590590
"CodeIntelManager.init_child should run on background thread!"
591591
self.log.debug("initializing child process")

‎libs/process.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ def subprocess_import(attr):
117117

118118
# Check if this is Windows NT and above.
119119
if sys.platform == "win32" and sys.getwindowsversion()[3] == 2:
120-
import winprocess
120+
try:
121+
from . import winprocess
122+
except:
123+
import winprocess
121124

122125
try:
123126
# These subprocess variables have moved around between Python versions.

‎libs/win32_named_pipe.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def read(self, count):
212212
True):
213213
raise ctypes.WinError(ctypes.get_last_error())
214214
assert read.value == count
215-
return str(buf.value)
215+
return buf.value
216216
finally:
217217
CloseHandle(overlapped.hEvent)
218218

0 commit comments

Comments
 (0)