Skip to content

Commit

Permalink
Disable OscryptoDownloader
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed May 18, 2024
1 parent 8222603 commit b041085
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Package Control.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@
// The "curl" and "wget" options require the command line "curl" or "wget"
// program installed and present in the PATH.
"downloader_precedence": {
"windows": ["wininet", "oscrypto", "urllib"],
"osx": ["urllib", "oscrypto", "curl"],
"linux": ["urllib", "oscrypto", "curl", "wget"]
"windows": ["wininet", "urllib"],
"osx": ["urllib", "curl"],
"linux": ["urllib", "curl", "wget"]
},

// Directories to ignore when creating a package
Expand Down
16 changes: 10 additions & 6 deletions package_control/downloaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
'wget': WgetDownloader
}

# oscrypto can fail badly on Linux in the Sublime Text 3 environment due to
# trying to mix the statically-linked OpenSSL in plugin_host with the OpenSSL
# loaded from the operating system. On Python 3.8 we dynamically link OpenSSL,
# so it just needs to be configured properly, which is handled in
# oscrypto_downloader.py.
if sys.platform != 'linux' or sys.version_info[:2] != (3, 3) or sys.executable != 'python3':
# oscrypto can fail badly
# 1. on Linux in the Sublime Text 3 environment due to trying to mix the
# statically-linked OpenSSL in plugin_host with the OpenSSL loaded from the
# operating system. On Python 3.8 we dynamically link OpenSSL, so it just needs
# to be configured properly, which is handled in oscrypto_downloader.py.
# 2. on MacOS ARM plattform due to whatever reason. Due to maintanance state of
# oscrypto, start fading it out by disabling it on python 3.8 (ST4)
if sys.platform != 'linux' and sys.version_info[:2] == (3, 3) or \
('sublime_text' not in sys.executable and 'plugin_host' not in sys.executable):

try:
from .oscrypto_downloader import OscryptoDownloader
DOWNLOADERS['oscrypto'] = OscryptoDownloader
Expand Down

0 comments on commit b041085

Please sign in to comment.