[Git][debian-gis-team/python-click-plugins][upstream] 2 commits: New upstream version 1.1

Bas Couwenberg gitlab at salsa.debian.org
Fri Apr 5 18:57:19 BST 2019



Bas Couwenberg pushed to branch upstream at Debian GIS Project / python-click-plugins


Commits:
f4c191d2 by Bas Couwenberg at 2019-04-05T17:46:09Z
New upstream version 1.1
- - - - -
8cb81743 by Bas Couwenberg at 2019-04-05T17:46:20Z
New upstream version 1.1.1
- - - - -


7 changed files:

- .travis.yml
- CHANGES.md
- LICENSE.txt
- click_plugins/__init__.py
- click_plugins/core.py
- setup.py
- tests/test_plugins.py


Changes:

=====================================
.travis.yml
=====================================
@@ -1,21 +1,27 @@
-language: python
-
 sudo: false
-cache:
-  directories:
-    - ~/.cache/pip
+dist: xenial
+
+language: python
+cache: pip
 
 python:
   - 2.7
   - 3.4
   - 3.5
   - 3.6
-  - pypy
-  - pypy3
+  - 3.7
+
+env:
+  matrix:
+    - CLICK_VERSION=4.1
+    - CLICK_VERSION=5.1
+    - CLICK_VERSION=6.7
+    - CLICK_VERSION=7
 
 install:
   - pip install coveralls
-  - pip install -e .\[dev\]
+  - pip install -e ".[dev]"
+  - pip install "click==${CLICK_VERSION}"
 
 script:
   - pytest tests --cov click_plugins --cov-report term-missing


=====================================
CHANGES.md
=====================================
@@ -1,6 +1,18 @@
 Changelog
 =========
 
+1.1.1 - 2019-04-04
+------------------
+
+- Fixed a version mismatch in `click_plugins/__init__.py`  See `1.1`.
+
+1.1 - 2019-04-04
+----------------
+
+- Fix an issue where a broken command's traceback would not be emitted - https://github.com/click-contrib/click-plugins/issues/25
+- Bump required click version to `click>=4` - https://github.com/click-contrib/click-plugins/pull/28
+- Runs Travis tests for the latest release of click versions 4 -> 7 - https://github.com/click-contrib/click-plugins/pull/28
+
 1.0.4 - 2018-09-15
 ------------------
 


=====================================
LICENSE.txt
=====================================
@@ -1,6 +1,6 @@
 New BSD License
 
-Copyright (c) 2015-2018, Kevin D. Wurster, Sean C. Gillies
+Copyright (c) 2015-2019, Kevin D. Wurster, Sean C. Gillies
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without


=====================================
click_plugins/__init__.py
=====================================
@@ -24,14 +24,14 @@ entry-points.
 from click_plugins.core import with_plugins
 
 
-__version__ = '1.0.4'
+__version__ = '1.1.1'
 __author__ = 'Kevin Wurster, Sean Gillies'
 __email__ = 'wursterk at gmail.com, sean.gillies at gmail.com'
 __source__ = 'https://github.com/click-contrib/click-plugins'
 __license__ = '''
 New BSD License
 
-Copyright (c) 2015-2018, Kevin D. Wurster, Sean C. Gillies
+Copyright (c) 2015-2019, Kevin D. Wurster, Sean C. Gillies
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without


=====================================
click_plugins/core.py
=====================================
@@ -87,3 +87,6 @@ class BrokenCommand(click.Command):
 
         click.echo(self.help, color=ctx.color)
         ctx.exit(1)
+
+    def parse_args(self, ctx, args):
+        return args


=====================================
setup.py
=====================================
@@ -51,14 +51,14 @@ setup(
                 "via setuptools entry-points.",
     extras_require={
         'dev': [
-            'pytest>=3',
+            'pytest>=3.6',
             'pytest-cov',
             'wheel',
             'coveralls'
         ],
     },
     include_package_data=True,
-    install_requires=['click>=3.0'],
+    install_requires=['click>=4.0'],
     keywords='click plugin setuptools entry-point',
     license="New BSD",
     long_description=long_desc,


=====================================
tests/test_plugins.py
=====================================
@@ -78,23 +78,23 @@ def test_registered():
 def test_register_and_run(runner):
 
     result = runner.invoke(good_cli)
-    assert result.exit_code is 0
+    assert result.exit_code == 0
 
     for ep in iter_entry_points('_test_click_plugins.test_plugins'):
         cmd_result = runner.invoke(good_cli, [ep.name, 'something'])
-        assert cmd_result.exit_code is 0
+        assert cmd_result.exit_code == 0
         assert cmd_result.output.strip() == 'passed'
 
 
 def test_broken_register_and_run(runner):
 
     result = runner.invoke(broken_cli)
-    assert result.exit_code is 0
+    assert result.exit_code == 0
     assert u'\U0001F4A9' in result.output or u'\u2020' in result.output
 
     for ep in iter_entry_points('_test_click_plugins.broken_plugins'):
         cmd_result = runner.invoke(broken_cli, [ep.name])
-        assert cmd_result.exit_code is not 0
+        assert cmd_result.exit_code != 0
         assert 'Traceback' in cmd_result.output
 
 
@@ -108,7 +108,7 @@ def test_group_chain(runner):
         pass
 
     result = runner.invoke(good_cli)
-    assert result.exit_code is 0
+    assert result.exit_code == 0
     assert sub_cli.name in result.output
     for ep in iter_entry_points('_test_click_plugins.test_plugins'):
         assert ep.name in result.output
@@ -121,13 +121,13 @@ def test_group_chain(runner):
         pass
 
     result = runner.invoke(good_cli, ['sub-cli-plugins'])
-    assert result.exit_code is 0
+    assert result.exit_code == 0
     for ep in iter_entry_points('_test_click_plugins.test_plugins'):
         assert ep.name in result.output
 
     # Execute one of the sub-group's commands
     result = runner.invoke(good_cli, ['sub-cli-plugins', 'cmd1', 'something'])
-    assert result.exit_code is 0
+    assert result.exit_code == 0
     assert result.output.strip() == 'passed'
 
 
@@ -138,3 +138,25 @@ def test_exception():
         @click.command()
         def cli():
             """Whatever"""
+
+
+def test_broken_register_and_run_with_help(runner):
+    result = runner.invoke(broken_cli)
+    assert result.exit_code == 0
+    assert u'\U0001F4A9' in result.output or u'\u2020' in result.output
+
+    for ep in iter_entry_points('_test_click_plugins.broken_plugins'):
+        cmd_result = runner.invoke(broken_cli, [ep.name, "--help"])
+        assert cmd_result.exit_code != 0
+        assert 'Traceback' in cmd_result.output
+
+
+def test_broken_register_and_run_with_args(runner):
+    result = runner.invoke(broken_cli)
+    assert result.exit_code == 0
+    assert u'\U0001F4A9' in result.output or u'\u2020' in result.output
+
+    for ep in iter_entry_points('_test_click_plugins.broken_plugins'):
+        cmd_result = runner.invoke(broken_cli, [ep.name, "-a", "b"])
+        assert cmd_result.exit_code != 0
+        assert 'Traceback' in cmd_result.output



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-click-plugins/compare/50360ce5b8001e65ccd2e95051683053c442267e...8cb81743d422a83764a6edfcdfc076ebe35d41b2

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-click-plugins/compare/50360ce5b8001e65ccd2e95051683053c442267e...8cb81743d422a83764a6edfcdfc076ebe35d41b2
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190405/b40a7d07/attachment-0001.html>


More information about the Pkg-grass-devel mailing list