Page MenuHomePhabricator

svn.wikimedia.org links in pywikibot
Closed, ResolvedPublic

Description

There were two instance of 'svn.wikimedia.org'

One is for fetching the version, using a deprecated/fallback algorithm

pywikibot/version.py:                t[1] = t[1].replace('svn.wikimedia.org/svnroot/pywikipedia/',

The other https://git.wikimedia.org/blob/pywikibot%2Fcore.git/c3e31d4ebabfd0893b7d2d1e99bfc07b9290250c/pywikibot%2Fpage.py#L4394 refers to

# Normalize unicode string to a NFC (composed) format to allow
# proper string comparisons. According to
# https://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_6/phase3/includes/normal/UtfNormal.php?view=markup
# the MediaWiki code normalizes everything to NFC, not NFKC
# (which might result in information loss).
t = unicodedata.normalize('NFC', t)

This was introduced into core in c636fd0d , but it was originally added by @Yurik in compat in April 2006 30510907 & ed5e7395

The file it references (now at a more stable https://github.com/wikimedia/mediawiki/blob/REL1_6/includes/normal/UtfNormal.php) is now a shell https://github.com/wikimedia/mediawiki/blob/master/includes/libs/normal/UtfNormal.php

Using NFC became a large problem in 2010-2011, which is documented at T102461

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptApr 6 2015, 2:17 AM
jayvdb set Security to None.
jayvdb added a subscriber: Yurik.

Change 218884 had a related patch set uploaded (by John Vandenberg):
Python issue #10254

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

MarcoAurelio subscribed.

@jayvdb Since https://gerrit.wikimedia.org/r/#/c/218884/ has been merged, can we close this task or there is further work to do? Best regards.

Still one more to remove

$ git grep svn.wikimedia.org
pywikibot/version.py:                t[1] = t[1].replace('svn.wikimedia.org/svnroot/pywikipedia/',

Change 234807 had a related patch set uploaded (by MarcoAurelio):
Removing svn.wikimedia links in pywikibot

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

Patch is halted since it seems we can't SVN from Phabricator. Anyone knows a solution?

Change 201907 had a related patch set uploaded (by John Vandenberg):
[FEAT] version: Use svn info command

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

@MarcoAurelio , sorry I didnt reply to you. I assume that the SVN server people have been using is github; it is the only one I know about, as it is documented at https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation/SVN .

The function with this old URL is probably currently broken, and has probably been broken since when Pywikibot was moved from SVN to git, which I think was around middle of 2013. IMO it can be deleted, but @XZise has a patch which will fix it, and @Xqt may have other ideas about this as he is the champion of SVN support.

Change 234807 abandoned by MarcoAurelio:
Removing svn.wikimedia links in pywikibot

Reason:
Looks that I3de96be6 might fix it and other people is also working, so leaving to them.

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

Change 201907 abandoned by XZise:
[FEAT] version: Use svn info command

Reason:
We should remove that svn/git magic… if a user uses git or svn they should be able to tell their git hash/svn revision.

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

Xqt claimed this task.

The remaining url is to retieve svn version and will be kept.