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

Missing origin attr added per 0.11 xsd #19

Merged

Conversation

gdedrouas
Copy link
Contributor

Missing origin attr added per 0.11 xsd, otherwise mwtypes breaks.

@@ -49,6 +50,8 @@ def from_element(cls, element):
user = User.from_element(sub_element)
elif tag == "minor":
minor = True
elif tag == "origin":
origin = sub_element.text
Copy link
Member

Choose a reason for hiding this comment

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

We'll need to add "origin" to the mwtypes.Revision model too and make sure it gets set.

@halfak
Copy link
Member

halfak commented Jun 1, 2023

Sorry for the late review! Thanks for the PR. This looks good but we'll need to do some work on the mwtypes library first to make this work. If we've officially switched to the new format, it looks like a bunch of pending work can get merged! I'll take a look at that over the next couple days so we can get this incorporated.

@halfak
Copy link
Member

halfak commented Jun 1, 2023

This is relevant but doesn't include "origin" mediawiki-utilities/python-mwtypes#5

@gdedrouas
Copy link
Contributor Author

Yes, if I understand correctly it is already written in the Content_Type class but not yet in the Revision_Type class (python-mwtypes/tree/updates_schema_0.11).

I've hacked this PR to make it work in a project where I use the updates_schema_0.11 branch from that project with no change (python-mwtypes/tree/updates_schema_0.11) and only on a Content dump of a Mediawiki (no revisions). That's probably why.

I'm still interested in the 0.11 branches of both projects btw !

@halfak halfak merged commit 9e1b9b4 into mediawiki-utilities:xml_format_0.11 Jul 9, 2024
@halfak
Copy link
Member

halfak commented Jul 9, 2024

OK both of these are in PyPi. Let me know how it goes!

@kilgarenone
Copy link

Thank you SO MUCH! Did you fix this too? #20 Anyway thanks!

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.

3 participants