Skip to content

Update doc/conf.py to avoid warnings with (future) sphinx 1.8. #11928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 24, 2018

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

doc/conf.py Outdated
if sphinx.version_info < (1, 8):
autodoc_default_flags = ['members', 'undoc-members']
else:
autodoc_default_options = {'members': '', 'undoc-members': ''}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand the values should be None and not empty string.
https://github.com/sphinx-doc/sphinx/pull/5315/files#r211091546

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'' appears to work too and having None mean 'on' is pretty terrible IMO (the sphinx maintainer seems to agree :)) but sure, I changed it as that's what's documented.

- sphinx 1.8 activates math by default; don't use mathmpl in that case
  (to avoid a duplicate-role warning) (mathmpl may be later deprecated
  once we depend on sphinx 1.8 for the doc build)
  sphinx-doc/sphinx#4975
- sphinx 1.8 introduced autodoc_default_options to replace
  autodoc_default_flags
  sphinx-doc/sphinx#5315
- sphinx 1.6 deprecated app.info in favor of a logging API, but we don't
  really need either anyways
  http://www.sphinx-doc.org/en/master/changes.html#id52
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not check with running sphinx 1.8 but this looks ok.

@dstansby dstansby added this to the v3.1 milestone Aug 26, 2018
@NelleV
Copy link
Member

NelleV commented Sep 7, 2018

Thanks @anntzer !

@NelleV NelleV merged commit b91b740 into matplotlib:master Sep 7, 2018
@anntzer anntzer deleted the sphinx18 branch September 7, 2018 21:30
@tacaswell tacaswell modified the milestones: v3.1, v3.0 Sep 15, 2018
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Sep 15, 2018
Update doc/conf.py to avoid warnings with (future) sphinx 1.8.
@tacaswell tacaswell mentioned this pull request Sep 15, 2018
openstack-gerrit pushed a commit to openstack/stevedore that referenced this pull request Sep 18, 2018
The autodoc_default_flags option is now deprecated.[1] This warning can
cause documentation build failed. use autodoc_default_options instead.

[1]matplotlib/matplotlib#11928
Change-Id: I73041da072edb635661503b75a9c7460e1242220
openstack-gerrit pushed a commit to openstack/taskflow that referenced this pull request Sep 19, 2018
The autodoc_default_flags option is now deprecated.[1] This warning can
cause documentation build failed. use autodoc_default_options instead.

[1]matplotlib/matplotlib#11928

Change-Id: I6ba69ca7361fd0e42b322f1b92fe22b952a13321
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Feb 12, 2019
Update doc/conf.py to avoid warnings with (future) sphinx 1.8.
openstack-gerrit pushed a commit to openstack/openstack that referenced this pull request Mar 4, 2019
* Update taskflow from branch 'master'
  - add python 3.7 unit test job
    
    See ML discussion here [1] for context.
    
    [1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html
    
    Story: #2004073
    Co-authored-by: Corey Bryant <corey.bryant@canonical.com>
    Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
    Change-Id: Ibc7749261119752c4e3a4854c7ce5be52a3b5d26
    
  - Merge "Move test requirements out of runtime requirements"
  - Move test requirements out of runtime requirements
    
    stestr is a test requirements for taskflow; drop from
    requirements.txt and add to test requirements target
    in setup.cfg.
    
    Change-Id: Id74eba0c02f482f96efb37b2975ada400794d88e
    
  - Change openstack-dev to openstack-discuss
    
    Mailinglists have been updated. Openstack-discuss replaces openstack-dev.
    
    Change-Id: I444a52a7c09d726ae707921e47e71a70a80b674c
    
  - Merge "Use templates for cover and lower-constraints"
  - Update doc/conf.py to avoid warnings with sphinx 1.8
    
    The autodoc_default_flags option is now deprecated.[1] This warning can
    cause documentation build failed. use autodoc_default_options instead.
    
    [1]matplotlib/matplotlib#11928
    
    Change-Id: I6ba69ca7361fd0e42b322f1b92fe22b952a13321
    
  - Use templates for cover and lower-constraints
    
    Use openstack-tox-cover template, this runs the cover job
    in the check queue only.
    
    Use openstack-lower-constraints-jobs template
    
    Remove jobs that are part of the templates.
    
    Sort list of templates.
    
    Change-Id: Ie7971023eed04f6479c05c1d2a1dfd2a948b07e1
    
  - Merge "add lib-forward-testing-python3 test job"
  - Merge "add python 3.6 unit test job"
  - Merge "Fix a symbol error"
  - Merge "add proper pydot3 dependency"
  - Remove the duplicated word
    
    Change-Id: Ia9964fd613efc49479e763b6a7095d63115179ab
    
  - Fix a symbol error
    
    There is a wrong use ' here, which causes the document
    to make errors when copying the code for
    experimentation.
    
    Change-Id: I3ae19f591ffd668bcd1563bd1e317b21b799dba6
    
  - Create KazooClient with taskflow logger
    
    KazooClient should use the taskflow logger and not the default one.
    Using the default logger means that the user cannot control its
    log level
    
    Change-Id: Id9549028522955ece0ae9f675c5ecc1c2fd816de
    Closes-Bug: #1785036
    
  - add lib-forward-testing-python3 test job
    
    This is a mechanically generated patch to add a functional test job
    running under Python 3 as part of the python3-first goal.
    
    See the python3-first goal document for details:
    https://governance.openstack.org/tc/goals/stein/python3-first.html
    
    Change-Id: If32dc1672c3d7365e6da8eb869fb5590497dbfbd
    Story: #2002586
    Task: #24322
    
  - add python 3.6 unit test job
    
    This is a mechanically generated patch to add a unit test job running
    under Python 3.6 as part of the python3-first goal.
    
    See the python3-first goal document for details:
    https://governance.openstack.org/tc/goals/stein/python3-first.html
    
    Change-Id: Ie0dc452548fbd315e85c4e782004565d25176f3e
    Story: #2002586
    Task: #24322
    
  - add proper pydot3 dependency
    
    Move the dependency out of tox.ini and into requirements.txt where it
    can be managed properly.
    
    Depends-On: https://review.openstack.org/590103
    Change-Id: Ic69a4c5beb1aed2e49d2f767cb46c324fe0df0f5
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - import zuul job settings from project-config
    
    This is a mechanically generated patch to complete step 1 of moving
    the zuul job settings out of project-config and into each project
    repository.
    
    Because there will be a separate patch on each branch, the branch
    specifiers for branch-specific jobs have been removed.
    
    See the python3-first goal document for details:
    https://governance.openstack.org/tc/goals/stein/python3-first.html
    
    Change-Id: Ifb81d077390a2d8185c27da418098449cd2e483e
    Story: #2003250
    
  - Switch to use stestr for unit test
    
    According to Openstack summit session [1],
    stestr is maintained project to which all Openstack projects should migrate.
    So we should switch to stestr.
    
    [1] https://etherpad.openstack.org/p/YVR-python-pti
    
    Depends-On: https://review.openstack.org/#/c/589728/
    Change-Id: I943a73e22eb23bd52c3a96e75c98b88665474e67
    
  - Add pydot test dependency
    
    We need to use pydot rather than pydot3 because
    of a broken version comparison in networkx, where it rejects
    the lower version number of pydot3.
    
    Without this patch the taskflow unit tests which use dot for
    rendering graphics are no longer runnable.
    
    Change-Id: I676e4d76627b3ecd0e4a9b896b2b93d652ebb25d
    
  - Remove PyPI downloads
    
    According to official site,
    https://packaging.python.org/guides/analyzing-pypi-package-downloads/
    PyPI package download statistics is no longer maintained and thus
    should be removed.
    
    Change-Id: Ibf996e1bc49c33576a2a07f80344063976d73fd1
    
  - Update reno for stable/rocky
    
    Change-Id: I183f46e8665149e06978f292a2986393d7d7dc2f
    
  - Update various links in docs
    
    Avoid redirects, s/http/https/.
    
    Change-Id: Id03bd49f250b48109967a0e04b92b75925f08932
    
  - Remove unused link target
    
    With the, somewhat, recent changes in pypi became more strict on what it
    will accept.  That resulted in I416befcf3e47818680018394fa63de8983351587
    which is blocking the taskflow 3.2.0 release[1].
    
    Remove the unused link target to clear the error.
    
    [1] http://logs.openstack.org/92/581892/1/check/openstack-tox-validate/8c0b5f2/job-output.txt.gz#_2018-07-11_21_52_05_919809
    
    Change-Id: I9bf32db1d73cec580377073d94b6a2bdac44fa34
    
  - Fix code to support networkx > 1.0
    
    With the release of NetworkX 2.0 the reporting API was
    moved to view/iterator model. Many methods were moved from
    reporting lists or dicts to iterating over the information.
    Methods that used to return containers now return views and
    methods that returned iterators have been removed in networkx.
    Because of this change in NetworkX 2.0 , taskflow code
    have to be changed also to support networkx > 2.0
    
    Change-Id: I23c226f37bd85c1e38039fbcb302a2d0de49f333
    Closes-Bug: #1778115
    
  - add release notes to README.rst
    
    add release notes to README.rst
    
    Change-Id: I6e0dc02f2d302691c5ee5e5ecbecca8461bb9bd0
    
  - replace http with https
    
    Change-Id: Ic01648cae18bf674cf5ee2753043dac7c5fc9ed0
    
  - Update links in README
    
     Change the outdated links to the latest links in README
    
    Change-Id: I0f88652c73b06e2430ce154452e076873a3aac6a
    
  - Merge "give pep8 and docs environments all of the dependencies they need"
  - Merge "Drop py34 target in tox.ini"
  - Merge "fix tox python3 overrides"
  - Merge "Uncap networkx"
  - fix tox python3 overrides
    
    We want to default to running all tox environments under python 3, so
    set the basepython value in each environment.
    
    We do not want to specify a minor version number, because we do not
    want to have to update the file every time we upgrade python.
    
    We do not want to set the override once in testenv, because that
    breaks the more specific versions used in default environments like
    py35 and py36.
    
    Change-Id: Id7f0cc773ddc6bdcf464574fc7faa9216db71e09
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - Drop py34 target in tox.ini
    
    We support py35 now.so it is no need to keep
    the supoort for py34.
    
    Change-Id: I3dbc5d63c0a4ad5ae9860983cf4d06fb91f1a151
    
  - Merge "Trivial: update pypi url to new url"
  - Uncap networkx
    
    Change-Id: I1bfa313531175dc218e015c3aabd0a8694e2a635
    Closes-Bug: #1718576
    
  - give pep8 and docs environments all of the dependencies they need
    
    Change-Id: Iebd7a1cd0a1ff9eee44fb2a20909f56db90d6430
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - Trivial: update pypi url to new url
    
    Change-Id: I172077bc2b4cf5e02691c98b07860f853f9f4da9
    
  - Fix doc build
    
    Most notably, taskflow is hitting the sphinx issue
    sphinx-doc/sphinx#2549 which causes a
    spurious warning that breaks the build with -W.  There is a
    workaround posted in
    https://stackoverflow.com/questions/31784830/sphinx-ivar-tag-goes-looking-for-cross-references
    to move :ivar: docstrings to inline comments on the member variable
    itself.  This is not ideal because it causes the docs to render
    differently from :ivar:, but until the sphinx bug is fixed it will
    allow us to keep documenting the problematic variables.
    
    There was also a problem with one of the doctests because the
    output had changed.  That is now fixed.
    
    I also noticed a typo in one of the parameter descriptions so that
    is fixed too.
    
    Change-Id: Ib44621f6c3ba2c5476ec430218a0449f9f45d18f
    
  - Merge "stop using tox_install.sh"
  - Merge "only run doc8 as part of pep8 test job"
  - Merge "standardize indentation in tox.ini"
  - Merge "Trivial: Update pypi url to new url"
  - Trivial: Update pypi url to new url
    
    Pypi url changed from [1] to [2]
    
    [1] https://pypi.python.org/pypi/<package>
    [2] https://pypi.org/project/<package>
    
    Change-Id: I0c8a226317fa62658555cb9a18028f1516aeccfe
    
  - stop using tox_install.sh
    
    Duplicate the dependencies that are listed in extras and place them in
    a test-requirements.txt file so we can install them using the
    constraints list.
    
    In order to add the new requirements file, we have to make the constraints
    and requirements match each other and the global settings.
    
    Change-Id: I4dae402fe37015f0f512d5e9a6426d5f39526347
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - only run doc8 as part of pep8 test job
    
    Change-Id: Id7e8b29fe5ffb9aa410985ce0e5914bdcf4e4df0
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - standardize indentation in tox.ini
    
    Try to tidy up the formatting of the configuration file.
    
    Change-Id: Ic492ee63f228b486da492088cd7fcb71d784b2e3
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - set default python to python3
    
    Set the default python to python3 except for the py27 environment. We
    have to set that explicitly to override the new default.
    
    Have py27 and py3* jobs run same commands by removing the commands entry
    for py27.
    
    The pep8 rules under python 3 are different, so we need to fix a
    couple of issues with blank space. The E721 rule is ignored entirely
    because we are not yet using a version of flake8 that supports
    ignoring individual rules on specific lines, although the instructions
    for that are added so that when we upgrade flake8 to a newer version
    we can remove the global rule.
    
    Change-Id: Id236b0632a83a188958130d04f1e9c476c5ace65
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - don't let tox_install.sh error if there is nothing to do
    
    If we end up with an empty package list, return without erroring.
    
    Change-Id: Id66aaf4bcb8c40ab720303a3ca92a46f92642369
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
openstack-gerrit pushed a commit to openstack/openstack that referenced this pull request Mar 4, 2019
* Update stevedore from branch 'master'
  - add python 3.7 unit test job
    
    See ML discussion here [1] for context.
    
    [1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html
    
    Story: #2004073
    Co-authored-by: Corey Bryant <corey.bryant@canonical.com>
    Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
    Change-Id: If7fc1428d98a96d73d90ca261c12c67836329341
    
  - Use template for lower-constraints
    
    Small cleanups:
    
    * Use openstack-lower-constraints-jobs template, remove individual
      jobs.
    * Sort list of templates
    
    Change-Id: Ie4fa0a49318e20b9c4a32db44de0bdb59666eddd
    Needed-By: https://review.openstack.org/623229
    
  - Change openstack-dev to openstack-discuss
    
    Mailinglists have been updated. Openstack-discuss replaces openstack-dev.
    
    Change-Id: I4d3bd4a4536e972fa2ebf14a9c73b674084cad88
    
  - Update sphinx logging to not use app object
    
    Logging via the application object was deprecated in sphinx 1.6 and is
    now removed in the master branch that will become 2.0. This updates our
    sphinx extension to use the recommended sphinx.util.logging instead.
    
    Closes-bug: #1798174
    
    Change-Id: Ie66579146d68680905c3eac3d256369309130cf4
    Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
    
  - Removed older version of python added 3.5
    
    In setup.cfg file the python 3.5 is added
    
    Change-Id: I6dbad224fb05d0f2fdb70828d157429bb1cf6282
    
  - Update doc/conf.py to avoid warnings with sphinx 1.8
    
    The autodoc_default_flags option is now deprecated.[1] This warning can
    cause documentation build failed. use autodoc_default_options instead.
    
    [1]matplotlib/matplotlib#11928
    Change-Id: I73041da072edb635661503b75a9c7460e1242220
    
  - Merge "fix wrong link"
  - add lib-forward-testing-python3 test job
    
    This is a mechanically generated patch to add a functional test job
    running under Python 3 as part of the python3-first goal.
    
    See the python3-first goal document for details:
    https://governance.openstack.org/tc/goals/stein/python3-first.html
    
    Change-Id: I760a924068be4d61496010cec967e5a181042b1b
    Story: #2002586
    Task: #24322
    
  - fix wrong link
    
    Change-Id: I19f63102037199d3a5b3afb614900075d8710b63
    
  - add python 3.6 unit test job
    
    This is a mechanically generated patch to add a unit test job running
    under Python 3.6 as part of the python3-first goal.
    
    See the python3-first goal document for details:
    https://governance.openstack.org/tc/goals/stein/python3-first.html
    
    Change-Id: I48e460abaf97613dfd2c9b035b322d38ba9bab52
    Story: #2002586
    Task: #24322
    
  - import zuul job settings from project-config
    
    This is a mechanically generated patch to complete step 1 of moving
    the zuul job settings out of project-config and into each project
    repository.
    
    Because there will be a separate patch on each branch, the branch
    specifiers for branch-specific jobs have been removed.
    
    See the python3-first goal document for details:
    https://governance.openstack.org/tc/goals/stein/python3-first.html
    
    Change-Id: Ia67171e6d46244a712ec8b8aa5736e9b8683600e
    Story: #2003250
    
  - Update reno for stable/rocky
    
    Change-Id: I7c0686a713d9e302f47f41c04cc3b3f2b1f79f6b
    
  - Remove unnecessary py27 testenv
    
    The pyNN factors automatically set basepython unless explicitly requested otherwise.
    Therefore, "testenv:py27" section are unnecessary and should be removed
    as the recommendation from Stephen in [1]
    
    [1] https://review.openstack.org/#/c/580250/3/tox.ini@15
    
    Change-Id: I07428041f70c68520c451589fc65cb586741b69b
    
  - Switch to stestr
    
    According to Openstack summit session [1],
    stestr is maintained project to which all Openstack projects should migrate.
    Let's switch to stestr as other projects have already moved to it.
    
    [1] https://etherpad.openstack.org/p/YVR-python-pti
    
    Change-Id: I1b5bd8a53d0f93b99dd60fd5711a60f1135bcc4c
    
  - fix tox python3 overrides
    
    We want to default to running all tox environments under python 3, so
    set the basepython value in each environment.
    
    We do not want to specify a minor version number, because we do not
    want to have to update the file every time we upgrade python.
    
    We do not want to set the override once in testenv, because that
    breaks the more specific versions used in default environments like
    py35 and py36.
    
    Decode subprocess output so it has the right type under python 3.
    
    Change-Id: Id2df5439fa6e788199bec4ac7c98c56347053621
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - Trivial: Update pypi url to new url
    
    Change-Id: Ie738ac6938b035c414c0c8d964b771c5155ed115
    
  - Trivial: Update pypi url to new url
    
    Pypi url changed from [1] to [2]
    
    [1] https://pypi.python.org/pypi/<package>
    [2] https://pypi.org/project/<package>
    
    Change-Id: Ifc9114fd4b4d95f2ae0acd7e0a19d217786b1168
    
  - set default python to python3
    
    Set the default python to python3 except for the py27 environment. We
    have to set that explicitly to override the new default.
    
    Change-Id: Ia540b70e648d585aa0de017f72ceb96214b67e27
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants