Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP1
python-sphinxcontrib-httpdomain
newer-sphinx.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File newer-sphinx.patch of Package python-sphinxcontrib-httpdomain
# HG changeset patch # User Dave Shawley <daveshawley@gmail.com> # Date 1498216338 14400 # Fri Jun 23 07:12:18 2017 -0400 # Branch new-sphinx # Node ID ac9095c543a4c5ffba77da14ca21aaa155725418 # Parent e758073384efd1ed5ed1e6286301b7bef71b27cf Update 'http' domain detection to work with new Sphinx. The autohttp.*.setup functions were detecting whether httpdomain was installed using an attribute on the sphinx application that was removed in recent Sphinx versions. This commit: (1) moves the idempotency logic into httpdomain.setup (2) makes the logic work with new and old versions of sphinx by falling back to the legacy behavior on AttributeError (3) changes each setup function to always call the new idempotent httpdomain.setup diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/bottle.py --- a/sphinxcontrib/autohttp/bottle.py Fri Mar 31 17:37:43 2017 +0000 +++ b/sphinxcontrib/autohttp/bottle.py Fri Jun 23 07:12:18 2017 -0400 @@ -108,7 +108,6 @@ def setup(app): - if 'http' not in app.domains: - httpdomain.setup(app) + httpdomain.setup(app) app.add_directive('autobottle', AutobottleDirective) diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/flask.py --- a/sphinxcontrib/autohttp/flask.py Fri Mar 31 17:37:43 2017 +0000 +++ b/sphinxcontrib/autohttp/flask.py Fri Jun 23 07:12:18 2017 -0400 @@ -43,6 +43,5 @@ def setup(app): - if 'http' not in app.domains: - httpdomain.setup(app) + httpdomain.setup(app) app.add_directive('autoflask', AutoflaskDirective) diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/flaskqref.py --- a/sphinxcontrib/autohttp/flaskqref.py Fri Mar 31 17:37:43 2017 +0000 +++ b/sphinxcontrib/autohttp/flaskqref.py Fri Jun 23 07:12:18 2017 -0400 @@ -2,7 +2,7 @@ sphinxcontrib.autohttp.flaskqref ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - The sphinx.ext.autodoc-style HTTP API quick reference + The sphinx.ext.autodoc-style HTTP API quick reference builder (from Flask) for sphinxcontrib.httpdomain. @@ -38,15 +38,15 @@ node.document = self.state.document result = ViewList() for line in QuickReferenceFlaskDirective.header: - result.append(line, '<qrefflask>') + result.append(line, '<qrefflask>') table={} table_sorted_names=[] - + for table_row in self.make_rst(qref=True): name = table_row['name'] if table.get(name) is None: table[name]=[] - table[name].append(table_row) + table[name].append(table_row) if name not in table_sorted_names: table_sorted_names.append(name) @@ -72,9 +72,8 @@ result.append('', '<qrefflask>') nested_parse_with_titles(self.state, result, node) return node.children - + def setup(app): - if 'http' not in app.domains: - httpdomain.setup(app) + httpdomain.setup(app) app.add_directive('qrefflask', QuickReferenceFlaskDirective) diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/autohttp/tornado.py --- a/sphinxcontrib/autohttp/tornado.py Fri Mar 31 17:37:43 2017 +0000 +++ b/sphinxcontrib/autohttp/tornado.py Fri Jun 23 07:12:18 2017 -0400 @@ -123,6 +123,5 @@ def setup(app): - if 'http' not in app.domains: - httpdomain.setup(app) + httpdomain.setup(app) app.add_directive('autotornado', AutoTornadoDirective) diff -r e758073384ef -r ac9095c543a4 httpdomain/sphinxcontrib/httpdomain.py --- a/sphinxcontrib/httpdomain.py Fri Mar 31 17:37:43 2017 +0000 +++ b/sphinxcontrib/httpdomain.py Fri Jun 23 07:12:18 2017 -0400 @@ -756,7 +756,13 @@ def setup(app): - app.add_domain(HTTPDomain) + try: + if app.registry.has_domain(HTTPDomain.name): + return + except AttributeError: + if HTTPDomain.name in app.domains: + return + try: get_lexer_by_name('http') except ClassNotFound: # HG changeset patch # User Dave Shawley <daveshawley@gmail.com> # Date 1498564881 14400 # Tue Jun 27 08:01:21 2017 -0400 # Branch new-sphinx # Node ID 158f6d8b018b3d148d389df8abb0485d665907f4 # Parent ac9095c543a4c5ffba77da14ca21aaa155725418 httpdomain: Add missing call to add_domain. diff -r ac9095c543a4 -r 158f6d8b018b httpdomain/sphinxcontrib/httpdomain.py --- a/sphinxcontrib/httpdomain.py Fri Jun 23 07:12:18 2017 -0400 +++ b/sphinxcontrib/httpdomain.py Tue Jun 27 08:01:21 2017 -0400 @@ -763,6 +763,8 @@ if HTTPDomain.name in app.domains: return + app.add_domain(HTTPDomain) + try: get_lexer_by_name('http') except ClassNotFound: # HG changeset patch # User Dave Shawley <daveshawley@gmail.com> # Date 1498565517 14400 # Tue Jun 27 08:11:57 2017 -0400 # Branch new-sphinx # Node ID ec67ec284a091ae31856c65a63004e21af26e6f3 # Parent 158f6d8b018b3d148d389df8abb0485d665907f4 httpdomain/autohttp: Use app.setup_extension. This method has been available since sphinx 1.0 so there is no need to wrap this in "version safety" checks and it is significantly cleaner. diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/bottle.py --- a/sphinxcontrib/autohttp/bottle.py Tue Jun 27 08:01:21 2017 -0400 +++ b/sphinxcontrib/autohttp/bottle.py Tue Jun 27 08:11:57 2017 -0400 @@ -108,6 +108,5 @@ def setup(app): - httpdomain.setup(app) + app.setup_extension('sphinxcontrib.httpdomain') app.add_directive('autobottle', AutobottleDirective) - diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/flask.py --- a/sphinxcontrib/autohttp/flask.py Tue Jun 27 08:01:21 2017 -0400 +++ b/sphinxcontrib/autohttp/flask.py Tue Jun 27 08:11:57 2017 -0400 @@ -43,5 +43,5 @@ def setup(app): - httpdomain.setup(app) + app.setup_extension('sphinxcontrib.httpdomain') app.add_directive('autoflask', AutoflaskDirective) diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/flaskqref.py --- a/sphinxcontrib/autohttp/flaskqref.py Tue Jun 27 08:01:21 2017 -0400 +++ b/sphinxcontrib/autohttp/flaskqref.py Tue Jun 27 08:11:57 2017 -0400 @@ -74,6 +74,5 @@ return node.children def setup(app): - httpdomain.setup(app) + app.setup_extension('sphinxcontrib.httpdomain') app.add_directive('qrefflask', QuickReferenceFlaskDirective) - diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/autohttp/tornado.py --- a/sphinxcontrib/autohttp/tornado.py Tue Jun 27 08:01:21 2017 -0400 +++ b/sphinxcontrib/autohttp/tornado.py Tue Jun 27 08:11:57 2017 -0400 @@ -123,5 +123,5 @@ def setup(app): - httpdomain.setup(app) + app.setup_extension('sphinxcontrib.httpdomain') app.add_directive('autotornado', AutoTornadoDirective) diff -r 158f6d8b018b -r ec67ec284a09 httpdomain/sphinxcontrib/httpdomain.py --- a/sphinxcontrib/httpdomain.py Tue Jun 27 08:01:21 2017 -0400 +++ b/sphinxcontrib/httpdomain.py Tue Jun 27 08:11:57 2017 -0400 @@ -756,13 +756,6 @@ def setup(app): - try: - if app.registry.has_domain(HTTPDomain.name): - return - except AttributeError: - if HTTPDomain.name in app.domains: - return - app.add_domain(HTTPDomain) try:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor