HI,

I've just re-check it right now, and You are right - it works, but only if
You will executer getID() method. I was just checking object's id property
(because it doesn't have leading underscores I assume, that it's public, or
rather not consider internal) and it hadn't work. (And off the topic I
guess pages without sitelinks should be properly handled - right now there
is NoPage error, instead ot that, I guess, it should create new item in
wikibase repository)

I believe, that for the sake of laziness We should make all object property
considered internal and give access to them by some getters/setters - right
now it's a little bit confusing. I thnik the same about get() method - it
shouldn't be externally execute, I know, that it will break lots of code,
but after that it will be lot less confusing.

And another question: is there any way to create simply just new ItemPage?
I could not find it (neither in trunk not rewrite branch). Right now I
found some workaround for trunk. It gives me some warnings, but it works.

BTW where is current bugtracer? I've found
https://sourceforge.net/p/pywikipediabot/feature-requests/340/ on
https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Development . Isn't it
rational to move it to wikimedia bugzilla, or even more, to github?



2013/7/21 legoktm <[email protected]>

> Hi,
> Could you provide an example of a page that currently doesn't work? I just
> ran our test suite on the latest revision and the fromPage-related tests
> all passed.
>
> Your current patch technically works, however I'd be wary of accepting it
> since it makes the API request while the item is being constructed, rather
> than passing on the site & title parameters to the write function that
> needs it (lazy).
>
> -- Legoktm
>
>
> On Sat, Jul 20, 2013 at 5:58 PM, Tomasz Magulski <
> [email protected]> wrote:
>
>> Hi,
>>
>> I've started to work with wikidata few days ago and have found out, that
>> in rewrite branch ItemPage.fromPage haven't worked properly, so I had
>> started digging in code and made small patch, which should resolve this
>> issue.
>>
>> The code is available here:
>> https://github.com/magul/pywikibot-core/tree/ItemPageFromPage
>>
>> Could be it merged to rewrite branch? What should I do to make it happen?
>>
>> Thanks for answer in advance
>>
>> --
>> Tomasz Magulski
>>
>> _______________________________________________
>> Pywikipedia-l mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>>
>>
>
> _______________________________________________
> Pywikipedia-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
>


-- 
Tomasz Magulski
_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to