Hello community,

here is the log from the commit of package python-sybil for openSUSE:Leap:15.2 
checked in at 2020-04-14 14:22:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-sybil (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-sybil.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sybil"

Tue Apr 14 14:22:18 2020 rev:6 rq:793633 version:1.3.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-sybil/python-sybil.changes      
2020-03-29 14:55:35.455153137 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.python-sybil.new.3248/python-sybil.changes    
2020-04-14 14:24:08.153415766 +0200
@@ -1,0 +2,7 @@
+Thu Apr  2 07:26:04 UTC 2020 - [email protected]
+
+- version update to 1.3.0
+  * Treat all documentation source files as being ``utf-8`` encoded. This can 
be overriden
+    by passing an encoding when instantiating a :class:`~sybil.Sybil`.
+
+-------------------------------------------------------------------

Old:
----
  sybil-1.2.2.tar.gz

New:
----
  sybil-1.3.0.tar.gz

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

Other differences:
------------------
++++++ python-sybil.spec ++++++
--- /var/tmp/diff_new_pack.0xj5LK/_old  2020-04-14 14:24:08.493416019 +0200
+++ /var/tmp/diff_new_pack.0xj5LK/_new  2020-04-14 14:24:08.497416023 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-sybil
-Version:        1.2.2
+Version:        1.3.0
 Release:        0
 Summary:        Automated testing of examples in documentation
 License:        MIT

++++++ sybil-1.2.2.tar.gz -> sybil-1.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/PKG-INFO new/sybil-1.3.0/PKG-INFO
--- old/sybil-1.2.2/PKG-INFO    2020-02-20 16:17:41.000000000 +0100
+++ new/sybil-1.3.0/PKG-INFO    2020-03-28 12:20:27.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: sybil
-Version: 1.2.2
+Version: 1.3.0
 Summary: Automated testing for the examples in your documentation.
 Home-page: https://github.com/cjw296/sybil
 Author: Chris Withers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/docs/changes.rst 
new/sybil-1.3.0/docs/changes.rst
--- old/sybil-1.2.2/docs/changes.rst    2020-02-20 16:17:20.000000000 +0100
+++ new/sybil-1.3.0/docs/changes.rst    2020-03-28 12:20:10.000000000 +0100
@@ -1,6 +1,12 @@
 Changes
 =======
 
+1.3.0 (28 Mar 2020)
+-------------------
+
+- Treat all documentation source files as being ``utf-8`` encoded. This can be 
overriden
+  by passing an encoding when instantiating a :class:`~sybil.Sybil`.
+
 1.2.2 (20 Feb 2020)
 -------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/docs/development.rst 
new/sybil-1.3.0/docs/development.rst
--- old/sybil-1.2.2/docs/development.rst        2020-02-20 16:17:20.000000000 
+0100
+++ new/sybil-1.3.0/docs/development.rst        2020-03-28 12:20:10.000000000 
+0100
@@ -3,15 +3,6 @@
 
 .. highlight:: bash
 
-This package is developed using continuous integration which can be
-found here:
-
-https://travis-ci.org/cjw296/sybil
-
-The latest development version of the documentation can be found here:
-
-http://sybil.readthedocs.org/en/latest/
-
 If you wish to contribute to this project, then you should fork the
 repository found here:
 
@@ -35,7 +26,8 @@
 
 Once you've set up a virtualenv, the tests can be run as follows::
 
-  $ bin/pytest
+  $ source bin/activate
+  $ pytest
 
 Building the documentation
 --------------------------
@@ -65,10 +57,5 @@
 ----------------
 
 To make a release, just update the version in ``setup.py``,
-update the change log, tag it
 and push to https://github.com/cjw296/sybil
-and Travis CI should take care of the rest.
-
-Once Travis CI is done, make sure to go to
-https://readthedocs.org/projects/sybil/versions/
-and make sure the new release is marked as an Active Version.
+and Carthorse should take care of the rest.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/setup.py new/sybil-1.3.0/setup.py
--- old/sybil-1.2.2/setup.py    2020-02-20 16:17:20.000000000 +0100
+++ new/sybil-1.3.0/setup.py    2020-03-28 12:20:10.000000000 +0100
@@ -9,7 +9,7 @@
 
 setup(
     name='sybil',
-    version='1.2.2',
+    version='1.3.0',
     author='Chris Withers',
     author_email='[email protected]',
     license='MIT',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/sybil/document.py 
new/sybil-1.3.0/sybil/document.py
--- old/sybil-1.2.2/sybil/document.py   2020-02-20 16:17:20.000000000 +0100
+++ new/sybil-1.3.0/sybil/document.py   2020-03-28 12:20:10.000000000 +0100
@@ -31,12 +31,14 @@
         self.namespace = {}
 
     @classmethod
-    def parse(cls, path, *parsers):
+    def parse(cls, path, *parsers, **kw):
         """
         Read the text from the supplied path and parse it into a document
         using the supplied parsers.
         """
-        with open(path) as source:
+        # python 2 compat:
+        encoding = kw.pop('encoding', 'utf-8')
+        with open(path, encoding=encoding) as source:
             text = source.read()
         document = cls(text, path)
         for parser in parsers:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/sybil/sybil.py 
new/sybil-1.3.0/sybil/sybil.py
--- old/sybil-1.2.2/sybil/sybil.py      2020-02-20 16:17:20.000000000 +0100
+++ new/sybil-1.3.0/sybil/sybil.py      2020-03-28 12:20:10.000000000 +0100
@@ -65,10 +65,15 @@
       :ref:`pytest integration <pytest_integration>`. The fixtures will be 
       inserted into the document's :attr:`~sybil.document.Document.namespace`.
       All scopes of fixture are supported.
+
+    :param encoding:
+      An optional string specifying the encoding to be used when decoding 
documentation
+      source files.
     """
     def __init__(self, parsers, pattern='', path='.',
                  setup=None, teardown=None, fixtures=(),
-                 filenames=(), excludes=()):
+                 filenames=(), excludes=(),
+                 encoding='utf-8'):
         self.parsers = parsers
         calling_filename = sys._getframe(1).f_globals.get('__file__')
         if calling_filename:
@@ -80,9 +85,10 @@
         self.setup = setup
         self.teardown = teardown
         self.fixtures = fixtures
+        self.encoding = encoding
 
     def parse(self, path):
-        return Document.parse(path, *self.parsers)
+        return Document.parse(path, *self.parsers, encoding=self.encoding)
 
     def all_documents(self):
         for filename in sorted(listdir(self.path)):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/sybil.egg-info/PKG-INFO 
new/sybil-1.3.0/sybil.egg-info/PKG-INFO
--- old/sybil-1.2.2/sybil.egg-info/PKG-INFO     2020-02-20 16:17:41.000000000 
+0100
+++ new/sybil-1.3.0/sybil.egg-info/PKG-INFO     2020-03-28 12:20:27.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: sybil
-Version: 1.2.2
+Version: 1.3.0
 Summary: Automated testing for the examples in your documentation.
 Home-page: https://github.com/cjw296/sybil
 Author: Chris Withers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sybil-1.2.2/tests/test_sybil.py 
new/sybil-1.3.0/tests/test_sybil.py
--- old/sybil-1.2.2/tests/test_sybil.py 2020-02-20 16:17:20.000000000 +0100
+++ new/sybil-1.3.0/tests/test_sybil.py 2020-03-28 12:20:10.000000000 +0100
@@ -224,6 +224,16 @@
                  'X count was 3 instead of 4',
                  'Y count was 3, as expected'])
 
+    def test_explicit_encoding(self, tmp_path):
+        (tmp_path / 'encoded.txt').write_text(
+            u'X 1 check\n\xa3',
+            encoding='charmap'
+        )
+        sybil = Sybil([parse_for_x], path=str(tmp_path), pattern='*.txt',
+                      encoding='charmap')
+        assert (self._evaluate_examples(self._all_examples(sybil), 42) ==
+                ['X count was 1, as expected'])
+
 
 class TestFiltering(object):
 


Reply via email to