Skip to content
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

docs test is failing #492

Closed
jaraco opened this issue Sep 7, 2019 · 7 comments · Fixed by #623
Closed

docs test is failing #492

jaraco opened this issue Sep 7, 2019 · 7 comments · Fixed by #623
Labels
blocked Issues we can't or shouldn't get to yet

Comments

@jaraco
Copy link
Member

jaraco commented Sep 7, 2019

Beginning with this build, the twine tests started failing when validating the docs build. The commit associated with that build (182e8af) seems unrelated, so I suspect it's something in the dependencies that has changed.

@jaraco
Copy link
Member Author

jaraco commented Sep 7, 2019

The most recent error message is this:

docs run-test: commands[0] | sphinx-build -W -b html -d /home/travis/build/pypa/twine/.tox/docs/tmp/doctrees docs docs/_build/html
Running Sphinx v2.2.0
making output directory... done
loading intersphinx inventory from https://docs.python.org/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] changelog
Exception occurred:
  File "/home/travis/build/pypa/twine/.tox/docs/lib/python3.7/site-packages/semantic_version/base.py", line 102, in __init__
    raise ValueError("Call either Version('1.2.3') or Version(major=1, ...).")
ValueError: Call either Version('1.2.3') or Version(major=1, ...).
The full traceback has been saved in /tmp/sphinx-err-agw9o8xv.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

@jaraco
Copy link
Member Author

jaraco commented Sep 7, 2019

I can replicate the failure locally. Here's what appears in the log:

twine master $ cat .../sphinx-err-rh_byw2n.log                                                  
# Sphinx version: 2.2.0
# Python version: 3.7.3 (CPython)
# Docutils version: 0.15.2 release
# Jinja2 version: 2.10.1
# Last messages:
#   making output directory...
#   done
#   loading intersphinx inventory from https://docs.python.org/objects.inv...
#   intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
#   building [mo]: targets for 0 po files that are out of date
#   building [html]: targets for 3 source files that are out of date
#   updating environment:
#   [new config]
#   3 added, 0 changed, 0 removed
#   reading sources... [ 33%] changelog
# Loaded extensions:
#   sphinx.ext.mathjax (2.2.0) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/ext/mathjax.py
#   sphinxcontrib.applehelp (1.0.1) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinxcontrib/applehelp/__init__.py
#   sphinxcontrib.devhelp (1.0.1) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinxcontrib/devhelp/__init__.py
#   sphinxcontrib.htmlhelp (1.0.2) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinxcontrib/htmlhelp/__init__.py
#   sphinxcontrib.serializinghtml (1.1.3) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinxcontrib/serializinghtml/__init__.py
#   sphinxcontrib.qthelp (1.0.2) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinxcontrib/qthelp/__init__.py
#   alabaster (0.7.12) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/alabaster/__init__.py
#   sphinx.ext.autodoc (2.2.0) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py
#   sphinx.ext.doctest (2.2.0) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/ext/doctest.py
#   sphinx.ext.intersphinx (2.2.0) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/ext/intersphinx.py
#   sphinx.ext.coverage (2.2.0) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/ext/coverage.py
#   sphinx.ext.viewcode (2.2.0) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/ext/viewcode.py
#   releases (1.6.1) from /Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/__init__.py
Traceback (most recent call last):
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/application.py", line 346, in build
    self.builder.build_update()
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 299, in build_update
    len(to_build))
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 311, in build
    updated_docnames = set(self.read())
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 418, in read
    self._read_serial(docnames)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 439, in _read_serial
    self.read_doc(docname)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 479, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/io.py", line 326, in read_doc
    pub.publish()
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/docutils/core.py", line 218, in publish
    self.apply_transforms()
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/docutils/core.py", line 199, in apply_transforms
    self.document.transformer.apply_transforms()
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/transforms/__init__.py", line 90, in apply_transforms
    super().apply_transforms()
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/docutils/transforms/__init__.py", line 172, in apply_transforms
    transform.apply(**kwargs)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/transforms/__init__.py", line 386, in apply
    self.app.emit('doctree-read', self.document)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/application.py", line 450, in emit
    return self.events.emit(event, *args)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/sphinx/events.py", line 103, in emit
    results.append(callback(self.app, *args))
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/__init__.py", line 612, in generate_changelog
    doctree.walk(changelog_visitor)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/docutils/nodes.py", line 142, in walk
    if child.walk(visitor):
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/docutils/nodes.py", line 142, in walk
    if child.walk(visitor):
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/docutils/nodes.py", line 134, in walk
    visitor.dispatch_visit(self)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/docutils/nodes.py", line 1912, in dispatch_visit
    return method(node)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/__init__.py", line 595, in visit_bullet_list
    releases, _ = construct_releases(node.children, self.app)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/__init__.py", line 521, in construct_releases
    construct_entry_without_release(focus, issues, manager, log, rest)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/__init__.py", line 405, in construct_entry_without_release
    focus.add_to_manager(manager)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/models.py", line 136, in add_to_manager
    families = [Version(str(x)) for x in manager]
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/models.py", line 136, in <listcomp>
    families = [Version(str(x)) for x in manager]
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/releases/models.py", line 14, in __init__
    super(Version, self).__init__(version_string, partial)
  File "/Users/jaraco/code/public/pypa/twine/.tox/docs/lib/python3.7/site-packages/semantic_version/base.py", line 102, in __init__
    raise ValueError("Call either Version('1.2.3') or Version(major=1, ...).")
ValueError: Call either Version('1.2.3') or Version(major=1, ...).
twine master $                                 

@jaraco
Copy link
Member Author

jaraco commented Sep 7, 2019

Comparing the before and after of the resolved dependencies for those runs, the sole difference is in the implicated library: before semantic-version==2.6.0, after semantic-version==2.7.1.

@jaraco
Copy link
Member Author

jaraco commented Nov 17, 2019

In the bugfix/492-validate-fix branch, I've updated the docs build step to use the releases code from the pull request (bitprophet/releases#86), demonstrating that the fix as proposed seems to work.

@deveshks
Copy link
Contributor

Given that bitprophet/releases has pinned against semantic-version 2.7 or later in their source code, should we go ahead and revert the changes made in #494 and close this PR?

@sigmavirus24
Copy link
Member

Sure @deveshks

@jaraco
Copy link
Member Author

jaraco commented Apr 3, 2024

I've archived the aforementioned branch to refs/archive/bugfix/492-validate-fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issues we can't or shouldn't get to yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants