[Pywikipedia-l] [pywikibot] New Pywikibot 7 stable release
Hi all,a new stable release Pywikibot 7 will be deployed at the end of this month.There are a lot important points with this release, currently implemented in master branch:Python Plattform:-Pywkibot support of Python 3.5.0 - 3.5.2 will be dropped. The minimum plattformrequired is Python 3.5.3 which is preinstalled at toolforge. On the other handPywikibot also works with new Python 3.11.0a and *new* supports PyPy 3. Mostused plattform measured by PyPy download statistic is Python 3.8 (T266984). Fordevelopers I highly propose to use Python 3.10 due to "Better error messages"(https://docs.python.org/3.10/whatsnew/3.10.html#better-error-messages).Framework Scripts:--The both scripts generate_family_file and generate_user_files were moved from framework root directory to pywikibot/scripts folder. The two scripts shell andversion were moved from scripts folder to pywikibot/scripts. This arrangementwas necessary to implement a code entry point for Pywikibot site-package. Possibly you have to change the path environment setting to use these scripts.But all of them are still available through the pwb.py wrapper script.Linux:--Scripts hash bang was changed from python to python3. This enables to invokescripts without preleading interpreter.PAWS:-Pywikibot 7 is a stable release and becomes the Pywikibot framework base onPAWS.Toolforge:--After deployment of Pywikibot 7 this stable release will be available under/shared/pywikibot/stable and the current master can be accessed under/shared/pywikibot/core. The pwb.py wrapper script can be used at Tooforgeand the similar script search is functional.https://doc.wikimedia.org/pywikibot/master/utilities/index.html#module-pwbMediaWiki:--No changes was made for supporting MediaWiki releases. Pywikibot 7 supportsMediaWiki 1.23-1.37. For current MediaWiki release 1.37 the minimum Pywikibotversion must be 6.6.1. MW 1.19 requires PWB 5 and MW 1.14 requires PWB 4.(https://www.mediawiki.org/wiki/Manual:Pywikibot/Compatibility)Pywikibot site-package (PyPi):--Installing Pywikibot as a site package (pip install pywikibot==7.0) comes withmany innovations. pywikibot i18n messages bundle is available. Framework scripts listed above can be used with Pywikibot 7.The pwb wrapper script is thecode entry point to invoke these scripts:pwb [global options] [script options|global options]Pywikibot Tests:Pywikibot CI tests were moved from Travis to GitHub action. There are twoactions implemented. The first runs up tp 20 workers in parallel and does themost tests whereas the second only runs login/logout tests but there are noparallel task which would lead to failures due to not logged-in test account.Module Changes:---Support for API:Redirects was added in site and page module. User.is_locked()and APISite.is_locked() were added to determine whether a given user or user idis locked globally. The cached output functionality from compat release wasre-implemented.families:Allow family files reside in `families` folder in base_dir by default. This is important if Pywikibot is used as a site-package. generate_family_file usesthis new place to save the family file. Wikihow family file was added.i18n module:bundles() yields message bundle names or Path objects; known_languages() givesall languages we have localizations for.page module:isStaticRedirect() also considers transcluded __STATICREDIRECT__.put() and change_category() now has a show_diff parameter. User.is_blocked()can also detect range blocks.proofreadpage:Wikimedia OCR engine is supported.site module:APISite.get_globaluserinfo() method was added to retrieve globaluserinfo.New "maxlimit" property was added to determine the limits for API loads.textlib module:textlib comes with to_latin_digits() function as counterpart ofto_local_digits() and case_escape() which gives an escaped regex patterndepending on 'first-letter' case.tools module:intersect_generators was rewritten which makes it running up to 10’000 times faster.Scripts Changes:Scripts descriptions can be viewed athttps://doc.wikimedia.org/pywikibot/master/scripts/index.htmlConfigParserBot is provided for several scripts. Any option can be set withinscripts.ini file.https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.html#pywikibot.bot.ConfigParserBotadd_text scripts provided -create and -createonly options. A CleanBot was addedin category script which can be invoked by clean action option. It removesredundant grandchildren categories. The fixing_redirect script uses concurrent.futures to retrieve redirect targets; this decreases processing timeby 90% if solving moved pages is enabled.Deprecations:-Most of the deprecated code parts were removed to start with a new proper andmaintainable code without budensome overhead. The deprecations must be solvedif you have your own code based on Pywikibot before you upgrade to the newrelease. Refer
[Pywikipedia-l] pip doc
Hi guys I wrote few lines about pip python package management system because I didn't know how to use it (with windows). Could someone confirm https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation#Core please. I am going to reinstall python developing stuff at the moment. Thanks in advance. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] SVN 1.6 support to be removed
The recent version of TortoiseSVN comes with SVN 1.8.13. I personally don't need SVN 1.6 anymore. Regards xqt - Original Nachricht Von: John Mark Vandenberg jay...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2015 02:22 Betreff: [Pywikipedia-l] SVN 1.6 support to be removed The core and compat codebase have code to support SVN pre 1.7. I have tested it with 1.6, and it looks *roughly* correct, but our code does not work, and has not worked since Feb 2014 as detailed at https://phabricator.wikimedia.org/T95077 In addition, SVN 1.6 is no longer supported by the SVN developers. As a result, I doubt that anyone is relying on support for SVN 1.6 or earlier, and I would like to remove support for SVN pre 1.7. Please yell out if there is a reason to keep supporting SVN 1.6 ...? -- John Vandenberg ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Line length
python code can be limited to 80 on most cases but there might be some documentation parts like urls which exceed this limit. Regards xqt - Original Nachricht Von: Ricordisamoa ricordisa...@openmailbox.org An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 31.12.2014 12:13 Betreff: Re: [Pywikipedia-l] Line length I generally dislike hard limits, but keeping lines shorter often helps. Shorter than 100 characters seems fine to me. Il 31/12/2014 01:31, Fabian Neundorf ha scritto: Hi all, after a short discussion about the line length in the pywikibot-core repo I made a little analysis (or more like 'gathered' the data). Currently the maximum allowed line length is 256 characters. Flake8 counts multi-bytes characters as one character (and afaik doesn't count the newline). The question is how easy it is to lower that to a value between 80 and 100 (when I submit code I try to have at most 80 characters sometimes it's 81). Maybe to 200 is short term feasible with only a 16 exceeding those. With a maximum of 150 characters at least 47 lines need to be edited. I used 'tox -e flake8' with the maximum line length set to 80 and then only used E501 entries. Some lines were garbled on the output like ?./pywikibot/1: E501 line too long (82 80 characters)?. I tried to repair those lines if there was at least some kind of file name and line number (e.g. ?ase.py:365?) but I deleted the rest. So those statistics only show the lowest number but I don't expect to much missing data. The data is gathered from ad6920135ef015855724ac660fa0dcfb1459cfda. And is available sorted line number first (so they could be fixed in reversed order) or sorted with line length first (so super long lines can be fixed primarily). There is a gist which contains both lists and a list of the quantity of all line lengths [1] and a Google Spreadsheet containing just the quantity numbers [2] to determine easily how many would need to be solved when enforcing a specific limit. Fabian [1]: https://gist.github.com/xZise/3d15a742a9a4f472b3b2 [2]: https://docs.google.com/spreadsheets/d/1lbCDURzpTm1uViUJ3Awa2C4J-TGzi1DfJWzo IiUuKeY/edit?usp=sharing ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[Pywikipedia-l] deprecated featured.py
Hi folks, since the badges are moved to Wikidata placing Link FA and Link GA won't be needed anymore. Therefore featured.py could be removed from framework scope and it could be placed into an archive folder (we had in past on svn). I don't know where is the right place for it. First I thought pywikibot/bots/misc could be the right one, unfortunately we have compat and core variant. Any suggestions? Best xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] deprecated featured.py
I guess unfortunately they aren't supported by featured.py too. xqt - Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikibot discussion list pywikipedia-l@lists.wikimedia.org Datum: 07.09.2014 19:18 Betreff: Re: [Pywikipedia-l] deprecated featured.py As a person who is working on badges in both Wikidata and Wikipedia, I think we should wait for a while. In it,fr,es,ru,pt,ca, and several other wikis still we can't remove Link FA and Link GA because they populate categories like this https://ca.wikipedia.org/wiki/Categoria:Articles_destacats_en_itali%C3%A0. So In these wiki Link FA still needs to be maintained though our scripts. Best On Sun, Sep 7, 2014 at 9:43 PM, i...@gno.de wrote: Hi folks, since the badges are moved to Wikidata placing Link FA and Link GA won't be needed anymore. Therefore featured.py could be removed from framework scope and it could be placed into an archive folder (we had in past on svn). I don't know where is the right place for it. First I thought pywikibot/bots/misc could be the right one, unfortunately we have compat and core variant. Any suggestions? Best xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] i18n in Pywikibot
I disagree with merging i18n to core and killing the submodule. Please mark compat as deprecated first. Installing problems often is a doc problem. With svn the externals are updated together with the compat/core framework. Git maybe needs additional steps. What about all the other externals? If there is a problem with i18n, there might be one with spelling, http and all the others too. xqt - Ursprüngliche Nachricht - Von: Amir Ladsgroup Gesendet: 14.08.2014 15:03 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] i18n in Pywikibot I forgot to mention the patch: [1]: https://gerrit.wikimedia.org/r/151114 On 8/14/14, Amir Ladsgroup ladsgr...@gmail.com wrote: Hello, Yesterday after some talks in IRC we thought It would be good if we kill off the i18n submodule and bring the files into core, compat will have the i18n folder but won't receive any updates. One of major advantage of this action is making installation of pywikibot so much easier. Another thing that is happening for i18n is that we are migrating to json [1]. Any comment about these actions is very welcome. Best -- Amir -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Gerrit notification
1000 Mails in 5 days spamming and flooding my mailbox account which is full now. Who has this activated? I do not see any sense. xqt - Original Nachricht Von: Antoine Musso hashar+...@free.fr An: pywikipedia-l@lists.wikimedia.org Datum: 04.08.2014 13:22 Betreff: Re: [Pywikipedia-l] Gerrit notification Le 04/08/2014 05:43, i...@gno.de a écrit : Hi folks, couldn't we reduce the gerrit notification mails please. Getting hundreds a day of them is time consuming and not helpful. Greetings xqt Hello, You can tweak Gerrit mail notifications in your settings. Head to https://gerrit.wikimedia.org/r/#/settings/projects Then Watched Projects, check/uncheck as needed. I have mail filter that use the header List-Id to move the mail notifications on a per project basis. Each mail has: List-Id: gerrit-pywikibot-core.gerrit.wikimedia.org Then there is an xtra header that indicates the state of the change, for example new-patchset, comment, merged, abandoned: X-Gerrit-MessageType: merged I use that to apply labels on messages which let me change the color of messages. An abandoned patch ends up blue, a merge green. Finally, I have a filter that change the color (red/purple) based on test result: X-Gerrit-MessageType: comment From: jenkins-bot Body match: build succeeded or build failed End result: http://i.imgur.com/ceq4Klr.png cheers, -- Antoine hashar Musso ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[Pywikipedia-l] Gerrit notification
Hi folks, couldn't we reduce the gerrit notification mails please. Getting hundreds a day of them is time consuming and not helpful. Greetings xqt___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] The build is broken
This is not a bug in testing. The test detects a bug for archivebot.py which fails for unsigned threads. xqt - Ursprüngliche Nachricht - Von: John Mark Vandenberg Gesendet: 26.07.2014 18:21 An: Pywikibot discussion list Betreff: Re: [Pywikipedia-l] The build is broken On Sat, Jul 26, 2014 at 10:39 PM, Ricordisamoa ricordisa...@openmailbox.org wrote: The build is still broken, but because of this edit, that breaks the timestamp detection of the ArchiveBot. Maybe a fictitious, write-protected talk page should be used? That is being tracked on https://bugzilla.wikimedia.org/show_bug.cgi?id=67663 An alternative test page would be a good solution. Or maybe the unit test could allow unsigned sections to be added to the talk page. -- John Vandenberg ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] The build is broken
Ah, maybe. I just saw your fixes at my Talk page(s). xqt - Ursprüngliche Nachricht - Von: Amir Ladsgroup Gesendet: 26.07.2014 23:22 An: Pywikibot discussion list Betreff: Re: [Pywikipedia-l] The build is broken it was another bug that John and Ricordisamoa are talking about. On 7/27/14, i...@gno.de i...@gno.de wrote: This is not a bug in testing. The test detects a bug for archivebot.py which fails for unsigned threads. xqt - Ursprüngliche Nachricht - Von: John Mark Vandenberg Gesendet: 26.07.2014 18:21 An: Pywikibot discussion list Betreff: Re: [Pywikipedia-l] The build is broken On Sat, Jul 26, 2014 at 10:39 PM, Ricordisamoa ricordisa...@openmailbox.org wrote: The build is still broken, but because of this edit, that breaks the timestamp detection of the ArchiveBot. Maybe a fictitious, write-protected talk page should be used? That is being tracked on https://bugzilla.wikimedia.org/show_bug.cgi?id=67663 An alternative test page would be a good solution. Or maybe the unit test could allow unsigned sections to be added to the talk page. -- John Vandenberg ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Two issues
- Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikibot discussion list pywikipedia-l@lists.wikimedia.org Datum: 11.07.2014 01:09 Betreff: Re: [Pywikipedia-l] Two issues Just sent an e-mail to wikitech-l Best On Fri, Jul 11, 2014 at 12:40 AM, Frances Hocutt frances.hoc...@gmail.com wrote: On Thu, Jul 10, 2014 at 12:36 PM, Jeremy Baron jer...@tuxmachine.com wrote: On Jul 10, 2014 3:30 PM, Bináris wikipo...@gmail.com wrote: I don't see anything like a compulsory username in this policy. I think Pywikibot has a UA that complies, it does not have to be unique and personal. I rememberd something like statistical purpose but may have mismatched something. But I have no problem with going to wikitech-l if you understand the policy in a different way. No, the whole point is to be unique, not statistics. I haven't read the policy recently but if the policy is unclear then we can change the policy. It is about being able to contact the bot-runner if the bot is misbehaving or runs into a problem. From https://meta.wikimedia.org/wiki/User-Agent_policy : If you run a bot, please send a User-Agent header identifying the bot and supplying some way of contacting you, e.g.: User-Agent: MyCoolTool/1.1 (http://example.com/MyCoolTool/; mycoolt...@example.com) BasedOnSuperLib/1.4 -Frances imho the first contact for the bot are the developers and pywikibot is well known as contact address. The second contact is the bot account itself. I is common to have bot account and the operator should be reachable via wikimail or contact information on the bot's user page. The bot account is unique. I guess it would be enough to have pywikibot, script name and bot account in the UA. Xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] drop support for python 2.6
Currently user-agent _is_ included (by pywikibot/comms/http.py) xqt - Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikibot discussion list pywikipedia-l@lists.wikimedia.org Datum: 15.06.2014 15:12 Betreff: Re: [Pywikipedia-l] drop support for python 2.6 2014-06-15 12:37 GMT+02:00 Maarten Dammers maar...@mdammers.nl: I was wondering, does the user-agent include the python version? If so, we could ask the wmf analytics team to do some logging for us. Currently doesn't, but it is a good idea to implement. ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] drop support for python 2.6
Betreff: Aw: Re: [Pywikipedia-l] drop support for python 2.6 Currently user-agent _is_ included (by pywikibot/comms/http.py) xqt Ah, no! Its the framework release, not the py version. Sorry disturbing you xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Page delete and protect
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikibot discussion list pywikipedia-l@lists.wikimedia.org Datum: 16.06.2014 17:11 Betreff: Re: [Pywikipedia-l] Page delete and protect Then it should be in the default 'bot' class, not in the Page class. strong +1 xqt On 16 June 2014 16:33, John phoenixoverr...@gmail.com wrote: Avoiding the headache of re-inventing the wheel across dozens of scripts that use that code? On Mon, Jun 16, 2014 at 10:19 AM, John Mark Vandenberg jay...@gmail.com wrote: In https://gerrit.wikimedia.org/r/#/c/139792 I noticed that Page.delete() and page.protect() have a lot of user interaction logic which would normally be in a script. e.g. asking a user what actions to take. Also, they set a flag in the site object. i.e. site._noDeletePrompt = True and site._noProtectPrompt = True Is there any reason for it being in Page? -- John Vandenberg ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] (core) Adding code in scripts/i18n to gerritreview
The i18n dict file must be committed first and you have to update submodules before your script works well. For your working copy you may cp the dict file into the scripts/i18n folder for testing purposes. Greetings xqt - Ursprüngliche Nachricht - Von: Travis Briggs Gesendet: 12.06.2014 19:30 An: Pywikibot discussion list Betreff: Re: [Pywikipedia-l] (core) Adding code in scripts/i18n to gerritreview Okay, so my follow up question is about this line: comment = i18n.twtranslate(pywikibot.Site(), selflink-remove) Will that somehow work properly before the scripts/i18n code is submitted? Or do I have to submit the i18n code first and then make the core scripts change? Thanks! -Travis On 12 June 2014 09:22, i...@gno.de wrote: - Original Nachricht Von: Travis Briggs audiod...@gmail.com An: pywikipedia-l@lists.wikimedia.org Datum: 12.06.2014 02:41 Betreff: [Pywikipedia-l] (core) Adding code in scripts/i18n to gerrit review Hi, I've sent my first patch for code review ( https://gerrit.wikimedia.org/r/#/c/138661/) As part of the review, it was noted that I should move a 'msg' variable into scripts/i18n. I have done so, however now I'm wondering what the review process for code in that submodule? Is there a way to add my i18n code to the same gerrit review? Conceptually it is one change, though I'm not sure if maybe the way the i18n works is that the script can function with the corresponding i18n script missing. Is that possible? Thanks, -Travis You can't. You must not use scripts/i18n directly but you have to commit the messages dict to pywikibot-i18n repository Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] (core) Adding code in scripts/i18n to gerrit review
- Original Nachricht Von: Travis Briggs audiod...@gmail.com An: pywikipedia-l@lists.wikimedia.org Datum: 12.06.2014 02:41 Betreff: [Pywikipedia-l] (core) Adding code in scripts/i18n to gerrit review Hi, I've sent my first patch for code review ( https://gerrit.wikimedia.org/r/#/c/138661/) As part of the review, it was noted that I should move a 'msg' variable into scripts/i18n. I have done so, however now I'm wondering what the review process for code in that submodule? Is there a way to add my i18n code to the same gerrit review? Conceptually it is one change, though I'm not sure if maybe the way the i18n works is that the script can function with the corresponding i18n script missing. Is that possible? Thanks, -Travis You can't. You must not use scripts/i18n directly but you have to commit the messages dict to pywikibot-i18n repository Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] reflinks.py under GPL?
- Original Nachricht Von: Nicolas Dumazet nicd...@gmail.com An: pywikipedia-l@lists.wikimedia.org Datum: 09.06.2014 10:02 Betreff: Re: [Pywikipedia-l] reflinks.py under GPL? Hey folks, Sorry about that. I'd happily relicense the original code under whatever is convenient for you. If anyone contributed to the file in the meantime, I'm afraid you'd have to ask those guys for permission, too :( We had 18 authors contributing to this code. Either we keep it as it is or we could double licence the code from now on. Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] lists vs tuples
The performance searching in a list or a tuple is both the same and both bad. Better performance has searching inside a string or in indexed types like set and dict whereas instantiating them is time consuming. Using list may lead to unexpected side effects because they are mutable objects whereas tuples are immutable. I remember bugs with lists as parameters to methods or setting a view to lists inside family file content and change them instead of copy its values. That's the reason why I prefer tuples when the content never has to be changed. For the given example there is no difference. Greetings xqt - Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 07.06.2014 00:13 Betreff: Re: [Pywikipedia-l] lists vs tuples On 6 June 2014 23:49, Ricordisamoa ricordisa...@openmailbox.org wrote: Should we always use tuples when instantiating them only once? E.g. *if* abc *in* ('e', 'f'): instead of *if* abc *in* ['e', 'f']: Performance-wise, I don't think it matters much; after all, most time is spent inside the loop, not in instantiating a list or tuple. Conceptually, a list often makes more sense (a list would be different items of the same type, while a tuple represents different properties of the same item). Merlijn ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Test needing fix
I made a new patch with can be started by unittest.main() in gerrit https://gerrit.wikimedia.org/r/137365 xqt - Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 04.06.2014 20:05 Betreff: Re: [Pywikipedia-l] Test needing fix I have reverted the commit that caused this. Thanks for the heads-up. Merlijn On 4 June 2014 16:42, Ricordisamoa ricordisa...@openmailbox.org wrote: https://travis-ci.org/wikimedia/pywikibot-core/jobs/26754246 ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Test needing fix
This bug is completely unclear to me :( Greetings xqt - Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 04.06.2014 20:05 Betreff: Re: [Pywikipedia-l] Test needing fix I have reverted the commit that caused this. Thanks for the heads-up. Merlijn On 4 June 2014 16:42, Ricordisamoa ricordisa...@openmailbox.org wrote: https://travis-ci.org/wikimedia/pywikibot-core/jobs/26754246 ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Test needing fix
seems setup.py always runs unittest.main() xqt - Ursprüngliche Nachricht - Von: i...@gno.de Gesendet: 04.06.2014 21:37 An: pywikipedia-l@lists.wikimedia.org Betreff: Re: [Pywikipedia-l] Test needing fix This bug is completely unclear to me :( Greetings xqt - Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 04.06.2014 20:05 Betreff: Re: [Pywikipedia-l] Test needing fix I have reverted the commit that caused this. Thanks for the heads-up. Merlijn On 4 June 2014 16:42, Ricordisamoa ricordisa...@openmailbox.org wrote: https://travis-ci.org/wikimedia/pywikibot-core/jobs/26754246 ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Deprecation of compat
You may also omit the script path, it is default. And the .py ending of the script may also be omitted. Just call pwb.py xxx followed by any options behind that. Best xqt - Ursprüngliche Nachricht - Von: John Mark Vandenberg Gesendet: 03.06.2014 06:05 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] Deprecation of compat On Mon, Jun 2, 2014 at 8:00 PM, Amir Ladsgroup ladsgr...@gmail.com wrote: Core has one million advantages on compat but easy-installation is not one of them, a week ago I was trying to teach some bot operators to migrate to core and there were three main problems: 1- core suggests people to make the user-config in a .pywikibot folder and people don't like this and changing it isn't easy (for example if you want to set it as current folder, like compat, which is a common act because people use several accounts and they need several pywikibot folders with separated user-config and the system doesn't let you to make a file in existing director, try doing this) This part of the startup is quite problematic, as the 'config directory' has three different sets of logic 1. pwb.py 2. generate_user_files.py get_base_dir() 3. pywikibot/config2.py _get_base_dir() https://gerrit.wikimedia.org/r/#/c/87893/ tries to copy the logic in config2.py into pwb.py, but really we need one function that is reused in all three cases. 2- people don't know what command is best for installation: python pwb.py python generate_user_files.py python setup.py install python ez_setup.py IMO we should promote 'python pwb.py' as the way that people start using pywiki. 3- There is an extra external needed (httplib2) and there is no documentation (in files) at all about them and how we can install them, I learned about them by experience and this command won't work: (my friend told me, I haven't checked it yet) git submodule update --init I quickly tested this , and it appears to be working correctly when used with 'python pwb.py scripts/.py' -- John Vandenberg ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Deprecation of compat
Seems nobody RTFM :7 greetings xqt - Ursprüngliche Nachricht - Von: Amir Ladsgroup Gesendet: 02.06.2014 12:01 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] Deprecation of compat Core has one million advantages on compat but easy-installation is not one of them, a week ago I was trying to teach some bot operators to migrate to core and there were three main problems: 1- core suggests people to make the user-config in a .pywikibot folder and people don't like this and changing it isn't easy (for example if you want to set it as current folder, like compat, which is a common act because people use several accounts and they need several pywikibot folders with separated user-config and the system doesn't let you to make a file in existing director, try doing this) 2- people don't know what command is best for installation: python pwb.py python generate_user_files.py python setup.py install python ez_setup.py 3- There is an extra external needed (httplib2) and there is no documentation (in files) at all about them and how we can install them, I learned about them by experience and this command won't work: (my friend told me, I haven't checked it yet) git submodule update --init Helping to fix this would fix lots of user-friendliness issues Best On Mon, Jun 2, 2014 at 12:47 PM, i...@gno.de wrote: Indeed documentation ist that part of code which coders does mostly neglects. Anyway there are some hints: README.rst in core Folder https://www.google.de/#q=pwb.py+site:mediawiki.org Seems our manual at mediawiki.org needs some cleanups. We had some discussions about this theme few days ago. Best xqt - Original Nachricht Von: Bináris wikipo...@gmail.com An: Xqt i...@gno.de Datum: 02.06.2014 09:11 Betreff: Re: Re: [Pywikipedia-l] Deprecation of compat 2014-06-02 9:01 GMT+02:00 i...@gno.de: As I wroth with my last mail this behaviour is available since 3th june 2012 using the pwb.py wrapper script. That wasn't quite clear for me at once, but thnak you, this is a great news! ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Deprecation of compat
There is an easy way to run core without installing it as side-package: - download core - read README.rst - run pwb.py and answer a number of questions that auto-create a user-config.py or copy and paste your old user_config.py into the topmost folder of core - run your script using pwb.py scriptname[options] I disliked installing core because I was running and developing bot scripts in both branches. We created that pwb.py wrapper script during Berlin hackathon as an easy way to have both branches in an easy to use manner without virtualizing environments. Greetings xqt - Original Nachricht Von: Andre Engels andreeng...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 01.06.2014 23:30 Betreff: Re: [Pywikipedia-l] Deprecation of compat To me, the actual functionality of core is zero. I have tried to install it three or four times, and failed every time. Just to check again, I did another attempt. First, trying to download and run compat: download compat try to run answer a number of questions that auto-create a user-config.py ready Now core: download core read INSTALL try 'python setup.py install' ** 'Python is not recognized as a command' ok, we're running window, so 'setup.py install' instead ** something is downloaded, all kind of files are being copied ** error: Setup script exited with error: Unable to find vcvarsall.bat Check the internet (Stack Overflow) and see that it means that the setup program assumes that Visual Studio is installed Check the internet for a download for Visual Studio ** Not free, just a 90 day free trial Say blergh and give up André On Sun, Jun 1, 2014 at 10:48 PM, Ricordisamoa ricordisa...@openmailbox.org wrote: It is not a matter of personal tastes, but of actual functionality and progress. Anyway never mind, no consensus ? no warning ;-) Il 01/06/2014 22:27, Bináris ha scritto: Fortunately. For God's sake, please, don't even try to dream of that. Leave people to choose without feeling guilty. I will keep in mind every time I use trunk that you don't like it without written warning. Thank you in advance in the name of the planet and mankind. And sorry for reacting so sharply but we have had enough trouble in the last year because of partially based developments. ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- André Engels, andreeng...@gmail.com ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Guideline for codes of PWB
A lot of parts looks like a doc duplication from https://www.mediawiki.org/wiki/Manual:Pywikibot/Development, some other hints are found at https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation. I propose not to duplicate neither the installation part nor the step by step example. The developer guideline should be a guideline for code style (pep20, pep8, pep257), naming convention, reviewing and guidelines using command line arguments etc. I find a good samples for coding guidlines are http://google-styleguide.googlecode.com/svn/trunk/pyguide.html and http://docs.python-guide.org/en/latest/writing/style/ Greetings xqt - Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 17.05.2014 18:42 Betreff: Re: [Pywikipedia-l] Guideline for codes of PWB I finished writing the guideline: https://www.mediawiki.org/wiki/Manual:Pywikibot/Development_guideline Reading the pep8 about naming style was interesting. (as pep8 name of our project has to be pywikibot not Pywikibot, or PyWikiBot) - Names of classes has to be CapWord (use DataPage instead of Datapage, datapage or data_page) - Names of functions and methods has to be lowercase with underscores for better readability (e.g. set_label instead setLabel, or SetLabel) - Names of errors has to be CapWord with Error suffix (like NoPageError) Please anyone check the page and if we can reach a consensus about the guideline, we'll start enforcing it and adding it to pages. Please feel free to edit (and add things) mercilessly Best On Fri, May 16, 2014 at 6:26 PM, Amir Ladsgroup ladsgr...@gmail.com wrote: a huge part of pep8 is dedicated to the naming style: http://legacy.python.org/dev/peps/pep-0008/#id26 for example names of functions has to be lowercase and name of classes has to be CamelCase, etc. On Fri, May 16, 2014 at 1:09 PM, Pyfisch pyfi...@googlemail.com wrote: I just want to mention a discussion about lowercase_with_underscores and mixedCase: https://gerrit.wikimedia.org/r/#/c/105173/ I agree that it should be consistent and everything changed to a single standard, I would prefer lowercase_with_underscores. Best ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] maintenance-bot
Normally it shouldn't care because you should be able to config CR/LF settings via git. xqt - Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 12.04.2014 12:29 Betreff: Re: [Pywikipedia-l] maintenance-bot It's probably a bug in wikimedia_site.py, I'm going to figure it out Best On 4/12/14, Legoktm legoktm.wikipe...@gmail.com wrote: On 04/11/2014 10:21 PM, Amir Ladsgroup wrote: Where did I use it? https://gerrit.wikimedia.org/r/#/c/125009/1/families/wikipedia_family.py,cm for example has \r's in it. -- Legoktm ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] versionHistories
Did you change the frameworks path with your update? xqt - Ursprüngliche Nachricht - Von: Bináris Gesendet: 05.04.2014 08:52 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] versionHistories What kind of configuration this mess wants me? As far as I know trunk never needed any configuration except user files. Tell me only one reason not to be angry. 2014-04-05 8:39 GMT+02:00 Bináris wikipo...@gmail.com: Next stage. It becomes more and more horroristic. I downloaded the latest compat from nightlies and unpacked. It is one third in size than that of 11 January. After unpacking version.py says: c:\Pywikipediaversion.py syntax error: line 1, column 0 Serious import error; pywikibot not available - was it configured? Traceback (most recent call last): File C:\Pywikipedia\version.py, line 20, in module pywikibot.output('Pywikibot: %s' % getversion()) AttributeError: 'module' object has no attribute 'output' version.py may have perhaps misunderstood something, I didn't want to configure anything, i just wanted to update my WORKING copy. Then I tried to restore the previous version but the result is the same, my Pywikibot does not work any more. I had a working version and tried to update it in a normal way before somebody cleverly asks me to do so, and I only have broken ruins. I am totally fed up with this whole mess! Give us back Pywikibot! -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] versionHistories
Cannot follow. In which way does it fix the import error? xqt - Ursprüngliche Nachricht - Von: Amir Ladsgroup Gesendet: 05.04.2014 10:39 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] versionHistories I made a patch to fix it https://gerrit.wikimedia.org/r/121891 Review it please :) On 4/5/14, Bináris wikipo...@gmail.com wrote: What kind of configuration this mess wants me? As far as I know trunk never needed any configuration except user files. Tell me only one reason not to be angry. 2014-04-05 8:39 GMT+02:00 Bináris wikipo...@gmail.com: Next stage. It becomes more and more horroristic. I downloaded the latest compat from nightlies and unpacked. It is one third in size than that of 11 January. After unpacking version.py says: c:\Pywikipediaversion.py syntax error: line 1, column 0 Serious import error; pywikibot not available - was it configured? Traceback (most recent call last): File C:\Pywikipedia\version.py, line 20, in module pywikibot.output('Pywikibot: %s' % getversion()) AttributeError: 'module' object has no attribute 'output' version.py may have perhaps misunderstood something, I didn't want to configure anything, i just wanted to update my WORKING copy. Then I tried to restore the previous version but the result is the same, my Pywikibot does not work any more. I had a working version and tried to update it in a normal way before somebody cleverly asks me to do so, and I only have broken ruins. *I am totally fed up with this whole mess!* Give us back Pywikibot! -- Bináris -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] versionHistories
Sorry, could you explain in more detail. I run my bots in Windows and I never had a problem with the actual release of version.py - Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2014 11:14 Betreff: Re: [Pywikipedia-l] versionHistories Actually pywikibot can't be ran at all and no one can imports pywikibot or version because of that bug in windows. Best On 4/5/14, i...@gno.de i...@gno.de wrote: Cannot follow. In which way does it fix the import error? xqt - Ursprüngliche Nachricht - Von: Amir Ladsgroup Gesendet: 05.04.2014 10:39 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] versionHistories I made a patch to fix it https://gerrit.wikimedia.org/r/121891 Review it please :) On 4/5/14, Bináris wikipo...@gmail.com wrote: What kind of configuration this mess wants me? As far as I know trunk never needed any configuration except user files. Tell me only one reason not to be angry. 2014-04-05 8:39 GMT+02:00 Bináris wikipo...@gmail.com: Next stage. It becomes more and more horroristic. I downloaded the latest compat from nightlies and unpacked. It is one third in size than that of 11 January. After unpacking version.py says: c:\Pywikipediaversion.py syntax error: line 1, column 0 Serious import error; pywikibot not available - was it configured? Traceback (most recent call last): File C:\Pywikipedia\version.py, line 20, in module pywikibot.output('Pywikibot: %s' % getversion()) AttributeError: 'module' object has no attribute 'output' version.py may have perhaps misunderstood something, I didn't want to configure anything, i just wanted to update my WORKING copy. Then I tried to restore the previous version but the result is the same, my Pywikibot does not work any more. I had a working version and tried to update it in a normal way before somebody cleverly asks me to do so, and I only have broken ruins. *I am totally fed up with this whole mess!* Give us back Pywikibot! -- Bináris -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] versionHistories
The monkey-patch for importing pywikibot directly instead of wikipedia was done in November 2012. It should run as expected. Do you have any Setting für PYWIKIBOT_DIR? The error sound like you have a wrong path to the Framework or a absolute path at your command line. Could you tell me your framework path and the whole command line invoking the script? Greetings xqt - Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2014 11:22 Betreff: Re: [Pywikipedia-l] versionHistories 2014-04-05 10:49 GMT+02:00 i...@gno.de: Did you change the frameworks path with your update? No, I just unpacked it to the same directorí with Total Commander. Should I have changed the path, I would still have a working copy... ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] versionHistories
I disagree: I haven't installed git at my Windows Server where the bot tasks are running and I haven't such a problem there. This import error does not have anything to do with the git installation but with the path to find the frameworks wikipedia.py file which is requested to be imported by pywikibot.__init__.py script. Please have a look at he traceback of that bug. Greetings xqt - Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2014 15:37 Betreff: Re: [Pywikipedia-l] versionHistories this problem happens when you don't install git and almost everybody hasn't installed it yet On Sat, Apr 5, 2014 at 5:46 PM, i...@gno.de wrote: The monkey-patch for importing pywikibot directly instead of wikipedia was done in November 2012. It should run as expected. Do you have any Setting für PYWIKIBOT_DIR? The error sound like you have a wrong path to the Framework or a absolute path at your command line. Could you tell me your framework path and the whole command line invoking the script? Greetings xqt - Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2014 11:22 Betreff: Re: [Pywikipedia-l] versionHistories 2014-04-05 10:49 GMT+02:00 i...@gno.de: Did you change the frameworks path with your update? No, I just unpacked it to the same directorí with Total Commander. Should I have changed the path, I would still have a working copy... ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] versionHistories
I can reproduce the error given by traceback if I use a wrong path to start a script. But I cannot reproduce the syntax error. This means the source might be corrupt and the object file cannot be created. This may cause the import error. Because version.py and pywikibot.__init__ gives a rigth traceback message I bet on the wikipedia.py. Seems it has illegal characters on the first line or something like this. Binariz: where did you downloaded the framework? I'll try to investigate into that matter. You may use the path setting for compat or core release but it may also be omitted. You also my use git or svn repository. I use it both: git for development, svn for the bot. The nightly dump is also available which works without these version control Systems but it is hard to use with local changes at the framework's scripts because you have to merge new code yourself. What does it mean back to the roots? Greetings xqt - Original Nachricht Von: John phoenixoverr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2014 17:50 Betreff: Re: [Pywikipedia-l] versionHistories Its not a path issue, compat doesnt use it, odds are someone fucked up the code, especially with the changes in the last two years or so where we moved away from what pywiki's origin. At the point where we require either git, or svn to be installed just begs for something to break. Instead of depending on the repo lets get back to our roots. On Sat, Apr 5, 2014 at 11:35 AM, Bináris wikipo...@gmail.com wrote: 2014-04-05 15:16 GMT+02:00 i...@gno.de: The monkey-patch for importing pywikibot directly instead of wikipedia was done in November 2012. It should run as expected. Do you have any Setting für PYWIKIBOT_DIR? I don't know about it. Should I have? I didn't have als for the prevoius version which worked. The error sound like you have a wrong path to the Framework or a absolute path at your command line. Could you tell me your framework path and the whole command line invoking the script? c:\Pywikipedia, since 2006 December. I open this directory in Total Commander, then start a command line directly from this dir, then I type the script name. ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] versionHistories
Thanks für these hints. I'll give some remarks soon. xqt - Original Nachricht Von: John phoenixoverr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2014 18:22 Betreff: Re: [Pywikipedia-l] versionHistories Writing a good solid code, that works. Doesnt hit the svn/git servers after every script invoke, doesnt create 10,000 different log files in the /logs folder by default. doesnt have a dozen dependencies for one or two bots, has a version control system that works cross platform without driving users crazy. I could go on but my basic point is to have a code base with minimal overhead, reliable code, and that doesnt break. On Sat, Apr 5, 2014 at 12:16 PM, i...@gno.de wrote: I can reproduce the error given by traceback if I use a wrong path to start a script. But I cannot reproduce the syntax error. This means the source might be corrupt and the object file cannot be created. This may cause the import error. Because version.py and pywikibot.__init__ gives a rigth traceback message I bet on the wikipedia.py. Seems it has illegal characters on the first line or something like this. Binariz: where did you downloaded the framework? I'll try to investigate into that matter. You may use the path setting for compat or core release but it may also be omitted. You also my use git or svn repository. I use it both: git for development, svn for the bot. The nightly dump is also available which works without these version control Systems but it is hard to use with local changes at the framework's scripts because you have to merge new code yourself. What does it mean back to the roots? Greetings xqt - Original Nachricht Von: John phoenixoverr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.04.2014 17:50 Betreff: Re: [Pywikipedia-l] versionHistories Its not a path issue, compat doesnt use it, odds are someone fucked up the code, especially with the changes in the last two years or so where we moved away from what pywiki's origin. At the point where we require either git, or svn to be installed just begs for something to break. Instead of depending on the repo lets get back to our roots. On Sat, Apr 5, 2014 at 11:35 AM, Bináris wikipo...@gmail.com wrote: 2014-04-05 15:16 GMT+02:00 i...@gno.de: The monkey-patch for importing pywikibot directly instead of wikipedia was done in November 2012. It should run as expected. Do you have any Setting für PYWIKIBOT_DIR? I don't know about it. Should I have? I didn't have als for the prevoius version which worked. The error sound like you have a wrong path to the Framework or a absolute path at your command line. Could you tell me your framework path and the whole command line invoking the script? c:\Pywikipedia, since 2006 December. I open this directory in Total Commander, then start a command line directly from this dir, then I type the script name. ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] mitmproxy: sniffing pywikibot traffic to debug network issues
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 16.01.2014 21:40 Betreff: [Pywikipedia-l] mitmproxy: sniffing pywikibot traffic to debug network issues Hello all, mainly co-developers, mitmproxy is a tool that allows you to sniff network traffic -- which is incredibly useful for debugging pywikibot network issues. Of course, there are other tools to do this (e.g. ethereal), but those are not usable anymore now that the WMF switched to HTTPS. In addition, mitmproxy allows you to /manipulate/ the traffic, which can be useful for tricking pywikibot into thinking there are network issues. This weekend, I finally got mitmproxy to work for pywikibot/core -- the version available in ubuntu did not correctly forge SSL certificates yet. For other interested developers, I put up a guide at https://www.mediawiki.org/wiki/Pywikibot/mitmproxy Unfortunately, the internet seems to suggest it doesn't work that well for Windows users. http://honeyproxy.org/ is supposed to be better, but I haven't tested it. Merlijn Would this help to investigate that bot hanging problem in core? xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Version numbers
Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 15.01.2014 13:47 Betreff: Re: [Pywikipedia-l] Version numbers The old version number HAD some meaning. It gave a sort order, some help where to put a script in my mind. This new system is only useful for computers. Well, we can live together with that, but if there is any chance to install some human readable version, I would appreciate it. I also wished a serial number in past and we discussed a patch for git in past [1][2] during review which would enable an additional number like id$. But unfortunately this would not have the same meanung as in svn before. I found serial numbers usefuff for annotate/blame the code and debugging purposes which then leaded directly to the svn CR page where the patch was submitted. But these patches given above did not give that result I wanted and has been abandoned then. SVN repository from github still comes with a serial number but this diverges form the git counter due to merging process I guess and the github server does not support custom revprops via log. So we have to have git as it is. Greetings xqt [1] https://gerrit.wikimedia.org/r/#/c/77555/ [2] https://gerrit.wikimedia.org/r/#/c/77554/ ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] mitmproxy: sniffing pywikibot traffic to debug network issues
- Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 17.01.2014 16:59 Betreff: Re: [Pywikipedia-l] mitmproxy: sniffing pywikibot traffic to debug network issues Would this help to investigate that bot hanging problem in core? xqt I think so, I'll start looking at the bug via this tool tomorrow -- Amir That would be great :) xt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Github SVN broken
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 12.01.2014 12:06 Betreff: Re: [Pywikipedia-l] Github SVN broken On 12 January 2014 05:03, Shantanoo shanta...@gmail.com wrote: One option to solve this is to have an externals svn repository, which has two svn:externals properties: pywikibot-compat http://github.com/wikimedia/pywikibot-compat pywikibot-compat/i18n http://github.com/wikimedia/pywikibot-i18n However, that requires finding that svn server, and maintaining the svn:externals properties when anything changes. If anyone wants that, feel free to set it up. For all bot operator who use tortoiseSVN there is a config file named .svnprops which can be imported. This sets the svn:externals properties given above and svn:ignore properties to ignore some files. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] pywikibot.extract_templates_and_params
Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 12.01.2014 01:06 Betreff: [Pywikipedia-l] pywikibot.extract_templates_and_params Whoever wrote this function is a big hero! I am just very glad with it and thanks a lot! -- Bináris There where many people involve but it is difficult to blame all contributors. The method as copied to textlib of rewrite branch 2008 and backported to textib of trunk release 2010 and got some code re-designs in the last years. Thank you all. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Unknown command git
I'm sorry you feel this way. No-one was very happy switching to git, but we did not have much of a choice -- svn.wikimedia.org would go down, no matter what. Of all the alternatives, switching to git/gerrit was the most reasonable one. Overall, I'm unhappy with the migration, as this was frustrating for developers and users alike, but I am also happy with some things - we have seen an influx of new developers, especially during the Google Code-In, and we now have a very nice integration between the bug tracker. I'm also really happy with the pre-commit code review, which (I think) improves pywikibot overall. Merlijn I aggree with Merlin. I was very unhappy with git, was frustrated, angry and hated that damned shit git and finally was going to give up developing furthermore. Then I found some ways to use git/gerrit system on my windows (which is a mix of tortoisegit and git bash) and it is ok for me now. And I do not want to miss these advantages of new developers, a better code review before committing it and at least it is much more easy to merge submitted patches compared with the old patch tracker system. Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Unknown command git
Hi John, Sorry, I do not know how I can help you with this statement. Neither on coding stuff nor on our workflow. Ok your are frustrated and angry on some issues. But what can we improve in your opinion? Greetings xqt - Original Nachricht Von: John phoenixoverr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 12.01.2014 01:30 Betreff: Re: [Pywikipedia-l] Unknown command git Seriously? you need to can the bullshit. I posted a patch and I got a response and code review of: I can't see why you're doing this, when can set protocol in so many other ways (which we did) Which is utter bullshit. Until I provided the patch there was a hole in the LinkSearch code, and it was broken Ill re-download core and prove that its a piece of shit still. Your response of Oh yes I know the code is horribly written and broken but I want that feature and I cant be bothered to fix it, is the reason I dont waste my time with a patch. This reminds me of what happened on en,wikipedia and visual editor, the WMF forced a broken product out regardless of the issues, It took a revolt and admins forcibly disabling the broken extension via common.js before they started to listen. I guess thats where this is headed. On Sat, Jan 11, 2014 at 7:11 PM, Merlijn van Deen valhall...@arctus.nlwrote: On 11 January 2014 23:28, John phoenixoverr...@gmail.com wrote: Given the support and feedback that I have received going back to the horribly broken addition by Trigon of a logging system Filling bugs is useless. Here is a quote from IRC earlier today: (...) Per valhallasw's request I did some profiling, They quoted a 0.37 seconds run-time to invoke interwiki.py -help I ran the same tests, both with a clean git checkout and my modified checkout. 0.389 seconds (mine) vs 1.257 that is a factor of 3 in regards to execution time (all I really did was remove the version checks on every script invoke) Besides the execution time it adds an additional ~500 hits per day to the git servers for my scheduled tasks. I still really don't get the issue with a second. Sure, it could be faster. Sure, it could be more efficient. Sure, we could save git.wikimedia.org some requests (but I have not had complaints from the WMF, so it's probably not an issue). But I really cannot be bothered spending my time to fix this for you. As I mentioned, you are more than welcome to submit a patch, but maybe not the one which you yourself described as [a] fix [that] has about as much chance of being accepted as a snowball in hell. I'm not opposed to caching, nor to adding a user-config option to remove version checking. I also got a nice lecture about toning my temper down, for calling out these rather significant bad ideas. I have kept a very cool head and my temper is a non-issue, I just call a spade a spade. I am, however, opposed to calling changes 'obnoxious fuckup's. Besides those issues, the decision to make the incomplete and broken rewrite into core and shelve the easier to use and more stable trunk into compat was an issue that wont get resolved. Ive tried several times to get it setup on windows and guess what? it works about as well as a square tire. I spent about 30 seconds and found 6 issues that make the branch unusable on windows. As Tom mentioned: have you created bugs for these? Because I have absolutely zero issues with core on windows, and I've been using it without any issues on linux for ages. I have lost count of the number of people who have come into irc://freenode/pywikipediabot asking for help setting up core and have been unable. Setting up compat? takes less than 5 instructions and I have yet to have someone unable to do it. On core? Ive had maybe 3 be able to do it. Well, then core clearly is better, with the one-liner 'pwb.py login'. But seriously, I have no clue what problems you encounter. Download python, download a nightly, run a bot. Nothing has changed in that respect. and then your code gets -2'ed because the reviewer has no clue about the changes being made and instead of asking just gives a comment that shows they are reviewing code that they know zero about. I sincerely doubt that. Having to use the gerrit patch uploader to even get things submitted is ugly as I got -2'ed for PEP8 spacing issues that where correct in my code, but between git and the patch uploader somehow got eaten. And again, please open a bug report, as this should not happen: https://github.com/valhallasw/gerrit-patch-uploader/issues Merlijn ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l
Re: [Pywikipedia-l] Unknown command git
Hi Bináris, the first bug due to git should be solved with Merlijns commits https://gerrit.wikimedia.org/r/107006 https://gerrit.wikimedia.org/r/107007 I've deeply reviewed that on windows PC. Sorry for that missspelling on my last message via smartphone. Greetings - Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 11.01.2014 11:39 Betreff: [Pywikipedia-l] Unknown command git Hi! Az last -- as SVN is totally broken -- I downloaded the latest nightly of compat. First problem: whatever script I try to run DOS (Windows command) writes me the thing in subject. I think I have nothing to do with this stuff called git at the moment and didn't say to Windows to run anything by this name. Why I am damned with these messages and how can I prevent them? At the moment I just want to use my bot. Second problem: version.py from latest nightly says: Pywikibot: wikipedia.py (r-1 (unknown), b1e1a57, 2014/01/01, 13:01:20, OUTDATED) Release version: 1.0b1 Why? Yes, I really AM very angry and frustrated with this whole mess and I wish we have never thrown away a well working system just for nothing. Once I used to be a developer of this framework, now I have troubles with making it run at all. I feel I have to build and learn everything again from scratch what I had built and learnt for years. Arghhhxcnmv^^?#@{?°~?^°~?^ -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Unknown command git
Binariz, I will send you a working release which I use an windows and svn when I am back at home thus weekend an I try to commit a working script a bit later after some improvements. Greetings xqt - Ursprüngliche Nachricht - Von: Bináris Gesendet: 11.01.2014 11:40 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Unknown command git Hi! Az last -- as SVN is totally broken -- I downloaded the latest nightly of compat. First problem: whatever script I try to run DOS (Windows command) writes me the thing in subject. I think I have nothing to do with this stuff called git at the moment and didn't say to Windows to run anything by this name. Why I am damned with these messages and how can I prevent them? At the moment I just want to use my bot. Second problem: version.py from latest nightly says: Pywikibot: wikipedia.py (r-1 (unknown), b1e1a57, 2014/01/01, 13:01:20, OUTDATED) Release version: 1.0b1 Why? Yes, I really AM very angry and frustrated with this whole mess and I wish we have never thrown away a well working system just for nothing. Once I used to be a developer of this framework, now I have troubles with making it run at all. I feel I have to build and learn everything again from scratch what I had built and learnt for years. Arghhhxcnmv^^ˇ#@{˘°~˘^°~˘^ -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Commonscat.py
Disambig behaviour has been changed on mw side. Thus it is strictly recommended to keep the bot up to date. Greetings xqt - Ursprüngliche Nachricht - Von: Bojan Kalkan Gesendet: 22.11.2013 13:47 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] Commonscat.py On 11/22/2013 1:27 PM, Amir Ladsgroup wrote: Are you using out-dated pwb? can you run version.py and give the output? because I fixed it (or I thought I fixed it) like a couple weeks ago Best On Fri, Nov 22, 2013 at 3:16 PM, Bojan Kalkan boki...@gmail.com wrote: This is output C:\pywikipediacommonscat.py -new -v Config.py WARNING: Running on Windows and transliteration_target is not set. Please see http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows - base_dir: C:\pywikipedia - done. 'git' is not recognized as an internal or external command, operable program or batch file. No handlers could be found for logger pywiki Pywikipediabot wikipedia.py (r-1 (unknown), c459615, 2013/08/31, 09:33:20, OUTDA TED) Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] API action:query rcprop: user|comment|timestamp|title|ids|loginfo|sizes rclimit: 60 rctype: new list: recentchanges rcnamespace: 0 rcshow: !redirect rcdir: older Requesting API query from wikipedia:sr Getting 60 pages from wikipedia:sr... WARNING: Family file wikipedia contains version number 1.22wmf12, but it should be 1.23wmf4 getting huge siprop magicwords... API action:query meta: siteinfo siprop: magicwords Requesting API query from wikipedia:sr Sleeping for 0.9 seconds, 2013-11-22 12:43:17 API action:query inprop: protection|subjectid rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: Medijaviki:Disambiguationspage rvlimit: 1 Requesting API query from wikipedia:sr Working on Zheljko Luchicj Getting information for site wikipedia:sr API action:query meta: userinfo uiprop: blockinfo|groups|rights|hasmsg|ratelimits|preferencestoken Requesting API query from wikipedia:sr API action:query titles: Zheljko Luchicj prop: langlinks Requesting API query from wikipedia:sr Working on Ivan Jovic API action:query titles: Ivan Jovic prop: langlinks Requesting API query from wikipedia:sr Working on Hotel kragujevac API action:query titles: Hotel kragujevac prop: langlinks Requesting API query from wikipedia:sr Working on Topkapi API action:query titles: Topkapi prop: langlinks Requesting API query from wikipedia:sr Working on Klada API action:query titles: Klada prop: langlinks Requesting API query from wikipedia:sr Working on Krajina (oblast) API action:query titles: Krajina (oblast) prop: langlinks Requesting API query from wikipedia:sr Working on KK Lukoil Akademik API action:query titles: KK Lukoil Akademik prop: langlinks Requesting API query from wikipedia:sr API action:query llcontinue: 838792|la titles: KK Lukoil Akademik prop: langlinks Requesting API query from wikipedia:sr API action:query inprop: protection|subjectid rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: Lukojl Akademik rvlimit: 1 Requesting API query from wikipedia:bg getting huge siprop magicwords... API action:query meta: siteinfo siprop: magicwords Requesting API query from wikipedia:bg API action:query inprop: protection|subjectid rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: MediyaUiki:Disambiguationspage rvlimit: 1 Requesting API query from wikipedia:bg Sleeping for 0.2 seconds, 2013-11-22 12:43:26 API action:query inprop: protection|subjectid rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: PBC Academic Sofia rvlimit: 1 Requesting API query from wikipedia:ca getting huge siprop magicwords... API action:query meta: siteinfo siprop: magicwords Requesting API query from wikipedia:ca API action:query inprop: protection|subjectid rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: MediaWiki:Disambiguationspage rvlimit: 1 Requesting API query from wikipedia:ca Sleeping for 0.4 seconds, 2013-11-22 12:43:28 API action:query inprop: protection|subjectid rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: Akademik Sofia (Basketball) rvlimit: 1 Requesting API query from wikipedia:de getting huge siprop magicwords... API action:query meta: siteinfo
Re: [Pywikipedia-l] Commonscat.py
Did you setup your user-config.py file? - Ursprüngliche Nachricht - Von: Bojan Kalkan Gesendet: 22.11.2013 22:39 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] Commonscat.py On 11/22/2013 1:57 PM, Amir Ladsgroup wrote: retry with downloading from https://tools.wmflabs.org/pywikibot It will work :) Best One problem is solved, but then appeared next C:\pywikipediacommonscat.py -new -cc WARNING: Running on Windows and transliteration_target is not set. Please see http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows cannot import name config Serious import error; pywikibot not available - was it configured? Traceback (most recent call last): File C:\pywikipedia\commonscat.py, line 68, in module import add_text File C:\pywikipedia\add_text.py, line 80, in module from pywikibot import config ImportError: cannot import name config ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] gerrit patch uploader
Hi Merlijn, I had that thought this morning at IRC with Strainu and we tried it successful. It is the same as in tortoisegit and I find it easy. Strainu will inform the GCI participants about that. Thanks. xqt - Ursprüngliche Nachricht - Von: Merlijn van Deen Gesendet: 21.11.2013 08:52 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] gerrit patch uploader Hi xqt, Yes, but it's not as easy as I would like it to be. The trick is to add the Change-Id line from the previous patchset commit message to the new commit message. So if you want to add a new patch to https://gerrit.wikimedia.org/r/#/c/96693/, fill in the patch uploader as usual, but add Change-Id: I0c31cd68dc372ed38f461e430c135350a1581828to the bottom of the commit message field. Hope this helps, Merlijn On 21 November 2013 08:21, i...@gno.de wrote: Hi Merlijn, is there any possibility to amend a commit to a given review via gerrit patch uploader? This may be important for our Google Code-In participants. Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Gerrit +2 voting rights for Strainu
+2 ;-) xqt - Ursprüngliche Nachricht - Von: Merlijn van Deen Gesendet: 21.11.2013 21:40 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Gerrit +2 voting rights for Strainu Hello all, Because Strainu is coordinating Google Code-In for pywikibot, I have given him +2 voting rights on our repositories. Merlijn ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[Pywikipedia-l] gerrit patch uploader
Hi Merlijn, is there any possibility to amend a commit to a given review via gerrit patch uploader? This may be important for our Google Code-In participants. Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] python styling (pep8/pyflakes)
# noqa works? I saw your last mail where you had doubts or I interpreted it in this way. Anyway, a lot of pyflakes reported messages are wrong and I would like to ignore these parts line by line if it is really wrong. - Ursprüngliche Nachricht - Von: Merlijn van Deen Gesendet: 03.11.2013 21:50 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes) Some of them (I think mainly the line breaking ones) can be ignored by adding # noqa to the end of the line. If we really need something more than that, we can look at a custom solution. What was the line that was giving you trouble? Merlijn On 3 November 2013 13:30, i...@gno.de wrote: Hi folks, is there any ability now to ignore pep8 or pyflake testing from a specific code line? Greetings xqt - Original Nachricht Von: Antoine Musso hashar+...@free.fr An: pywikipedia-l@lists.wikimedia.org Datum: 29.07.2013 21:41 Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes) Le 29/07/13 21:19, Merlijn van Deen a écrit : Hm, indeed. # noqa is only supported in v1.4.1+; # nopep8 was introduced in v1.4+, and thus is also not available in 1.3. Would it be possible to upgrade to a more recent version? Ubuntu Saucy has 1.4.5 available. Merlijn I apparently managed to backport pep8 1.4.5 from Saucy to Precise using the tutorial at: https://wikitech.wikimedia.org/wiki/Backport_packages I have installed the package on the instance and it seems to be running fine. I have filled https://bugzilla.wikimedia.org/52239 to record the log of the build and track the backporting itself. I will have to announce the upgrade ahead of time since it will introduce new failures that might makes some repos to suddenly fail their pep8 check. -- Antoine hashar Musso ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] python styling (pep8/pyflakes)
Hi folks, is there any ability now to ignore pep8 or pyflake testing from a specific code line? Greetings xqt - Original Nachricht Von: Antoine Musso hashar+...@free.fr An: pywikipedia-l@lists.wikimedia.org Datum: 29.07.2013 21:41 Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes) Le 29/07/13 21:19, Merlijn van Deen a écrit : Hm, indeed. # noqa is only supported in v1.4.1+; # nopep8 was introduced in v1.4+, and thus is also not available in 1.3. Would it be possible to upgrade to a more recent version? Ubuntu Saucy has 1.4.5 available. Merlijn I apparently managed to backport pep8 1.4.5 from Saucy to Precise using the tutorial at: https://wikitech.wikimedia.org/wiki/Backport_packages I have installed the package on the instance and it seems to be running fine. I have filled https://bugzilla.wikimedia.org/52239 to record the log of the build and track the backporting itself. I will have to announce the upgrade ahead of time since it will introduce new failures that might makes some repos to suddenly fail their pep8 check. -- Antoine hashar Musso ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Request to become an developer of Pyfisch
Hi Pyfisch, you are able to commit changes to gerrit review if you have a labs account. Otherwise you may use the new gerrit patch uploader (https://tools.wmflabs.org/gerrit-patch-uploader) Best xqt - Ursprüngliche Nachricht - Von: Pyfisch Gesendet: 02.11.2013 10:15 An: pywikipedia-l@lists.wikimedia.org Betreff: [Pywikipedia-l] Request to become an developer of Pyfisch Hello, I am reading this list for months and already provided a small patch for the Wikidata functions in core [1] and I requested to create the new listpages.py script. Additionally I am working on the PWB docs on mediawiki.org. With commit access I want mostly to fix bugs and improve the code in core branch. Regards Pyfisch ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Survey 2012 (Message still there)
I do not find any survey snipplets in code and I got no message about that in past. xqt - Original Nachricht Von: Dr. Trigon dr.tri...@surfeu.ch An: Pywikipedia-l@lists.wikimedia.org Datum: 26.10.2013 10:47 Betreff: [Pywikipedia-l] Survey 2012 (Message still there) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello All! Can somebody explain to me why the user-config.py variable suppresssurvey = True was removed but not the message? Now I get dozens of such messages... https://www.mediawiki.org/wiki/Manual:Pywikibot/Survey2012 Greetings DrTrigon -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJrgZIACgkQAXWvBxzBrDDvUQCfSJjVSyxQYhocx8Gh1Vf36D5e D3QAn1EVCMehPT3LweHqrdF7Co35WyWH =K4LW -END PGP SIGNATURE- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Survey 2012 (Message still there)
This depends unicode error which is still valid for older pythons and not the survey message. - Ursprüngliche Nachricht - Von: Dr. Trigon Gesendet: 26.10.2013 14:41 An: pywikipedia-l@lists.wikimedia.org Betreff: Re: [Pywikipedia-l] Survey 2012 (Message still there) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Im am talking of compat: $ git pull Already up-to-date. $ python version.py Pywikibot: [ssh] pywikibot/compat (r10376, 3887020, 2013/10/25, 23:03:54, ok) Release version: 1.0b1 Python: 2.7.5 (default, Oct 8 2013, 12:19:40) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] config-settings: use_api = True use_api_login = True unicode test: ok $ grep -i 3081100 * interwiki.py: pywikibot.unicode_error: # work-arround for bug #3081100 (do not remove affected pages) interwiki.py:u'\03{lightred}This may be false positive due to unicode bug #3081100\03{default}') version.py:print u'unicode test: triggers problem #3081100' wikipedia.py:# TEST for bug #3081100 wikipedia.py:\03{lightyellow}WARNING:\03{lightred} your python version might trigger issue #3081100\03{default} wikipedia.py:More information: See https://sourceforge.net/support/tracker.php?aid=3081100 wikipedia.py:# TEST for bug #3081100 wikipedia.py:print u'unicode test: triggers problem #3081100' So my version is up-to-date and grep clearly finds remnants of this old message...?!? Thanks and Greetings DrTrigon On 26.10.2013 11:16, Merlijn van Deen wrote: On 26 October 2013 10:47, Dr. Trigon dr.tri...@surfeu.ch mailto:dr.tri...@surfeu.ch wrote: Can somebody explain to me why the user-config.py variable suppresssurvey = True was removed but not the message? Now I get dozens of such messages... What is the output of version.py? Are you running core or compat? The config option *and* message were removed in r10734: https://www.mediawiki.org/wiki/Special:Code/pywikipedia/10734 and I also cannot find the message in my current compat checkout. Merlijn ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJruGoACgkQAXWvBxzBrDBFqACfWAotLetL8uY7xp4LnUl64C/2 NSMAoLq1CF9r6abju+zvph8NFzz1GRtP =FTDe -END PGP SIGNATURE- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] import module -- ImportError: No module named ...
Samat, where did you get your core bot? Did you download the nightly dump? Or did you fetch is from git or from github and if the last one as svn repository? xqt - Original Nachricht Von: Samat sama...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 19.10.2013 15:48 Betreff: Re: [Pywikipedia-l] import module -- ImportError: No module named ... Hi Strainu, Thanks for your answer! I have tried your advice, but it is still not perfect. c:\Program Files\pywikipediapython pwb.py pywikibot\login.py Traceback (most recent call last): File pwb.py, line 104, in module run_python_file(fn, args) File pwb.py, line 49, in run_python_file exec compile(source, filename, exec) in main_mod.__dict__ File pywikibot\login.py, line 15, in module import pywikibot File c:\Program Files\pywikipedia\pywikibot\__init__.py, line 308, in module from page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim File c:\Program Files\pywikipedia\pywikibot\page.py, line 16, in module import pywikibot.site File c:\Program Files\pywikipedia\pywikibot\site.py, line 33, in module from pywikibot.data import api File c:\Program Files\pywikipedia\pywikibot\data\api.py, line 13, in module from pywikibot.comms import http File c:\Program Files\pywikipedia\pywikibot\comms\http.py, line 30, in module from httplib2 import SSLHandshakeError ImportError: No module named httplib2 How should I do? :( Samat ps. to Bináris: you are right, old version was more (beginner) user friendly :) On Sat, Oct 19, 2013 at 3:29 PM, Strainu strain...@gmail.com wrote: The simplest way is to run pwb.py from the root of the framework. So, if you got the code in c:\pywikibot-core and pywikibot in c:\pywikibot-core\pywikibot, you'd have something like: c:\pywikibot-core python pwb.py pywikibot\login.py or, in general, c:\pywikibot-core python pwb.py c:\path\to\your\script.py as pwb.py solves all the path-related issues. You can also try to install pywikibot as a python library, with python setup.py install, but I'm not sure if and how this works on Windows. If the install is successful, you should be able to import pywikibot from anywhere. After each update from git, you need to install the script again. 2013/10/19 Samat sama...@gmail.com: Hi, I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded the code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of these. I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows As I want to run login.py, I get this message: Traceback (most recent call last): File C:\Program Files\pywikipedia\pywikibot\login.py, line 15, in module import pywikibot ImportError: No module named pywikibot I got similar error for other scripts: import module -- ImportError: No module named ... Could you please help me, how could I solve this problem? Thanks in advance. Best regards, Samat ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] import module -- ImportError: No module named ...
- Original Nachricht Von: Samat sama...@gmail.com An: i...@gno.de Datum: 20.10.2013 10:23 Betreff: Re: Re: [Pywikipedia-l] import module -- ImportError: No module named ... Dear xqt, I got my core bot from github using TortoiseSVN, it should have been the latest repository. I followed the instructions on https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation page, so I used h https://github.com/wikimedia/pywikibot-core/trunk ttps://github.com/wikimedia/pywikibot-core/trunkhttps://github.com/wikimedi a/pywikibot-core/trunk (In fact I checked out into a pywikipedia folder instead of /pywikibot-coreor /svn-core, but it shouldn't cause this (path?) problem.) Best, Samat I use TortoiseSVN too for my bot. You have to set external properties to the svn working copy to include all needed externals as follows: https://github.com/wikimedia/pywikibot-i18n/trunk scripts/i18n https://github.com/wikimedia/pywikibot-externals-httplib2/trunk externals/httplib2 (maybe I have to place the properties anywhere as file) You can do it manually by - right click onto the svn working copy - choose Properties (last item of the pull down menu) - click Subversion tab - click Properties button - click New... - Externals - click New... - set scripts/i18n for the Local path - set https://github.com/wikimedia/pywikibot-i18n/trunk; for URL - click OK - Again click New... for the next external - set externals/httplib2 for the Local path - set https://github.com/wikimedia/pywikibot-externals-httplib2/trunk; for URL - click OK to save - click OK to leave property edit - click OK to leave property Now make SVN update to retrieve the externals. For compat you need to include externals too as follows: ... (open properties, see above) - set i18n for the Local path - set https://github.com/wikimedia/pywikibot-i18n/trunk; for URL ... (save it, see above) Xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] [Pywikipedia-bugs] [Bug 55689] Replace.py errors
That's when a trunk user develops a script. :-) -save was invented by me, but I never used rewrite/core, and nobody felt like porting this feature to core. Sometimes this is vice versa from core to compat but I prefer keeping compat unchanged in this direction. It is impossible to keep both releases in synchron state and I propose using core for future things. Greetings xqt 2013/10/14 bugzilla-dae...@wikimedia.org https://bugzilla.wikimedia.org/show_bug.cgi?id=55689 --- Comment #3 from xqt i...@gno.de --- Sorry, -search option is quite right but -save option is available on compat version only (yet). -- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] BS and externals (again ;)
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 11.09.2013 20:11 Betreff: Re: [Pywikipedia-l] BS and externals (again ;) On 11 September 2013 19:17, Dr. Trigon dr.tri...@surfeu.ch wrote: Just a thought about that; might it be possible that we have a philosophy mismatch between win (xqt, ...) and linux (me, ...) users? Might it be possible that win users want to have everything included whereas linux useres are used to have independent packages with dependencies between them? If this is the problem, what about having averything included e.g. in the nightly release? I do have no idea about how nightly works and whether this is already the case? This release would then be 100MB but as used from python with batteries included. No. It's a mismatch between 'have everything needed for basic functionality in one package' versus 'it's OK if something has to be downloaded later'. Your packaging system is very useful for packages that are only needed for a few scripts, but I really don't understand why you so desperately want BeautifulSoup to *not* be included by default. It's needed for basic usage of bots and it's only 80KB (compared to almost 20M for the rest of the framework). Merlijn +1 This is exactly my opinion. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] BeautifulSoup4
On Mon, Sep 9, 2013 at 2:40 PM, i...@gno.de wrote: Hi Amir, I am against this breaking change and I do not see the advantage for that. The big advantage is after using this version there is no need to download and install more after downloading PWB compat and this is really helpful for people who are using servers in order to run bots (because they doesn't have admin rights to install beautifulsoup) and more than 100 projects are using this way so why not us? I agree with having BeautifulSoup as part of the framework (which was it til few months ago). It is a main part of the compat branch and no script will run without it. As suggested (see below) I would prefer the alternate bs3 i.e. BeautifulSoup.py eighter in topmost folder (as it was previously) or in the external folder. I do not see any advantage for bs4 and your renaming. I guess we will never have a compat release for python 3+. This is in my TODO list but not a big priority because nobody like python 3 I do not dislike py3+ but I do not like a lot of pywikbot branches because it is hard to work to keep them on the same level. core branch was started 6 years ago and it needs this time to be accepted by more and more bot owners. If we try to merge to py3+ we should do it with core imho Therefore we could have the BeautifulSoup.py in the topmost folder (as we had before some patching changes) or in the externals folder (as we have it while downloaded by its first use whicht is made by externals.__init__.py). We just need to set an amend for it, not a big deal. I'll do very soon Be aware there could be other scripts from bot owners using beautifulsoup directliy and not via pywikibot/wikipedia module. Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] BeautifulSoup4
I use this command and change every usage of BS (case in point https://gerrit.wikimedia.org/r/#/c/83372/4/reflinks.py) grep (?:from|import) BeautifulSoup ~/compat-git/*.py you can do it and see As I said on my last reply there could be other scripts from bot owners which use bs directly and not via wikipedia/pywikibot module. I suggest waiting for additional opinions before merging to the repo. Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] BeautifulSoup4
Hi Amir, I am against this breaking change and I do not see the advantage for that. I guess we will never have a compat release for python 3+. Therefore we could have the BeautifulSoup.py in the topmost folder (as we had before some patching changes) or in the externals folder (as we have it while downloaded by its first use whicht is made by externals.__init__.py). Greetings xqt - Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 08.09.2013 19:15 Betreff: [Pywikipedia-l] BeautifulSoup4 Hi everybody! I just set this patch: https://gerrit.wikimedia.org/r/83372 It's final resolution of BeautifulSoup problem. Out of some options, I chose maintaining by hand. Why? let's take a look at the options: 1- using BS4 as an external submodule directly from their version control system: unfortunately it's not possible because BS is using Bazaar So we can't make a an exact mirror beside of that the launchpad version is not stable and they have an stable release once a while 2-using BS4 as an external from git clones: the clones in GitHub are totally maintaining by hand and are out of date, (really out of date like updated two years ago) 3-Make people to download and install BS: there is no need to explain why this is not a good option 4-Copying from the stable release and maintaining by hand: We have to update this codes once a while but we are maintaining name of namespaces in Wikipedia projects by hand, so It won't bother me (as a dev) so much and it's more available and more easier for users I talked about this problem with some of BS devs: https://groups.google.com/forum/?fromgroups#!topic/beautifulsoup/AoV_ao9Hrvg Any suggestion, idea, anything! is welcome! Best -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Guide for migration from SVN to Git update
No, I know about that page but it's not useful. I know I must do a new checkout, but I'd use a guide on how to do so in the best way. How to list my files in the folder (there are so many...)? What will happen with files with local modifications (svn handles them very easily)? What changes in git compared to what you can/have to do with svn? For now I only tried making the checkout and then moving over all old files, but then I can't merge them because git thinks everything is up to date. I guess I can try doing the opposite, but it's so easy to waste hours and get terrible headaches with git that I know I'll be too lazy to do any update for months (until something breaks horribly) unless I have a guide. Thanks. Nemo +1 There is a problem with changes on the working copy which are not committed or stashed. Pulling the repo often fails with the following: C:\pwb\compatgit pull origin master -v --progress From https://gerrit.wikimedia.org/r/pywikibot/compat * branchmaster - FETCH_HEAD Updating f9f28e8..9fe0bc2 error: Your local changes to the following files would be overwritten by merge: externals/__init__.py Please, commit your changes or stash them before you can merge. Aborting svn merged it automatically if there where no conficts and if there where some conflicts I could easy solve it. Any ideas for that flow with git? xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Guide for migration from SVN to Git update
There is a problem with changes on the working copy which are not committed or stashed. Pulling the repo often fails with the following: C:\pwb\compatgit pull origin master -v --progress From https://gerrit.wikimedia.org/r/pywikibot/compat * branchmaster - FETCH_HEAD Updating f9f28e8..9fe0bc2 error: Your local changes to the following files would be overwritten by merge: externals/__init__.py Please, commit your changes or stash them before you can merge. Aborting svn merged it automatically if there where no conficts and if there where some conflicts I could easy solve it. Any ideas for that flow with git? Untested, but you could try: git stash git pull git stash pop Looks good to me. git stash pop unhides the changes and I again can easily see the modified files (with tortoisgit). Thanks xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Git error message
- Original Nachricht Von: Jeremy Baron jer...@tuxmachine.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.09.2013 18:57 Betreff: Re: [Pywikipedia-l] Git error message On Sep 5, 2013 12:44 PM, i...@gno.de wrote: Jeremy, I did some pushes which where done without any problems. Then I sometimes get that messages. I deleted the clones several times and started a new try over and over again. But I did not found the point. Really I am tired with that stuff. Could we get svn back please. so then maybe you don't have the hook installed at all. it must be reinstalled every time you reclone. Yes, I always did it after cloning git bash doesn't work with refs/for/master review because it seems to redirect it to refs/refs/for/master. Obmitting refs/ creates a new directory /for/master. I'ts very strange. Well I don't have Windows here and don't have much free time through the end of the weekend but I would love to dig into that more. You should bring these issues first to IRC when you encounter them; there's usually someone around to help. (I'll be back on Monday and feel free to highlight me then. (e.g. say 'jeremyb' in #pywikipediabot on freenode)) I played a bit with git and could push some changes after the following try: $ git pull origin master From ssh://gerrit.wikimedia.org:29418/pywikibot/compat * branch master - FETCH_HEAD Already up-to-date $ git pull --rebase There is no tracking information for the current branch. Please specify which branch you want to rebase against. See git-pull(1) for details git pull remote branch If you wish to set tracking information for this branch you do so with: git branch --set-upstream master origin/branch $ git push warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'upstream'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default upstream See 'git help config' and search for 'push.default' for further information. Counting objects: 10, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (7/7), 878 bytes, done. Total 7 (delta 3), reused 0 (delta 0) remote: Resolving deltas: 100% (3/3) remote: Processing changes: closed: 2, refs: 1, done To ssh://x...@gerrit.wikimedia.org:29418/pywikibot/compat f9f28e8..b1b0531 master - master # with this command the last push was merged without any review [1] # but afterwards I could push a new commit which I tried before without success: [2] tortoisegit git commit [ammend last commit] tortoisegit push master - refs/for/master Awaiting the next failure. Best regards xqt [1] https://gerrit.wikimedia.org/r/#/c/82256/ [2] https://gerrit.wikimedia.org/r/#/c/83068/ ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Git error message
- Original Nachricht Von: Chad Horohoe choro...@wikimedia.org An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.09.2013 17:58 Betreff: Re: [Pywikipedia-l] Git error message On Thu, Sep 5, 2013 at 8:52 AM, i...@gno.de wrote: I got the following git message while pushing but the commit-msg hook is already installed (before committing the change). Does anyone has an idea? git.exe push --progress origin master:refs/for/master Counting objects: 10, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (7/7), 871 bytes, done. Total 7 (delta 3), reused 0 (delta 0) remote: Resolving deltas: 100% (3/3) remote: Processing changes: refs: 1, done remote: ERROR: missing Change-Id in commit message footer remote: Suggestion for commit message: remote: Merge branch 'master' of ssh:// gerrit.wikimedia.org:29418/pywikibot/compat remote: remote: Change-Id: I5563ab61e3017eaeddd30ca270b9916d64f809cb remote: remote: Hint: To automatically insert Change-Id, install the hook: remote: scp -p -P 29418 x...@gerrit.wikimedia.org:hooks/commit-msg `git rev-parse --git-dir`/hooks/commit-msg remote: remote: To ssh://x...@gerrit.wikimedia.org:29418/pywikibot/compat ! [remote rejected] master - refs/for/master (missing Change-Id in commit message footer) error: failed to push some refs to 'ssh:// x...@gerrit.wikimedia.org:29418/pywikibot/compat' git did not exit cleanly (exit code 1) (2293 ms @ 05.09.2013 17:46:45) Greetings Offhand, my guess would be that the commit-msg hook isn't platform independent and is giving you problems on Windows. As a workaround, you can amend your latest commit on master (git commit -a --amend) and copy+paste that suggested Change-Id into the message. -Chad Chad, could you explain how to cp the Change-ID into the message? I am not familar with messaging the push command. Thanks a lot. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Git error message
- Original Nachricht Von: Chad Horohoe choro...@wikimedia.org An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.09.2013 18:18 Betreff: Re: [Pywikipedia-l] Git error message On Thu, Sep 5, 2013 at 9:16 AM, i...@gno.de wrote: - Original Nachricht Von: Chad Horohoe choro...@wikimedia.org An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.09.2013 17:58 Betreff: Re: [Pywikipedia-l] Git error message On Thu, Sep 5, 2013 at 8:52 AM, i...@gno.de wrote: I got the following git message while pushing but the commit-msg hook is already installed (before committing the change). Does anyone has an idea? git.exe push --progress origin master:refs/for/master Counting objects: 10, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (7/7), 871 bytes, done. Total 7 (delta 3), reused 0 (delta 0) remote: Resolving deltas: 100% (3/3) remote: Processing changes: refs: 1, done remote: ERROR: missing Change-Id in commit message footer remote: Suggestion for commit message: remote: Merge branch 'master' of ssh:// gerrit.wikimedia.org:29418/pywikibot/compat remote: remote: Change-Id: I5563ab61e3017eaeddd30ca270b9916d64f809cb remote: remote: Hint: To automatically insert Change-Id, install the hook: remote: scp -p -P 29418 x...@gerrit.wikimedia.org:hooks/commit-msg `git rev-parse --git-dir`/hooks/commit-msg remote: remote: To ssh://x...@gerrit.wikimedia.org:29418/pywikibot/compat ! [remote rejected] master - refs/for/master (missing Change-Id in commit message footer) error: failed to push some refs to 'ssh:// x...@gerrit.wikimedia.org:29418/pywikibot/compat' git did not exit cleanly (exit code 1) (2293 ms @ 05.09.2013 17:46:45) Greetings Offhand, my guess would be that the commit-msg hook isn't platform independent and is giving you problems on Windows. As a workaround, you can amend your latest commit on master (git commit -a --amend) and copy+paste that suggested Change-Id into the message. -Chad Chad, could you explain how to cp the Change-ID into the message? I am not familar with messaging the push command. Thanks a lot. So, in that error response to you it said: remote: Suggestion for commit message: [snip] remote: Change-Id: I5563ab61e3017eaeddd30ca270b9916d64f809cb That change-id is an acceptable unused one that you can use right away. So copy that, then amend your commit like I suggested (git commit -a --amend), paste the change-id in the footer. Then try pushing like you did (that part was correct :)) -Chad I did it in that way but got the same error. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] [Errored] wikimedia/pywikibot-core#114 (master - 5105954)
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 03.09.2013 09:53 Betreff: Re: [Pywikipedia-l] [Errored] wikimedia/pywikibot-core#114 (master - 5105954) Hi xqt, On 3 September 2013 01:36, i...@gno.de wrote: Could anyone explain this message please. I tried to push some changes on family files to core but it hanged until I aborted the pushing. I did not found these changes on Gerrit. How to proceed in that matter? This message is unrelated to the family files - it was caused by my commit ( https://github.com/wikimedia/pywikibot-core/commit/3e8885c3dd3fd50e57e3804d6 9cd2e29894f0780) which was +2ed by you. Before, it was jenkins-bot that was the author of merge commits -- apparently it's now the +2-er (which makes very little sense to me). Anyway - the mail should really have landed on *my* doorstep instead. I'll check with Ops to see if anything changed in the configuration. Merlijn This is strange to me because the travis message is related to a commit that I tried to push to core. Look at that changeset: https://github.com/wikimedia/pywikibot-core/compare/da3542c8738c...5105954bd6fd I see that diff on github but it is not places at core. Maybe the reason was that the push was hanging during transmission. Greetings xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Name of the project
Now he have a new old project name at bugzilla: https://bugzilla.wikimedia.org/show_bug.cgi?id=52692 xqt - Original Nachricht Von: Dr. Trigon dr.tri...@surfeu.ch An: pywikipedia-l@lists.wikimedia.org Datum: 31.08.2013 23:12 Betreff: Re: [Pywikipedia-l] Name of the project -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Basically I thend to +1 ... BUT had someone ever a look to [1]?? It is and was from beginning on just a redirect to [2]... so WHAT do you want to move here? What subpages? [1] https://www.mediawiki.org/wiki/PWB [2] https://www.mediawiki.org/wiki/Pywikipediabot I would tend and create redirects to the pages mentioned by xqt and then link their sources: * Python Wikipedia Robot Framework * Pywikipediabot * Pywikipedia * Pywikibot * pwb * not to forget wikibooks on [3] [3] https://en.wikibooks.org/wiki/Pywikibot Greetings On 31.08.2013 06:37, Amir Ladsgroup wrote: Hi, Name of this project is really confusing. sometimes we use pywikipedia, sometimes pywikibot, and sometimes more strange names like PyWikipediaBot: I think we have to move this page and all of the subpages to Pywikibot. As we used this name in the Git repository, new mailing lists, and so many other places https://www.mediawiki.org/wiki/PWB What do you think? Is there any objection or suggestion? Best -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIiXEQACgkQAXWvBxzBrDALWQCgziBMmdTPbCR6NQcMjjmIzNRQ gvMAoLfV7FxS3YutOka9qT/7ZRUbTyyA =XLyU -END PGP SIGNATURE- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Cruft in compat
logging should activated for those scripts listed in config.log list only. Isn't it? xqt - Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 31.08.2013 18:08 Betreff: Re: [Pywikipedia-l] Cruft in compat 2013/8/24 John phoenixoverr...@gmail.com Another point that is really frustrating is the logging system that complains about not having a logger defined if you run any custom scripts. So this is the reason! I didn't understand why I suddenly got those strange messages. I have a dream: someday we get back to schöne alte Zeiten when things just worked and there was no need to dissipate our energies for continous maintenance and following changes. And we can just USE the bot again. ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Code review in gerrit
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 10.08.2013 16:13 Betreff: Re: [Pywikipedia-l] Code review in gerrit On 2 August 2013 08:52, i...@gno.de wrote: Ok (or to bad). I am just for a tool stuff reminder for this part of code has still remaining bugs (fixme) and when it is solved mark it as solved. I assume we must use the bug tracker for that which is not very comfortable (at least of the last changes at sf ihmo). I think the basic workflow would be to fix those bugs before merging the code. Of course, it could be possible one would want to merge code that is not perfect yet, but keeping that in a bug I think would be better. In my experience the best part about the post-commit code review was getting comments on your work, which you then could fix - but now we can do this before even merging the code! :-) Merlijn Yes I aggree with pre-commit code review. But there also could be remaining bugs after the code was pushed and identified to that code. Anyway I've additional questions to that gerrit workflow: 1st: Is there any way to download these patches for review purposes and merge it to the working copy. It is very uncomfortable do do that by hand and in some cases it is necessary to test the code snippets and not only read it. 2nd: What is the meaning of the scorings verified vs. Code-Review Thanks xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Release number under git/gerrit
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 10.08.2013 16:21 Betreff: Re: [Pywikipedia-l] Release number under git/gerrit Hi xqt and dr. trigon, On 1 August 2013 13:33, i...@gno.de wrote: Hi folks, unfortunately the git Id numer is not a sequential release number as in svn but a hash. I find it a good idea to have a release number in the code as it was before git migration. A git statement generates it: git rev-list HEAD | wc -l which is the revision number. A better idea would be the gerrit number which gives us the last and actual change for that code. It is posible to merge such a number to the __version__ header of the script instead or in addition to the hash? Although this is possible, I'm not sure what we gain by doing this - is the problem the length of the hash? Or do you want a number that increases? If so - why? I see it can be useful to quickly determine how old someone's version is, but we can add logic to version.py to do that (e.g. including date). In my experience, it was never very useful to see who touched a file for the last time - and it's quickly available using git log filename (although this might be harder on windows?) Merlijn The has is unwieldy and in past there where a lot of cases like ... it worked with release 3815 but it failed after 4711. Unfortunately the repository log only shows the hash and not any chronological number. I believe I still perserve in the old svn workflow and I probably have to rethink these things. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Code review in gerrit
- Original Nachricht Von: Merlijn van Deen valhall...@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 11.08.2013 12:51 Betreff: Re: [Pywikipedia-l] Code review in gerrit On 11 August 2013 12:48, Merlijn van Deen valhall...@arctus.nl wrote: I'm not really sure though how you can do this under windows easily, as tortoisegit doesn't seem to have any git-review capabilities... http://wiki.typo3.org/Contribution_Walkthrough_with_TortoiseGit seems to be a guide that explains how to do gerrit with TortoiseGit. Thanks a lot for this hint, Merlijn. I had really given up to contribute any patches to the new repository. Now can I use tortoisegit for windows and I do not need to have git-review installed which fails while missing distutils package and some other problems occured while trying to connect gerrit. Anyway I will write a small HOWTO. Best xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[Pywikipedia-l] git migration
It seems SVN is not closed for submitting and i18n-bot does not push to git [1] [1] http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11781 Best xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Setup of pywikipedia for private mediawiki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Are you using the SVN or the GIT version? Since 26. July you should use the GIT versions, please confer [1]. [1] http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Gerrit I don't think that this causes any difference and btw it must not. But you are right to ask for the actual release running. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Question about externals and patches
- Original Nachricht Von: Dr. Trigon dr.tri...@surfeu.ch An: pywikipedia-l@lists.wikimedia.org Datum: 01.08.2013 11:03 Betreff: Re: [Pywikipedia-l] Question about externals and patches -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01.08.2013 05:37, i...@gno.de wrote: There is a remaining bug. Try the following e.g. from idle: import Wikipedia you are asked to install patch.exe. If you decline this request you are asked a second time. If declined a second time the script raises a fatal error while importing beautifullsoup. Beautifullsoup is a central part if the screen scraping compat framework and we should not prohibit using the framework for a cosmetic patch. Please give us back that part as e.g. externals or a library script. Anyway it is not a good idea to ask for installation (twice) and fall into a fatal error if you answer is NO. There should be alternatives to patching the working copy (e.g. nightly dump etc.) Thank you very much for this info! I will look at this as soon as possible! The question is how to handle the case you descibed? This questions have to be regarded as final part of the install/setup process (checkout, clone or download), so how to handle a sequence of N(o) answers? In fact this means that the user does not want to finish the install/setup process - this is somehow a paradox... Shall I simply output a message: Install process could not be finished, framework NOT ready for use! Please contribute your ideas! externals/__init__.py is supposed to help us, not to bother us... :) By the way the concept is not new, is was inspired by how VisTrails does this. Thanks and Greetings DrTrigon I don't like any installation process including rewrite branch/core and I am using pwb.py to have a directory based environment. Maybe for some reasons a installation is necessary but it should be very rare! There is no reason for patching beautifullsoup because we could either use the external library (as something like external) as it is or include it to the framework as it was previously. This is a central library for the compat branch and you cannot run it whithout that stuff. Missing this library stops running the whole framework if some users did not want to install any .exe file. Other patches only depends few scripts or not even a script is affected. And please check whether a patch is necessary for other parts too and keep the code simple. I guess there could be other ways which have the same effect without running any .exe file which some people don't like to. E.g. for music21, pydmtx, zbar I don't understand why a patch is required (and for what scripts they are needed at all). best xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Question about externals and patches
As we discussed several times some bot operators do not like having .exe files executed without explicit permission to do it. In my opinion it is not a good solution blocking the bot now if the permission is denied because the bot worked 10 years ago without this permission and patching beautifullsoup. That library was included to our code since the first steps of pwb. Where are the problems to include them or what are the licenses problems? Maybe you are right and we did wrong in past. And what are the special necessity for that patch? Externals can be included without running patch.exe. But I do not understand them. I understood that patch as a sample for that technoloy which should be used when needed. Now I only see the exception raising while starting any script of the framework (which was few days ago and not some months behind. Sorry I am not up to day while testing ;) Ok this behaviour seems a good way to let the trunk/compat branch die in honest. In this respect I am with you :D Best xqt - Original Nachricht Von: Dr. Trigon dr.tri...@surfeu.ch An: pywikipedia-l@lists.wikimedia.org Datum: 01.08.2013 13:29 Betreff: Re: [Pywikipedia-l] Question about externals and patches -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I don't like any installation process including rewrite branch/core and I am using pwb.py to have a directory based environment. Maybe for some reasons a installation is necessary but it should be very rare! There is no reason for patching beautifullsoup because we could either use the external library (as something like external) as it is or include it to the framework as it was previously. This is a central library for the compat branch and you cannot run it whithout that stuff. Missing this library stops running the whole framework if some users did not want to install any .exe file. Other patches only depends few scripts or not even a script is affected. I don't like installation either!! This is not about installing the framework itself, but the dependencies needed! That's a big difference! Nobody forces you to use the externals/__init__.py you CAN do this all manually. But I for my part am very unhappy, if I have to install several packages and search them on the web, find the correct version, try to compile it and all the stuff - just to TEST, whether this pywikipedia framework could be useful to me. It is a good thing if it is able to do this by itself - still if you do it by yourself in advance there is no need for externals to jump in. That's supposed to be more beginner-friendly (it is a one-time help to start using the framework). It is a bad idea to include code like beautifulsoup.py from another source. That makes confusion (who has written the code originally), is problematic with licenses and gives issues with merging new versions. (cosmetic changes were applied to our version and so it was not clear anymore how to merge this with the one upstream) - so we should NOT include other code into our repos! AND on linux systems there is beautifulsoup already included into the distro repo - so it makes no sense to include it with pywikipedia. (similarly for simplejson, setuptools, httplib2, ...) And please check whether a patch is necessary for other parts too and keep the code simple. I guess there could be other ways which have the same effect without running any .exe file which some people don't like to. E.g. for music21, pydmtx, zbar I don't understand why a patch is required (and for what scripts they are needed at all). In fact we discussed about all the stuff already in the past [1] (May 2013 till now - search for 'externals' and 'patch') where I explained all that in detail. (I kept it as simple as possible - I explained already several options - The patches are reduced to a minimum - Forking those packages just creates additional workload - Some of those packages are huge - ...) [1] http://lists.wikimedia.org/pipermail/pywikipedia-l/ I already mentioned - several times - if you have a better solution (I searched one for months now!) then PLEASE tell me! I do not know any other solution to include all my code and scripts here! If you want me to remove them again, fine - I will do this - but it would have been nice to tell me this before I invested weeks of coding into that stuff! And as you should have been seeing e.g. in the migration to git submodules - externals/__init__.py was in fact an easy, simple and fast solution to work-a-round that stuff. Although we migrated to git, it is still as bad as svn - regarding externals or submodules neither (svn, git) has a good solution! But PLEASE tell me a better one if you know it!! One last way out that I can think of is, we make it non-automatic; we could do it together with the creation of user-config.py as one explicit step the user has to do manually in the beginning (instead of jumping in
Re: [Pywikipedia-l] Setup of pywikipedia for private mediawiki
Could you please five us the full traceback and your python release. xqt - Ursprüngliche Nachricht - Von: Adam Waldstein Gesendet: 01.08.2013 02:20 An: pywikipedia-l@lists.wikimedia.org Betreff: Re: [Pywikipedia-l] Setup of pywikipedia for private mediawiki I am also trying to create a family but get a different error. It comes up with: Traceback (most recent call last): File generate_family_file.py, line 22, in ? from urlparse import urlparse, urljoin, ParseResult I don't know what is wrong with line 22. I tried the trick you suggested above of removing the user-config file first, but it still comes up with the same error. Any suggestions would be more then appreciated. Adam ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] [Rewrite] Cannot download http://gl.wiktionary.org/wiki/̰̳̰̰̽̿͂
Sounds there is an illegal character in the page name. Could you try to normalize the page name e.g. search for it at gl-wikt and fetch the displayed title by hand. xqt - Ursprüngliche Nachricht - Von: Adrián Chaves Fernández Gesendet: 28.07.2013 09:30 An: Bináris Cc: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l][Rewrite] Cannot download http://gl.wiktionary.org/wiki/̰̳̰̰̽̿͂ Thanks for the suggestion. I get the same result, though. I should probably mention that it works with asian characters, and that I’m running this on an utf8-enabled GNU/Linux terminal. O Domingo, 28 de Xullo de 2013 09:11:14 Bináris escribiu: Just a try: what happens for pywikibot.output(page.get()) instead of print? 2013/7/28 Adrián Chaves Fernández adriyeticha...@gmail.com I have written the following script: # -*- coding: utf-8 -*- import pywikibot site = pywikibot.Site(gl, wiktionary) page = pywikibot.Page(site, ṵ̳̰̰̽̿͂) print page.get() It fails with the following output: [gallaecio@afonso fontes]$ python2 test.py Traceback (most recent call last): File test.py, line 7, in module print page.get() File /usr/lib/python2.7/site-packages/pywikibot/__init__.py, line 249, in wrapper return method(*__args, **__kw) File /usr/lib/python2.7/site-packages/pywikibot/__init__.py, line 249, in wrapper return method(*__args, **__kw) File /usr/lib/python2.7/site-packages/pywikibot/page.py, line 278, in get self._getInternals(sysop) File /usr/lib/python2.7/site-packages/pywikibot/page.py, line 302, in _getInternals self.site.loadrevisions(self, getText=True, sysop=sysop) File /usr/lib/python2.7/site-packages/pywikibot/page.py, line 96, in site return self._link.site File /usr/lib/python2.7/site-packages/pywikibot/page.py, line 3080, in site self.parse() File /usr/lib/python2.7/site-packages/pywikibot/page.py, line 3037, in parse ucontains illegal char(s) '%s' % m.group(0)) pywikibot.exceptions.InvalidTitle: contains illegal char(s) '̰' ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Question about externals and patches
There is a remaining bug. Try the following e.g. from idle: import Wikipedia you are asked to install patch.exe. If you decline this request you are asked a second time. If declined a second time the script raises a fatal error while importing beautifullsoup. Beautifullsoup is a central part if the screen scraping compat framework and we should not prohibit using the framework for a cosmetic patch. Please give us back that part as e.g. externals or a library script. Anyway it is not a good idea to ask for installation (twice) and fall into a fatal error if you answer is NO. There should be alternatives to patching the working copy (e.g. nightly dump etc.) Greetings xqt - Ursprüngliche Nachricht - Von: Dr. Trigon Gesendet: 03.07.2013 20:14 An: pywikipedia-l@lists.wikimedia.org Betreff: Re: [Pywikipedia-l] Question about externals and patches -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello to all (again)! Quit some time has elapsed since my first mail. Today I tested successfully 'patch.exe' [1] in win and in linux wine. This is another one than mentioned before, but/and as I can see works quite well even with LF (unix-style) line endings. [1] http://gnuwin32.sourceforge.net/packages/patch.htm Since I will commit these changes now the time has come to test it on other machines also. After that was successful too I will remove BeautifulSoup.py from externals because it will be downloaded and patched automatically. In order to test this on your windows machine you can e.g.: 1.) create a directory, e.g. '[...]/Desktop/patch-test' 2.) download and extract 'patch.exe' from http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-bin.zip to this directory 3.) download and extract 'BeautifulSoup.py' from https://pypi.python.org/packages/source/B/BeautifulSoup/BeautifulSoup-3.2.0.tar.gz to this directory 4.) download the patch 'patch-BeautifulSoup' from http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/externals/patch-BeautifulSoup?view=co to this directory 5.) open 'cmd', cd to '[...]/Desktop/patch-test' and enter patch.exe - -p0 -d [...]/Desktop/patch-test/ -i [...]/Desktop/patch-test/patch-BeautifulSoup --binary 6.) check the output for error messages and compare the resulting 'BeautifulSoup.py' to the one in your pywikipedia/externals directory, they should be exactly the same! IF NOT AND/OR ERRORS OCCURED PLEASE REPORT THIS TO ME! Thanks a lot to everybody helping and Greetings DrTrigon On 25.05.2013 11:40, Dr. Trigon wrote: Hello all! Following issue: I am up re-organizing the whole externals part in trunk as you might have recognized already. In fact this is done now with the single exception of a generic patching system, e.g. needed for BeautifulSoup.py. (As usual) this is no problem under linux, but becomes a major issue under win. The mechanism I want to use is the well known diff-patch duo. Therefore a patch executable/binary (OR python script) is needed (for every OS). While this is kind of built-in in linux, win needs extra-attention. This is what I found so far: * http://sourceforge.net/projects/unxutils/ The executables do only depend on the Microsoft C-runtime (msvcrt.dll) and not on an emulation layer like that provided by Cygwin tools - windows ONLY not multi OS * http://python-patch.googlecode.com/svn/trunk/patch.py Python script therefore multi OS - but does not support the full diff-patch command set e.g. cannot create new files * https://code.google.com/p/google-diff-match-patch/ Not a command-line tool like patch but a python library/module. Multi OS. So I am stuck here and need some further knowledge, experience and personal preferences from your side in order to make a good decicion. In my opinion we should also keep further os (than just linux, mac, win) in our mind, becuase they are very close to what we already have too. Thanks for any help and Greetings DrTrigon ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlHUacQACgkQAXWvBxzBrDCwOACgst3qYcS1YTqZvUvtmy8+2TOD jVkAnjBYVcMCNLSY5zBBFVG7LGg9pTDD =fDqI -END PGP SIGNATURE- ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[Pywikipedia-l] Code review in gerrit
Hi folks, is there any posibility reviewing code _after_ it has been merged as it was before we went to git/gerrit like the mw cr special page. Or us the bug tracker the only remaining way to do it? Greetings xqt___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Additional parameter in a replace function
- Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 21.07.2013 18:14 Betreff: [Pywikipedia-l] Additional parameter in a replace function Hi, I use functions in my fixes.py as written in https://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/Fixes_and_functio ns_HOWTO . Now, my idea is to use an additional parameter. (In case nobody breaks the framework. :-)) So my fix has something like this in replacements: (ur'someregex', MyFunc), Then MyFunc takes the match object as a parameter and is executed. I have to write def MyFunc(match): etc. Now I want to write def MyFunc(match, mode), but I can't pass mode to MyFunc anyway. I guessed the line in question is #195 in textlib.py: replacement = new(match) Here I stopped. How could I pass additional optional parameters? Just an idea, I haven't investigated in it but you could try it out: you may use a class instance inside fixes.py and pass the option through the constructor. Your MyFunc should be an instance method. e.g. class myClass(object): def __init__(self, option): self.option = option def myFunc(self, match): result = u'' # change the result depending of match and self.option # ... return result thisClass = myClass(option='submit anything as option') and play with replacements using thisClass.myFunc Best xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] GIT Migration
- Original Nachricht Von: Dr. Trigon dr.tri...@surfeu.ch An: pywikipedia-l@lists.wikimedia.org Datum: 22.07.2013 15:26 Betreff: Re: [Pywikipedia-l] GIT Migration -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Have you asked and admin (e.g. petan, Ryan_Lane, Damianz, ...) on #wikimedia-labs or suma...@wikimedia.org ? Yes I asked Ryan for help after a hint from malafaya on mw's conversion page. xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] GIT Migration
- Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 22.07.2013 15:57 Betreff: Re: [Pywikipedia-l] GIT Migration the only one left in +2 group is dear xqt and Ryan Lane told me that he would sort out xqt issue today but he is in different timezone so we have to wait a while. Great! Thanks for all! xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] GIT Migration
Hi Jan, if you are familar with tortoiseSVN you may have a look to tortoiseGit [1]. Greetings xqt [1] http://code.google.com/p/tortoisegit/wiki/Download?tm=2 - Original Nachricht Von: Jan Dudík jan.du...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 20.07.2013 21:02 Betreff: Re: [Pywikipedia-l] GIT Migration I'm missing info how to update bot after 26th on windows. Now is there link to tortoiseSVN, which works fine witk SVN, but no link to programm for updating from GIT. JAnD 2013/7/17 Amir Ladsgroup ladsgr...@gmail.com: maybe the manual that I wrote is wrong, can you check this? http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Installation#Download_Py Wikipedia_with_Git Best On 7/18/13, Amir Ladsgroup ladsgr...@gmail.com wrote: I forwarded to you because I thought (and I still think) problem is GIT because when people download and run codes via SVN, codecs work correctly but when you clone it via git something goes wrong maybe some of submodules don't download during the colonization On 7/18/13, Chad Horohoe choro...@wikimedia.org wrote: On Wed, Jul 17, 2013 at 2:27 PM, Amir Ladsgroup ladsgr...@gmail.com wrote: On 7/18/13, Strainu strain...@gmail.com wrote: 2013/7/18 Chad Horohoe choro...@wikimedia.org: On Wed, Jul 17, 2013 at 2:07 PM, Strainu strain...@gmail.com wrote: Yes, it's working. I should mention I used the github mirror, for some reason I can't seem to finish the cloning from gerrit. This should be better now. The pywikibot/compat repository was taking up approximately 14GB!! on disk. After doing some compression and garbage collection I got things down to 192MB. Things should be much faster now for this. OK, that explains it :) Have you had a chance to look on the problem with the pywikibot/core branch (or is it another Chad that Amir was talking about)? I forwarded your e-mail to this Chad but he didn't answer yet. I don't know why. Have you received my e-mail, Chad? I did, I just didn't have a good answer. I don't know python well and don't really know what's going on there. Git is working just fine--maybe your resulting code isn't ending up where you think it is? -Chad -- Amir -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Script halted, textlib.py?
Hi Binaris, I was investigating in that issue again and found a wrong order for the re.escape() sequence. This caused some errors in past with blanks and underlines in the section headers. I fixed it in r11755/r11756. Could you please validate it for your script. Thanks and sorry for trouble xqt - Original Nachricht Von: Bináris wikipo...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 06.07.2013 00:16 Betreff: [Pywikipedia-l] Script halted, textlib.py? Hi, this is a message from the server running masvita.py. The only change in code since the last successful run is here: http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:BinBot/masvita.py; diff=prevoldid=13723804 This is also the source of my script. The error message is below and it mentions textlib.py at the end. Has anything changed? I can't imagine how my above modification in the quoted text could cause the crash. -- Forwarded message -- From: Cron Daemon r...@tron.wmm.hu Date: 2013/7/2 Subject: Cron binaris@tron bash weekofmonth 1 python pywikipedia/masvita.py /dev/null To: wikiposta+t...@gmail.com No handlers could be found for logger pywiki NOTE: You have new messages on wikipedia:hu Getting references to [[Sablon:Másvita]] via API... Reading section info from [[Wikipédia:Kocsmafal (egyéb)/Archív53]] via API... A pywikipedia/masvita.py 09:02-kor megszakadt. A feldolgozás során mentési hiba nem történt. Email sent. Traceback (most recent call last): File pywikipedia/masvita.py, line 279, in module main() File pywikipedia/masvita.py, line 273, in main bot.run() File pywikipedia/masvita.py, line 208, in run comment += self.commenttext(self.found(archtitle), False) File pywikipedia/masvita.py, line 134, in found section.get() File /home/binaris/pywikipedia/wikipedia.py, line 741, in get expandtemplates = expandtemplates) File /home/binaris/pywikipedia/wikipedia.py, line 881, in _getEditPage not does_text_contain_section(pagetext, self.section()): File /home/binaris/pywikipedia/pywikibot/textlib.py, line 1078, in does_text_contain_section m = re.search(=+[ ']*%s[ ']*=+ % section, pagetext) File /usr/lib/python2.7/re.py, line 142, in search return _compile(pattern, flags).search(string) File /usr/lib/python2.7/re.py, line 244, in _compile raise error, v # invalid expression sre_constants.error: multiple repeat -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Patch.exe, what sort of message is this?
As shown in you version.py your working copy is outdated. You need r11719 or newer which solves the outboundlocalerror. Greetings Xqt - Ursprüngliche Nachricht - Von: Bináris Gesendet: 09.07.2013 00:09 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] Patch.exe, what sort of message is this? I forgot the detailes: c:\Pywikipediareplace.py -search WARNING: Download package patch.exe from http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7 -bin.zip WARNING: Size of download: 126248 byte(s) WARNING: MIME type: ['application', 'x-zip-compressed'] WARNING: Extract package patch.exe to C:\Pywikipedia\externals\patch.exe. Traceback (most recent call last): File C:\Pywikipedia\replace.py, line 171, in module import wikipedia as pywikibot File C:\Pywikipedia\wikipedia.py, line 149, in module import externals # allow imports from externals File C:\Pywikipedia\externals\__init__.py, line 387, in module check_setup('patch.exe') File C:\Pywikipedia\externals\__init__.py, line 372, in check_setup if download_install(modules_needed[m][1], m, path): File C:\Pywikipedia\externals\__init__.py, line 315, in download_install arch.extractall(os.path.join(path, '__setup_tmp/')) UnboundLocalError: local variable 'arch' referenced before assignment Output of version.py: c:\Pywikipediaversion.py WARNING: Download package patch.exe from http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7 -bin.zip WARNING: Size of download: 126248 byte(s) WARNING: MIME type: ['application', 'x-zip-compressed'] WARNING: Extract package patch.exe to C:\Pywikipedia\externals\patch.exe. local variable 'arch' referenced before assignment Serious import error; pywikibot not available - was it configured? Pywikipedia trunk/pywikipedia/ (r11712, 2013/07/05, 01:17:44, OUTDATED) Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] config-settings: use_api = True use_api_login = True unicode test: ok ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Script halted, textlib.py?
Hi Binaris, I did it. I removed re.compile() from the textlib method because it never found any section with unicode chars. I'll try to examine this weekend. Regards Xqt - Ursprüngliche Nachricht - Von: Bináris Gesendet: 06.07.2013 00:17 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Script halted, textlib.py? Hi, this is a message from the server running masvita.py. The only change in code since the last successful run is here: http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:BinBot/masvita.pydiff=prevoldid=13723804 This is also the source of my script. The error message is below and it mentions textlib.py at the end. Has anything changed? I can't imagine how my above modification in the quoted text could cause the crash. -- Forwarded message -- From: Cron Daemon r...@tron.wmm.hu Date: 2013/7/2 Subject: Cron binaris@tron bash weekofmonth 1 python pywikipedia/masvita.py /dev/null To: wikiposta+t...@gmail.com No handlers could be found for logger pywiki NOTE: You have new messages on wikipedia:hu Getting references to [[Sablon:Másvita]] via API... Reading section info from [[Wikipédia:Kocsmafal (egyéb)/Archív53]] via API... A pywikipedia/masvita.py 09:02-kor megszakadt. A feldolgozás során mentési hiba nem történt. Email sent. Traceback (most recent call last): File pywikipedia/masvita.py, line 279, in module main() File pywikipedia/masvita.py, line 273, in main bot.run() File pywikipedia/masvita.py, line 208, in run comment += self.commenttext(self.found(archtitle), False) File pywikipedia/masvita.py, line 134, in found section.get() File /home/binaris/pywikipedia/wikipedia.py, line 741, in get expandtemplates = expandtemplates) File /home/binaris/pywikipedia/wikipedia.py, line 881, in _getEditPage not does_text_contain_section(pagetext, self.section()): File /home/binaris/pywikipedia/pywikibot/textlib.py, line 1078, in does_text_contain_section m = re.search(=+[ ']*%s[ ']*=+ % section, pagetext) File /usr/lib/python2.7/re.py, line 142, in search return _compile(pattern, flags).search(string) File /usr/lib/python2.7/re.py, line 244, in _compile raise error, v # invalid expression sre_constants.error: multiple repeat -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Running Pywikipedia (rewrite) bots on Tools Labs
Great. Shouldn't it be placed at mw:pywikipediabot as a subpage? Regards xqt - Original Nachricht Von: Russell Blau russb...@imapmail.org An: toolserve...@lists.wikimedia.org, lab...@lists.wikimedia.org, pywikipedia-l@lists.wikimedia.org Datum: 16.05.2013 20:14 Betreff: [Pywikipedia-l] Running Pywikipedia (rewrite) bots on Tools Labs For any users interested in migrating Pywikipedia-based bots from the Toolserver to the new Labs platform, or just interested in using Labs to run bots, I've written a page[1] describing the steps I took to get my bots running under the rewrite branch. If someone who uses trunk has gotten their bot(s) running on Labs, feel free to add instructions for that process, too. [1] https://wikitech.wikimedia.org/wiki/User:Russell_Blau/Using_pywikibot_on_Lab s -- Russell Blau russb...@imapmail.org ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights
This behaviour was not changed in past. Maybe the corresponding deletion tag has been changed. At which wiki are you working whith it? xqt - Original Nachricht Von: Marco Aurelio maure...@gmx.es An: Lista pywikibot pywikipedia-l@lists.wikimedia.org Datum: 10.05.2013 19:36 Betreff: [Pywikipedia-l] redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights Hi, I run my bot in some projects where I do handle broken/double redirects repairs. IIRC in the past the redirect.py script did tagged for deletion the broken redirects if the bot didn't had sysop rights (or a sysop was not in the 'sysopnames' var in user_config). Why was this functionality removed? Did it gave problems? - I would be interested in having it back. I even remember having translated some messages in translatewiki.net for that. Thank you, -M. ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score
This sort of html like tags are already implemented.Just use 'score' in the exception list. greeting xqt - Ursprüngliche Nachricht - Von: legoktm Gesendet: 24.04.2013 12:54 An: WikiMedia Mailing Lists Betreff: Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score I'm guessing this was intended for the Pywikipedia-l list? :) -- Legoktm On Wed, Apr 24, 2013 at 1:38 AM, Bináris wikipo...@gmail.com wrote: Hi, score blahblah /score or score foo bar ... /score is introduces for music notes as written below. See also http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:Grin/lilypondaction=edit for live use. Anyone to add a new exceptcion to textlib? Not a big deal, I am just far from my own computer now where I could solve it. It should be handled in the way as syntaxhighlight in line 121 here: http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/pywikibot/textlib.py?view=markuppathrev=11442 -- Forwarded message -- From: MZMcBride z...@mzmcbride.com Date: 2013/4/23 Subject: [Wikitech-l] Bug 189: Add a music wikimodule resolved/fixed To: Wikimedia developers wikitec...@lists.wikimedia.org Hi. https://bugzilla.wikimedia.org/show_bug.cgi?id=189 Congrats to all involved in getting bug 189 resolved! :-) Bug 189 was one of the oldest unresolved and one of the better known bugs in Bugzilla involving a request to add a music module to Wikimedia wikis. Quick stats about the bug: * Opened: 2004-08-22 * Votes: 48 * Comments: 123 The bug filer is still around and left a nice note on the bug (https://bugzilla.wikimedia.org/show_bug.cgi?id=189#c123): --- Congratulations to all ! It makes my dream comes true today ! Thanks million times! --- https://en.wikipedia.org/wiki/Note seemed like an easy target for demoing the newly deployed Score extension (https://www.mediawiki.org/wiki/Extension:Score) on a production site, if anyone's interested. I tried looking around for a point and click lilypond or ABC code generation tool (preferably Web-based), but a lot of these tools quickly went over my head. MZMcBride ___ Wikitech-l mailing list wikitec...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- Bináris -- Bináris ___ Wikidata-l mailing list wikidat...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score
I saw the request below only ;-) Xqt - Ursprüngliche Nachricht - Von: Bináris Gesendet: 24.04.2013 16:57 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score No, this is similar to syntaxhighlight because of score foo bar ... /score syntax. 2013/4/24 i...@gno.de This sort of html like tags are already implemented.Just use 'score' in the exception list. greeting xqt Von: legoktm Gesendet: 24.04.2013 12:54 An: WikiMedia Mailing Lists Betreff: Re: [Pywikipedia-l] [Wikidata-l] New exception needed: score I'm guessing this was intended for the Pywikipedia-l list? :) -- Legoktm On Wed, Apr 24, 2013 at 1:38 AM, Bináris wikipo...@gmail.com wrote: Hi, score blahblah /score or score foo bar ... /score is introduces for music notes as written below. See also http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:Grin/lilypondaction=edit for live use. Anyone to add a new exceptcion to textlib? Not a big deal, I am just far from my own computer now where I could solve it. It should be handled in the way as syntaxhighlight in line 121 here: http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/pywikibot/textlib.py?view=markuppathrev=11442 -- Forwarded message -- From: MZMcBride z...@mzmcbride.com Date: 2013/4/23 Subject: [Wikitech-l] Bug 189: Add a music wikimodule resolved/fixed To: Wikimedia developers wikitec...@lists.wikimedia.org Hi. https://bugzilla.wikimedia.org/show_bug.cgi?id=189 Congrats to all involved in getting bug 189 resolved! :-) Bug 189 was one of the oldest unresolved and one of the better known bugs in Bugzilla involving a request to add a music module to Wikimedia wikis. Quick stats about the bug: * Opened: 2004-08-22 * Votes: 48 * Comments: 123 The bug filer is still around and left a nice note on the bug (https://bugzilla.wikimedia.org/show_bug.cgi?id=189#c123): --- Congratulations to all ! It makes my dream comes true today ! Thanks million times! --- https://en.wikipedia.org/wiki/Note seemed like an easy target for demoing the newly deployed Score extension (https://www.mediawiki.org/wiki/Extension:Score) on a production site, if anyone's interested. I tried looking around for a point and click lilypond or ABC code generation tool (preferably Web-based), but a lot of these tools quickly went over my head. MZMcBride ___ Wikitech-l mailing list wikitec...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- Bináris -- Bináris ___ Wikidata-l mailing list wikidat...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Bináris ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Archivebot
what is your command line to invoke the not script? Xqt - Ursprüngliche Nachricht - Von: Bojan Kalkan Gesendet: 02.04.2013 19:04 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Archivebot I constrantly get MissingConfigError: Missing or malformed template. Where is the problem? This is our archive temlate http://sr.wikipedia.org/wiki/%D0%9A%D0%BE%D1%80%D0%B8%D1%81%D0%BD%D0%B8%D0%BA:MickiBot/archive Thanks. ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] interlanguage links from Wikidata
This is really a bug in the current implementation of Page.title(). I guess you have family = 'commons' in your user-config.py If you change it to 'wikipedia' (as a work-around) it will work as expected. But this must be fixed. Greetings xqt - Original Nachricht Von: Tuszynski, Jaroslaw W. jaroslaw.w.tuszyn...@saic.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 04.03.2013 18:34 Betreff: [Pywikipedia-l] interlanguage links from Wikidata Today I was trying to switch some code of mine from old fashion interwiki to wikidata based. I found http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Wikidata#Getting_data page and based on that I wrote: #!/usr/bin/python # -*- coding: utf-8 -*- import wikipedia as pywikibot if __name__ == __main__: try: site = pywikibot.getSite(u'it', u'wikipedia') page = pywikibot.Page(site, 'Fabio degli Abati Olivieri') data = pywikibot.DataPage(page) language_links = data.interwiki() for page in language_links: print page.title(asLink=True) finally: pywikibot.stopme() The output was: [[commons:fr:Fabio Olivieri]] [[commons:de:Fabio Olivieri]] [[commons:it:Fabio degli Abati Olivieri]] Which seem to point to non existing language specific Commons sites instead of Wikipedias. I worked around this issue, but what is the source of this issue: Wikidata, Italian Wikipedia, pywikipediabot? Jarek T. User:jarekt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace
Yes please with all these cases. Best Xqt - Ursprüngliche Nachricht - Von: Morten Wang Gesendet: 01.03.2013 17:32 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] Rewrite branch,issue with user pages in aliased namespace Found another bug related to this issue: page = pywikibot.Page(site, uUsuário:Vitorvicentevalente); page.exists(); Traceback (most recent call last): File stdin, line 1, in module File pywikibot/page.py, line 417, in exists return self.site.page_exists(self) File pywikibot/site.py, line 1180, in page_exists return page._pageid 0 AttributeError: 'Page' object has no attribute '_pageid' Let me know if it's easier to simply open a bug on SourceForge for this instead. Regards, Morten On 28 February 2013 09:55, Morten Wang nett...@gmail.com wrote: [inadvertently only replied to xqt, sorry about double emails, thought I'd post to the list too] Awesome work, thanks for the speedy bugfix! I noticed that it appears to also affect PreloadingGenerator, I get these warnings: WARNING: preloadpages: Query returned unexpected title 'Usuário:Vitorvicentevalente' WARNING: preloadpages: Query returned unexpected title 'Usuário:Vitorvicentevalente/Etiquetas' Is that something that's easy to fix too, or should I perhaps switch to not preloading the pages? Looks like the warning's thrown in site.py, preloadpages, line 1291. Regards, Morten On 28 February 2013 04:31, i...@gno.de wrote: Fixes in r11139 best xqt - Original Nachricht Von: Morten Wang nett...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 27.02.2013 20:46 Betreff: Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace Deleted the API cache and the cookie file, still get the same error. Making sure the site reloads the namespace info (by calling site._getsiteinfo(force=True)) didn't help either. It's line 1711 in site.py (method loadrevisions) that's throwing the exception, in case that wasn't already obvious. Regards, Morten On 27 February 2013 12:28, i...@gno.de wrote: You should delete the API cache first. xqt -- Von: Morten Wang Gesendet: 27.02.2013 16:39 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Rewrite branch,issue with user pages in aliased namespace Hi all, I've run into an interesting issue on Portuguese Wikipedia, with a user page that's in the aliased user namespace: import pywikibot; site = pywikibot.getSite('pt'); page = pywikibot.Page(site, uUsuário:Vitorvicentevalente); page.title(); u'Usu\xe1rio(a):Vitorvicentevalente' page.get() [NOTE: callback trace removed for brevity] pywikibot.exceptions.Error: loadrevisions: Query on [[pt:Usuário(a):Vitorvicentevalente]] returned data on 'Usuário:Vitorvicentevalente' According to the API Usuário is a valid namespace alias[1]. Is there an easy workaround or fix here? Also, I've noticed this is not an issue in trunk, it's just the rewrite branch that produces this error. Footnotes: 1: ref: http://pt.wikipedia.org/w/api.php?action=querymeta=siteinfosiprop=general| namespaces|namespacealiases Regards, Morten ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace
Thee is a difference beween the default namespace alias which is Usuário(a) given via api and the namspace alias of a given user which has determined gender settings. This is really a bug. xqt - Original Nachricht Von: Morten Wang nett...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 27.02.2013 20:46 Betreff: Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace Deleted the API cache and the cookie file, still get the same error. Making sure the site reloads the namespace info (by calling site._getsiteinfo(force=True)) didn't help either. It's line 1711 in site.py (method loadrevisions) that's throwing the exception, in case that wasn't already obvious. Regards, Morten On 27 February 2013 12:28, i...@gno.de wrote: You should delete the API cache first. xqt -- Von: Morten Wang Gesendet: 27.02.2013 16:39 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Rewrite branch,issue with user pages in aliased namespace Hi all, I've run into an interesting issue on Portuguese Wikipedia, with a user page that's in the aliased user namespace: import pywikibot; site = pywikibot.getSite('pt'); page = pywikibot.Page(site, uUsuário:Vitorvicentevalente); page.title(); u'Usu\xe1rio(a):Vitorvicentevalente' page.get() [NOTE: callback trace removed for brevity] pywikibot.exceptions.Error: loadrevisions: Query on [[pt:Usuário(a):Vitorvicentevalente]] returned data on 'Usuário:Vitorvicentevalente' According to the API Usuário is a valid namespace alias[1]. Is there an easy workaround or fix here? Also, I've noticed this is not an issue in trunk, it's just the rewrite branch that produces this error. Footnotes: 1: ref: http://pt.wikipedia.org/w/api.php?action=querymeta=siteinfosiprop=general| namespaces|namespacealiases Regards, Morten ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace
Fixes in r11139 best xqt - Original Nachricht Von: Morten Wang nett...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 27.02.2013 20:46 Betreff: Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace Deleted the API cache and the cookie file, still get the same error. Making sure the site reloads the namespace info (by calling site._getsiteinfo(force=True)) didn't help either. It's line 1711 in site.py (method loadrevisions) that's throwing the exception, in case that wasn't already obvious. Regards, Morten On 27 February 2013 12:28, i...@gno.de wrote: You should delete the API cache first. xqt -- Von: Morten Wang Gesendet: 27.02.2013 16:39 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Rewrite branch,issue with user pages in aliased namespace Hi all, I've run into an interesting issue on Portuguese Wikipedia, with a user page that's in the aliased user namespace: import pywikibot; site = pywikibot.getSite('pt'); page = pywikibot.Page(site, uUsuário:Vitorvicentevalente); page.title(); u'Usu\xe1rio(a):Vitorvicentevalente' page.get() [NOTE: callback trace removed for brevity] pywikibot.exceptions.Error: loadrevisions: Query on [[pt:Usuário(a):Vitorvicentevalente]] returned data on 'Usuário:Vitorvicentevalente' According to the API Usuário is a valid namespace alias[1]. Is there an easy workaround or fix here? Also, I've noticed this is not an issue in trunk, it's just the rewrite branch that produces this error. Footnotes: 1: ref: http://pt.wikipedia.org/w/api.php?action=querymeta=siteinfosiprop=general| namespaces|namespacealiases Regards, Morten ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Rewrite branch, issue with user pages in aliased namespace
You should delete the API cache first. xqt - Ursprüngliche Nachricht - Von: Morten Wang Gesendet: 27.02.2013 16:39 An: Pywikipedia discussion list Betreff: [Pywikipedia-l] Rewrite branch,issue with user pages in aliased namespace Hi all, I've run into an interesting issue on Portuguese Wikipedia, with a user page that's in the aliased user namespace: import pywikibot; site = pywikibot.getSite('pt'); page = pywikibot.Page(site, uUsuário:Vitorvicentevalente); page.title(); u'Usu\xe1rio(a):Vitorvicentevalente' page.get() [NOTE: callback trace removed for brevity] pywikibot.exceptions.Error: loadrevisions: Query on [[pt:Usuário(a):Vitorvicentevalente]] returned data on 'Usuário:Vitorvicentevalente' According to the API Usuário is a valid namespace alias[1]. Is there an easy workaround or fix here? Also, I've noticed this is not an issue in trunk, it's just the rewrite branch that produces this error. Footnotes: 1: ref: http://pt.wikipedia.org/w/api.php?action=querymeta=siteinfosiprop=general|namespaces|namespacealiases Regards, Morten ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
[Pywikipedia-l] Creating wikidata items
Hi folks, Reza1615 as published a small code snippet to create items at data repository. Please use this sample with care becaus it does not test whether a data repository item already exists. It only test whether it exists for a given site page. This could also mean that a given site page as no language link on a given repository page. This must be checked before a page is created. Regards xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Creating wikidata items
Hi Amir the point is there may be an existing data item without language link to fa-wiki and a bot is able to create a new repository item for fa-wiki without having any language links (or having it's own link cluster). Before a bot creates a data repository item we must be be sure that a repository item does not already exists. I am unsure whether this is a job for bots. sample: existing item Q1234 with links en:Hello, fr:Bonjour, es:Hola your bot find a new page de:Hallo without language links (or with link to nl:Hoi which has no entry in Q1234 yet). You are wrongly able to create a new data item for de:Hallo via bot. But you first must check that the content of de:Hallo does not match any other content of any other data items's language links (which is in this sample the content of Q1234's language links). So you must not use this code snippet without having care on this matter. Regards xqt - Original Nachricht Von: Amir Ladsgroup ladsgr...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 26.02.2013 10:19 Betreff: Re: [Pywikipedia-l] Creating wikidata items Dear xqt, is it ok? # -*- coding: utf-8 -*- import wikipedia site=wikipedia.getSite('fa', fam='wikipedia') listofarticles=[u ???,u ] for name in listofarticles: page=wikipedia.Page(site,name) data=wikipedia.DataPage(page) try: items=data.get() except wikipedia.NoPage: print The item doesn't exist. Creating... data.createitem(Bot: Importing article from Persian wikipedia) else: print It has been created already. Skipping... I tested it, it was ok. but I'm not sure On Tue, Feb 26, 2013 at 11:49 AM, i...@gno.de wrote: Hi folks, Reza1615 as published a small code snippet to create items at data repository. Please use this sample with care becaus it does not test whether a data repository item already exists. It only test whether it exists for a given site page. This could also mean that a given site page as no language link on a given repository page. This must be checked before a page is created. Regards xqt ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Translated namespaces can cause edits to the wrong namespace
you cannot use the canonical namespace without explicit use of it or renaming it in the page text. But I fixed that bug in r11092 by overriding the default namespaces from family.py. Regards xqt - Original Nachricht Von: Jesse (Pathoschild) pathosch...@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 20.02.2013 05:07 Betreff: [Pywikipedia-l] Translated namespaces can cause edits to the wrong namespace Hello, Pywikipedia uses its own translations of the canonical namespaces. When these translations are incorrect, the bot will edit the main namespace instead. For example, pywikipedia currently translates the User namespace as Wikipedysta on pl-wikivoyage, but the correct namespace is U?ytkownik. Is there a way to page.put() with the canonical namespace instead of a translated namespace? -- Yours cordially, Jesse (Pathoschild) ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Re: [Pywikipedia-l] Wikidata interwiki behavior
I am preparing an easy way to create a DataPage from a Page object. This enables to integrate wikidata to interwiki and run it in just a similar way as with other pages. More follows asap... xqt - Ursprüngliche Nachricht - Von: Amir Ladsgroup Gesendet: 17.01.2013 17:27 An: jan.du...@volny.cz; Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] Wikidata interwiki behavior On Thu, Jan 17, 2013 at 11:04 AM, Jan Dudík jan.du...@gmail.com wrote: There might be possibility to solve conflict as it is i current interwiki.py with preffering wikidata version? it's a very interesting idea. Is there a way someone tell me how we can do it? about other things i think we can simply make a list of the articles in each cases by using toolserver -- Amir ___ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l