Dear maintainer,
A new upstream version of Pywikibot is now available: 8.0.0
Dear maintainer,
A new upstream version of Pywikibot is now available: 8.0.0
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | BUG REPORT | rook | T329714 bash: pwb.py: command not found | ||
Resolved | rook | T326512 New upstream release for Pywikibot |
This may not be working on PAWS. I haven't upgraded the config yet, though https://github.com/toolforge/paws/blob/a1499a64835649125696bc8c1cef6f06184f8519/paws/values.yaml#L305 should get it upgraded on pod restart. I'm getting:
@PAWS:~$ pwb.py --version No module named 'requests' @PAWS:~$ pip list | grep requests requests 2.28.2 requests-oauthlib 1.3.1
Mentioned in SAL (#wikimedia-cloud) [2023-02-13T12:20:42Z] <Rook> pywikibot to version 8 16f07db23b6e380a15297605cbbb532f312a3246 T326512
Though it would appear only basic scripts are included in the pip install (version, login, a few others) so things like replace does not work.
It does seem that the git install works if prefaced with python such as:
@PAWS:/srv/paws/pwb$ pwb.py version No module named 'requests' @PAWS:/srv/paws/pwb$ python pwb.py version Pywikibot: [https] r-pywikibot-core.git (c4403b4, g17789, 2023/02/09, 13:16:36, stable) Release version: 8.0.0 ...
python3 is a link to python (python3 is called in the pwb.py #!)
Looks like a relative path problem.
@PAWS:/srv/paws/pwb$ ls -l /srv/paws/bin/python3 lrwxrwxrwx. 1 tools.paws tools.paws 16 Feb 8 17:45 /srv/paws/bin/python3 -> /usr/bin/python3 @PAWS:/srv/paws/pwb$ /usr/bin/python3 pwb.py version No module named 'requests' @PAWS:/srv/paws/pwb$ /srv/paws/bin/python3 pwb.py version Pywikibot: [https] r-pywikibot-core.git (c4403b4, g17789, 2023/02/09, 13:16:36, stable) Release version: 8.0.0
Probably the pwb.py #! change, in 7.7.2 it is:
#!/usr/bin/env python3
in 8.0.0 it became:
#!/usr/bin/python3
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/889238 merged
@Xqt: Would you create a new pywikibot release so we can get PAWs updated?
https://github.com/toolforge/paws/pull/260 switches back to a git install and adds a hack to workaround the pwb.py shebang issue.
@JJMC89 It's still building so I haven't tested it yet, but how does https://github.com/toolforge/paws/pull/261 look to you? I've revert all of the changes I made going to 8 and added your sed in to get it working. It should list you as an author of the commit
It should work. I don't know why you prefer a full clone and installation from a hacked requirements file over the method in my PR.
Mentioned in SAL (#wikimedia-cloud) [2023-02-18T20:48:21Z] <Rook> revert to installing pywikibot from git a22cd26b16dc256f505e70d30c3d10e038da747d T326512