[Pywikipedia-bugs] [Maniphest] [Commented On] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years

2020-10-20 Thread Mpaa
Mpaa added a comment.


  @Vicarage, is this solved after the patch?

TASK DETAIL
  https://phabricator.wikimedia.org/T265257

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Mpaa
Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years

2020-10-13 Thread gerritbot
gerritbot added a comment.


  Change 633572 **merged** by jenkins-bot:
  [pywikibot/core@master] [bugfix] do not encode str to bytes in 
imagetransfer.py
  
  https://gerrit.wikimedia.org/r/633572

TASK DETAIL
  https://phabricator.wikimedia.org/T265257

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH, 
Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, 
joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, 
Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years

2020-10-12 Thread gerritbot
gerritbot added a comment.


  Change 633572 had a related patch set uploaded (by Mpaa; owner: Mpaa):
  [pywikibot/core@master] [bugfix] do not encode str to bytes in 
imagetransfer.py
  
  https://gerrit.wikimedia.org/r/633572

TASK DETAIL
  https://phabricator.wikimedia.org/T265257

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: gerritbot
Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years

2020-10-12 Thread Xqt
Xqt added a comment.


  The script version is neither python2 branch nor 4.0+. Anyway there is still 
a bug described above. url string is encoded to bytes (don’t know why) and 
cannot be combined to str in that way.

TASK DETAIL
  https://phabricator.wikimedia.org/T265257

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years

2020-10-12 Thread Vicarage
Vicarage added a comment.


  When I ran software ticket systems, I found it best to let the problem 
reporter to update the ticket before marking it closed.
  
  My pwb.py starts
  
  #!/usr/bin/env python
  
  PYTHON_VERSION = sys.version_info[:3]
  PY2 = (PYTHON_VERSION[0] == 2)
  
  versions_required_message = """
  Pywikibot is not available on:
  {version}
  
  This version of Pywikibot only supports Python 2.7.2+ or 3.4+.
  """
  
  def python_is_supported():
  
"""Check that Python is supported."""
# Any change to this must be copied to setup.py
return PYTHON_VERSION >= (3, 4, 0) or PY2 and PYTHON_VERSION >= (2, 7, 2)
  
  So I had no reason to try python3
  
  python3 /home/john/bin/pywikibot/core/pwb.py imagetransfer -v File:Happy.jpeg 
-tofamily:newwiki
  Python 3.6.9 (default, Jul 17 2020, 12:50:27) 
  [GCC 8.4.0]
  
  Found 1 oldwiki:en-gb processes running, including this one.
  
  
  0. Found image: [[File:Happy.jpeg]]
  
  Found 1 newwiki:en-gb processes running, including this one.
  
  
  WARNING: /home/john/bin/pywikibot/core/scripts/imagetransfer.py:143: 
DeprecationWarning: pywikibot.page.FilePage.fileUrl is deprecated for 4 years 
and 4 months; use get_file_url instead.
url = sourceImagePage.fileUrl().encode('utf-8')
  
  Traceback (most recent call last):
  
File "/home/john/bin/pywikibot/core/pwb.py", line 257, in 
  if not main():
File "/home/john/bin/pywikibot/core/pwb.py", line 250, in main
  run_python_file(filename, [filename] + args, argvu, file_package)
File "/home/john/bin/pywikibot/core/pwb.py", line 119, in run_python_file
  main_mod.__dict__)
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 336, in 

  main()
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 332, in 
main
  bot.run()
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 278, in 
run
  self.transferImage(imagelist[todo])
File "/home/john/bin/pywikibot/core/scripts/imagetransfer.py", line 144, in 
transferImage
  pywikibot.output('URL should be: ' + url)
  
  TypeError: must be str, not bytes
  Dropped throttle(s).
  
  CRITICAL: Closing network session.
  Network session closed.
  python3 -V
  Python 3.6.9
  
  So you still have a 4 year old deprecation, and it fails.

TASK DETAIL
  https://phabricator.wikimedia.org/T265257

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vicarage
Cc: Mpaa, Xqt, Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years

2020-10-12 Thread Xqt
Xqt added a comment.


  The deprecation warning is already solved with 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/633303
  
  The remaining problem is the UploadWarning from api:
  Upload error: Local file uploads are disabled on newwiki:en-gb.
  
  Note that current releases does not support Python 2 anymore.
  
  Could you please run the script with -verbose option please to get the api 
url passed to the site.

TASK DETAIL
  https://phabricator.wikimedia.org/T265257

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T265257: Pywikibot ImageTransfer script has features deprecated for 5 years

2020-10-12 Thread Vicarage
Vicarage added a comment.


  python -V
  Python 2.7.17
  oldwiki and newwiki are 1.35.0

TASK DETAIL
  https://phabricator.wikimedia.org/T265257

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vicarage
Cc: Aklapper, pywikibot-bugs-list, Vicarage, JohnsonLee01, SHEKH, Dijkstra, 
Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, 
Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs