jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/347138 )
Change subject: pywikibot/__init__.py: Do not use `deprecate_arg` ......................................................................
pywikibot/__init__.py: Do not use `deprecate_arg`
`deprecate_arg` is deprecated itself and redirected to `pywikibot.tools.deprecate_arg` which is imported as `__deprecate_arg`.
Rename `__deprecate_arg` to `_deprecate_arg`. Python mangles names that start with two leading underscores inside classes to make them private. This prevented the usage of `__deprecate_arg` in Coordinate class.
Bug: T162509 Change-Id: Icf557d5f337c302b328ad784317cdb2934bcf458 --- M pywikibot/__init__.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 45b08f5..59016c3 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -69,7 +69,7 @@ from pywikibot.tools import ( # __ to avoid conflict with ModuleDeprecationWrapper._deprecated deprecated as __deprecated, - deprecate_arg as __deprecate_arg, + deprecate_arg as _deprecate_arg, normalize_username, MediaWikiVersion, redirect_func, @@ -130,7 +130,7 @@
deprecated = redirect_func(__deprecated) -deprecate_arg = redirect_func(__deprecate_arg) +deprecate_arg = redirect_func(_deprecate_arg)
class Timestamp(datetime.datetime): @@ -235,7 +235,7 @@
_items = ('lat', 'lon', 'globe')
- @deprecate_arg('entity', 'globe_item') + @_deprecate_arg('entity', 'globe_item') def __init__(self, lat, lon, alt=None, precision=None, globe='earth', typ='', name='', dim=None, site=None, globe_item=None): """
pywikibot-commits@lists.wikimedia.org