Hello community,
here is the log from the commit of package python-sphinxcontrib-httpdomain for
openSUSE:Factory checked in at 2013-08-13 13:21:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sphinxcontrib-httpdomain (Old)
and /work/SRC/openSUSE:Factory/.python-sphinxcontrib-httpdomain.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sphinxcontrib-httpdomain"
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-sphinxcontrib-httpdomain/python-sphinxcontrib-httpdomain.changes
2013-05-16 11:29:37.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python-sphinxcontrib-httpdomain.new/python-sphinxcontrib-httpdomain.changes
2013-08-13 13:21:28.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Aug 8 20:26:27 UTC 2013 - [email protected]
+
+- update to 1.1.9:
+ * Add sphinx.ext.autodoc-style HTTP API reference builder (from Bottle)
+
+-------------------------------------------------------------------
Old:
----
sphinxcontrib-httpdomain-1.1.8.tar.gz
New:
----
sphinxcontrib-httpdomain-1.1.9.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sphinxcontrib-httpdomain.spec ++++++
--- /var/tmp/diff_new_pack.JYNqr6/_old 2013-08-13 13:21:29.000000000 +0200
+++ /var/tmp/diff_new_pack.JYNqr6/_new 2013-08-13 13:21:29.000000000 +0200
@@ -17,7 +17,7 @@
Name: python-sphinxcontrib-httpdomain
-Version: 1.1.8
+Version: 1.1.9
Release: 0
Summary: Sphinx domain for HTTP APIs
License: BSD-2-Clause
@@ -25,7 +25,7 @@
Url: http://bitbucket.org/birkenfeld/sphinx-contrib
Source:
http://pypi.python.org/packages/source/s/sphinxcontrib-httpdomain/sphinxcontrib-httpdomain-%{version}.tar.gz
BuildRequires: python-devel
-BuildRequires: python-distribute
+BuildRequires: python-setuptools
Requires: python-Sphinx
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
++++++ sphinxcontrib-httpdomain-1.1.8.tar.gz ->
sphinxcontrib-httpdomain-1.1.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-httpdomain-1.1.8/PKG-INFO
new/sphinxcontrib-httpdomain-1.1.9/PKG-INFO
--- old/sphinxcontrib-httpdomain-1.1.8/PKG-INFO 2013-04-10 10:36:09.000000000
+0200
+++ new/sphinxcontrib-httpdomain-1.1.9/PKG-INFO 2013-08-07 18:26:56.000000000
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: sphinxcontrib-httpdomain
-Version: 1.1.8
+Version: 1.1.9
Summary: Sphinx domain for HTTP APIs
Home-page: http://bitbucket.org/birkenfeld/sphinx-contrib
Author: Hong Minhee
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-httpdomain-1.1.8/setup.cfg
new/sphinxcontrib-httpdomain-1.1.9/setup.cfg
--- old/sphinxcontrib-httpdomain-1.1.8/setup.cfg 2013-04-10
10:36:09.000000000 +0200
+++ new/sphinxcontrib-httpdomain-1.1.9/setup.cfg 2013-08-07
18:26:56.000000000 +0200
@@ -1,3 +1,10 @@
+[aliases]
+upload_docs = build_sphinx upload_docs
+
+[upload_docs]
+repository = https://pypi.python.org/pypi
+upload_dir = build/sphinx/html
+
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-httpdomain-1.1.8/setup.py
new/sphinxcontrib-httpdomain-1.1.9/setup.py
--- old/sphinxcontrib-httpdomain-1.1.8/setup.py 2013-04-10 10:33:20.000000000
+0200
+++ new/sphinxcontrib-httpdomain-1.1.9/setup.py 2013-04-16 22:42:36.000000000
+0200
@@ -15,7 +15,7 @@
setup(
name='sphinxcontrib-httpdomain',
- version='1.1.8',
+ version='1.1.9',
url='http://bitbucket.org/birkenfeld/sphinx-contrib',
download_url='http://pypi.python.org/pypi/sphinxcontrib-httpdomain',
license='BSD',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/__init__.py
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/__init__.py
--- old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/__init__.py
2013-04-10 10:32:54.000000000 +0200
+++ new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/__init__.py
2013-04-16 22:44:24.000000000 +0200
@@ -9,4 +9,3 @@
:license: BSD, see LICENSE for details.
"""
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/bottle.py
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/bottle.py
--- old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/bottle.py
1970-01-01 01:00:00.000000000 +0100
+++ new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/bottle.py
2013-08-07 18:16:58.000000000 +0200
@@ -0,0 +1,115 @@
+"""
+ sphinxcontrib.autohttp.bottle
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ The sphinx.ext.autodoc-style HTTP API reference builder (from Bottle)
+ for sphinxcontrib.httpdomain.
+
+ :copyright: Copyright 2012 by Jameel Al-Aziz
+ :license: BSD, see LICENSE for details.
+
+"""
+
+import re
+try:
+ import cStringIO as StringIO
+except ImportError:
+ import StringIO
+
+from docutils import nodes
+from docutils.parsers.rst import directives
+from docutils.statemachine import ViewList
+
+from sphinx.util import force_decode
+from sphinx.util.compat import Directive
+from sphinx.util.nodes import nested_parse_with_titles
+from sphinx.util.docstrings import prepare_docstring
+from sphinx.pycode import ModuleAnalyzer
+
+from sphinxcontrib import httpdomain
+from sphinxcontrib.autohttp.common import http_directive, import_object
+
+
+def translate_bottle_rule(app, rule):
+ buf = StringIO.StringIO()
+ for name, filter, conf in app.router.parse_rule(rule):
+ if filter:
+ buf.write('(')
+ buf.write(name)
+ if filter != app.router.default_filter or conf:
+ buf.write(':')
+ buf.write(filter)
+ if conf:
+ buf.write(':')
+ buf.write(conf)
+ buf.write(')')
+ else:
+ buf.write(name)
+ return buf.getvalue()
+
+
+def get_routes(app):
+ for rule, methods in app.router.rules.iteritems():
+ for method, target in methods.iteritems():
+ if method in ('OPTIONS', 'HEAD'):
+ continue
+ path = translate_bottle_rule(app, rule)
+ yield method, path, target
+
+
+class AutobottleDirective(Directive):
+
+ has_content = True
+ required_arguments = 1
+ option_spec = {'endpoints': directives.unchanged,
+ 'undoc-endpoints': directives.unchanged,
+ 'include-empty-docstring': directives.unchanged}
+
+ @property
+ def endpoints(self):
+ endpoints = self.options.get('endpoints', None)
+ if not endpoints:
+ return None
+ return frozenset(re.split(r'\s*,\s*', endpoints))
+
+ @property
+ def undoc_endpoints(self):
+ undoc_endpoints = self.options.get('undoc-endpoints', None)
+ if not undoc_endpoints:
+ return frozenset()
+ return frozenset(re.split(r'\s*,\s*', undoc_endpoints))
+
+ def make_rst(self):
+ app = import_object(self.arguments[0])
+ for method, path, target in get_routes(app):
+ endpoint = target.name or target.callback.__name__
+ if self.endpoints and endpoint not in self.endpoints:
+ continue
+ if endpoint in self.undoc_endpoints:
+ continue
+ view = target.callback
+ docstring = view.__doc__ or ''
+ if not isinstance(docstring, unicode):
+ analyzer = ModuleAnalyzer.for_module(view.__module__)
+ docstring = force_decode(docstring, analyzer.encoding)
+ if not docstring and 'include-empty-docstring' not in self.options:
+ continue
+ docstring = prepare_docstring(docstring)
+ for line in http_directive(method, path, docstring):
+ yield line
+
+ def run(self):
+ node = nodes.section()
+ node.document = self.state.document
+ result = ViewList()
+ for line in self.make_rst():
+ result.append(line, '<autobottle>')
+ nested_parse_with_titles(self.state, result, node)
+ return node.children
+
+
+def setup(app):
+ if 'http' not in app.domains:
+ httpdomain.setup(app)
+ app.add_directive('autobottle', AutobottleDirective)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/common.py
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/common.py
--- old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/common.py
1970-01-01 01:00:00.000000000 +0100
+++ new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/common.py
2013-04-16 22:45:21.000000000 +0200
@@ -0,0 +1,34 @@
+"""
+ sphinxcontrib.autohttp.common
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ The common functions for web framework reflection.
+
+ :copyright: Copyright 2011 by Hong Minhee
+ :license: BSD, see LICENSE for details.
+
+"""
+
+import __builtin__
+
+
+def import_object(import_name):
+ module_name, expr = import_name.split(':', 1)
+ mod = __import__(module_name)
+ mod = reduce(getattr, module_name.split('.')[1:], mod)
+ globals = __builtin__
+ if not isinstance(globals, dict):
+ globals = globals.__dict__
+ return eval(expr, globals, mod.__dict__)
+
+
+def http_directive(method, path, content):
+ method = method.lower().strip()
+ if isinstance(content, basestring):
+ content = content.splitlines()
+ yield ''
+ yield '.. http:{method}:: {path}'.format(**locals())
+ yield ''
+ for line in content:
+ yield ' ' + line
+ yield ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/flask.py
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/flask.py
--- old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/autohttp/flask.py
2013-04-10 10:32:54.000000000 +0200
+++ new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/autohttp/flask.py
2013-08-07 18:16:58.000000000 +0200
@@ -17,6 +17,7 @@
import StringIO
from docutils import nodes
+from docutils.parsers.rst import directives
from docutils.statemachine import ViewList
from sphinx.util import force_decode
@@ -26,28 +27,7 @@
from sphinx.pycode import ModuleAnalyzer
from sphinxcontrib import httpdomain
-
-
-def import_object(import_name):
- module_name, expr = import_name.split(':', 1)
- mod = __import__(module_name)
- mod = reduce(getattr, module_name.split('.')[1:], mod)
- globals = __builtins__
- if not isinstance(globals, dict):
- globals = globals.__dict__
- return eval(expr, globals, mod.__dict__)
-
-
-def http_directive(method, path, content):
- method = method.lower().strip()
- if isinstance(content, basestring):
- content = content.splitlines()
- yield ''
- yield '.. http:{method}:: {path}'.format(**locals())
- yield ''
- for line in content:
- yield ' ' + line
- yield ''
+from sphinxcontrib.autohttp.common import http_directive, import_object
def translate_werkzeug_rule(rule):
@@ -78,42 +58,48 @@
has_content = True
required_arguments = 1
- option_spec = {'endpoints': str,
- 'undoc-endpoints': str,
- 'undoc-blueprints': str,
- 'undoc-static': str,
- 'include-empty-docstring': str}
+ option_spec = {'endpoints': directives.unchanged,
+ 'blueprints': directives.unchanged,
+ 'undoc-endpoints': directives.unchanged,
+ 'undoc-blueprints': directives.unchanged,
+ 'undoc-static': directives.unchanged,
+ 'include-empty-docstring': directives.unchanged}
@property
def endpoints(self):
- try:
- endpoints = re.split(r'\s*,\s*', self.options['endpoints'])
- except KeyError:
- # means 'endpoints' option was missing
+ endpoints = self.options.get('endpoints', None)
+ if not endpoints:
return None
- return frozenset(endpoints)
+ return frozenset(re.split(r'\s*,\s*', endpoints))
@property
def undoc_endpoints(self):
- try:
- endpoints = re.split(r'\s*,\s*', self.options['undoc-endpoints'])
- except KeyError:
+ undoc_endpoints = self.options.get('undoc-endpoints', None)
+ if not undoc_endpoints:
return frozenset()
- return frozenset(endpoints)
+ return frozenset(re.split(r'\s*,\s*', undoc_endpoints))
+
+ @property
+ def blueprints(self):
+ blueprints = self.options.get('blueprints', None)
+ if not blueprints:
+ return None
+ return frozenset(re.split(r'\s*,\s*', blueprints))
@property
def undoc_blueprints(self):
- try:
- blueprints = re.split(r'\s*,\s*', self.options['undoc-blueprints'])
- except KeyError:
+ undoc_blueprints = self.options.get('undoc-blueprints', None)
+ if not undoc_blueprints:
return frozenset()
- return frozenset(blueprints)
+ return frozenset(re.split(r'\s*,\s*', undoc_blueprints))
def make_rst(self):
app = import_object(self.arguments[0])
for method, path, endpoint in get_routes(app):
try:
blueprint, endpoint_internal = endpoint.split('.')
+ if self.blueprints and blueprint not in self.blueprints:
+ continue
if blueprint in self.undoc_blueprints:
continue
except ValueError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/httpdomain.py
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/httpdomain.py
--- old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib/httpdomain.py
2013-04-10 10:32:54.000000000 +0200
+++ new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib/httpdomain.py
2013-08-07 18:20:52.000000000 +0200
@@ -144,12 +144,20 @@
TypedField('parameter', label='Parameters',
names=('param', 'parameter', 'arg', 'argument'),
typerolename='obj', typenames=('paramtype', 'type')),
- GroupedField('queryparameter', label='Query Parameters',
- names=('queryparameter', 'queryparam', 'qparam',
'query')),
+ TypedField('jsonparameter', label='Json Parameters',
+ names=('jsonparameter', 'jsonparam', 'json'),
+ typerolename='obj', typenames=('jsonparamtype',
'jsontype')),
+ TypedField('queryparameter', label='Query Parameters',
+ names=('queryparameter', 'queryparam', 'qparam', 'query'),
+ typerolename='obj', typenames=('queryparamtype',
'querytype', 'qtype')),
GroupedField('formparameter', label='Form Parameters',
names=('formparameter', 'formparam', 'fparam', 'form')),
- GroupedField('jsonparameter', label='Json Parameters',
- names=('jsonparameter', 'jsonparam', 'json')),
+ GroupedField('requestheader', label='Request Headers',
+ rolename='mailheader',
+ names=('reqheader', 'requestheader')),
+ GroupedField('responseheader', label='Response Headers',
+ rolename='mailheader',
+ names=('resheader', 'responseheader')),
GroupedField('statuscode', label='Status Codes',
rolename='statuscode',
names=('statuscode', 'status', 'code'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib_httpdomain.egg-info/PKG-INFO
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib_httpdomain.egg-info/PKG-INFO
---
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib_httpdomain.egg-info/PKG-INFO
2013-04-10 10:36:09.000000000 +0200
+++
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib_httpdomain.egg-info/PKG-INFO
2013-08-07 18:26:56.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: sphinxcontrib-httpdomain
-Version: 1.1.8
+Version: 1.1.9
Summary: Sphinx domain for HTTP APIs
Home-page: http://bitbucket.org/birkenfeld/sphinx-contrib
Author: Hong Minhee
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib_httpdomain.egg-info/SOURCES.txt
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib_httpdomain.egg-info/SOURCES.txt
---
old/sphinxcontrib-httpdomain-1.1.8/sphinxcontrib_httpdomain.egg-info/SOURCES.txt
2013-04-10 10:36:09.000000000 +0200
+++
new/sphinxcontrib-httpdomain-1.1.9/sphinxcontrib_httpdomain.egg-info/SOURCES.txt
2013-08-07 18:26:56.000000000 +0200
@@ -1,10 +1,13 @@
LICENSE
MANIFEST.in
README.rst
+setup.cfg
setup.py
sphinxcontrib/__init__.py
sphinxcontrib/httpdomain.py
sphinxcontrib/autohttp/__init__.py
+sphinxcontrib/autohttp/bottle.py
+sphinxcontrib/autohttp/common.py
sphinxcontrib/autohttp/flask.py
sphinxcontrib_httpdomain.egg-info/PKG-INFO
sphinxcontrib_httpdomain.egg-info/SOURCES.txt
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]