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: fix documentation generation on python 3.6+ (try 2) #675

Merged
merged 2 commits into from
Jan 17, 2020

Conversation

rokm
Copy link
Member

@rokm rokm commented Jan 16, 2020

Second attempt at fixing the documentation generation issue, tested both with python 3.6.x on Ubuntu 18.04 and 3.7.x on Fedora 31.

This time, the __mro_entries__ issue is addressed by raising the AttributeError.

However, this still leaves the TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases error, which is caused by the mocked GObject.GObject being involved in multiple inheritance in xl.common.ProgressThread. For this to work, we need our Mock object for the GObject module return a type instead of an instance for GObject (class).

Due to the name repetition (gi.repository.GObject.GObject, with GObject referring both to the module and the class) and __getattr__ being a class method, distinction between the two is handled by introduction of a new MockGiModule class, which now also collects all mock functionality of GI (sub)modules.

@genodeftest
Copy link
Member

Documentation builds and works fine and nothing breaks so feel free to merge imho. Thanks for caring!

@rokm rokm merged commit 0ae9862 into exaile:py3 Jan 17, 2020
@rokm rokm deleted the py3-doc-metatype branch January 17, 2020 21:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants