Hello community,

here is the log from the commit of package python-clikit for openSUSE:Factory 
checked in at 2019-10-10 11:53:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-clikit (Old)
 and      /work/SRC/openSUSE:Factory/.python-clikit.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-clikit"

Thu Oct 10 11:53:07 2019 rev:2 rq:736693 version:0.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-clikit/python-clikit.changes      
2019-09-27 14:48:11.132805778 +0200
+++ /work/SRC/openSUSE:Factory/.python-clikit.new.2352/python-clikit.changes    
2019-10-10 11:53:12.403359222 +0200
@@ -1,0 +2,6 @@
+Wed Oct  9 14:10:12 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.3.2:
+  * Fixed handling of KeyboardInterrupt exceptions.
+
+-------------------------------------------------------------------

Old:
----
  clikit-0.3.1.tar.gz

New:
----
  clikit-0.3.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-clikit.spec ++++++
--- /var/tmp/diff_new_pack.KSap4f/_old  2019-10-10 11:53:12.811358139 +0200
+++ /var/tmp/diff_new_pack.KSap4f/_new  2019-10-10 11:53:12.815358129 +0200
@@ -18,11 +18,10 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-clikit
-Version:        0.3.1
+Version:        0.3.2
 Release:        0
 Summary:        Helper to build testable command line interfaces
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://github.com/sdispater/clikit
 Source:         
https://github.com/sdispater/clikit/archive/%{version}.tar.gz#/clikit-%{version}.tar.gz
 BuildRequires:  %{python_module pastel}

++++++ clikit-0.3.1.tar.gz -> clikit-0.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/.appveyor.yml 
new/clikit-0.3.2/.appveyor.yml
--- old/clikit-0.3.1/.appveyor.yml      2019-06-24 23:31:36.000000000 +0200
+++ new/clikit-0.3.2/.appveyor.yml      1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-build: false
-
-environment:
-  PYTHONIOENCODING: "UTF-8"
-
-  matrix:
-    - PYTHON: "C:/Python27-x64"
-    - PYTHON: "C:/Python35-x64"
-    - PYTHON: "C:/Python36-x64"
-    - PYTHON: "C:/Python37-x64"
-
-
-install:
-  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
-
-  # Installing Poetry
-  - "curl -sSL 
https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | 
python"
-  - "SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%"
-
-  # Ensure latest pip in Poetry's virtualenv
-  - "poetry run python -m pip install -U pip"
-
-  # Install dependencies
-  - "poetry install -v"
-
-test_script:
-  - "poetry run pytest --cov=clikit tests/ -W ignore"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/.github/workflows/push.yml 
new/clikit-0.3.2/.github/workflows/push.yml
--- old/clikit-0.3.1/.github/workflows/push.yml 1970-01-01 01:00:00.000000000 
+0100
+++ new/clikit-0.3.2/.github/workflows/push.yml 2019-09-20 15:59:56.000000000 
+0200
@@ -0,0 +1,97 @@
+name: Push
+
+on: [push, pull_request]
+
+jobs:
+  Linting:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v1
+      - name: Set up Python 3.7
+        uses: actions/setup-python@v1
+        with:
+          python-version: 3.7
+      - name: Linting
+        run: |
+          pip install pre-commit
+          pre-commit run --all-files
+  Linux:
+    needs: Linting
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: [2.7, 3.5, 3.6, 3.7]
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v1
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install Poetry
+      run: |
+        curl -fsS -o get-poetry.py 
https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
+        python get-poetry.py --preview -y
+        source $HOME/.poetry/env
+    - name: Install dependencies
+      run: |
+        source $HOME/.poetry/env
+        poetry install
+    - name: Test
+      run: |
+        source $HOME/.poetry/env
+        poetry run pytest -q tests
+  MacOS:
+    needs: Linting
+    runs-on: macos-latest
+    strategy:
+      matrix:
+        python-version: [2.7, 3.5, 3.6, 3.7]
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v1
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install Poetry
+      run: |
+        curl -fsS -o get-poetry.py 
https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
+        python get-poetry.py --preview -y
+        source $HOME/.poetry/env
+    - name: Install dependencies
+      run: |
+        source $HOME/.poetry/env
+        poetry install
+    - name: Test
+      run: |
+        source $HOME/.poetry/env
+        poetry run pytest -q tests
+  Windows:
+    needs: Linting
+    runs-on: windows-latest
+    strategy:
+      matrix:
+        python-version: [2.7, 3.5, 3.6, 3.7]
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v1
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install Poetry
+      shell: pwsh
+      run: |
+        Invoke-WebRequest 
https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O 
get-poetry.py
+        python get-poetry.py --preview -y
+        $env:Path += ";$env:Userprofile\.poetry\bin"
+    - name: Install dependencies
+      run: |
+        SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
+        poetry install
+    - name: Test
+      run: |
+        SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
+        poetry run pytest -q tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/.travis.yml new/clikit-0.3.2/.travis.yml
--- old/clikit-0.3.1/.travis.yml        2019-06-24 23:31:36.000000000 +0200
+++ new/clikit-0.3.2/.travis.yml        1970-01-01 01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-language: python
-
-stages:
-  - linting
-  - test
-
-cache:
-  pip: true
-  directories:
-    - $HOME/.cache/pypoetry
-    - $HOME/.cache/pre-commit
-
-install:
-  - curl -sSL 
https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
-  - source $HOME/.poetry/env
-  - poetry install -v
-
-script:
-  - pytest --cov clikit tests/
-
-jobs:
-  include:
-    - python: "2.7"
-    - python: "3.4"
-    - python: "3.5"
-    - python: "3.6"
-    - python: "3.7"
-      dist: xenial
-
-    - stage: linting
-      python: "3.7"
-      dist: xenial
-      install:
-        - pip install pre-commit
-        - pre-commit install-hooks
-      script:
-        - pre-commit run --all-files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/CHANGELOG.md 
new/clikit-0.3.2/CHANGELOG.md
--- old/clikit-0.3.1/CHANGELOG.md       2019-06-24 23:31:36.000000000 +0200
+++ new/clikit-0.3.2/CHANGELOG.md       2019-09-20 15:59:56.000000000 +0200
@@ -1,5 +1,12 @@
 # Change Log
 
+## [0.3.2] - 2019-09-20
+
+### Fixed
+
+- Fixed handling of `KeyboardInterrupt` exceptions.
+
+
 ## [0.3.1] - 2019-06-24
 
 ### Fixed
@@ -67,7 +74,8 @@
 - Fixed the progress indicator component.
 
 
-[Unreleased]: https://github.com/sdispater/tomlkit/compare/0.3.1...master
+[Unreleased]: https://github.com/sdispater/tomlkit/compare/0.3.2...master
+[0.3.2]: https://github.com/sdispater/tomlkit/releases/tag/0.3.2
 [0.3.1]: https://github.com/sdispater/tomlkit/releases/tag/0.3.1
 [0.3.0]: https://github.com/sdispater/tomlkit/releases/tag/0.3.0
 [0.2.4]: https://github.com/sdispater/tomlkit/releases/tag/0.2.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/pyproject.toml 
new/clikit-0.3.2/pyproject.toml
--- old/clikit-0.3.1/pyproject.toml     2019-06-24 23:31:36.000000000 +0200
+++ new/clikit-0.3.2/pyproject.toml     2019-09-20 15:59:56.000000000 +0200
@@ -1,17 +1,20 @@
 [tool.poetry]
 name = "clikit"
-version = "0.3.1"
+version = "0.3.2"
 description = "CliKit is a group of utilities to build beautiful and testable 
command line interfaces."
 authors = ["Sébastien Eustace <[email protected]>"]
-
 license = "MIT"
-
 readme = "README.md"
-
 repository = "https://github.com/sdispater/clikit";
-
 keywords = ["packaging", "dependency", "poetry"]
 
+packages = [
+    {include = "clikit", from = "src"},
+    # This trips up pip when installing in editable mode
+    # so until it's fixed in Poetry we have to comment
+    # {include = "tests", format = "sdist"}
+]
+
 [tool.poetry.dependencies]
 python = "~2.7 || ^3.4"
 pastel = "^0.1.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/src/clikit/__init__.py 
new/clikit-0.3.2/src/clikit/__init__.py
--- old/clikit-0.3.1/src/clikit/__init__.py     2019-06-24 23:31:36.000000000 
+0200
+++ new/clikit-0.3.2/src/clikit/__init__.py     2019-09-20 15:59:56.000000000 
+0200
@@ -3,4 +3,4 @@
 from .config.default_application_config import DefaultApplicationConfig
 
 
-__version__ = "0.3.1"
+__version__ = "0.3.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/src/clikit/api/command/command.py 
new/clikit-0.3.2/src/clikit/api/command/command.py
--- old/clikit-0.3.1/src/clikit/api/command/command.py  2019-06-24 
23:31:36.000000000 +0200
+++ new/clikit-0.3.2/src/clikit/api/command/command.py  2019-09-20 
15:59:56.000000000 +0200
@@ -116,7 +116,13 @@
         return self.handle(self.parse(args), io)
 
     def handle(self, args, io):  # type: (Args, IO) -> int
-        status_code = self._do_handle(args, io)
+        try:
+            status_code = self._do_handle(args, io)
+        except KeyboardInterrupt:
+            if io.is_debug():
+                raise
+
+            status_code = 1
 
         # Any empty value is considered a success
         if not status_code:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/src/clikit/console_application.py 
new/clikit-0.3.2/src/clikit/console_application.py
--- old/clikit-0.3.1/src/clikit/console_application.py  2019-06-24 
23:31:36.000000000 +0200
+++ new/clikit-0.3.2/src/clikit/console_application.py  2019-09-20 
15:59:56.000000000 +0200
@@ -130,6 +130,8 @@
             parsed_args = resolved_command.args
 
             status_code = command.handle(parsed_args, io)
+        except KeyboardInterrupt:
+            status_code = 1
         except Exception as e:
             if not self._config.is_exception_caught():
                 raise
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clikit-0.3.1/tests/test_console_aplication.py 
new/clikit-0.3.2/tests/test_console_aplication.py
--- old/clikit-0.3.1/tests/test_console_aplication.py   2019-06-24 
23:31:36.000000000 +0200
+++ new/clikit-0.3.2/tests/test_console_aplication.py   2019-09-20 
15:59:56.000000000 +0200
@@ -1,3 +1,5 @@
+from typing import Generator
+
 import pytest
 
 from clikit import ConsoleApplication
@@ -22,7 +24,7 @@
 
 
 @pytest.fixture()
-def config():  # type: () -> ApplicationConfig
+def config():  # type: () -> Generator[ApplicationConfig]
     config = ApplicationConfig()
     config.set_catch_exceptions(False)
     config.set_terminate_after_run(False)
@@ -260,3 +262,21 @@
     assert 123 == app.run(args, input, output, error_output)
     assert "line1\n" == output.fetch()
     assert "line2" == error_output.fetch()
+
+
+def test_run_with_keyboard_interrupt(config):  # type: (ApplicationConfig) -> 
None
+    def callback(_, io):
+        raise KeyboardInterrupt()
+
+    config.create_command("interrupted").set_handler(CallbackHandler(callback))
+    app = ConsoleApplication(config)
+
+    output = BufferedOutputStream()
+    error_output = BufferedOutputStream()
+
+    assert 1 == app.run(
+        StringArgs("interrupted"), StringInputStream(""), output, error_output
+    )
+
+    assert "" == output.fetch()
+    assert "" == error_output.fetch()


Reply via email to