diff -Nru sphinxcontrib-bibtex-0.4.1/CHANGELOG.rst sphinxcontrib-bibtex-1.0.0/CHANGELOG.rst --- sphinxcontrib-bibtex-0.4.1/CHANGELOG.rst 2018-11-28 13:48:02.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/CHANGELOG.rst 2019-09-20 09:58:55.000000000 +0000 @@ -1,3 +1,28 @@ +1.0.0 (20 September 2019) +------------------------- + +* Drop Python 2.7 and 3.4 support (as upstream sphinx has dropped + support for these as well). + +* Add Python 3.8 support (contributed by hroncok). + +* Update for Sphinx 2.x, and drop Sphinx 1.x support (as there is too + much difference between the two versions). + +* Non-bibtex citations will now no longer issue warnings (fix + contributed by chrisjsewell). + +* Switch to codecov for coverage reporting. + +0.4.2 (7 January 2018) +---------------------- + +* Drop Python 3.3 support, add Python 3.7 support. + +* Work around issue with sphinx-testing on Fedora (reported by + jamesjer in issue #157, fix contributed by mitya57 in pull request + #158). + 0.4.1 (28 November 2018) ------------------------ diff -Nru sphinxcontrib-bibtex-0.4.1/debian/changelog sphinxcontrib-bibtex-1.0.0/debian/changelog --- sphinxcontrib-bibtex-0.4.1/debian/changelog 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/changelog 2020-04-17 17:01:42.000000000 +0000 @@ -1,3 +1,18 @@ +sphinxcontrib-bibtex (1.0.0-1) unstable; urgency=medium + + * Team upload. + * New upstream release. + - Compatible with Sphinx 2.x (closes: #955121). + * Drop Register-node-with-override.patch, applied upstream. + * Rebase the other patches. + * Remove python3-six build-dependency, no longer needed. + * Bump python3-sphinx build-dependency and dependency to 2.0. + * Update to debhelper compat level 12, use the new syntax. + * Drop NOSE_IGNORE_FILES export, the Tinkerer test was removed. + * Bump Standards-Version to 4.5.0, no changes needed. + + -- Dmitry Shachnev Fri, 17 Apr 2020 20:01:42 +0300 + sphinxcontrib-bibtex (0.4.1-2) unstable; urgency=medium * Team upload. diff -Nru sphinxcontrib-bibtex-0.4.1/debian/compat sphinxcontrib-bibtex-1.0.0/debian/compat --- sphinxcontrib-bibtex-0.4.1/debian/compat 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -10 diff -Nru sphinxcontrib-bibtex-0.4.1/debian/control sphinxcontrib-bibtex-1.0.0/debian/control --- sphinxcontrib-bibtex-0.4.1/debian/control 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/control 2020-04-17 17:01:42.000000000 +0000 @@ -3,7 +3,7 @@ Uploaders: Ghislain Antony Vaillant Section: python Priority: optional -Build-Depends: debhelper (>= 10), +Build-Depends: debhelper-compat (= 12), dh-python, dpkg-dev (>= 1.17.14), python3-all, @@ -11,13 +11,12 @@ python3-nose , python3-pybtex-docutils , python3-setuptools, - python3-six , python3-sortedcollections , - python3-sphinx (>= 1.6) , + python3-sphinx (>= 2.0) , python3-sphinx-testing , sphinx-common, sphinx-doc -Standards-Version: 4.3.0 +Standards-Version: 4.5.0 Vcs-Browser: https://salsa.debian.org/science-team/sphinxcontrib-bibtex Vcs-Git: https://salsa.debian.org/science-team/sphinxcontrib-bibtex.git Homepage: https://github.com/mcmtroffaes/sphinxcontrib-bibtex @@ -25,6 +24,7 @@ Package: python3-sphinxcontrib.bibtex Architecture: all Depends: python3-pybtex (>= 0.20), + python3-sphinx (>= 2.0), ${misc:Depends}, ${python3:Depends} Suggests: python-sphinxcontrib.bibtex-doc diff -Nru sphinxcontrib-bibtex-0.4.1/debian/patches/No-privacy-breach.patch sphinxcontrib-bibtex-1.0.0/debian/patches/No-privacy-breach.patch --- sphinxcontrib-bibtex-0.4.1/debian/patches/No-privacy-breach.patch 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/patches/No-privacy-breach.patch 2020-04-17 17:01:42.000000000 +0000 @@ -8,14 +8,14 @@ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/README.rst b/README.rst -index 4b678d7..6f6737f 100644 +index e83e82e..6f6737f 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,6 @@ sphinxcontrib-bibtex ==================== --|travis| |coveralls| |version| |license| +-|travis| |codecov| |version| |license| - A Sphinx extension for BibTeX style citations. @@ -29,9 +29,9 @@ - :target: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex - :alt: travis-ci - --.. |coveralls| image:: https://coveralls.io/repos/mcmtroffaes/sphinxcontrib-bibtex/badge.png?branch=develop -- :target: https://coveralls.io/github/mcmtroffaes/sphinxcontrib-bibtex?branch=develop -- :alt: coveralls.io +-.. |codecov| image:: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex/branch/develop/graph/badge.svg +- :target: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex +- :alt: codecov - -.. |version| image:: https://img.shields.io/pypi/v/sphinxcontrib-bibtex.svg - :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ @@ -41,10 +41,10 @@ - :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ - :alt: license diff --git a/setup.py b/setup.py -index e1be4fd..8cafc06 100644 +index 0ee27a8..4979b9e 100644 --- a/setup.py +++ b/setup.py -@@ -10,7 +10,7 @@ def readfile(filename): +@@ -9,7 +9,7 @@ def readfile(filename): return stream.read().split("\n") diff -Nru sphinxcontrib-bibtex-0.4.1/debian/patches/Register-node-with-override.patch sphinxcontrib-bibtex-1.0.0/debian/patches/Register-node-with-override.patch --- sphinxcontrib-bibtex-0.4.1/debian/patches/Register-node-with-override.patch 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/patches/Register-node-with-override.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -From: Dmitry Shachnev -Date: Sun, 6 Jan 2019 00:42:53 +0300 -Subject: Add override=True when registering bibliography node - -sphinx-testing 0.8 restores docutils directives and roles (but not -nodes) after each test exits, so the `"bibliography" not in _directives` -check will be satisfied on subsequent test runs. - -However, registering a node twice raises a warning, which is converted -to error in our tests as they use warningiserror=True. - -Forwarded: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/pull/158 ---- - sphinxcontrib/bibtex/__init__.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sphinxcontrib/bibtex/__init__.py b/sphinxcontrib/bibtex/__init__.py -index 546ecd6..fe182f3 100644 ---- a/sphinxcontrib/bibtex/__init__.py -+++ b/sphinxcontrib/bibtex/__init__.py -@@ -142,7 +142,7 @@ def setup(app): - if "bibliography" not in _directives: - app.add_directive("bibliography", BibliographyDirective) - app.add_role("cite", CiteRole()) -- app.add_node(bibliography) -+ app.add_node(bibliography, override=True) - else: - assert _directives["bibliography"] is BibliographyDirective - try: diff -Nru sphinxcontrib-bibtex-0.4.1/debian/patches/series sphinxcontrib-bibtex-1.0.0/debian/patches/series --- sphinxcontrib-bibtex-0.4.1/debian/patches/series 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/patches/series 2020-04-17 17:01:42.000000000 +0000 @@ -1,4 +1,3 @@ No-privacy-breach.patch Use-the-packaged-docs.patch Use-sortedcollections.patch -Register-node-with-override.patch diff -Nru sphinxcontrib-bibtex-0.4.1/debian/patches/Use-sortedcollections.patch sphinxcontrib-bibtex-1.0.0/debian/patches/Use-sortedcollections.patch --- sphinxcontrib-bibtex-0.4.1/debian/patches/Use-sortedcollections.patch 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/patches/Use-sortedcollections.patch 2020-04-17 17:01:42.000000000 +0000 @@ -8,21 +8,21 @@ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt -index 8c649e4..f64b7f8 100644 +index 07468cc..fdf1dde 100644 --- a/requirements.txt +++ b/requirements.txt -@@ -2,5 +2,5 @@ pybtex>=0.20 +@@ -1,5 +1,5 @@ + pybtex>=0.20 pybtex-docutils>=0.2.0 - six>=1.4.1 - Sphinx>=1.6 + Sphinx>=2.0 -oset>=0.1.3 +sortedcollections diff --git a/sphinxcontrib/bibtex/cache.py b/sphinxcontrib/bibtex/cache.py -index bdd7404..1458679 100644 +index 1477e1b..904da2b 100644 --- a/sphinxcontrib/bibtex/cache.py +++ b/sphinxcontrib/bibtex/cache.py -@@ -24,7 +24,7 @@ except ImportError: # pragma: no cover +@@ -20,7 +20,7 @@ from collections import OrderedDict import ast import collections import copy diff -Nru sphinxcontrib-bibtex-0.4.1/debian/patches/Use-the-packaged-docs.patch sphinxcontrib-bibtex-1.0.0/debian/patches/Use-the-packaged-docs.patch --- sphinxcontrib-bibtex-0.4.1/debian/patches/Use-the-packaged-docs.patch 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/patches/Use-the-packaged-docs.patch 2020-04-17 17:01:42.000000000 +0000 @@ -7,7 +7,7 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py -index c4926fd..591c519 100644 +index 12155af..d2e50f0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -243,6 +243,6 @@ texinfo_documents = [ @@ -15,7 +15,7 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - 'python': ('https://docs.python.org/3/', None), -- 'sphinx': ('http://sphinx-doc.org/', None), +- 'sphinx': ('http://www.sphinx-doc.org/en/master/', None), + 'python': ('https://docs.python.org/3/', '/usr/share/doc/python3-doc/html/objects.inv'), -+ 'sphinx': ('http://sphinx-doc.org/', '/usr/share/doc/sphinx-doc/html/objects.inv'), ++ 'sphinx': ('http://www.sphinx-doc.org/en/master/', '/usr/share/doc/sphinx-doc/html/objects.inv'), } diff -Nru sphinxcontrib-bibtex-0.4.1/debian/rules sphinxcontrib-bibtex-1.0.0/debian/rules --- sphinxcontrib-bibtex-0.4.1/debian/rules 2019-01-05 21:58:28.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/debian/rules 2020-04-17 17:01:42.000000000 +0000 @@ -5,9 +5,6 @@ export PYBUILD_NAME=sphinxcontrib.bibtex -# This test case requires Tinkerer (#664760). -export NOSE_IGNORE_FILES=test_issue1.py - %: dh $@ --with python3,sphinxdoc --buildsystem=pybuild diff -Nru sphinxcontrib-bibtex-0.4.1/doc/conf.py sphinxcontrib-bibtex-1.0.0/doc/conf.py --- sphinxcontrib-bibtex-0.4.1/doc/conf.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/doc/conf.py 2019-06-13 12:16:02.000000000 +0000 @@ -244,5 +244,5 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None), - 'sphinx': ('http://sphinx-doc.org/', None), + 'sphinx': ('http://www.sphinx-doc.org/en/master/', None), } diff -Nru sphinxcontrib-bibtex-0.4.1/doc/usage.rst sphinxcontrib-bibtex-1.0.0/doc/usage.rst --- sphinxcontrib-bibtex-0.4.1/doc/usage.rst 2018-11-28 08:54:48.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/doc/usage.rst 2019-09-04 07:48:25.000000000 +0000 @@ -24,14 +24,6 @@ See :cite:`1987:nelson,2001:schechter`. - .. note:: - - Due to a docutils implementation detail, Sphinx's LaTeX backend - will not actually generate ``\cite`` commands. Instead, all - references, including citation references, are managed using - ``\hyperref`` and ``\label`` commands. - See https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/10 - .. rst:directive:: .. bibliography:: refs.bib [...] Create bibliography for all cited references. The ``all`` flag @@ -42,8 +34,6 @@ .. code-block:: rest - .. rubric:: References - .. bibliography:: refs.bib :cited: @@ -58,9 +48,6 @@ \newblock Princeton University Press, 1987. \end{thebibliography} - Note that, unlike LaTeX, the :rst:dir:`bibliography` directive does - not generate a default section title. - .. warning:: Sphinx may not be able to create an entry for :rst:role:`cite` keys @@ -408,21 +395,14 @@ (using the ``pybtex.style.labels`` group), and sorting plugins (using the ``pybtex.style.sorting`` group). -A minimal example demonstrating how to create a custom label style -is available here: -https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/issue77 +A few minimal examples demonstrating how to create a custom label styles +are available here: +* https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/issue77 +* https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/custom_labels Known Issues and Workarounds ---------------------------- -Tinkerer -~~~~~~~~ - -To use the bibtex extension with `Tinkerer `_, -be sure to specify the bibtex extension first in your ``conf.py`` file:: - - extensions = ['sphinxcontrib.bibtex', 'tinkerer.ext.blog', 'tinkerer.ext.disqus'] - Encoding: Percent Signs ~~~~~~~~~~~~~~~~~~~~~~~ @@ -472,16 +452,6 @@ * Use a style that has non-numerical labelling, such as ``:style: alpha``. -Citation Links Broken When Using LaTeX Backend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This is a known bug in Sphinx's latex writer, -which has been fixed upstream: - -https://bitbucket.org/birkenfeld/sphinx/pull-requests/171 - -https://bitbucket.org/birkenfeld/sphinx/pull-requests/173 - LaTeX Backend Fails with Citations In Figure Captions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -523,8 +493,11 @@ This code could be placed in your :file:`zreferences.rst`. -The current aim is to fix Sphinx's LaTeX writer -to match the html output more closely. -The issue is tracked here: +Alternatively, to remove the bibliography section title from the +LaTeX output, you can add the following to your LaTeX preamble: + +.. code-block:: latex + + \usepackage{etoolbox} + \patchcmd{\thebibliography}{\section*{\refname}}{}{}{} -https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/48 diff -Nru sphinxcontrib-bibtex-0.4.1/PKG-INFO sphinxcontrib-bibtex-1.0.0/PKG-INFO --- sphinxcontrib-bibtex-0.4.1/PKG-INFO 2018-11-28 13:48:18.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/PKG-INFO 2019-09-20 10:00:24.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: sphinxcontrib-bibtex -Version: 0.4.1 +Version: 1.0.0 Summary: A Sphinx extension for BibTeX style citations. Home-page: https://github.com/mcmtroffaes/sphinxcontrib-bibtex Author: Matthias C. M. Troffaes @@ -30,9 +30,9 @@ :target: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex :alt: travis-ci - .. |coveralls| image:: https://coveralls.io/repos/mcmtroffaes/sphinxcontrib-bibtex/badge.png?branch=develop - :target: https://coveralls.io/github/mcmtroffaes/sphinxcontrib-bibtex?branch=develop - :alt: coveralls.io + .. |codecov| image:: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex/branch/develop/graph/badge.svg + :target: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex + :alt: codecov .. |version| image:: https://img.shields.io/pypi/v/sphinxcontrib-bibtex.svg :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ @@ -43,20 +43,17 @@ :alt: license Platform: any -Classifier: Development Status :: 4 - Beta +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Documentation diff -Nru sphinxcontrib-bibtex-0.4.1/README.rst sphinxcontrib-bibtex-1.0.0/README.rst --- sphinxcontrib-bibtex-0.4.1/README.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/README.rst 2019-06-13 12:16:02.000000000 +0000 @@ -1,7 +1,7 @@ sphinxcontrib-bibtex ==================== -|travis| |coveralls| |version| |license| +|travis| |codecov| |version| |license| A Sphinx extension for BibTeX style citations. @@ -28,9 +28,9 @@ :target: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex :alt: travis-ci -.. |coveralls| image:: https://coveralls.io/repos/mcmtroffaes/sphinxcontrib-bibtex/badge.png?branch=develop - :target: https://coveralls.io/github/mcmtroffaes/sphinxcontrib-bibtex?branch=develop - :alt: coveralls.io +.. |codecov| image:: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex/branch/develop/graph/badge.svg + :target: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex + :alt: codecov .. |version| image:: https://img.shields.io/pypi/v/sphinxcontrib-bibtex.svg :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ diff -Nru sphinxcontrib-bibtex-0.4.1/requirements.txt sphinxcontrib-bibtex-1.0.0/requirements.txt --- sphinxcontrib-bibtex-0.4.1/requirements.txt 2018-11-28 08:54:38.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/requirements.txt 2019-06-13 12:15:26.000000000 +0000 @@ -1,6 +1,5 @@ pybtex>=0.20 pybtex-docutils>=0.2.0 -six>=1.4.1 -Sphinx>=1.6 +Sphinx>=2.0 oset>=0.1.3 diff -Nru sphinxcontrib-bibtex-0.4.1/setup.cfg sphinxcontrib-bibtex-1.0.0/setup.cfg --- sphinxcontrib-bibtex-0.4.1/setup.cfg 2018-11-28 13:48:18.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/setup.cfg 2019-09-20 10:00:24.000000000 +0000 @@ -4,9 +4,6 @@ cover-branches = 1 cover-html = 1 -[wheel] -universal = 1 - [egg_info] tag_build = tag_date = 0 diff -Nru sphinxcontrib-bibtex-0.4.1/setup.py sphinxcontrib-bibtex-1.0.0/setup.py --- sphinxcontrib-bibtex-0.4.1/setup.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/setup.py 2019-09-20 09:58:55.000000000 +0000 @@ -2,7 +2,6 @@ import io from setuptools import setup, find_packages -import sys def readfile(filename): @@ -14,9 +13,6 @@ requires = readfile("requirements.txt") version = readfile("VERSION")[0].strip() -if sys.version_info < (2, 7): - requires.append('ordereddict>=1.1') - setup( name='sphinxcontrib-bibtex', version=version, @@ -29,20 +25,17 @@ long_description="\n".join(readme[2:]), zip_safe=False, classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Documentation', diff -Nru sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/cache.py sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/cache.py --- sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/cache.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/cache.py 2019-06-13 12:22:36.000000000 +0000 @@ -16,11 +16,7 @@ :members: """ -import six -try: # pragma: no cover - from collections import OrderedDict -except ImportError: # pragma: no cover - from ordereddict import OrderedDict +from collections import OrderedDict import ast import collections import copy @@ -82,10 +78,10 @@ right = self.visit(node.right) if isinstance(op, ast.Mod): # modulo operator is used for regular expression matching - if not isinstance(left, six.string_types): + if not isinstance(left, str): raise ValueError( "expected a string on left side of %s" % node.op) - if not isinstance(right, six.string_types): + if not isinstance(right, str): raise ValueError( "expected a string on right side of %s" % node.op) return re.search(right, left, re.IGNORECASE) @@ -136,14 +132,10 @@ return self.docname elif id_ == 'docnames': return self.cited_docnames - elif id_ == 'True': - return True - elif id_ == 'False': - return False elif id_ == 'author' or id_ == 'editor': if id_ in self.entry.persons: return u' and '.join( - six.text_type(person) # XXX needs fix in pybtex? + str(person) # XXX needs fix in pybtex? for person in self.entry.persons[id_]) else: return u'' @@ -153,13 +145,19 @@ def visit_Set(self, node): return frozenset(self.visit(elt) for elt in node.elts) - def visit_Str(self, node): - return node.s + # NameConstant is Python 3.4 only + def visit_NameConstant(self, node): + return node.value - # NameConstant is Python 3.4 only so do not insist on coverage - def visit_NameConstant(self, node): # pragma: no cover + # Constant is Python 3.6+ only + # Since 3.8 Num, Str, Bytes, NameConstant and Ellipsis are just Constant + def visit_Constant(self, node): return node.value + # Not used on 3.8+ + def visit_Str(self, node): + return node.s + def generic_visit(self, node): _raise_invalid_node(node) @@ -243,7 +241,7 @@ :type key: :class:`str` """ return frozenset([ - docname for docname, keys in six.iteritems(self._cited) + docname for docname, keys in self._cited.items() if key in keys]) def get_label_from_key(self, key): @@ -277,8 +275,8 @@ def get_all_bibliography_caches(self): """Return all bibliography caches.""" - for bibcaches in six.itervalues(self._bibliographies): - for bibcache in six.itervalues(bibcaches): + for bibcaches in self._bibliographies.values(): + for bibcache in bibcaches.values(): yield bibcache def _get_bibliography_entries(self, docname, id_, warn): @@ -290,7 +288,7 @@ # generate entries for bibfile in bibcache.bibfiles: data = self.bibfiles[bibfile].data - for entry in six.itervalues(data.entries): + for entry in data.entries.values(): # beware: the prefix is not stored in the data # to allow reusing the data for multiple bibliographies cited_docnames = self.get_cited_docnames( @@ -336,7 +334,7 @@ pass else: sorted_entries.append(entry) - sorted_entries += six.itervalues(entries) + sorted_entries += entries.values() return sorted_entries diff -Nru sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/__init__.py sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/__init__.py --- sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/__init__.py 2018-11-28 08:54:38.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/__init__.py 2019-06-13 12:44:40.000000000 +0000 @@ -19,7 +19,6 @@ from sphinxcontrib.bibtex.roles import CiteRole from sphinxcontrib.bibtex.directives import BibliographyDirective from sphinxcontrib.bibtex.transforms import BibliographyTransform -import six logger = sphinx.util.logging.getLogger(__name__) @@ -57,12 +56,9 @@ :type docname: :class:`str` """ for node in doctree.traverse(docutils.nodes.citation): - key = node[0].astext() - try: + if "bibtex" in node.attributes.get('classes', []): + key = node[0].astext() label = app.env.bibtex_cache.get_label_from_key(key) - except KeyError: - logger.warning("could not relabel citation [%s]" % key) - else: node[0] = docutils.nodes.label('', label) @@ -79,20 +75,11 @@ # sphinx has already turned citation_reference nodes # into reference nodes, so iterate over reference nodes for node in doctree.traverse(docutils.nodes.reference): - # exclude sphinx [source] labels - if isinstance(node[0], docutils.nodes.Element): - if 'viewcode-link' in node[0]['classes']: - continue - text = node[0].astext() - if text.startswith('[') and text.endswith(']'): + if "bibtex" in node.attributes.get('classes', []): + text = node[0].astext() key = text[1:-1] - try: - label = app.env.bibtex_cache.get_label_from_key(key) - except KeyError: - logger.warning( - "could not relabel citation reference [%s]" % key) - else: - node[0] = docutils.nodes.Text('[' + label + ']') + label = app.env.bibtex_cache.get_label_from_key(key) + node[0] = docutils.nodes.Text('[' + label + ']') def check_duplicate_labels(app, env): @@ -105,7 +92,7 @@ """ label_to_key = {} for info in env.bibtex_cache.get_all_bibliography_caches(): - for key, label in six.iteritems(info.labels): + for key, label in info.labels.items(): if label in label_to_key: logger.warning( "duplicate label for keys %s and %s" @@ -142,14 +129,9 @@ if "bibliography" not in _directives: app.add_directive("bibliography", BibliographyDirective) app.add_role("cite", CiteRole()) - app.add_node(bibliography) - else: - assert _directives["bibliography"] is BibliographyDirective - try: - transforms = app.registry.get_transforms() - except AttributeError: # Sphinx < 1.7 - from sphinx.io import SphinxStandaloneReader - transforms = SphinxStandaloneReader.transforms + app.add_node(bibliography, override=True) + assert _directives["bibliography"] is BibliographyDirective + transforms = app.registry.get_transforms() if BibliographyTransform not in transforms: app.add_transform(BibliographyTransform) diff -Nru sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/roles.py sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/roles.py --- sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/roles.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/roles.py 2019-06-13 12:44:40.000000000 +0000 @@ -32,6 +32,8 @@ refnodes = [ self.backend.citation_reference(_fake_entry(key), document) for key in keys] + for refnode in refnodes: + refnode['classes'].append('bibtex') for key in keys: env.bibtex_cache.add_cited(key, env.docname) return refnodes, [] diff -Nru sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/transforms.py sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/transforms.py --- sphinxcontrib-bibtex-0.4.1/sphinxcontrib/bibtex/transforms.py 2018-11-28 08:54:38.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/sphinxcontrib/bibtex/transforms.py 2019-09-04 09:23:28.000000000 +0000 @@ -102,6 +102,7 @@ citation += backend.paragraph(entry) else: # "citation" citation = backend.citation(entry, self.document) + citation['classes'].append('bibtex') # backend.citation(...) uses entry.key as citation label # we change it to entry.label later onwards # but we must note the entry.label now; diff -Nru sphinxcontrib-bibtex-0.4.1/sphinxcontrib_bibtex.egg-info/PKG-INFO sphinxcontrib-bibtex-1.0.0/sphinxcontrib_bibtex.egg-info/PKG-INFO --- sphinxcontrib-bibtex-0.4.1/sphinxcontrib_bibtex.egg-info/PKG-INFO 2018-11-28 13:48:18.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/sphinxcontrib_bibtex.egg-info/PKG-INFO 2019-09-20 10:00:24.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: sphinxcontrib-bibtex -Version: 0.4.1 +Version: 1.0.0 Summary: A Sphinx extension for BibTeX style citations. Home-page: https://github.com/mcmtroffaes/sphinxcontrib-bibtex Author: Matthias C. M. Troffaes @@ -30,9 +30,9 @@ :target: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex :alt: travis-ci - .. |coveralls| image:: https://coveralls.io/repos/mcmtroffaes/sphinxcontrib-bibtex/badge.png?branch=develop - :target: https://coveralls.io/github/mcmtroffaes/sphinxcontrib-bibtex?branch=develop - :alt: coveralls.io + .. |codecov| image:: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex/branch/develop/graph/badge.svg + :target: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex + :alt: codecov .. |version| image:: https://img.shields.io/pypi/v/sphinxcontrib-bibtex.svg :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ @@ -43,20 +43,17 @@ :alt: license Platform: any -Classifier: Development Status :: 4 - Beta +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Documentation diff -Nru sphinxcontrib-bibtex-0.4.1/sphinxcontrib_bibtex.egg-info/requires.txt sphinxcontrib-bibtex-1.0.0/sphinxcontrib_bibtex.egg-info/requires.txt --- sphinxcontrib-bibtex-0.4.1/sphinxcontrib_bibtex.egg-info/requires.txt 2018-11-28 13:48:18.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/sphinxcontrib_bibtex.egg-info/requires.txt 2019-09-20 10:00:24.000000000 +0000 @@ -1,5 +1,4 @@ pybtex>=0.20 pybtex-docutils>=0.2.0 -six>=1.4.1 -Sphinx>=1.6 +Sphinx>=2.0 oset>=0.1.3 diff -Nru sphinxcontrib-bibtex-0.4.1/sphinxcontrib_bibtex.egg-info/SOURCES.txt sphinxcontrib-bibtex-1.0.0/sphinxcontrib_bibtex.egg-info/SOURCES.txt --- sphinxcontrib-bibtex-0.4.1/sphinxcontrib_bibtex.egg-info/SOURCES.txt 2018-11-28 13:48:18.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/sphinxcontrib_bibtex.egg-info/SOURCES.txt 2019-09-20 10:00:24.000000000 +0000 @@ -40,13 +40,13 @@ test/test_bibfile_out_of_date.py test/test_bibfilenotfound.py test/test_citationnotfound.py +test/test_custom_labels.py test/test_custom_style.py test/test_filter.py test/test_filter_fix_author_keyerror.py test/test_filter_option_clash.py test/test_filter_syntax_error.py test/test_invalid_cite_option.py -test/test_issue1.py test/test_issue14.py test/test_issue14_2.py test/test_issue15.py @@ -59,6 +59,7 @@ test/test_issue85.py test/test_issue87.py test/test_issue91.py +test/test_issue_173.py test/test_latex_refs.py test/test_list_bullet.py test/test_list_citation.py @@ -66,25 +67,28 @@ test/test_list_invalid.py test/test_sphinx.py test/bibfile_out_of_date/conf.py -test/bibfile_out_of_date/contents.rst +test/bibfile_out_of_date/index.rst test/bibfile_out_of_date/test_new.bib test/bibfile_out_of_date/test_old.bib test/bibfilenotfound/conf.py -test/bibfilenotfound/contents.rst +test/bibfilenotfound/index.rst test/citationnotfound/conf.py -test/citationnotfound/contents.rst +test/citationnotfound/index.rst test/citationnotfound/test.bib +test/custom_labels/conf.py +test/custom_labels/index.rst +test/custom_labels/test.bib test/custom_style/conf.py -test/custom_style/contents.rst +test/custom_style/index.rst test/custom_style/test.bib test/filter/bitand.rst test/filter/bitor.rst test/filter/conf.py -test/filter/contents.rst test/filter/false.rst test/filter/gt.rst test/filter/gte.rst test/filter/in.rst +test/filter/index.rst test/filter/key.rst test/filter/lt.rst test/filter/lte.rst @@ -94,91 +98,91 @@ test/filter/set.rst test/filter/test.bib test/filter/title.rst +test/filter/true.rst test/filter_fix_author_keyerror/conf.py -test/filter_fix_author_keyerror/contents.rst +test/filter_fix_author_keyerror/index.rst test/filter_fix_author_keyerror/test.bib test/filter_option_clash/conf.py -test/filter_option_clash/contents.rst +test/filter_option_clash/index.rst test/filter_option_clash/test.bib test/filter_syntax_error/conf.py -test/filter_syntax_error/contents.rst +test/filter_syntax_error/index.rst test/filter_syntax_error/test.bib test/invalid_cite_option/conf.py -test/invalid_cite_option/contents.rst +test/invalid_cite_option/index.rst test/invalid_cite_option/test.bib -test/issue1/conf.py -test/issue1/master.rst -test/issue1/refs.bib -test/issue1/2012/07/24/hello_world_.rst test/issue14/conf.py -test/issue14/contents.rst test/issue14/doc1.rst test/issue14/doc2.rst +test/issue14/index.rst test/issue14/test1.bib test/issue14/test2.bib test/issue14_2/conf.py -test/issue14_2/contents.rst test/issue14_2/doc1.rst test/issue14_2/doc2.rst +test/issue14_2/index.rst test/issue14_2/test1.bib test/issue14_2/test2.bib test/issue15/conf.py -test/issue15/contents.rst +test/issue15/index.rst test/issue15/test.bib test/issue17/conf.py -test/issue17/contents.rst +test/issue17/index.rst test/issue17/somemodule.py test/issue2/adoc1.rst test/issue2/adoc2.rst test/issue2/conf.py -test/issue2/contents.rst +test/issue2/index.rst test/issue2/test.bib test/issue4/conf.py -test/issue4/contents.rst +test/issue4/index.rst test/issue4/test.bib test/issue61/conf.py -test/issue61/contents.rst +test/issue61/index.rst test/issue61/refs.bib test/issue62/conf.py -test/issue62/contents.rst test/issue62/doc1.rst test/issue62/doc2.rst +test/issue62/index.rst test/issue62/refs.bib test/issue62/summary.rst test/issue77/conf.py -test/issue77/contents.rst +test/issue77/index.rst test/issue77/test.bib test/issue85/conf.py -test/issue85/contents.rst +test/issue85/index.rst test/issue85/test.bib test/issue87/conf.py -test/issue87/contents.rst test/issue87/doc0.rst test/issue87/doc1.rst +test/issue87/index.rst test/issue87/test.bib test/issue91/conf.py -test/issue91/contents.rst +test/issue91/index.rst test/issue91/test.bib +test/issue_173/conf.py +test/issue_173/index.rst +test/issue_173/test.bib test/latex_refs/conf.py -test/latex_refs/contents.rst +test/latex_refs/index.rst test/latex_refs/test.bib test/list_bullet/conf.py -test/list_bullet/contents.rst +test/list_bullet/index.rst test/list_bullet/test.bib test/list_citation/conf.py -test/list_citation/contents.rst +test/list_citation/index.rst test/list_citation/test.bib test/list_enumerated/conf.py -test/list_enumerated/contents.rst +test/list_enumerated/index.rst test/list_enumerated/test.bib test/list_enumerated/test2.bib test/list_enumerated/test3.bib test/list_invalid/conf.py -test/list_invalid/contents.rst +test/list_invalid/index.rst test/list_invalid/test.bib test/sphinx/Makefile test/sphinx/conf.py -test/sphinx/contents.rst +test/sphinx/index.rst test/sphinx/make.bat test/sphinx/test.bib test/sphinx/test2.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/bibfilenotfound/contents.rst sphinxcontrib-bibtex-1.0.0/test/bibfilenotfound/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/bibfilenotfound/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/bibfilenotfound/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -.. bibliography:: unknown.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/bibfilenotfound/index.rst sphinxcontrib-bibtex-1.0.0/test/bibfilenotfound/index.rst --- sphinxcontrib-bibtex-0.4.1/test/bibfilenotfound/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/bibfilenotfound/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1 @@ +.. bibliography:: unknown.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/bibfile_out_of_date/contents.rst sphinxcontrib-bibtex-1.0.0/test/bibfile_out_of_date/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/bibfile_out_of_date/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/bibfile_out_of_date/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -:cite:`test1` -:cite:`test2` -:cite:`test3` -:cite:`test4` - -.. bibliography:: test.bib - :style: plain - :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/bibfile_out_of_date/index.rst sphinxcontrib-bibtex-1.0.0/test/bibfile_out_of_date/index.rst --- sphinxcontrib-bibtex-0.4.1/test/bibfile_out_of_date/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/bibfile_out_of_date/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,8 @@ +:cite:`test1` +:cite:`test2` +:cite:`test3` +:cite:`test4` + +.. bibliography:: test.bib + :style: plain + :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/citationnotfound/contents.rst sphinxcontrib-bibtex-1.0.0/test/citationnotfound/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/citationnotfound/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/citationnotfound/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -:cite:`nosuchkey` - -.. bibliography:: test.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/citationnotfound/index.rst sphinxcontrib-bibtex-1.0.0/test/citationnotfound/index.rst --- sphinxcontrib-bibtex-0.4.1/test/citationnotfound/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/citationnotfound/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,3 @@ +:cite:`nosuchkey` + +.. bibliography:: test.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/custom_labels/conf.py sphinxcontrib-bibtex-1.0.0/test/custom_labels/conf.py --- sphinxcontrib-bibtex-0.4.1/test/custom_labels/conf.py 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/custom_labels/conf.py 2019-09-04 07:47:17.000000000 +0000 @@ -0,0 +1,23 @@ +from pybtex.style.formatting.unsrt import Style as UnsrtStyle +from pybtex.style.labels import BaseLabelStyle +from pybtex.plugin import register_plugin + + +extensions = ['sphinxcontrib.bibtex'] +exclude_patterns = ['_build'] + + +# a simple label style which uses the bibtex keys for labels +class MyLabelStyle(BaseLabelStyle): + + def format_labels(self, sorted_entries): + for entry in sorted_entries: + yield entry.key + + +class MyStyle(UnsrtStyle): + + default_label_style = MyLabelStyle + + +register_plugin('pybtex.style.formatting', 'mystyle', MyStyle) diff -Nru sphinxcontrib-bibtex-0.4.1/test/custom_labels/index.rst sphinxcontrib-bibtex-1.0.0/test/custom_labels/index.rst --- sphinxcontrib-bibtex-0.4.1/test/custom_labels/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/custom_labels/index.rst 2019-09-04 07:29:29.000000000 +0000 @@ -0,0 +1,5 @@ +:cite:`myfancybibtexkey` +:cite:`myotherfancybibtexkey` + +.. bibliography:: test.bib + :style: mystyle diff -Nru sphinxcontrib-bibtex-0.4.1/test/custom_labels/test.bib sphinxcontrib-bibtex-1.0.0/test/custom_labels/test.bib --- sphinxcontrib-bibtex-0.4.1/test/custom_labels/test.bib 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/custom_labels/test.bib 2019-09-04 07:15:19.000000000 +0000 @@ -0,0 +1,27 @@ +@Misc{myfancybibtexkey, +author = {Jan Mandel}, +title = {A Brief Tutorial on the Ensemble {K}alman Filter}, +howpublished = {arXiv:0901.3725v1 [physics.ao-ph]}, +month = jan, +year = {2009}, +OPTnote = {}, +OPTannote = {}, +archivePrefix = {arXiv}, +eprint = {0901.3725}, +primaryClass = {physics.ao-ph} +} + +@Article{myotherfancybibtexkey, + author = {Geir Evensen}, + title = {The Ensemble {K}alman Filter: theoretical formulation and practical implementation}, + journal = {Ocean Dynamics}, + year = {2003}, + OPTkey = {}, + volume = {53}, + number = {4}, + pages = {343--367}, + OPTmonth = {}, + OPTnote = {}, + OPTannote = {}, + doi = {10.1007/s10236-003-0036-9} +} diff -Nru sphinxcontrib-bibtex-0.4.1/test/custom_style/contents.rst sphinxcontrib-bibtex-1.0.0/test/custom_style/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/custom_style/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/custom_style/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -.. bibliography:: test.bib - :style: nowebref - :all: - :list: bullet diff -Nru sphinxcontrib-bibtex-0.4.1/test/custom_style/index.rst sphinxcontrib-bibtex-1.0.0/test/custom_style/index.rst --- sphinxcontrib-bibtex-0.4.1/test/custom_style/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/custom_style/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,4 @@ +.. bibliography:: test.bib + :style: nowebref + :all: + :list: bullet diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter/contents.rst sphinxcontrib-bibtex-1.0.0/test/filter/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/filter/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -.. bibliography:: test.bib - :list: bullet - :filter: author % "Second" and type == "misc" - -.. toctree:: - - or - noteq - lt - lte - gt - gte - key - false - title - in - notin - set - bitand - bitor diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter/index.rst sphinxcontrib-bibtex-1.0.0/test/filter/index.rst --- sphinxcontrib-bibtex-0.4.1/test/filter/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter/index.rst 2019-06-13 12:16:02.000000000 +0000 @@ -0,0 +1,21 @@ +.. bibliography:: test.bib + :list: bullet + :filter: author % "Second" and type == "misc" + +.. toctree:: + + or + noteq + lt + lte + gt + gte + key + false + true + title + in + notin + set + bitand + bitor diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter/true.rst sphinxcontrib-bibtex-1.0.0/test/filter/true.rst --- sphinxcontrib-bibtex-0.4.1/test/filter/true.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter/true.rst 2019-06-13 12:16:02.000000000 +0000 @@ -0,0 +1,6 @@ +True +---- + +.. bibliography:: test.bib + :list: bullet + :filter: True diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter_fix_author_keyerror/contents.rst sphinxcontrib-bibtex-1.0.0/test/filter_fix_author_keyerror/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/filter_fix_author_keyerror/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter_fix_author_keyerror/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -.. bibliography:: test.bib - :list: bullet - :filter: author % "Test" diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter_fix_author_keyerror/index.rst sphinxcontrib-bibtex-1.0.0/test/filter_fix_author_keyerror/index.rst --- sphinxcontrib-bibtex-0.4.1/test/filter_fix_author_keyerror/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter_fix_author_keyerror/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,3 @@ +.. bibliography:: test.bib + :list: bullet + :filter: author % "Test" diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter_option_clash/contents.rst sphinxcontrib-bibtex-1.0.0/test/filter_option_clash/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/filter_option_clash/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter_option_clash/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -.. bibliography:: test.bib - :all: - :cited: - :notcited: - :filter: author % "Troffaes" diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter_option_clash/index.rst sphinxcontrib-bibtex-1.0.0/test/filter_option_clash/index.rst --- sphinxcontrib-bibtex-0.4.1/test/filter_option_clash/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter_option_clash/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,5 @@ +.. bibliography:: test.bib + :all: + :cited: + :notcited: + :filter: author % "Troffaes" diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter_syntax_error/contents.rst sphinxcontrib-bibtex-1.0.0/test/filter_syntax_error/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/filter_syntax_error/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter_syntax_error/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -.. bibliography:: test.bib - :filter: $ - -.. bibliography:: test.bib - :filter: yield author - -.. bibliography:: test.bib - :filter: author is title - -.. bibliography:: test.bib - :filter: False % title - -.. bibliography:: test.bib - :filter: title % False - -.. bibliography:: test.bib - :filter: ~title - -.. bibliography:: test.bib - :filter: "2000" <= year <= "2005" - -.. bibliography:: test.bib - :filter: author + title - -.. bibliography:: test.bib - :filter: author; title diff -Nru sphinxcontrib-bibtex-0.4.1/test/filter_syntax_error/index.rst sphinxcontrib-bibtex-1.0.0/test/filter_syntax_error/index.rst --- sphinxcontrib-bibtex-0.4.1/test/filter_syntax_error/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/filter_syntax_error/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,26 @@ +.. bibliography:: test.bib + :filter: $ + +.. bibliography:: test.bib + :filter: yield author + +.. bibliography:: test.bib + :filter: author is title + +.. bibliography:: test.bib + :filter: False % title + +.. bibliography:: test.bib + :filter: title % False + +.. bibliography:: test.bib + :filter: ~title + +.. bibliography:: test.bib + :filter: "2000" <= year <= "2005" + +.. bibliography:: test.bib + :filter: author + title + +.. bibliography:: test.bib + :filter: author; title diff -Nru sphinxcontrib-bibtex-0.4.1/test/invalid_cite_option/contents.rst sphinxcontrib-bibtex-1.0.0/test/invalid_cite_option/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/invalid_cite_option/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/invalid_cite_option/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -.. bibliography:: test.bib - :thisisintentionallyinvalid: diff -Nru sphinxcontrib-bibtex-0.4.1/test/invalid_cite_option/index.rst sphinxcontrib-bibtex-1.0.0/test/invalid_cite_option/index.rst --- sphinxcontrib-bibtex-0.4.1/test/invalid_cite_option/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/invalid_cite_option/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,2 @@ +.. bibliography:: test.bib + :thisisintentionallyinvalid: diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue1/2012/07/24/hello_world_.rst sphinxcontrib-bibtex-1.0.0/test/issue1/2012/07/24/hello_world_.rst --- sphinxcontrib-bibtex-0.4.1/test/issue1/2012/07/24/hello_world_.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue1/2012/07/24/hello_world_.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -Hello World! -============ - -:cite:`2011:BabikerIPv6` - -.. bibliography:: ../../../refs.bib - -.. author:: default -.. categories:: none -.. tags:: none -.. comments:: diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue1/conf.py sphinxcontrib-bibtex-1.0.0/test/issue1/conf.py --- sphinxcontrib-bibtex-0.4.1/test/issue1/conf.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue1/conf.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -import tinkerer -import tinkerer.paths -project = 'My blog' -tagline = 'Add intelligent tagline here' -author = 'Mr Test' -website = 'http://127.0.0.1/blog/html/' -html_theme = "modern5" -posts_per_page = 2 - -extensions = [ - 'sphinxcontrib.bibtex', - 'tinkerer.ext.blog', - 'tinkerer.ext.disqus'] - -html_static_path = [tinkerer.paths.static] -html_theme_path = [tinkerer.paths.themes] -exclude_patterns = ["drafts/*"] - -# ************************************************************** -# Do not modify below lines as the values are required by -# Tinkerer to play nice with Sphinx -# ************************************************************** - -master_doc = tinkerer.master_doc -html_title = project -html_use_index = False -html_show_sourcelink = False -html_add_permalinks = "" diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue1/master.rst sphinxcontrib-bibtex-1.0.0/test/issue1/master.rst --- sphinxcontrib-bibtex-0.4.1/test/issue1/master.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue1/master.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -Sitemap -======= - -.. toctree:: - :maxdepth: 1 - - 2012/07/24/hello_world_ - diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue1/refs.bib sphinxcontrib-bibtex-1.0.0/test/issue1/refs.bib --- sphinxcontrib-bibtex-0.4.1/test/issue1/refs.bib 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue1/refs.bib 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -@InProceedings{2011:BabikerIPv6, - author = {H. Babiker and I. Nikolova and K. Chittimaneni}, - title = {Deploying IPv6 in the Google Enterprise Network. Lessons learned.}, - booktitle = {USENIX LISA 2011}, - year = 2011, - note = {\url{http://static.usenix.org/events/lisa11/tech/full_papers/Babiker.pdf}} } diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue14/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue14/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue14/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue14/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -Contents -======== - -.. toctree:: - - doc1 - doc2 diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue14/index.rst sphinxcontrib-bibtex-1.0.0/test/issue14/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue14/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue14/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,7 @@ +Contents +======== + +.. toctree:: + + doc1 + doc2 diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue14_2/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue14_2/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue14_2/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue14_2/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -Contents -======== - -.. toctree:: - - doc1 - doc2 diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue14_2/index.rst sphinxcontrib-bibtex-1.0.0/test/issue14_2/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue14_2/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue14_2/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,7 @@ +Contents +======== + +.. toctree:: + + doc1 + doc2 diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue15/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue15/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue15/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue15/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -:cite:`first` -:cite:`second` - -.. bibliography:: test.bib - :style: unsrt diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue15/index.rst sphinxcontrib-bibtex-1.0.0/test/issue15/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue15/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue15/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,5 @@ +:cite:`first` +:cite:`second` + +.. bibliography:: test.bib + :style: unsrt diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue17/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue17/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue17/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue17/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -.. automodule:: somemodule - :members: diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue17/index.rst sphinxcontrib-bibtex-1.0.0/test/issue17/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue17/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue17/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,2 @@ +.. automodule:: somemodule + :members: diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue17/somemodule.py sphinxcontrib-bibtex-1.0.0/test/issue17/somemodule.py --- sphinxcontrib-bibtex-0.4.1/test/issue17/somemodule.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue17/somemodule.py 2019-06-13 12:16:02.000000000 +0000 @@ -1,6 +1,6 @@ """Some module.""" -def somefunction(): - """Some function.""" +class someclass: + """Some class.""" pass diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue_173/conf.py sphinxcontrib-bibtex-1.0.0/test/issue_173/conf.py --- sphinxcontrib-bibtex-0.4.1/test/issue_173/conf.py 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue_173/conf.py 2019-09-09 07:16:00.000000000 +0000 @@ -0,0 +1,2 @@ +extensions = ['sphinxcontrib.bibtex'] +exclude_patterns = ['_build'] diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue_173/index.rst sphinxcontrib-bibtex-1.0.0/test/issue_173/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue_173/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue_173/index.rst 2019-09-09 07:16:00.000000000 +0000 @@ -0,0 +1,6 @@ +First edition: :cite:`ABC_R1`. + +Second edition: :cite:`ABC_R2`. + +.. bibliography:: test.bib + :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue_173/test.bib sphinxcontrib-bibtex-1.0.0/test/issue_173/test.bib --- sphinxcontrib-bibtex-0.4.1/test/issue_173/test.bib 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue_173/test.bib 2019-09-09 07:16:00.000000000 +0000 @@ -0,0 +1,12 @@ +@manual{ABC_R1, + author = {xyz}, + title = {{ABC}}, + edition = 1, + year = {2019} +} +@manual{ABC_R2, + author = {xyz}, + title = {{ABC}}, + edition = 2, + year = {2019} +} diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue2/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue2/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue2/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue2/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -Contents -======== - -.. toctree:: - - adoc1 - adoc2 - -.. bibliography:: test.bib - :style: plain diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue2/index.rst sphinxcontrib-bibtex-1.0.0/test/issue2/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue2/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue2/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,10 @@ +Contents +======== + +.. toctree:: + + adoc1 + adoc2 + +.. bibliography:: test.bib + :style: plain diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue4/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue4/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue4/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue4/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -:cite:`Test` - -.. bibliography:: test.bib - :all: - :encoding: latex+utf diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue4/index.rst sphinxcontrib-bibtex-1.0.0/test/issue4/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue4/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue4/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,5 @@ +:cite:`Test` + +.. bibliography:: test.bib + :all: + :encoding: latex+utf diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue61/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue61/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue61/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue61/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -Contents -======== - -:cite:`testone,testtwo` - -.. bibliography:: refs.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue61/index.rst sphinxcontrib-bibtex-1.0.0/test/issue61/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue61/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue61/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,6 @@ +Contents +======== + +:cite:`testone,testtwo` + +.. bibliography:: refs.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue62/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue62/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue62/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue62/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -Contents -======== - -.. toctree:: - - doc1 - doc2 - summary - diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue62/index.rst sphinxcontrib-bibtex-1.0.0/test/issue62/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue62/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue62/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,9 @@ +Contents +======== + +.. toctree:: + + doc1 + doc2 + summary + diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue77/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue77/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue77/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue77/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -:cite:`2009:mandel` -:cite:`2003:evensen` - -.. bibliography:: test.bib - :style: apastyle diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue77/index.rst sphinxcontrib-bibtex-1.0.0/test/issue77/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue77/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue77/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,5 @@ +:cite:`2009:mandel` +:cite:`2003:evensen` + +.. bibliography:: test.bib + :style: apastyle diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue85/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue85/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue85/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue85/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -:cite:`_software_2015` -:cite:`2009:mandel` - -.. bibliography:: test.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue85/index.rst sphinxcontrib-bibtex-1.0.0/test/issue85/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue85/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue85/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,4 @@ +:cite:`_software_2015` +:cite:`2009:mandel` + +.. bibliography:: test.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue87/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue87/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue87/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue87/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -Contents -======== - -.. toctree:: - - doc0 - doc1 diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue87/index.rst sphinxcontrib-bibtex-1.0.0/test/issue87/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue87/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue87/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,7 @@ +Contents +======== + +.. toctree:: + + doc0 + doc1 diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue91/contents.rst sphinxcontrib-bibtex-1.0.0/test/issue91/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/issue91/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue91/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -:cite:`2009:mandel` - -.. bibliography:: test.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/issue91/index.rst sphinxcontrib-bibtex-1.0.0/test/issue91/index.rst --- sphinxcontrib-bibtex-0.4.1/test/issue91/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/issue91/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,3 @@ +:cite:`2009:mandel` + +.. bibliography:: test.bib diff -Nru sphinxcontrib-bibtex-0.4.1/test/latex_refs/conf.py sphinxcontrib-bibtex-1.0.0/test/latex_refs/conf.py --- sphinxcontrib-bibtex-0.4.1/test/latex_refs/conf.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/latex_refs/conf.py 2019-06-13 12:15:26.000000000 +0000 @@ -1,7 +1,7 @@ extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] latex_documents = [ - ('contents', 'test.tex', + ('index', 'test.tex', u'Test', u'Mr. Test', 'manual'), ] diff -Nru sphinxcontrib-bibtex-0.4.1/test/latex_refs/contents.rst sphinxcontrib-bibtex-1.0.0/test/latex_refs/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/latex_refs/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/latex_refs/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -Test -==== - -:cite:`1657:huygens` - -.. bibliography:: test.bib - :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/latex_refs/index.rst sphinxcontrib-bibtex-1.0.0/test/latex_refs/index.rst --- sphinxcontrib-bibtex-0.4.1/test/latex_refs/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/latex_refs/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,7 @@ +Test +==== + +:cite:`1657:huygens` + +.. bibliography:: test.bib + :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_bullet/contents.rst sphinxcontrib-bibtex-1.0.0/test/list_bullet/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/list_bullet/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_bullet/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -.. bibliography:: test.bib - :list: bullet - :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_bullet/index.rst sphinxcontrib-bibtex-1.0.0/test/list_bullet/index.rst --- sphinxcontrib-bibtex-0.4.1/test/list_bullet/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_bullet/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,3 @@ +.. bibliography:: test.bib + :list: bullet + :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_citation/contents.rst sphinxcontrib-bibtex-1.0.0/test/list_citation/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/list_citation/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_citation/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -:cite:`test1` -:cite:`test2` -:cite:`test3` -:cite:`test4` - -.. bibliography:: test.bib - :style: plain - :list: citation - :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_citation/index.rst sphinxcontrib-bibtex-1.0.0/test/list_citation/index.rst --- sphinxcontrib-bibtex-0.4.1/test/list_citation/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_citation/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,9 @@ +:cite:`test1` +:cite:`test2` +:cite:`test3` +:cite:`test4` + +.. bibliography:: test.bib + :style: plain + :list: citation + :all: diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_enumerated/contents.rst sphinxcontrib-bibtex-1.0.0/test/list_enumerated/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/list_enumerated/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_enumerated/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -.. bibliography:: test.bib - :list: enumerated - :all: - -.. bibliography:: test2.bib - :list: enumerated - :start: continue - :all: - -.. bibliography:: test3.bib - :list: enumerated - :start: 23 - :all: - diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_enumerated/index.rst sphinxcontrib-bibtex-1.0.0/test/list_enumerated/index.rst --- sphinxcontrib-bibtex-0.4.1/test/list_enumerated/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_enumerated/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,14 @@ +.. bibliography:: test.bib + :list: enumerated + :all: + +.. bibliography:: test2.bib + :list: enumerated + :start: continue + :all: + +.. bibliography:: test3.bib + :list: enumerated + :start: 23 + :all: + diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_invalid/contents.rst sphinxcontrib-bibtex-1.0.0/test/list_invalid/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/list_invalid/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_invalid/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -.. bibliography:: test.bib - :list: thisisintentionallyinvalid diff -Nru sphinxcontrib-bibtex-0.4.1/test/list_invalid/index.rst sphinxcontrib-bibtex-1.0.0/test/list_invalid/index.rst --- sphinxcontrib-bibtex-0.4.1/test/list_invalid/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/list_invalid/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,2 @@ +.. bibliography:: test.bib + :list: thisisintentionallyinvalid diff -Nru sphinxcontrib-bibtex-0.4.1/test/sphinx/contents.rst sphinxcontrib-bibtex-1.0.0/test/sphinx/contents.rst --- sphinxcontrib-bibtex-0.4.1/test/sphinx/contents.rst 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/sphinx/contents.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -.. Sphinx bibtex extension test documentation master file, created by - sphinx-quickstart on Mon Mar 21 14:37:33 2011. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to Sphinx bibtex extension test's documentation! -======================================================== - -Citation :cite:`1996:fukuda` :cite:`dreze:2000` to other document. -Regular citation test [Test01]_ to other document. - -Contents: - -.. toctree:: - :maxdepth: 2 - - zbibliography - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff -Nru sphinxcontrib-bibtex-0.4.1/test/sphinx/index.rst sphinxcontrib-bibtex-1.0.0/test/sphinx/index.rst --- sphinxcontrib-bibtex-0.4.1/test/sphinx/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/sphinx/index.rst 2019-06-13 12:15:26.000000000 +0000 @@ -0,0 +1,25 @@ +.. Sphinx bibtex extension test documentation master file, created by + sphinx-quickstart on Mon Mar 21 14:37:33 2011. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Sphinx bibtex extension test's documentation! +======================================================== + +Citation :cite:`1996:fukuda` :cite:`dreze:2000` to other document. +Regular citation test [Test01]_ to other document. + +Contents: + +.. toctree:: + :maxdepth: 2 + + zbibliography + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_bibfile_out_of_date.py sphinxcontrib-bibtex-1.0.0/test/test_bibfile_out_of_date.py --- sphinxcontrib-bibtex-0.4.1/test/test_bibfile_out_of_date.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_bibfile_out_of_date.py 2019-06-13 12:44:40.000000000 +0000 @@ -21,29 +21,35 @@ (srcdir / 'test.bib').rmtree(True) +def htmlbibitem(label, text): + return ( + '.*
' + '{0}
\\s*
.*{1}.*
'.format(label, text)) + + @with_app(srcdir=srcdir, warningiserror=True) def test_bibfile_out_of_date(app, status, warning): shutil.copyfile((srcdir / 'test_old.bib'), (srcdir / 'test.bib')) app.builder.build_all() - output = (app.outdir / "contents.html").read_text() + output = (path(app.outdir) / "index.html").read_text() assert re.search( - '

' - '.*.*\\[1\\].*.*Akkerdju.*' - '.*.*\\[2\\].*.*Bro.*' - '.*.*\\[3\\].*.*Chap.*' - '.*.*\\[4\\].*.*Dude.*' - '.*

', + '

' + + htmlbibitem("1", "Akkerdju") + + htmlbibitem("2", "Bro") + + htmlbibitem("3", "Chap") + + htmlbibitem("4", "Dude") + + '.*

', output, re.MULTILINE | re.DOTALL) # wait to ensure different timestamp time.sleep(0.1) shutil.copyfile((srcdir / 'test_new.bib'), (srcdir / 'test.bib')) app.builder.build_all() - output = (app.outdir / "contents.html").read_text() + output = (path(app.outdir) / "index.html").read_text() assert re.search( - '

' - '.*.*\\[1\\].*.*Eminence.*' - '.*.*\\[2\\].*.*Frater.*' - '.*.*\\[3\\].*.*Giggles.*' - '.*.*\\[4\\].*.*Handy.*' - '.*

', + '

' + + htmlbibitem("1", "Eminence") + + htmlbibitem("2", "Frater") + + htmlbibitem("3", "Giggles") + + htmlbibitem("4", "Handy") + + '.*

', output, re.MULTILINE | re.DOTALL) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_custom_labels.py sphinxcontrib-bibtex-1.0.0/test/test_custom_labels.py --- sphinxcontrib-bibtex-0.4.1/test/test_custom_labels.py 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_custom_labels.py 2019-09-04 07:50:50.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +""" + test_custom_style + ~~~~~~~~~~~~~~~~~ + + Test a custom label style. +""" + +from sphinx_testing.util import path, with_app + +srcdir = path(__file__).dirname().joinpath('custom_labels').abspath() + + +def teardown_module(): + (srcdir / '_build').rmtree(True) + + +@with_app(srcdir=srcdir, warningiserror=True) +def test_custom_labels(app, status, warning): + app.builder.build_all() + output = (path(app.outdir) / "index.html").read_text(encoding='utf-8') + # the custom style uses keys as labels + print(output) + assert "[myfancybibtexkey]" in output + assert "[myotherfancybibtexkey]" in output + assert ">myfancybibtexkey" in output + assert ">myotherfancybibtexkey" in output diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_custom_style.py sphinxcontrib-bibtex-1.0.0/test/test_custom_style.py --- sphinxcontrib-bibtex-0.4.1/test/test_custom_style.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_custom_style.py 2019-06-13 12:15:26.000000000 +0000 @@ -20,7 +20,7 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_custom_style(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "index.html").read_text(encoding='utf-8') # the custom style suppresses web links assert not re.search('http://arxiv.org', output) assert not re.search('http://dx.doi.org', output) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_filter.py sphinxcontrib-bibtex-1.0.0/test/test_filter.py --- sphinxcontrib-bibtex-0.4.1/test/test_filter.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_filter.py 2019-06-13 12:16:02.000000000 +0000 @@ -20,43 +20,47 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_filter(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "index.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert not re.search('ideetje', output) assert not re.search('Jakkamakka', output) - output = (app.outdir / "or.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "or.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert re.search('Jakkamakka', output) - output = (app.outdir / "noteq.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "noteq.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert re.search('ideetje', output) assert not re.search('Jakkamakka', output) - output = (app.outdir / "lt.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "lt.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert not re.search('ideetje', output) assert not re.search('Jakkamakka', output) - output = (app.outdir / "lte.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "lte.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert not re.search('ideetje', output) assert re.search('Jakkamakka', output) - output = (app.outdir / "gt.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "gt.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert not re.search('Jakkamakka', output) - output = (app.outdir / "gte.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "gte.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert re.search('Jakkamakka', output) - output = (app.outdir / "key.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "key.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert not re.search('Jakkamakka', output) - output = (app.outdir / "false.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "false.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert not re.search('ideetje', output) assert not re.search('Jakkamakka', output) - output = (app.outdir / "title.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "true.html").read_text(encoding='utf-8') + assert re.search('Tralalala', output) + assert re.search('ideetje', output) + assert re.search('Jakkamakka', output) + output = (path(app.outdir) / "title.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert not re.search('ideetje', output) assert re.search('Jakkamakka', output) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue14_2.py sphinxcontrib-bibtex-1.0.0/test/test_issue14_2.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue14_2.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue14_2.py 2019-06-13 12:15:26.000000000 +0000 @@ -20,7 +20,7 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_label_prefix(app, status, warning): app.builder.build_all() - output = (app.outdir / "doc1.html").read_text(encoding='utf-8') - assert re.search('.*\\[A1\\].*', output) - output = (app.outdir / "doc2.html").read_text(encoding='utf-8') - assert re.search('.*\\[B1\\].*', output) + output = (path(app.outdir) / "doc1.html").read_text(encoding='utf-8') + assert re.search('\\[A1\\]', output) + output = (path(app.outdir) / "doc2.html").read_text(encoding='utf-8') + assert re.search('\\[B1\\]', output) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue14.py sphinxcontrib-bibtex-1.0.0/test/test_issue14.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue14.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue14.py 2019-06-13 12:44:40.000000000 +0000 @@ -17,13 +17,19 @@ (srcdir / '_build').rmtree(True) +def htmlbiblabel(label): + return ( + '
{0}
' + .format(label)) + + @with_app(srcdir=srcdir) def test_duplicate_label(app, status, warning): app.builder.build_all() assert re.search( 'duplicate label for keys (Test and Test2)|(Test2 and Test)', warning.getvalue()) - output = (app.outdir / "doc1.html").read_text(encoding='utf-8') - assert re.search('\\[1\\]', output) - output = (app.outdir / "doc2.html").read_text(encoding='utf-8') - assert re.search('\\[1\\]', output) + output = (path(app.outdir) / "doc1.html").read_text(encoding='utf-8') + assert re.search(htmlbiblabel("1"), output) + output = (path(app.outdir) / "doc2.html").read_text(encoding='utf-8') + assert re.search(htmlbiblabel("1"), output) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue15.py sphinxcontrib-bibtex-1.0.0/test/test_issue15.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue15.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue15.py 2019-06-13 12:15:26.000000000 +0000 @@ -20,7 +20,7 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_duplicate_label(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text() + output = (path(app.outdir) / "index.html").read_text() assert re.search( - '.*Test 1.*.*.*Test 2.*', + '
.*Test 1.*
.*
.*Test 2.*
', output, re.DOTALL) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue_173.py sphinxcontrib-bibtex-1.0.0/test/test_issue_173.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue_173.py 1970-01-01 00:00:00.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue_173.py 2019-09-09 07:16:00.000000000 +0000 @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +""" + test_issue_173 + ~~~~~~~~~~~~~~ + + Check referencing works with near identical entries. +""" + +from sphinx_testing.util import path, with_app + +srcdir = path(__file__).dirname().joinpath('issue_173').abspath() + + +def teardown_module(): + (srcdir / '_build').rmtree(True) + + +@with_app(srcdir=srcdir, warningiserror=True) +def test_issue_173(app, status, warning): + app.builder.build_all() + output = (path(app.outdir) / "index.html").read_text(encoding='utf-8') + assert "[xyz19a]" in output + assert "[xyz19b]" in output diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue1.py sphinxcontrib-bibtex-1.0.0/test/test_issue1.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue1.py 2018-11-28 13:11:11.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue1.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -""" - test_issue1 - ~~~~~~~~~~~ - - Test Tinkerer and check output. -""" - -import nose.tools -# import sys - -from sphinx_testing.util import path, with_app - -srcdir = path(__file__).dirname().joinpath('issue1').abspath() - - -def teardown_module(): - (srcdir / '_build').rmtree(True) - - -# if sys.version_info[0] > 2: -if False: - @with_app(srcdir=srcdir, warningiserror=True) - def test_tinker(app, status, warning): - app.builder.build_all() - nose.tools.assert_equal( - app.env.bibtex_cache.get_cited_docnames(u"2011:BabikerIPv6"), - {u"2012/07/24/hello_world_"}) - nose.tools.assert_equal( - app.env.bibtex_cache.get_label_from_key(u"2011:BabikerIPv6"), - u"BNC11") diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue4.py sphinxcontrib-bibtex-1.0.0/test/test_issue4.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue4.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue4.py 2019-06-13 12:15:26.000000000 +0000 @@ -20,5 +20,5 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_encoding(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text(encoding='utf-8') + output = (path(app.outdir) / "index.html").read_text(encoding='utf-8') assert re.search(u"Tést☺", output) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue61.py sphinxcontrib-bibtex-1.0.0/test/test_issue61.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue61.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue61.py 2019-06-13 12:44:40.000000000 +0000 @@ -19,6 +19,8 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_multiple_keys(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text(encoding='utf-8') - assert re.search('class="reference internal" href="#testone"', output) - assert re.search('class="reference internal" href="#testtwo"', output) + output = (path(app.outdir) / "index.html").read_text(encoding='utf-8') + assert re.search( + 'class="bibtex reference internal" href="#testone"', output) + assert re.search( + 'class="bibtex reference internal" href="#testtwo"', output) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_issue62.py sphinxcontrib-bibtex-1.0.0/test/test_issue62.py --- sphinxcontrib-bibtex-0.4.1/test/test_issue62.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_issue62.py 2019-06-13 12:44:40.000000000 +0000 @@ -18,12 +18,12 @@ def extract_references(code): return frozenset(re.findall( - '= (1, 8): - assert r'\sphinxcite{contents:huygens}' in output - assert r'\bibitem[Huy57]{contents:huygens}' in output - else: - assert re.search( - r'\\hyperref\[(\\detokenize{)?contents:huygens(})?\]', output) - assert re.search( - r'\\label{(\\detokenize{)?contents:huygens(})?}}', output) + output = (path(app.outdir) / "test.tex").read_text(encoding='utf-8') + assert r'\sphinxcite{index:huygens}' in output + assert r'\bibitem[Huy57]{index:huygens}' in output diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_list_bullet.py sphinxcontrib-bibtex-1.0.0/test/test_list_bullet.py --- sphinxcontrib-bibtex-0.4.1/test/test_list_bullet.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_list_bullet.py 2019-06-13 12:15:26.000000000 +0000 @@ -20,9 +20,9 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_list_bullet(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text() + output = (path(app.outdir) / "index.html").read_text() assert re.search( - '
    ' + '
      ' '.*
    • .*Akkerdju.*
    • ' '.*
    • .*Bro.*
    • ' '.*
    • .*Chap.*
    • ' diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_list_citation.py sphinxcontrib-bibtex-1.0.0/test/test_list_citation.py --- sphinxcontrib-bibtex-0.4.1/test/test_list_citation.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_list_citation.py 2019-06-13 12:44:40.000000000 +0000 @@ -17,15 +17,21 @@ (srcdir / '_build').rmtree(True) +def htmlbibitem(label, text): + return ( + '.*
      ' + '{0}
      \\s*
      .*{1}.*
      '.format(label, text)) + + @with_app(srcdir=srcdir, warningiserror=True) def test_list_citation(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text() + output = (path(app.outdir) / "index.html").read_text() assert re.search( - '

      ' - '.*.*\\[1\\].*.*Akkerdju.*' - '.*.*\\[2\\].*.*Bro.*' - '.*.*\\[3\\].*.*Chap.*' - '.*.*\\[4\\].*.*Dude.*' - '.*

      ', + '

      ' + + htmlbibitem("1", "Akkerdju") + + htmlbibitem("2", "Bro") + + htmlbibitem("3", "Chap") + + htmlbibitem("4", "Dude") + + '.*

      ', output, re.MULTILINE | re.DOTALL) diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_list_enumerated.py sphinxcontrib-bibtex-1.0.0/test/test_list_enumerated.py --- sphinxcontrib-bibtex-0.4.1/test/test_list_enumerated.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_list_enumerated.py 2019-06-13 12:15:26.000000000 +0000 @@ -20,21 +20,21 @@ @with_app(srcdir=srcdir, warningiserror=True) def test_list_enumerated(app, status, warning): app.builder.build_all() - output = (app.outdir / "contents.html").read_text() + output = (path(app.outdir) / "index.html").read_text() assert re.search( - '
        ' + '
          ' '.*
        1. .*Akkerdju.*
        2. ' '.*
        3. .*Bro.*
        4. ' '.*
        5. .*Chap.*
        6. ' '.*
        7. .*Dude.*
        8. ' '.*
        ' - '.*
          ' + '.*
            ' '.*
          1. .*Eminence.*
          2. ' '.*
          3. .*Frater.*
          4. ' '.*
          5. .*Giggles.*
          6. ' '.*
          7. .*Handy.*
          8. ' '.*
          ' - '.*
            ' + '.*
              ' '.*
            1. .*Iedereen.*
            2. ' '.*
            3. .*Joke.*
            4. ' '.*
            5. .*Klopgeest.*
            6. ' diff -Nru sphinxcontrib-bibtex-0.4.1/test/test_sphinx.py sphinxcontrib-bibtex-1.0.0/test/test_sphinx.py --- sphinxcontrib-bibtex-0.4.1/test/test_sphinx.py 2018-11-28 08:05:39.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/test/test_sphinx.py 2019-06-13 12:44:40.000000000 +0000 @@ -6,7 +6,7 @@ General Sphinx test and check output. """ -import re +import nose.tools from sphinx_testing.util import path, with_app @@ -21,15 +21,8 @@ def test_sphinx(app, status, warning): app.builder.build_all() warnings = warning.getvalue() - assert re.search(u'could not relabel citation \\[Test01\\]', warnings) - assert re.search(u'could not relabel citation \\[Test02\\]', warnings) - assert re.search(u'could not relabel citation \\[Wa04\\]', warnings) - assert re.search( - u'could not relabel citation reference \\[Test01\\]', - warnings) - assert re.search( - u'could not relabel citation reference \\[Test02\\]', - warnings) - assert re.search( - u'could not relabel citation reference \\[Wa04\\]', - warnings) + assert u'could not relabel citation' not in warnings + assert u'is not referenced' in warnings + # for coverage + with nose.tools.assert_raises(KeyError): + app.env.bibtex_cache.get_label_from_key("nonexistinglabel") diff -Nru sphinxcontrib-bibtex-0.4.1/VERSION sphinxcontrib-bibtex-1.0.0/VERSION --- sphinxcontrib-bibtex-0.4.1/VERSION 2018-11-28 13:48:02.000000000 +0000 +++ sphinxcontrib-bibtex-1.0.0/VERSION 2019-09-20 09:58:55.000000000 +0000 @@ -1 +1 @@ -0.4.1 +1.0.0