[Python-modules-commits] [sphinxcontrib-websupport] 01/02: Add two patches to fix compatibility with Sphinx 1.6.
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Fri Sep 29 19:48:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
mitya57 pushed a commit to branch debian/master
in repository sphinxcontrib-websupport.
commit 1fef7b8a6fad276f285b76e9b50268c0e9107ef0
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Fri Sep 29 17:37:35 2017 +0300
Add two patches to fix compatibility with Sphinx 1.6.
- tests_fix_import.diff: Import local sqlalchemystorage in tests.
- sphinx16_translator_class.diff: Use new API to set translator class.
Closes: #877158.
---
debian/changelog | 8 +++++++
debian/patches/series | 2 ++
debian/patches/sphinx16_translator_class.diff | 34 +++++++++++++++++++++++++++
debian/patches/tests_fix_import.diff | 23 ++++++++++++++++++
4 files changed, 67 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 910db62..e84ebd4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+sphinxcontrib-websupport (1.0.1-2) UNRELEASED; urgency=medium
+
+ * Add two patches to fix compatibility with Sphinx 1.6 (closes: #877158):
+ - tests_fix_import.diff: Import local sqlalchemystorage in tests.
+ - sphinx16_translator_class.diff: Use new API to set translator class.
+
+ -- Dmitry Shachnev <mitya57 at debian.org> Fri, 29 Sep 2017 17:35:19 +0300
+
sphinxcontrib-websupport (1.0.1-1) unstable; urgency=medium
* Initial release. (Closes: #867763)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c796121
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+tests_fix_import.diff
+sphinx16_translator_class.diff
diff --git a/debian/patches/sphinx16_translator_class.diff b/debian/patches/sphinx16_translator_class.diff
new file mode 100644
index 0000000..27e118c
--- /dev/null
+++ b/debian/patches/sphinx16_translator_class.diff
@@ -0,0 +1,34 @@
+From: Dmitry Shachnev <mitya57 at debian.org>
+Date: Fri, 29 Sep 2017 17:30:54 +0300
+Subject: Replace init_translator_class method with default_translator_class
+ attribute
+
+To fix compatibility with Sphinx 1.6, see sphinx-doc/sphinx at 78ea36a787a762bb.
+---
+ sphinxcontrib/websupport/builder.py | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/sphinxcontrib/websupport/builder.py b/sphinxcontrib/websupport/builder.py
+index d38626e..da12961 100644
+--- a/sphinxcontrib/websupport/builder.py
++++ b/sphinxcontrib/websupport/builder.py
+@@ -34,6 +34,7 @@ class WebSupportBuilder(PickleHTMLBuilder):
+ name = 'websupport'
+ versioning_method = 'commentable'
+ versioning_compare = True # for commentable node's uuid stability.
++ default_translator_class = WebSupportTranslator
+
+ def init(self):
+ # type: () -> None
+@@ -54,11 +55,6 @@ class WebSupportBuilder(PickleHTMLBuilder):
+ self.search = search
+ self.storage = storage
+
+- def init_translator_class(self):
+- # type: () -> None
+- if self.translator_class is None:
+- self.translator_class = WebSupportTranslator
+-
+ def prepare_writing(self, docnames):
+ # type: (Iterable[unicode]) -> None
+ PickleHTMLBuilder.prepare_writing(self, docnames)
diff --git a/debian/patches/tests_fix_import.diff b/debian/patches/tests_fix_import.diff
new file mode 100644
index 0000000..7d8d7bf
--- /dev/null
+++ b/debian/patches/tests_fix_import.diff
@@ -0,0 +1,23 @@
+From: Dmitry Shachnev <mitya57 at debian.org>
+Date: Fri, 29 Sep 2017 17:28:14 +0300
+Subject: tests: Import Session, Comment and CommentVote from local module
+
+The sphinx.websupport.storage.sqlalchemystorage wrapper module only
+provides SQLAlchemyStorage, but not these names.
+---
+ tests/test_websupport.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_websupport.py b/tests/test_websupport.py
+index 91f67bf..c7e357c 100644
+--- a/tests/test_websupport.py
++++ b/tests/test_websupport.py
+@@ -15,7 +15,7 @@ from sphinx.websupport.errors import DocumentNotFoundError, \
+ from sphinx.websupport.storage import StorageBackend
+ from sphinx.websupport.storage.differ import CombinedHtmlDiff
+ try:
+- from sphinx.websupport.storage.sqlalchemystorage import Session, \
++ from sphinxcontrib.websupport.storage.sqlalchemystorage import Session, \
+ Comment, CommentVote
+ from sphinx.websupport.storage.sqlalchemy_db import Node
+ sqlalchemy_missing = False
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinxcontrib-websupport.git
More information about the Python-modules-commits
mailing list