Re: [Wikitech-l] Help me to fix a bug in my extension

2017-01-05 Thread bawolff
Hi,

You shouldn't modify the contents of the ParserOutput object from any
OutputPage related hook, as MediaWiki's cache system won't take the
new version into account correctly. Instead you should use a hook
called from the parser. For your use case I would suggest the
ParserAfterParse.

So try changing that hook to use ParserAfterParse instead of
OutputPageParserOutput  (The first argument to ParserAfterParse is a
Parser object, call $parser->getOutput() to get the appropriate
ParserOutput object, and then do the exact same thing as before,
except delete the stuff about LinksUpdate, since MW will handle
LinksUpdate itself).

Hope that helps
--
Brian

On Thu, Jan 5, 2017 at 11:48 PM, Victor Porton  wrote:
> My extension does add additional links (which it is created to render
> in addition to the normal [[...]] links) to the pagelinks table for the
> edited page every even edit and erroneously removes them back every odd
> edit.
>
> Please help to debug this silly behavior:
>
> https://gerrit.wikimedia.org/r/#/c/330816/1 is the patch which half-
> works.
>
> My extension:
> https://www.mediawiki.org/wiki/Extension:NamespacePopups
>
> It uses my another extension:
> https://www.mediawiki.org/wiki/Extension:PagePopups
>
> This is very important for me.
>
> Well, maybe some day we'll use these extensions in Wikipedia, who
> knows.
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Help me to fix a bug in my extension

2017-01-05 Thread Victor Porton
My extension does add additional links (which it is created to render
in addition to the normal [[...]] links) to the pagelinks table for the
edited page every even edit and erroneously removes them back every odd
edit.

Please help to debug this silly behavior:

https://gerrit.wikimedia.org/r/#/c/330816/1 is the patch which half-
works.

My extension:
https://www.mediawiki.org/wiki/Extension:NamespacePopups

It uses my another extension:
https://www.mediawiki.org/wiki/Extension:PagePopups

This is very important for me.

Well, maybe some day we'll use these extensions in Wikipedia, who
knows.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] pywikibot troubleshooting in recitation-bot

2017-01-05 Thread Anthony Di Franco
Actually I've made a bit of progress diagnosing this. It has nothing to do
with the login or looping in my code but may have to do with the
composition of my use of multiprocessing and pywikibot's use of
multithreading and may have to do with this bug:
https://phabricator.wikimedia.org/T135986
Any advice on managing this?

On Sat, Dec 24, 2016 at 1:36 PM Legoktm  wrote:

Hi,

+cc pywiki...@lists.wikimedia.org

On 12/22/2016 03:55 PM, Anthony Di Franco wrote:
> Hi all,
>  I'm doing some renovations on recitation-bot and running into trouble
when
> the time comes for pywikibot to upload article data to wikisource and
> commons. The thread doing so hangs without any sort of informative error.
I
> made sure that the unix user under which the web service that is using
> pywikibot is running is logged into each wiki per Max's advice but I still
> have the problem. I'm going to try to get more information about what's
> going on but would also appreciate pointers about what might be going
> wrong. Particularly, the web service is now running under Kubernetes
rather
> than sun grid engine, so I suspect that the login state might not be
making
> it into the container - can anyone advise on where the login state is
> maintained and whether this will be transferred into the kubernetes
> container?

Pywikibot stores all of its state in the same directory that your
user-config.py file is in.

In my experience python hanging is typically an accidental infinite
loop. Adding debug logging can help pinpoint where it starts hanging and
narrow down the problematic code.

-- Legoktm

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Team Practices Coaching Clinic during 2017 Developer Summit

2017-01-05 Thread Joel Aufrecht
Team Practices Group Clinic

TPG will be offering 15-minute consultations on team practices and
collaboration topics of your choosing; for example: task tracking,
improving communication between or within teams, or communicating with
geographic diversity.  See TPG_Clinic

to get more information.


This is open to anyone attending the Summit.




*-- Joel Aufrecht*
Team Practices Group
Wikimedia Foundation
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l