Page MenuHomePhabricator

DeprecationWarning: ipaddress backport not available.
Closed, ResolvedPublic

Description

When saving a page, no particular options
Probably need investigation

WARNING: /mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/tools/ip.py:78: DeprecationWarning: ipaddress backport not available.
WARNING: /mnt/nfs/labstore-secondary-tools-project/pywikibot/public_html/core/pywikibot/tools/ip.py:79: DeprecationWarning: page.ip_regexp is deprecated; use tools.ip.is_IP instead.
  if ip_regexp.match(IP) is None:

Sleeping for 7.8 seconds, 2017-08-27 20:12:19
Page [[Projet:Les sans pagEs/Articles récents/Photos]] saved without any changes.
Page [[Projet:Les sans pagEs/Articles récents/Photos]] saved

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptAug 29 2017, 7:04 PM
Dalba added a subscriber: Dalba.Aug 30 2017, 12:43 AM

It helps to know if you are seeing any ImportWarnings during the startup. Installing a recent version of ipaddr package should resolve the issue.
By the way, this should only be reproducible on python 2.

Xqt triaged this task as Low priority.Sep 10 2017, 12:01 PM
Xqt added subscribers: Multichill, Xqt.

Like @Multichill noted in T76286 I am also unhappy with this deprecation warning and propose to remove it. Neither ipaddress nor ipaddr packages are mandatory because we have a regex which does the job. Imho we should not atomize the framework with different packages and requests is sometimes difficult enought to get the bot running. Packages may be good for some special scripts, but should be omitted for core codebase.

Is this still an issue?

Change 580067 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [cleanup] remove deprecated tools.ip.ip_regex

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

Change 580067 merged by jenkins-bot:
[pywikibot/core@master] [cleanup] remove deprecated tools.ip.ip_regex

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

Xqt closed this task as Resolved.Apr 27 2020, 4:00 AM
Xqt claimed this task.