More support Sphinx >=1.3b1 and <1.3.1

Although https://review.openstack.org/#/c/171309/
says Sphinx >=1.3, the actual implementation does not
support Sphinx >=1.3b1 and 1.3.1.
I have seen Sphinx release notes and source codes for
those versions, and found that up to 1.2.3 used
init_values(self) and Sphinx from 1.3b1 used
init_values(self, warn).

So to change the code from >=1.3.1 to >1.2.3, it can
more support Sphinx >=1.3b1 and <1.3.1.

Change-Id: Ia73be8111d3af7f72aaf640e4c7c519a5d0b08c5
Partial-Bug: #1379998
Related-Bug: #1496882
This commit is contained in:
Ian Y. Choi 2015-11-09 21:14:47 +09:00
parent 62ee1b917b
commit a5d46d5ce7
1 changed files with 2 additions and 2 deletions

View File

@ -133,8 +133,8 @@ class LocalBuildDoc(setup_command.BuildDoc):
confoverrides['today'] = self.today
sphinx_config = config.Config(self.config_dir, 'conf.py', {}, [])
sphinx_ver = pkg_resources.get_distribution("sphinx").version
if pkg_resources.parse_version(sphinx_ver) >= \
pkg_resources.parse_version('1.3.1'):
if pkg_resources.parse_version(sphinx_ver) > \
pkg_resources.parse_version('1.2.3'):
sphinx_config.init_values(warnings.warn)
else:
sphinx_config.init_values()