https://bugzilla.wikimedia.org/show_bug.cgi?id=71980
Bug ID: 71980
Summary: Implement ItemPage.makeRedirectPage(self, page)
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Wikidata
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: maarten(a)mdammers.nl
Depends on: 71979
Web browser: ---
Mobile Platform: ---
It's now possible to create ItemPage redirects. We should implement this
functionality in Pywikibot too
>From https://www.wikidata.org/w/api.php
* action=wbcreateredirect *
API module for creating Entity redirects.
This module requires read rights
This module requires write rights
This module only accepts POST requests
Parameters:
from - Entity ID to make a redirect
to - Entity ID to point the redirect to
token - A 'csrf' token retrieved from action=query&meta=tokens
This parameter is required
bot - Mark this edit as bot
This URL flag will only be respected if the user
belongs to the group "bot".
Example:
Turn Q11 into a redirect to Q12:
api.php?action=wbcreateredirect&from=Q11&to=Q12
This should be two parts: Part in site and part in page.
In bug 71979 we're tracking Page.makeRedirectPage(self, page)
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71699
Bug ID: 71699
Summary: harvest_template does not harvest
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: Unprioritized
Component: Wikidata
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jan.dudik(a)gmail.com
Web browser: ---
Mobile Platform: ---
script does not find any value even if in article is. Older version (based on
older versions of [[d:User:Underlying_lk/harvest_template.py]] with some
updates) works correctly
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=60214
Web browser: ---
Bug ID: 60214
Summary: testImageusage in site_tests fails
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: mpaa.wiki(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Line 549 in site_tests.py fails:
for using in mysite.imageusage(imagepage, namespaces=[3, 4], total=5):
self.assertType(using, pywikibot.Page)
self.assertTrue(imagepage in list(using.imagelinks())) --> fails
imagepage on main page (current 'Main Page' on ew:WP) is different from images
in list(using.imagelinks()), in cached data in
c:\\users\\...\\AppData\\Roaming\\pywikibot\\apicache\\ff322b...
Cached data is used due to monkey patching in tests/__init__.py
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55522
Web browser: ---
Bug ID: 55522
Summary: Option to delete image in imagecopy.py once it's been
transferred
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
Once an image has been copied with imagecopy.py and a sysop account is
configured for that wiki, we should provide an option to delete the image.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71124
Bug ID: 71124
Summary: Add ability to add/subtract months to/from
pywikibot.Timestamp
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: info(a)gno.de
Web browser: ---
Mobile Platform: ---
mw is able to calculate with parser variable #time e.g. to add or subtract
months to the given time. python does not support it with standard libs and
dateutils is not part of the framework. On the other hand it would be great to
have such a feature calculating months with Timestamps.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71400
Bug ID: 71400
Summary: When an image deleted before imagetransfer.py asks
many times: Do you want to ignore? ([y]es, [N]o)
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Other scripts
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: reza.energy(a)gmail.com
Web browser: ---
Mobile Platform: ---
When an image deleted before on target wiki imagetransfer.py asks many times:
Do you want to ignore? ([y]es, [N]o)
If you write y it will continue aking also it will upload new revetions on
image page!
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=58907
Web browser: ---
Bug ID: 58907
Summary: Site.upload(ignore_warnings=True) will still raise
UploadWarnings
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: legoktm.wikipedia(a)gmail.com
Classification: Unclassified
Mobile Platform: ---
When uploading a file, I have ignore_warnings=True. This value is passed to the
API, so the upload completes successfully. However, pywikibot sees the
'warnings' dict and then raises an UploadWarning exception, even though I've
suppressed the warnings.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=69090
Bug ID: 69090
Summary: upload.py attempts uploads on wikis that dont allows
uploads
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
Uploads are disabled on Wikidata: https://www.wikidata.org/wiki/Special:Upload
upload.py happily allows the user to attempt to upload, but then reports an
APIError. If pywikibot cant detect whether uploads are enabled before upload,
it should detect this APIError and provide a nice response for the user.
$ python pwb.py -family:wikidata -lang:wikidata scripts/upload.py
No input filename given
File or URL where image is now: blahblah.png
The filename on the target wiki will default to: blahblah.png
Enter a better name, or press enter to accept:
The suggested description is:
Do you want to change this description? ([y]es, [N]o) y
Uploading file to wikidata:wikidata via API....
Reading file blahblah.png
ERROR: Upload error:
Traceback (most recent call last):
File "scripts/upload.py", line 216, in upload_image
ignore_warnings=self.ignoreWarning)
File ".../pywikibot/site.py", line 3432, in upload
result = req.submit()
File ".../pywikibot/data/api.py", line 418, in submit
raise APIError(code, info, **result["error"])
APIError: uploaddisabled: Uploads are not enabled. Make sure $wgEnableUploads
is set to true in LocalSettings.php and the PHP ini setting file_uploads is
true
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71727
Bug ID: 71727
Summary: chunked upload does not ignore warnings
Product: Pywikibot
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: network
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
If a file already exists on the server with the same title, chunked Site.upload
fails with:
Traceback (most recent call last):
File "tests/upload_tests.py", line 45, in test_png_chunked
ignore_warnings=True, chunk_size=1024)
File ".../pywikibot/tools.py", line 367, in wrapper
return method(*__args, **__kw)
File ".../pywikibot/site.py", line 4404, in upload
% {'msg': message})
UploadWarning: exists: File MP_sounds-pwb.png already exists.
Chunked uploading with a new title works correctly:
https://test.wikipedia.org/wiki/File:MP_sounds-pwb-chunked.png
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=71104
Bug ID: 71104
Summary: page.isRedirectPage() reports always False after
page.isDisambig()
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: CommodoreFabianus(a)gmx.de
Web browser: ---
Mobile Platform: ---
When calling page.isDisambig() a page.isRedirectPage() followed after that is
reporting it always false. Calling 'page.text' does 'fix' that so that it
returns the actual value.
>>> import pywikibot
>>> enwp = pywikibot.Site('en', 'wikipedia')
>>> page = pywikibot.Page(enwp, 'TBBT')
>>> page.isRedirectPage()
True
>>> page = pywikibot.Page(enwp, 'TBBT')
>>> not page.isDisambig()
True
>>> page.isRedirectPage()
False
>>> page.text
'#REDIRECT [[The Big Bang Theory]]'
>>> page.isRedirectPage()
True
--
You are receiving this mail because:
You are the assignee for the bug.