How are custom families handled in the rewrite branch?
That is, as a user, do I have to write my custom family files to the installation directory, or can I use a user-writable directory instead? (e.g. .pywikibot)?
Hello everybody ! I'm getting the following error with the latest revision of pywikipedia (trunk) on the toolserver :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wikipedia.py", line 150, in <module>
File "externals/__init__.py", line 377, in check_setup
if globals()[dist + '_install'](modules_needed[m]):
As this error happens when trying to import the wikipedia library, I cannot use any script… Do you have an idea ?
— Toto Azéro
----- Original Nachricht ----
Von: Bináris <wikiposta(a)gmail.com>
An: Pywikipedia discussion list <pywikipedia-l(a)lists.wikimedia.org>
Datum: 21.07.2013 18:14
Betreff: [Pywikipedia-l] Additional parameter in a replace function
> I use functions in my fixes.py as written in
> 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):
> 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.
def __init__(self, option):
self.option = option
def myFunc(self, match):
result = u''
# change the result depending of match and self.option
thisClass = myClass(option='submit anything as option')
and play with replacements using thisClass.myFunc
for those "unit radius users" as we say in Hungary the end users, who don't
want to learn git and don't want to contribute to the framework, will the
nightlies be available in the same way after 26th?
-----BEGIN PGP SIGNED MESSAGE-----
May be I missed something or are completely misinformed or something,
but am I right that at the moment SVN to GIT migration is taking
place? How is that status? How are we supposed to commit changes at
Could somebody shed some light onto this for me please?
Thanks a lot and Greetings
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
I've synced yesterday my repo with this availiable in gerrit/github, so
yesterday it was up to date.
Today, when I was merging my master branch it seemed that I had circa 830
commits to mutual parent with gerrit/github and the same situation occur
for gerrit/gihub (it has circa 830 comitis to our mutual parent), so I
start digging and found out that uncommon commits (this 830) look (as far
as commit comment) the same.
So my suspicion is that someone (legoktm) has been independently importing
new commits from svn to git repo (so they look exactly the same but don't
have the same commit hash) and has pushed them to directly gerrit without
merging with master?
Could we do something to avoid that kind of situations?
I've just created a possibility to create brand new ItemPage from scratch.
My work is avaliable here:
it works like:
i = ItemPage.createNew(repo)
Before it (afaik) there was not possibility to simply create new ItemPage
(you were able to create new object of ItemPage class, but should provide a
title, and create new ItemPage from existing page on another site).
What do You think about it?
I use functions in my fixes.py as written in
Now, my idea is to use an additional parameter. (In case nobody breaks the
So my fix has something like this in replacements:
Then MyFunc takes the match object as a parameter and is executed. I have
Now I want to write def MyFunc(match, mode), but I can't pass mode to
I guessed the line in question is #195 in textlib.py:
replacement = new(match)
Here I stopped. How could I pass additional optional parameters?
> It's interesting to say for a 2-days-old and by that time correctly working
> copy to be outdated. I can't see a reason for what properly working
> programs should be broken without prior notice. What was the
> *critical*issue for what anybody was forced to block replace.py?
We have perpetual beta release. Properly working programs my suddenly be broken by new new methods, variants and other stuff as well as API changes and we cannot guarantee a bug free code at all. I always would be glad if I could notice bugs before them came up ;)
Anyway there are circumstances that new commits can cause problems due to other OS, python versions and changes to the working copy which are unpredictable. In this particular case I found that bug when my bot failed while doing his daily tasks and solving it was very trivial for me.
> Additionally, to force somebody to download and run an unknown .EXE without
> further eyplanation when using an open source project is very unfriendly
> thing and by no means the proper way of developing the framework.
> First, an exe is an alien corpus here and should not be part of an open
> source framework.
As I posted few days ago I am unhappy too with .exe cuting external files. On the other hand runing the framework with its scripts and externals which also includes native codes may also be problematic. I found some explanations to that way of developing by DrTrigon few days ago.
> Second, majority of scripts had run correctly and without any problem by
> that time. Now, for I don't know what kind of development of I don't know
> which part of the project, properly working scripts were broken.
> Users who want to run simple scripts should be left to run them unless
> there is any critical problem.
There are a lot of new issues and task and the framework is evolving. I cannot guarantee that the code works always as expected but I'll do my best. On the other hand I find a lot of problems e.g. while migrating from trunk to rewrite. Some of them are very hard to find and kill, the script hangs and keybord interrupt doesn't work and I have no chance to figure out the point.
> Too many breaking changes suddenly! This was not the Pywiki way by this
> time and I don't like this new style!
Ist that really a new style of pwb framework? We also had blocker in past and we still have bugs in the code. Migrating to git will become the next big step and I guess it will not work without problems for bot owners and including be for developers (maybe I am off with git). Anyway there should be good reasons for major changes.