Hi,
Are there any guidelines on the separation between the pywikibot framework and the scripts bundled with it? I'm referring in particular with the way things are deprecated/removed from the framework just because they're not used _in the scripts bundled with pywikibot_.
I've recently upgraded pywikibot and stumbled on an issue with one of my bots, who was silently failing because the family file did not contain namespacesWithSubpage any longer. This was removed in https://gerrit.wikimedia.org/r/#/c/219610/ . Ignoring the fact that +2 was given by the commiter himself (which is bad practice no matter what), the field was removed without any apparent warning, just because it seemed unused.
If pywikibot does not have any guideline for framework/scripts separation and repsect for 3rd party bots usage of features, can we please create one? A minimum requirement should be to keep any deprecated field/method for at least 1 year (with warnings), then remove it.
In order to enforce this separation, perhaps we should move the scripts folder in a different repository.
Thanks, Strainu
Hi Strainu,
Are there any guidelines on the separation between the pywikibot
framework and the scripts bundled with it? I'm referring in particular with the way things are deprecated/removed from the framework just because they're not used _in the scripts bundled with pywikibot_.
The general guideline is that - functions in scripts are considered 'private use', and can be removed/refactored without notice, - functions in the framework are first deprecated, and removed at some later time. - unless something is marked as internal (_ prefix) or something is practically internal (e.g. a helper function in pywikibot.data.api).
At the same time, master is a development branch, so this is not set in stone (otherwise large scale refactoring becomes impossible). We have a stable branch (2.0), which is what you should use if dealing with the occasional breakage is a large problem.
Merlijn
2016-09-04 15:54 GMT+03:00 Merlijn van Deen (valhallasw) valhallasw@arctus.nl:
Hi Strainu,
Are there any guidelines on the separation between the pywikibot framework and the scripts bundled with it? I'm referring in particular with the way things are deprecated/removed from the framework just because they're not used _in the scripts bundled with pywikibot_.
Hi,
The general guideline is that
- functions in scripts are considered 'private use', and can be
removed/refactored without notice,
- functions in the framework are first deprecated, and removed at some
later time.
- unless something is marked as internal (_ prefix) or something is
practically internal (e.g. a helper function in pywikibot.data.api).
This makes sense.
At the same time, master is a development branch, so this is not set in stone (otherwise large scale refactoring becomes impossible). We have a stable branch (2.0), which is what you should use if dealing with the occasional breakage is a large problem.
I don't really see how respecting the rules above in master would prevent large scale refactoring. It would make it more complicated, yes, but not impossible. Do you really feel this would make development so much harder?
Strainu
A good example of valid breakages in dev is the switch from httplib2 to requests. Most of the pywikibot api stayed the same, but some parts of it were ruthlessly dropped.
On Mon, 5 Sep 2016 03:48 Strainu, strainu10@gmail.com wrote:
2016-09-04 15:54 GMT+03:00 Merlijn van Deen (valhallasw) < valhallasw@arctus.nl>:
Hi Strainu,
Are there any guidelines on the separation between the pywikibot framework and the scripts bundled with it? I'm referring in particular with the way things are deprecated/removed from the framework just because they're not used _in the scripts bundled with pywikibot_.
Hi,
The general guideline is that
- functions in scripts are considered 'private use', and can be
removed/refactored without notice,
- functions in the framework are first deprecated, and removed at some
later time.
- unless something is marked as internal (_ prefix) or something is
practically internal (e.g. a helper function in pywikibot.data.api).
This makes sense.
At the same time, master is a development branch, so this is not set in stone (otherwise large scale refactoring becomes impossible). We have a stable branch (2.0), which is what you should use if dealing with the occasional breakage is a large problem.
I don't really see how respecting the rules above in master would prevent large scale refactoring. It would make it more complicated, yes, but not impossible. Do you really feel this would make development so much harder?
Strainu
pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot