diff --git a/HISTORY.rst b/HISTORY.rst index 804737ee..e19a7e76 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,6 +10,7 @@ PlatformIO 4.0 ~~~~~~~~~~~~~~~~~~ * Print `debug tool `__ name for the active debugging session +* Do not shutdown PIO Home Server for "upgrade" operations (`issue #2784 `_) * Fixed an issue with incorrect escaping of Windows slashes when using `PIO Unified Debugger `__ and "piped" openOCD 4.0.0 (2019-07-10) diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index 91286230..a70e7780 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -21,7 +21,6 @@ import requests from platformio import VERSION, __version__, exception, util from platformio.compat import WINDOWS -from platformio.managers.core import shutdown_piohome_servers from platformio.proc import exec_command, get_pythonexe_path from platformio.project.helpers import get_project_cache_dir @@ -38,9 +37,6 @@ def cli(dev): click.secho("Please wait while upgrading PlatformIO ...", fg="yellow") - # kill all PIO Home servers, they block `pioplus` binary - shutdown_piohome_servers() - to_develop = dev or not all(c.isdigit() for c in __version__ if c != ".") cmds = (["pip", "install", "--upgrade", get_pip_package(to_develop)], ["platformio", "--version"]) diff --git a/platformio/managers/core.py b/platformio/managers/core.py index f93145fb..11e4b5fc 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -16,9 +16,6 @@ import os import subprocess import sys from os.path import dirname, join -from time import sleep - -import requests from platformio import __version__, exception, util from platformio.compat import PY2, WINDOWS @@ -99,25 +96,10 @@ def update_core_packages(only_check=False, silent=False): if not pkg_dir: continue if not silent or pm.outdated(pkg_dir, requirements): - if name == "tool-pioplus" and not only_check: - shutdown_piohome_servers() - if WINDOWS: - sleep(1) pm.update(name, requirements, only_check=only_check) return True -def shutdown_piohome_servers(): - port = 8010 - while port < 8050: - try: - requests.get("http://127.0.0.1:%d?__shutdown__=1" % port, - timeout=0.01) - except: # pylint: disable=bare-except - pass - port += 1 - - def inject_contrib_pysite(): from site import addsitedir contrib_pysite_dir = get_core_package_dir("contrib-pysite")