diff --git a/HISTORY.rst b/HISTORY.rst index 7d5de273..8199e368 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,6 +9,7 @@ PlatformIO Core 4 4.3.2 (2020-??-??) ~~~~~~~~~~~~~~~~~~ +* New `PIO Account `__ with "username" and profile support * Open source `PIO Remote `__ client * Fixed PIO Unit Testing for Zephyr RTOS * Fixed UnicodeDecodeError on Windows when network drive (NAS) is used (`issue #3417 `_) diff --git a/docs b/docs index ae721948..14dee6e0 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ae721948ba4640e64073d2357b9c2bd47d3430c1 +Subproject commit 14dee6e0b45e174633ea61fd7a2420f5231eec57 diff --git a/platformio/__init__.py b/platformio/__init__.py index 8573627e..fd914dcd 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -34,4 +34,5 @@ __license__ = "Apache Software License" __copyright__ = "Copyright 2014-present PlatformIO" __apiurl__ = "https://api.platformio.org" +__pioaccount_api__ = "https://api.accounts.platformio.org" __pioremote_endpoint__ = "ssl:remote.platformio.org:4413" diff --git a/platformio/commands/account/client.py b/platformio/commands/account/client.py index 4c49922a..5acef85e 100644 --- a/platformio/commands/account/client.py +++ b/platformio/commands/account/client.py @@ -20,13 +20,13 @@ import time import requests.adapters from requests.packages.urllib3.util.retry import Retry # pylint:disable=import-error -from platformio import app +from platformio import __pioaccount_api__, app from platformio.commands.account import exception class AccountClient(object): def __init__( - self, api_base_url="https://api.accounts.platformio.org", retries=3, + self, api_base_url=__pioaccount_api__, retries=3, ): if api_base_url.endswith("/"): api_base_url = api_base_url[:-1] diff --git a/platformio/commands/account/command.py b/platformio/commands/account/command.py index e24261a6..539f1a5b 100644 --- a/platformio/commands/account/command.py +++ b/platformio/commands/account/command.py @@ -44,7 +44,7 @@ def validate_username(value): def validate_email(value): value = str(value).strip() if not re.match(r"^[a-z\d_.+-]+@[a-z\d\-]+\.[a-z\d\-.]+$", value, flags=re.I): - raise click.BadParameter("Invalid E-Mail address") + raise click.BadParameter("Invalid email address") return value @@ -90,7 +90,7 @@ def account_register(username, email, password, firstname, lastname): @cli.command("login", short_help="Log in to PIO Account") -@click.option("-u", "--username", prompt="Username or e-mail") +@click.option("-u", "--username", prompt="Username or email") @click.option("-p", "--password", prompt=True, hide_input=True) def account_login(username, password): client = AccountClient() @@ -127,13 +127,13 @@ def account_token(password, regenerate, json_output): @cli.command("forgot", short_help="Forgot password") -@click.option("--username", prompt="Username or e-mail") +@click.option("--username", prompt="Username or email") def account_forgot(username): client = AccountClient() client.forgot_password(username) return click.secho( "If this account is registered, we will send the " - "further instructions to your E-Mail.", + "further instructions to your email.", fg="green", ) diff --git a/platformio/commands/remote/command.py b/platformio/commands/remote/command.py index 869890a8..d4a1cc34 100644 --- a/platformio/commands/remote/command.py +++ b/platformio/commands/remote/command.py @@ -343,10 +343,10 @@ def device_monitor(ctx, agents, **kwargs): kwargs["baud"] = kwargs["baud"] or 9600 def _tx_target(sock_dir): - pioplus_argv = ["remote", "device", "monitor"] - pioplus_argv.extend(device_helpers.options_to_argv(kwargs, project_options)) - pioplus_argv.extend(["--sock", sock_dir]) - subprocess.call([proc.where_is_program("platformio")] + pioplus_argv) + subcmd_argv = ["remote", "device", "monitor"] + subcmd_argv.extend(device_helpers.options_to_argv(kwargs, project_options)) + subcmd_argv.extend(["--sock", sock_dir]) + subprocess.call([proc.where_is_program("platformio")] + subcmd_argv) sock_dir = mkdtemp(suffix="pio") sock_file = os.path.join(sock_dir, "sock") diff --git a/platformio/managers/core.py b/platformio/managers/core.py index 55af5fe1..88419f6b 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -24,9 +24,8 @@ from platformio.proc import get_pythonexe_path from platformio.project.config import ProjectConfig CORE_PACKAGES = { - "contrib-piohome": "~3.1.0", + "contrib-piohome": ">=3.2.0-rc.1", "contrib-pysite": "~2.%d%d.0" % (sys.version_info.major, sys.version_info.minor), - "tool-pioplus": "^2.6.1", "tool-unity": "~1.20500.0", "tool-scons": "~2.20501.7" if PY2 else "~3.30102.0", "tool-cppcheck": "~1.189.0", @@ -34,8 +33,6 @@ CORE_PACKAGES = { "tool-pvs-studio": "~7.5.0", } -PIOPLUS_AUTO_UPDATES_MAX = 100 - # pylint: disable=arguments-differ