From 6b2ff04bbf86f3a1c404165d6e0517743f41953e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 13:01:33 +0200 Subject: [PATCH 1/7] Fixed an error "SyntaxError: 'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used --- HISTORY.rst | 5 +++++ platformio/commands/debug/server.py | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4771a3c088..7f606cf52a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,11 @@ Release Notes PlatformIO Core 4 ----------------- +4.3.1 (2020-??-??) +~~~~~~~~~~~~~~~~~~ + +* Fixed a "SyntaxError: 'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used + 4.3.0 (2020-03-19) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/debug/server.py b/platformio/commands/debug/server.py index 29a006780f..ef06b58c93 100644 --- a/platformio/commands/debug/server.py +++ b/platformio/commands/debug/server.py @@ -42,11 +42,11 @@ def spawn(self, patterns): # pylint: disable=too-many-branches systype = util.get_systype() server = self.debug_options.get("server") if not server: - return None + defer.returnValue(None) server = self.apply_patterns(server, patterns) server_executable = server["executable"] if not server_executable: - return None + defer.returnValue(None) if server["cwd"]: server_executable = join(server["cwd"], server_executable) if ( @@ -83,7 +83,7 @@ def spawn(self, patterns): # pylint: disable=too-many-branches ) self._debug_port = '| "%s" %s' % (server_executable, str_args) self._debug_port = fs.to_unix_path(self._debug_port) - return self._debug_port + defer.returnValue(self._debug_port) env = os.environ.copy() # prepend server "lib" folder to LD path @@ -120,7 +120,7 @@ def spawn(self, patterns): # pylint: disable=too-many-branches yield self._wait_until_ready() - return self._debug_port + defer.returnValue(self._debug_port) @defer.inlineCallbacks def _wait_until_ready(self): From 20023f8d8a2bee34e5db240aa8d8352bc50254e1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 13:02:11 +0200 Subject: [PATCH 2/7] Bump version to 4.3.1a1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index c5dd8dcce8..3d1f33edc2 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (4, 3, 0) +VERSION = (4, 3, "1a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From d32312e7386c1e59c7c2f841f1db1c7a60364268 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 13:34:35 +0200 Subject: [PATCH 3/7] Fixed an issue when `lib_archive = no` was not honored in "platformio.ini" --- HISTORY.rst | 3 ++- platformio/builder/tools/piolib.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7f606cf52a..21c44eb655 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,7 +9,8 @@ PlatformIO Core 4 4.3.1 (2020-??-??) ~~~~~~~~~~~~~~~~~~ -* Fixed a "SyntaxError: 'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used +* Fixed an error "SyntaxError: 'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used +* Fixed an issue when ``lib_archive = no`` was not honored in `"platformio.ini" `__ 4.3.0 (2020-03-19) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index c9c97e2876..5e61abffaf 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -723,7 +723,9 @@ def lib_archive(self): "env:" + self.env["PIOENV"], "lib_archive", missing ) if global_value != missing: - return global_value + return self.env.GetProjectConfig().get( + "env:" + self.env["PIOENV"], "lib_archive" + ) return self._manifest.get("build", {}).get( "libArchive", LibBuilderBase.lib_archive.fget(self) ) From 658b3df12358852d7351d652d829abdad8ab72d0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 13:56:30 +0200 Subject: [PATCH 4/7] Fixed an TypeError "super(type, obj): obj must be an instance or subtype of type" when device monitor is used with a custom dev-platform filter // Resolve #3431 --- HISTORY.rst | 3 ++- platformio/commands/device/filters/base.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 21c44eb655..2fa38d63a2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,8 +9,9 @@ PlatformIO Core 4 4.3.1 (2020-??-??) ~~~~~~~~~~~~~~~~~~ -* Fixed an error "SyntaxError: 'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used +* Fixed a SyntaxError "'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used * Fixed an issue when ``lib_archive = no`` was not honored in `"platformio.ini" `__ +* Fixed an TypeError "super(type, obj): obj must be an instance or subtype of type" when device monitor is used with a custom dev-platform filter (`issue #3431 `_) 4.3.0 (2020-03-19) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/device/filters/base.py b/platformio/commands/device/filters/base.py index bc0880b35b..5c6d0400f1 100644 --- a/platformio/commands/device/filters/base.py +++ b/platformio/commands/device/filters/base.py @@ -20,7 +20,7 @@ class DeviceMonitorFilter(miniterm.Transform): def __init__(self, project_dir=None, environment=None): """ Called by PlatformIO to pass context """ - super(DeviceMonitorFilter, self).__init__() + miniterm.Transform.__init__(self) self.project_dir = project_dir self.environment = environment From b8f43732fe3fd40dcb7eab9e21aafa2d63fae378 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 14:44:24 +0200 Subject: [PATCH 5/7] Docs: update What's PlatformIO and PIO IDE pages --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 51b7dd49b7..57d8b750ef 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 51b7dd49b703fd6156375a93d4bbb6e0890ecb09 +Subproject commit 57d8b750efe08bd79adc2aa756feced3a1fba332 From 97a0cbdd189bf460b8474faaa120959b60a983aa Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 15:11:14 +0200 Subject: [PATCH 6/7] Skip Click 7.1 and 7.1.1 on Windows due to broken releases --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2d3cd72f4e..512d2757ab 100644 --- a/setup.py +++ b/setup.py @@ -23,12 +23,12 @@ __url__, __version__, ) -from platformio.compat import PY2 +from platformio.compat import PY2, WINDOWS install_requires = [ "bottle<0.13", - "click>=5,<8,!=7.1,!=7.1.1", + "click>=5,<8%s" % (",!=7.1,!=7.1.1" if WINDOWS else ""), "colorama", "pyserial>=3,<4,!=3.3", "requests>=2.4.0,<3", From b7b9ee5a803bebc6419dce25159b1c03d75877d2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 15:13:40 +0200 Subject: [PATCH 7/7] Bump version to 4.3.1 --- HISTORY.rst | 2 +- docs | 2 +- platformio/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 2fa38d63a2..9606fdd925 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,7 +6,7 @@ Release Notes PlatformIO Core 4 ----------------- -4.3.1 (2020-??-??) +4.3.1 (2020-03-20) ~~~~~~~~~~~~~~~~~~ * Fixed a SyntaxError "'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used diff --git a/docs b/docs index 57d8b750ef..d97117eb2e 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 57d8b750efe08bd79adc2aa756feced3a1fba332 +Subproject commit d97117eb2e40380c309d1ef86ebf3501c673f270 diff --git a/platformio/__init__.py b/platformio/__init__.py index 3d1f33edc2..afa9e24dee 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (4, 3, "1a1") +VERSION = (4, 3, 1) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"