Skip to content

Commit 6c283ae

Browse files
authored
Merge pull request #553 from ehuss/python3.8-fixes
Update for Python 3.14 changes.
2 parents 561fe3b + cb3ef88 commit 6c283ae

8 files changed

Lines changed: 8 additions & 21 deletions

‎.python-version‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.8

‎RustEnhanced.sublime-settings‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
// Specify environment variables to add when running Cargo.
2626
// "rust_env": {"PATH": "$PATH:$HOME/.cargo/bin"}
2727

28-
// If true, will use the environment from the user's login shell when
29-
// running Cargo.
30-
"rust_include_shell_env": true,
31-
3228
// For errors/warnings, how to show the inline message.
3329
// "normal" - Shows the message inline.
3430
// "popup" - Show popup on mouse hover.

‎dependencies.json‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
{
2-
"*": {
3-
"*": [
4-
"shellenv"
5-
]
6-
}
72
}

‎rust/cargo_config.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,8 @@ def _toolchain_list(self):
410410
# https://static.rust-lang.org/dist/index.html
411411
# (See https://github.com/rust-lang-nursery/rustup.rs/issues/215)
412412
shorthands = []
413-
channels = ['nightly', 'beta', 'stable', '\d\.\d{1,2}\.\d']
414-
pattern = '(%s)(?:-(\d{4}-\d{2}-\d{2}))?(?:-(.*))' % '|'.join(channels)
413+
channels = ['nightly', 'beta', 'stable', r'\d\.\d{1,2}\.\d']
414+
pattern = r'(%s)(?:-(\d{4}-\d{2}-\d{2}))?(?:-(.*))' % '|'.join(channels)
415415
for toolchain in output:
416416
m = re.match(pattern, toolchain)
417417
# Should always match.

‎rust/cargo_settings.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
'allows_release': True,
4949
'allows_features': True,
5050
'allows_json': True,
51-
'json_stop_pattern': '^\s*Running ',
51+
'json_stop_pattern': r'^\s*Running ',
5252
},
5353
'check': {
5454
'name': 'Check',

‎rust/messages.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def message_popup(view, point, hover_zone):
351351
on_nav = functools.partial(_click_handler, view, hide_popup=True)
352352
max_width = view.em_width() * 79
353353
_sublime_show_popup(view, minihtml, sublime.COOPERATE_WITH_AUTO_COMPLETE,
354-
point, max_width=max_width, on_navigate=on_nav)
354+
point, max_width=int(max_width), on_navigate=on_nav)
355355

356356

357357
STATUS_KEY = 'rust-msg-status'

‎rust/rust_proc.py‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import sys
1212
import threading
1313
import time
14-
import shellenv
1514
import sublime
1615
import traceback
1716

@@ -191,11 +190,6 @@ def run(self, window, cmd, cwd, listener, env=None,
191190

192191
# Configure the environment.
193192
self.env = os.environ.copy()
194-
if util.get_setting('rust_include_shell_env', True):
195-
global USER_SHELL_ENV
196-
if USER_SHELL_ENV is None:
197-
USER_SHELL_ENV = shellenv.get_env()[1]
198-
self.env.update(USER_SHELL_ENV)
199193

200194
rust_env = util.get_setting('rust_env')
201195
if rust_env:

‎tests/test_click_handler.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ def get_line(lineno):
5656
# Filter out just the "Accept Replacement" phantoms.
5757
click_urls = []
5858
for phantom in phantoms:
59-
click_urls.extend(re.findall(r'<a .*href="(replace:[^"]+)"',
60-
phantom['content']))
59+
urls = re.findall(r'<a .*href="(replace:[^"]+)"', phantom['content'])
60+
urls = [url.replace('&amp;', '&') for url in urls]
61+
click_urls.extend(urls)
6162
self.assertEqual(len(click_urls), len(after))
6263
for url, (lineno, expected_line) in zip(click_urls, after):
6364
phantom['on_navigate'](url)

0 commit comments

Comments
 (0)