Hello community,

here is the log from the commit of package python-cfgv for openSUSE:Factory 
checked in at 2020-08-05 20:28:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cfgv (Old)
 and      /work/SRC/openSUSE:Factory/.python-cfgv.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cfgv"

Wed Aug  5 20:28:25 2020 rev:5 rq:824395 version:3.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cfgv/python-cfgv.changes  2020-03-31 
17:17:41.023720512 +0200
+++ /work/SRC/openSUSE:Factory/.python-cfgv.new.3592/python-cfgv.changes        
2020-08-05 20:28:35.939073562 +0200
@@ -1,0 +2,6 @@
+Wed Aug  5 01:05:34 UTC 2020 - Steve Kowalik <[email protected]>
+
+- Update to 3.2.0:
+  * No upstream changelog 
+
+-------------------------------------------------------------------

Old:
----
  cfgv-3.1.0.tar.gz

New:
----
  cfgv-3.2.0.tar.gz

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

Other differences:
------------------
++++++ python-cfgv.spec ++++++
--- /var/tmp/diff_new_pack.X8Wcqo/_old  2020-08-05 20:28:37.535074395 +0200
+++ /var/tmp/diff_new_pack.X8Wcqo/_new  2020-08-05 20:28:37.535074395 +0200
@@ -19,11 +19,10 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-cfgv
-Version:        3.1.0
+Version:        3.2.0
 Release:        0
 Summary:        Configuration validator producing human readable error messages
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://github.com/asottile/cfgv
 Source:         
https://github.com/asottile/cfgv/archive/v%{version}.tar.gz#/cfgv-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}

++++++ cfgv-3.1.0.tar.gz -> cfgv-3.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cfgv-3.1.0/.coveragerc new/cfgv-3.2.0/.coveragerc
--- old/cfgv-3.1.0/.coveragerc  2020-02-25 00:53:07.000000000 +0100
+++ new/cfgv-3.2.0/.coveragerc  1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-[run]
-branch = True
-source =
-    .
-omit =
-    .tox/*
-    /usr/*
-    setup.py
-    # Don't complain if non-runnable code isn't run
-    */__main__.py
-
-[report]
-show_missing = True
-skip_covered = True
-exclude_lines =
-    # Have to re-enable the standard pragma
-    \#\s*pragma: no cover
-    # We optionally substitute this
-    ${COVERAGE_IGNORE_WINDOWS}
-
-    # Don't complain if tests don't hit defensive assertion code:
-    ^\s*raise AssertionError\b
-    ^\s*raise NotImplementedError\b
-    ^\s*return NotImplemented\b
-    ^\s*raise$
-
-    # Don't complain if non-runnable code isn't run:
-    ^if __name__ == ['"]__main__['"]:$
-
-[html]
-directory = coverage-html
-
-# vim:ft=dosini
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cfgv-3.1.0/.pre-commit-config.yaml 
new/cfgv-3.2.0/.pre-commit-config.yaml
--- old/cfgv-3.1.0/.pre-commit-config.yaml      2020-02-25 00:53:07.000000000 
+0100
+++ new/cfgv-3.2.0/.pre-commit-config.yaml      2020-07-31 03:54:31.000000000 
+0200
@@ -10,29 +10,29 @@
     -   id: name-tests-test
     -   id: requirements-txt-fixer
 -   repo: https://gitlab.com/pycqa/flake8
-    rev: 3.7.9
+    rev: 3.8.0
     hooks:
     -   id: flake8
 -   repo: https://github.com/pre-commit/mirrors-autopep8
-    rev: v1.5
+    rev: v1.5.2
     hooks:
     -   id: autopep8
 -   repo: https://github.com/asottile/reorder_python_imports
-    rev: v1.9.0
+    rev: v2.3.0
     hooks:
     -   id: reorder-python-imports
         args: [--py3-plus]
 -   repo: https://github.com/asottile/pyupgrade
-    rev: v1.26.2
+    rev: v2.4.1
     hooks:
     -   id: pyupgrade
         args: [--py36-plus]
 -   repo: https://github.com/asottile/add-trailing-comma
-    rev: v1.5.0
+    rev: v2.0.1
     hooks:
     -   id: add-trailing-comma
         args: [--py36-plus]
 -   repo: https://github.com/asottile/setup-cfg-fmt
-    rev: v1.6.0
+    rev: v1.9.0
     hooks:
     -   id: setup-cfg-fmt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cfgv-3.1.0/cfgv.py new/cfgv-3.2.0/cfgv.py
--- old/cfgv-3.1.0/cfgv.py      2020-02-25 00:53:07.000000000 +0100
+++ new/cfgv-3.2.0/cfgv.py      2020-07-31 03:54:31.000000000 +0200
@@ -395,11 +395,14 @@
         if not os.path.exists(filename):
             raise ValidationError(f'{filename} does not exist')
 
-        with open(filename, encoding='utf-8') as f:
-            contents = f.read()
-
         with validate_context(f'File {filename}'):
             try:
+                with open(filename, encoding='utf-8') as f:
+                    contents = f.read()
+            except UnicodeDecodeError as e:
+                raise ValidationError(str(e))
+
+            try:
                 data = load_strategy(contents)
             except Exception as e:
                 raise ValidationError(str(e))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cfgv-3.1.0/requirements-dev.txt 
new/cfgv-3.2.0/requirements-dev.txt
--- old/cfgv-3.1.0/requirements-dev.txt 2020-02-25 00:53:07.000000000 +0100
+++ new/cfgv-3.2.0/requirements-dev.txt 2020-07-31 03:54:31.000000000 +0200
@@ -1,3 +1,3 @@
+covdefaults
 coverage
-pre-commit
 pytest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cfgv-3.1.0/setup.cfg new/cfgv-3.2.0/setup.cfg
--- old/cfgv-3.1.0/setup.cfg    2020-02-25 00:53:07.000000000 +0100
+++ new/cfgv-3.2.0/setup.cfg    2020-07-31 03:54:31.000000000 +0200
@@ -1,6 +1,6 @@
 [metadata]
 name = cfgv
-version = 3.1.0
+version = 3.2.0
 description = Validate configuration and produce human readable error messages.
 long_description = file: README.md
 long_description_content_type = text/markdown
@@ -25,3 +25,6 @@
 
 [bdist_wheel]
 universal = True
+
+[coverage:run]
+plugins = covdefaults
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cfgv-3.1.0/tests/cfgv_test.py 
new/cfgv-3.2.0/tests/cfgv_test.py
--- old/cfgv-3.1.0/tests/cfgv_test.py   2020-02-25 00:53:07.000000000 +0100
+++ new/cfgv-3.2.0/tests/cfgv_test.py   2020-07-31 03:54:31.000000000 +0200
@@ -532,6 +532,16 @@
     assert excinfo.value.args[0].error_msg == 'does_not_exist does not exist'
 
 
+def test_load_from_filename_unicode_error(tmp_path):
+    f = tmp_path.joinpath('f')
+    f.write_bytes(b'\x98\xae\xfe')
+
+    with pytest.raises(Error) as excinfo:
+        load_from_filename(f, map_required, json.loads, Error)
+    expected = (f'File {f}', mock.ANY)
+    _assert_exception_trace(excinfo.value.args[0], expected)
+
+
 def test_load_from_filename_fails_load_strategy(tmpdir):
     f = tmpdir.join('foo.notjson')
     f.write('totes not json')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cfgv-3.1.0/tox.ini new/cfgv-3.2.0/tox.ini
--- old/cfgv-3.1.0/tox.ini      2020-02-25 00:53:07.000000000 +0100
+++ new/cfgv-3.2.0/tox.ini      2020-07-31 03:54:31.000000000 +0200
@@ -7,7 +7,6 @@
     coverage erase
     coverage run -m pytest {posargs:tests}
     coverage report --fail-under 100
-    pre-commit install
 
 [testenv:pre-commit]
 skip_install = true


Reply via email to