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

[py3] documentation generation is broken #667

Closed
genodeftest opened this issue Jan 14, 2020 · 2 comments
Closed

[py3] documentation generation is broken #667

genodeftest opened this issue Jan 14, 2020 · 2 comments

Comments

@genodeftest
Copy link
Member

Steps to Reproduce (for bugs)

  1. Get the latest commits from py3 branch
  2. run make check-doc or make -C doc html

Expected Behavior

Generate documentation or at least try to.

Current Behavior

Aborts with this error message:
Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/sphinx/config.py", line 361, in eval_config_file
	execfile_(filename, namespace)
  File "/usr/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 86, in execfile_
	exec(code, _globals)
  File "/path/to/exaile/doc/conf.py", line 46, in <module>
	mocks.fake_xl_settings()
  File "/path/to/exaile/doc/mocks.py", line 81, in fake_xl_settings
	import xl.settings
  File "/path/to/exaile/xl/settings.py", line 41, in <module>
	from xl.common import VersionError, glib_wait, glib_wait_seconds
  File "/path/to/exaile/xl/common.py", line 748, in <module>
	class ProgressThread(GObject.GObject, threading.Thread):
TypeError: __mro_entries__ must return a tuple

Possible Solution

I think someone needs to go over the config for sphinx and probably redo it.

Environment

Linux/Fedora with python3-3.7.6-1.fc31.x86_64 and python3-sphinx-2.1.2-2.fc31.noarch. I have also seen this with our ubuntu19.10 and debian10 docker images:
https://travis-ci.org/exaile/exaile/jobs/637118951
https://travis-ci.org/exaile/exaile/jobs/637118949

@rokm
Copy link
Member

rokm commented Jan 15, 2020

From what I can tell, this is caused by introduction of PEP 560 in python 3.7.

Our Mock implementation returns an instance of itself for __mro_entries__ (default behavior), causing the error. Raising AttributeError seems to cause another error later on, but adding a __mro_entries__ method that returns an empty tuple seems to do the trick.

However, as noted in the PR, I am not familiar enough with this area of python to be certain that there are not side effects.

rokm added a commit to rokm/exaile that referenced this issue Jan 16, 2020
@rokm rokm closed this as completed Jan 16, 2020
@rokm
Copy link
Member

rokm commented Jan 16, 2020

Hmm, it seems the PR fixed the issue for pyhton 3.7.x but not for python 3.6.x - Ubuntu 18.04 is still failing, but with the metaclass conflict error that I've mentioned above.

@rokm rokm reopened this Jan 16, 2020
rokm added a commit to rokm/exaile that referenced this issue Jan 16, 2020
Fixes exaile#667, this time both on python 3.6 (Ubuntu 18.04) and 3.7
(Fedora 31).
@rokm rokm closed this as completed Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants