Page MenuHomePhabricator

[RfC] Drop compat module
Open, LowestPublic

Description

core branch is now 10 years old and decommission of compat was one year ago. The compat module was created in 2012 and older catlib and userlib where merged into that folder in 2014.

The framework is not using this compatibility modul anymore and bot operators get a deprecation waring for their private scripts when the module is used.

I guess it is time to drop this module because all scripts should use the core framework equivalent parts. It might be more difficult to keep this backward compatibility alive and btw its usage is unsure because the behavioris never testet. Finally not all parts of userlib and catlib has been ported.

Now I propose to remove this backward compatibility module because it had to be invoked explicitly and could be replaced by the framework equivalent implemetations.

Details

Related Gerrit Patches:

Event Timeline

Xqt created this task.Dec 17 2017, 10:56 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptDec 17 2017, 10:56 AM

Change 398024 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [compat] drop compat module

https://gerrit.wikimedia.org/r/398024

Framawiki added a subscriber: Framawiki.
Dalba added a subscriber: Dalba.EditedDec 22 2017, 12:17 PM

It sounds like a backward incompatible change. Should we announce it? Should it wait for Pywikibot v4? I don't know how pywikibot is going to handle backward incompatible changes (T106121).

Euku removed a subscriber: Euku.Dec 22 2017, 12:49 PM

Would be good to start using SemVer.

Fae added a subscriber: Fae.Dec 24 2017, 11:18 AM

Unless there is an immediate issue, please keep this minor backwards compatibility. Most of my stuff is now in Core but look have a library of Compat handy things that once broken are unlikely to be revisited. Deliberately breaking them does not make much sense.

Gain: Some code clean up
Pain: A lot of our long time users will have broken scrips they have to update

If I look at it like that, it's not worth it. Please explain why this is needed now.

Change 427663 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [compat] Update conversion description

https://gerrit.wikimedia.org/r/427663

Change 427663 merged by jenkins-bot:
[pywikibot/core@master] [compat] Update conversion description

https://gerrit.wikimedia.org/r/427663

Xqt triaged this task as Lowest priority.Jun 17 2018, 5:31 PM
Xqt added a comment.EditedJun 17 2018, 7:21 PM

Unless there is an immediate issue, please keep this minor backwards compatibility. Most of my stuff is now in Core but look have a library of Compat handy things that once broken are unlikely to be revisited. Deliberately breaking them does not make much sense.

compat scripts has to be converted to core framework anway. README-conversion.txt, compat2core.py and the debug option to show the deprecated stuff are able to help the conversion process. There are remaining issues like such described in T136513.

Regarding to the compat module I think it shouldn't be necessary anymore after this long time and it shouldn't be used anyway. There is no reason to use pywikibot.compat.catlib.Category instead of pywikibot.Category or pywikibot.compat.userlib.User instead of pywikibot.User or pywikibot.compat.query.GetData(request) instead of pywikibot.data.api.request(**request).submit(). Ok the last one looks a bit strange but there a a lot of high level Page or Site methods which could be used instead. What might be the reason to keep this old stuff? Older releases of the pywikibot framework are tagged with a version number and can be downloaded easily if needed.

Status of that?

Xqt added a comment.Oct 8 2018, 2:21 PM

Status of that?

I think a FutureWarning should be placed first instead of the hidden deprecation warning.

Change 467645 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [compat] do not actively support compat module

https://gerrit.wikimedia.org/r/467645

Change 467645 merged by jenkins-bot:
[pywikibot/core@master] [compat] do not actively support compat module

https://gerrit.wikimedia.org/r/467645

Change 481331 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [compat] Remove compat.rst subpackage tree

https://gerrit.wikimedia.org/r/481331

Xqt moved this task from Backlog to Needs Review on the Pywikibot board.Feb 3 2019, 11:22 AM
Xqt claimed this task.Feb 7 2019, 4:27 PM

Change 481331 merged by jenkins-bot:
[pywikibot/core@master] [compat] Remove compat.rst subpackage tree

https://gerrit.wikimedia.org/r/481331