From 2bac5fd5acb55aa5134dad3ec4379e9ca295df61 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Wed, 13 Jan 2021 15:49:56 +0100 Subject: [PATCH] fix(python): process.terminate() got an unexpected keyword argument 'timeout' (#2421) Corrected usage of `process.terminate` to remove unexpected `timeout` argument. Not sure how this did not surface in integration tests (will investigate later). Fixes #2398 --- CHANGELOG.md | 7 +++++++ lerna.json | 6 ++---- .../python-runtime/src/jsii/_kernel/providers/process.py | 5 +---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bd72f8431..99f2d78652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.17.1](https://github.com/aws/jsii/compare/v1.17.0...v1.17.1) (2021-01-13) + +### Bug Fixes + +* **python:** process.terminate() got an unexpected keyword argument 'timeout' ([#2421](https://github.com/aws/jsii/issues/2421)), closes [#2398](https://github.com/aws/jsii/issues/2398) + + ## [1.17.0](https://github.com/aws/jsii/compare/v1.16.0...v1.17.0) (2021-01-13) diff --git a/lerna.json b/lerna.json index da8d0b206c..74eba06108 100644 --- a/lerna.json +++ b/lerna.json @@ -2,13 +2,11 @@ "lerna": "3.13.1", "npmClient": "yarn", "useWorkspaces": true, - "packages": [ - "packages/*" - ], + "packages": ["packages/*"], "command": { "bootstrap": { "rejectCycles": true } }, - "version": "1.17.0" + "version": "1.17.1" } diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py index ac178785cd..2293ea8d37 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/providers/process.py @@ -298,10 +298,7 @@ def stop(self): try: self._process.wait(timeout=5) except subprocess.TimeoutExpired: - try: - self._process.terminate(timeout=5) - except subprocess.TimeoutExpired: - self._process.kill() + self._process.terminate() self._ctx_stack.close()