Hello community, here is the log from the commit of package python-sybil for openSUSE:Factory checked in at 2020-03-27 00:26:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sybil (Old) and /work/SRC/openSUSE:Factory/.python-sybil.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sybil" Fri Mar 27 00:26:30 2020 rev:8 rq:785870 version:1.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sybil/python-sybil.changes 2019-05-06 13:28:21.781399836 +0200 +++ /work/SRC/openSUSE:Factory/.python-sybil.new.3160/python-sybil.changes 2020-03-27 00:26:30.868293794 +0100 @@ -1,0 +2,9 @@ +Tue Mar 17 10:15:26 UTC 2020 - [email protected] + +- version update to 1.2.2 + - Improvements to :attr:`~sybil.parsers.doctest.FIX_BYTE_UNICODE_REPR` + for multiple strings on a single line. + - Better handling of files with Windows line endings on Linux under Python 2. + - Fixes for pytest 3.1.0. + +------------------------------------------------------------------- Old: ---- sybil-1.2.0.tar.gz New: ---- sybil-1.2.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sybil.spec ++++++ --- /var/tmp/diff_new_pack.IzQvCP/_old 2020-03-27 00:26:31.404294065 +0100 +++ /var/tmp/diff_new_pack.IzQvCP/_new 2020-03-27 00:26:31.408294066 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-sybil # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,12 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-sybil -Version: 1.2.0 +Version: 1.2.2 Release: 0 Summary: Automated testing of examples in documentation License: MIT Group: Development/Languages/Python -Url: https://github.com/cjw296/sybil +URL: https://github.com/cjw296/sybil Source: https://files.pythonhosted.org/packages/source/s/sybil/sybil-%{version}.tar.gz BuildRequires: %{python_module nose} BuildRequires: %{python_module pytest >= 3.5.0} ++++++ sybil-1.2.0.tar.gz -> sybil-1.2.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/PKG-INFO new/sybil-1.2.2/PKG-INFO --- old/sybil-1.2.0/PKG-INFO 2019-04-28 08:57:30.000000000 +0200 +++ new/sybil-1.2.2/PKG-INFO 2020-02-20 16:17:41.000000000 +0100 @@ -1,22 +1,27 @@ Metadata-Version: 2.1 Name: sybil -Version: 1.2.0 +Version: 1.2.2 Summary: Automated testing for the examples in your documentation. Home-page: https://github.com/cjw296/sybil Author: Chris Withers Author-email: [email protected] License: MIT -Description: ===== - sybil +Description: Sybil ===== - Automated testing for the examples in your documentation. + |CircleCI|_ |Docs|_ - The latest documentation can be found at: - http://sybil.readthedocs.org/en/latest/ + .. |CircleCI| image:: https://circleci.com/gh/cjw296/sybil/tree/master.svg?style=shield + .. _CircleCI: https://circleci.com/gh/cjw296/sybil/tree/master - Development takes place here: - https://github.com/cjw296/sybil/ + .. |Docs| image:: https://readthedocs.org/projects/sybil/badge/?version=latest + .. _Docs: http://sybil.readthedocs.org/en/latest/ + + + This library provides a way to test examples in your documentation by parsing + them from the documentation source and evaluating the parsed examples as part of + your normal test run. Integration is provided for the three main Python test + runners. Platform: UNKNOWN Classifier: Intended Audience :: Developers @@ -26,5 +31,5 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 -Provides-Extra: build Provides-Extra: test +Provides-Extra: build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/README.rst new/sybil-1.2.2/README.rst --- old/sybil-1.2.0/README.rst 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/README.rst 2020-02-20 16:17:20.000000000 +0100 @@ -1,21 +1,16 @@ -|Travis|_ |Coveralls|_ |Docs|_ +Sybil +===== -.. |Travis| image:: https://api.travis-ci.org/cjw296/sybil.svg?branch=master -.. _Travis: https://travis-ci.org/cjw296/sybil +|CircleCI|_ |Docs|_ -.. |Coveralls| image:: https://coveralls.io/repos/cjw296/sybil/badge.svg?branch=master -.. _Coveralls: https://coveralls.io/r/cjw296/sybil?branch=master +.. |CircleCI| image:: https://circleci.com/gh/cjw296/sybil/tree/master.svg?style=shield +.. _CircleCI: https://circleci.com/gh/cjw296/sybil/tree/master .. |Docs| image:: https://readthedocs.org/projects/sybil/badge/?version=latest .. _Docs: http://sybil.readthedocs.org/en/latest/ -Sybil -===== - -Automated testing for the examples in your documentation. - -The latest documentation can be found at: -http://sybil.readthedocs.org/en/latest/ -Development takes place here: -https://github.com/cjw296/sybil/ +This library provides a way to test examples in your documentation by parsing +them from the documentation source and evaluating the parsed examples as part of +your normal test run. Integration is provided for the three main Python test +runners. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/docs/changes.rst new/sybil-1.2.2/docs/changes.rst --- old/sybil-1.2.0/docs/changes.rst 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/docs/changes.rst 2020-02-20 16:17:20.000000000 +0100 @@ -1,6 +1,19 @@ Changes ======= +1.2.2 (20 Feb 2020) +------------------- + +- Improvements to :attr:`~sybil.parsers.doctest.FIX_BYTE_UNICODE_REPR` + for multiple strings on a single line. + +- Better handling of files with Windows line endings on Linux under Python 2. + +1.2.1 (21 Jan 2020) +------------------- + +- Fixes for pytest 3.1.0. + 1.2.0 (28 Apr 2019) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/docs/conf.py new/sybil-1.2.2/docs/conf.py --- old/sybil-1.2.0/docs/conf.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/docs/conf.py 2020-02-20 16:17:20.000000000 +0100 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import os, pkg_resources, datetime +import os, pkg_resources, datetime, time on_rtd = os.environ.get('READTHEDOCS', None) == 'True' @@ -17,7 +17,8 @@ source_suffix = '.rst' master_doc = 'index' project = 'sybil' -copyright = '2017 - %s Chris Withers' % datetime.datetime.now().year +build_date = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) +copyright = '2017 - %s Chris Withers' % build_date.year version = release = pkg_resources.get_distribution(project).version exclude_patterns = [ 'description.rst', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/docs/description.rst new/sybil-1.2.2/docs/description.rst --- old/sybil-1.2.0/docs/description.rst 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/docs/description.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -===== -sybil -===== - -Automated testing for the examples in your documentation. - -The latest documentation can be found at: -http://sybil.readthedocs.org/en/latest/ - -Development takes place here: -https://github.com/cjw296/sybil/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/docs/index.rst new/sybil-1.2.2/docs/index.rst --- old/sybil-1.2.0/docs/index.rst 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/docs/index.rst 2020-02-20 16:17:20.000000000 +0100 @@ -1,10 +1,6 @@ -Sybil documentation -=================== +.. include:: ../README.rst -This library provides a way to test examples in your documentation by parsing -them from the documentation source and evaluating the parsed examples as part of -your normal test run. Integration is provided for the three main Python test -runners. Sybil is designed so that it's easy to provide your own parsers for +Sybil is designed so that it's easy to provide your own parsers for your own types of example in addition to the included parsers for :mod:`doctest` and :rst:dir:`code-block` examples. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/docs/license.rst new/sybil-1.2.2/docs/license.rst --- old/sybil-1.2.0/docs/license.rst 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/docs/license.rst 2020-02-20 16:17:20.000000000 +0100 @@ -2,7 +2,7 @@ License ======= -Copyright (c) 2017-2018 Chris Withers +Copyright (c) 2017-2020 Chris Withers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/docs/parsers.rst new/sybil-1.2.2/docs/parsers.rst --- old/sybil-1.2.0/docs/parsers.rst 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/docs/parsers.rst 2020-02-20 16:17:20.000000000 +0100 @@ -124,7 +124,7 @@ document: >>> expected_listing.split() -['root.txt', 'subdir/', 'subdir/file.txt', 'subdir/logs/'] +[u'root.txt', u'subdir/', u'subdir/file.txt', u'subdir/logs/'] The parser is used by including :func:`sybil.parsers.capture.parse_captures` as an element in the list passed as the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/docs/use.rst new/sybil-1.2.2/docs/use.rst --- old/sybil-1.2.0/docs/use.rst 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/docs/use.rst 2020-02-20 16:17:20.000000000 +0100 @@ -10,7 +10,7 @@ :rst:dir:`code-block` examples with a ``from __future__ import print_function``: .. literalinclude:: conftest.py - :lines: 1-2, 4-10, 12- + :lines: 1-2, 4-11, 13- __ http://www.sphinx-doc.org/ __ https://docs.pytest.org diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/setup.cfg new/sybil-1.2.2/setup.cfg --- old/sybil-1.2.0/setup.cfg 2019-04-28 08:57:30.000000000 +0200 +++ new/sybil-1.2.2/setup.cfg 2020-02-20 16:17:41.000000000 +0100 @@ -4,6 +4,13 @@ [tool:pytest] addopts = --verbose --strict norecursedirs = functional .git docs/example +filterwarnings = + ignore::DeprecationWarning + +[coverage:run] +omit = + /the/path + /tmp/* [egg_info] tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/setup.py new/sybil-1.2.2/setup.py --- old/sybil-1.2.0/setup.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/setup.py 2020-02-20 16:17:20.000000000 +0100 @@ -1,5 +1,5 @@ # See docs/license.rst for license details. -# Copyright (c) 2017-2018 Chris Withers +# Copyright (c) 2017-2020 Chris Withers import os @@ -9,12 +9,12 @@ setup( name='sybil', - version='1.2.0', + version='1.2.2', author='Chris Withers', author_email='[email protected]', license='MIT', description="Automated testing for the examples in your documentation.", - long_description=open('docs/description.rst').read(), + long_description=open('README.rst').read(), url='https://github.com/cjw296/sybil', classifiers=[ # 'Development Status :: 5 - Production/Stable', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/sybil/document.py new/sybil-1.2.2/sybil/document.py --- old/sybil-1.2.0/sybil/document.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/sybil/document.py 2020-02-20 16:17:20.000000000 +0100 @@ -1,5 +1,6 @@ import re from bisect import bisect +from io import open from .example import Example diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/sybil/integration/pytest.py new/sybil-1.2.2/sybil/integration/pytest.py --- old/sybil-1.2.0/sybil/integration/pytest.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/sybil/integration/pytest.py 2020-02-20 16:17:20.000000000 +0100 @@ -8,6 +8,7 @@ from _pytest.fixtures import FuncFixtureInfo from _pytest.main import Session from _pytest.python import Module +import py.path import pytest from ..example import SybilFailure @@ -60,7 +61,7 @@ info = '%s line=%i column=%i' % ( self.fspath.basename, self.example.line, self.example.column ) - return self.example.document.path, self.example.line, info + return py.path.local(self.example.document.path), self.example.line, info def getparent(self, cls): if cls is Module: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/sybil/parsers/codeblock.py new/sybil-1.2.2/sybil/parsers/codeblock.py --- old/sybil-1.2.0/sybil/parsers/codeblock.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/sybil/parsers/codeblock.py 2020-02-20 16:17:20.000000000 +0100 @@ -39,7 +39,7 @@ for start_match in re.finditer(CODEBLOCK_START, document.text): source_start = start_match.end() indent = str(len(start_match.group('indent'))) - end_pattern = re.compile(r'(\n\Z|\n[ \t]{0,'+indent+'}(?=\S))') + end_pattern = re.compile(r'(\n\Z|\n[ \t]{0,'+indent+'}(?=\\S))') end_match = end_pattern.search(document.text, source_start) source_end = end_match.start() source = textwrap.dedent(document.text[source_start:source_end]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/sybil/parsers/doctest.py new/sybil-1.2.2/sybil/parsers/doctest.py --- old/sybil-1.2.0/sybil/parsers/doctest.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/sybil/parsers/doctest.py 2020-02-20 16:17:20.000000000 +0100 @@ -15,7 +15,7 @@ def make_literal(literal): - return re.compile(literal+r"((['\"])[^\2]*\2)", re.MULTILINE) + return re.compile(literal+r"((['\"])[^\2]*?\2)", re.MULTILINE) BYTE_LITERAL = make_literal('b') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/sybil.egg-info/PKG-INFO new/sybil-1.2.2/sybil.egg-info/PKG-INFO --- old/sybil-1.2.0/sybil.egg-info/PKG-INFO 2019-04-28 08:57:30.000000000 +0200 +++ new/sybil-1.2.2/sybil.egg-info/PKG-INFO 2020-02-20 16:17:41.000000000 +0100 @@ -1,22 +1,27 @@ Metadata-Version: 2.1 Name: sybil -Version: 1.2.0 +Version: 1.2.2 Summary: Automated testing for the examples in your documentation. Home-page: https://github.com/cjw296/sybil Author: Chris Withers Author-email: [email protected] License: MIT -Description: ===== - sybil +Description: Sybil ===== - Automated testing for the examples in your documentation. + |CircleCI|_ |Docs|_ - The latest documentation can be found at: - http://sybil.readthedocs.org/en/latest/ + .. |CircleCI| image:: https://circleci.com/gh/cjw296/sybil/tree/master.svg?style=shield + .. _CircleCI: https://circleci.com/gh/cjw296/sybil/tree/master - Development takes place here: - https://github.com/cjw296/sybil/ + .. |Docs| image:: https://readthedocs.org/projects/sybil/badge/?version=latest + .. _Docs: http://sybil.readthedocs.org/en/latest/ + + + This library provides a way to test examples in your documentation by parsing + them from the documentation source and evaluating the parsed examples as part of + your normal test run. Integration is provided for the three main Python test + runners. Platform: UNKNOWN Classifier: Intended Audience :: Developers @@ -26,5 +31,5 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 -Provides-Extra: build Provides-Extra: test +Provides-Extra: build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/sybil.egg-info/SOURCES.txt new/sybil-1.2.2/sybil.egg-info/SOURCES.txt --- old/sybil-1.2.0/sybil.egg-info/SOURCES.txt 2019-04-28 08:57:30.000000000 +0200 +++ new/sybil-1.2.2/sybil.egg-info/SOURCES.txt 2020-02-20 16:17:41.000000000 +0100 @@ -10,7 +10,6 @@ docs/changes.rst docs/conf.py docs/conftest.py -docs/description.rst docs/development.rst docs/example-skip.rst docs/example.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/tests/test_codeblock.py new/sybil-1.2.2/tests/test_codeblock.py --- old/sybil-1.2.0/tests/test_codeblock.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/tests/test_codeblock.py 2020-02-20 16:17:20.000000000 +0100 @@ -1,5 +1,6 @@ import pytest from sybil.compat import StringIO +from sybil.document import Document from sybil.parsers.codeblock import CodeBlockParser, compile_codeblock from tests.helpers import document_from_sample, evaluate_region @@ -52,3 +53,18 @@ # the future import line drops the firstlineno by 1 code = compile_codeblock(regions[1].parsed, document.path) assert code.co_firstlineno == 8 + + +def test_windows_line_endings(tmp_path): + p = tmp_path / "example.txt" + p.write_bytes( + b'This is my example:\r\n\r\n' + b'.. code-block:: python\r\n\r\n' + b' from math import cos\r\n' + b' x = 123\r\n\r\n' + b'That was my example.\r\n' + ) + document = Document.parse(str(p), CodeBlockParser()) + example, = document + example.evaluate() + assert document.namespace['x'] == 123 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sybil-1.2.0/tests/test_functional.py new/sybil-1.2.2/tests/test_functional.py --- old/sybil-1.2.0/tests/test_functional.py 2019-04-28 08:57:09.000000000 +0200 +++ new/sybil-1.2.2/tests/test_functional.py 2020-02-20 16:17:20.000000000 +0100 @@ -41,7 +41,7 @@ out = Finder(out) out.then_find('fail.rst::line:1,column:1') - out.then_find('fail.rst sybil setup session_fixture setup\n' + out.then_find('fail.rst::line:1,column:1 sybil setup session_fixture setup\n' 'module_fixture setup\n' 'class_fixture setup\n' 'function_fixture setup\n' @@ -49,50 +49,50 @@ 'FAILED function_fixture teardown\n' 'class_fixture teardown') out.then_find('fail.rst::line:6,column:1') - out.then_find('fail.rst class_fixture setup\n' + out.then_find('fail.rst::line:6,column:1 class_fixture setup\n' 'function_fixture setup\n' '0smcf PASSED function_fixture teardown\n' 'class_fixture teardown') out.then_find('fail.rst::line:8,column:1') - out.then_find('fail.rst class_fixture setup\n' + out.then_find('fail.rst::line:8,column:1 class_fixture setup\n' 'function_fixture setup\n' '1smcf FAILED function_fixture teardown\n' 'class_fixture teardown') out.then_find('fail.rst::line:10,column:1') - out.then_find('fail.rst class_fixture setup\n' + out.then_find('fail.rst::line:10,column:1 class_fixture setup\n' 'function_fixture setup\n' '2smcf FAILED function_fixture teardown\n' 'class_fixture teardown') out.then_find('fail.rst::line:12,column:1') - out.then_find('fail.rst class_fixture setup\n' + out.then_find('fail.rst::line:12,column:1 class_fixture setup\n' 'function_fixture setup\n' '3smcf PASSED function_fixture teardown\n' 'class_fixture teardown') out.then_find('fail.rst::line:14,column:1') - out.then_find('fail.rst class_fixture setup\n' + out.then_find('fail.rst::line:14,column:1 class_fixture setup\n' 'function_fixture setup\n' 'FAILED function_fixture teardown\n' 'class_fixture teardown\n' 'module_fixture teardown\n' 'sybil teardown 5') out.then_find('pass.rst::line:1,column:1') - out.then_find('pass.rst sybil setup module_fixture setup\n' + out.then_find('pass.rst::line:1,column:1 sybil setup module_fixture setup\n' 'class_fixture setup\n' 'function_fixture setup\n' '0smcf PASSED function_fixture teardown\n' 'class_fixture teardown') out.then_find('pass.rst::line:3,column:1') - out.then_find('pass.rst class_fixture setup\n' + out.then_find('pass.rst::line:3,column:1 class_fixture setup\n' 'function_fixture setup\n' '1smcf PASSED function_fixture teardown\n' 'class_fixture teardown') out.then_find('pass.rst::line:5,column:1') - out.then_find('pass.rst class_fixture setup\n' + out.then_find('pass.rst::line:5,column:1 class_fixture setup\n' 'function_fixture setup\n' '2smcf PASSED function_fixture teardown\n' 'class_fixture teardown') out.then_find('pass.rst::line:7,column:1') - out.then_find('pass.rst class_fixture setup\n' + out.then_find('pass.rst::line:7,column:1 class_fixture setup\n' 'function_fixture setup\n' '3smcf PASSED function_fixture teardown\n' 'class_fixture teardown\n'
