Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/330/
Reported by: valhallasw
Created on: 2013-02-04 20:52:53
Subject: Extended version information in user-agent
Original description:
See the discussion at https://www.mediawiki.org/wiki/Special:Code/pywikipedia/11027\#c33303
Implementation notes:
Hash of a file:
>>> import hashlib
>>> m = hashlib.sha1\(\)
>>> m.hexdigest\(\)
'93ae86148e74a7c3a3d63f7810b48c51889fba46'
Classes used in stack trace:
>> import inspect
>> \[\(x.\_\_module\_\_, x.\_\_name\_\_\) for x in \(s\[0\].f\_locals.get\('self', None\).\_\_class\_\_ for s in inspect.stack\(\)\)\]
Example result:
\[\('wikipedia\_family', 'Family'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('wikipedia\_family', 'Family'\), \('wikipedia', 'Site'\), \('wikipedia', 'Site'\), \('wikipedia', 'Site'\), \('wikipedia', 'Site'\), \('wikipedia', 'Site'\), \('wikipedia', 'Page'\), \('wikipedia', 'Page'\), \('\_\_main\_\_', 'Subject'\), \('\_\_main\_\_', 'Subject'\), \('\_\_main\_\_', 'InterwikiBot'\), \('\_\_main\_\_', 'InterwikiBot'\), \('\_\_builtin\_\_', 'NoneType'\), \('\_\_builtin\_\_', 'NoneType'\), \('\_\_builtin\_\_', 'NoneType'\), \('pdb', 'Pdb'\), \('pdb', 'Pdb'\), \('\_\_builtin\_\_', 'NoneType'\), \('\_\_builtin\_\_', 'NoneType'\), \('\_\_builtin\_\_', 'NoneType'\), \('\_\_builtin\_\_', 'NoneType'\)\]
Version: core-(2.0)
Severity: enhancement
See Also:
https://sourceforge.net/p/pywikipediabot/feature-requests/330