https://bugzilla.wikimedia.org/show_bug.cgi?id=70985
Bug ID: 70985 Summary: replaceExcept is DEPRECATED Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jan.dudik@gmail.com Web browser: --- Mobile Platform: ---
pwb.py replace -regex -nocase -transcludes:silnice "silnice {{silnice|I|(.*?)(|)*}}" "[[silnice I/\1]]" "silnice {{silnice|II|(.*?)(|)*}}" "[[silnice II/\1]]" -summary:"link na silnici - v textu textem"
Retrieving 50 pages from wikipedia:cs. ...
Dobrichovice <<<
- :Mestem prochazi silnice {{Silnice|II|115||}} Praha Radotin - Dobrichovice - R evnice. + :Mestem prochazi [[silnice II/115]] Praha Radotin - Dobrichovice - Revnice.
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a ]ll, [q]uit) y No changes were necessary in [[Brehov]] No changes were necessary in [[Dasny]]
Petrovice (okres Rakovnik) <<<
- :Obci vede silnice {{Silnice|II|229||}} Rakovnik - Kralovice. + :Obci vede [[silnice II/229]] Rakovnik - Kralovice.
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a ]ll, [q]uit) WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRE CATED, use pywikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. WARNING: D:\Py\rewrite\pywikibot__init__.py.replaceExcept is DEPRECATED, use py wikibot.textlib.replaceExcept instead. Page [[Dobrichovice]] saved
https://bugzilla.wikimedia.org/show_bug.cgi?id=70985
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mpaa.wiki@gmail.com
--- Comment #1 from Mpaa mpaa.wiki@gmail.com --- Cannot reproduce.
https://bugzilla.wikimedia.org/show_bug.cgi?id=70985
--- Comment #2 from JAn Dudík jan.dudik@gmail.com --- try pwb.py replace -regex -nocase -page:cs:Dálnice_D2 "{{silnice|I|(.*?)(|)*}}" "[[silnice I/\1]]" "{{silnice|II|(.*?)(|)*}}" "[[silnice II/\1]]" -summary:"test chyby"
https://bugzilla.wikimedia.org/show_bug.cgi?id=70985
--- Comment #3 from Mpaa mpaa.wiki@gmail.com --- Not yet.
https://cs.wikipedia.org/w/index.php?title=D%C3%A1lnice_D2&diff=prev&...
python pwb.py replace -regex -nocase -page:cs:Dálnice_D2 "{{silnice|I|(.*?)(|)*}}" "[[silnice I/\1]]" "{{silnice|II|(.*?)(|)*}}" "[[silnice II/\1]]" -summary:"test chyby" -lang:cs -family:wikipedia Retrieving 1 pages from wikipedia:cs.
Dálnice D2 <<<
- {{Dálnice křižovatka|3|[[Brno-Chrlice|Chrlice]]|{{silnice|II|152}}}} + {{Dálnice křižovatka|3|[[Brno-Chrlice|Chrlice]]|[[silnice II/152]]}} - {{Dálnice křižovatka|11|[[Blučina]]|{{silnice|II|416}}}} + {{Dálnice křižovatka|11|[[Blučina]]|[[silnice II/416]]}} - {{Dálnice křižovatka|25|[[Hustopeče]]|{{silnice|II|425}}}} + {{Dálnice křižovatka|25|[[Hustopeče]]|[[silnice II/425]]}} - {{Dálnice křižovatka|41|[[Podivín]]|{{silnice|II|422}}}} + {{Dálnice křižovatka|41|[[Podivín]]|[[silnice II/422]]}} - {{Dálnice křižovatka|48|[[Břeclav]]|{{silnice|I|55}}}} + {{Dálnice křižovatka|48|[[Břeclav]]|[[silnice I/55]]}}
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a]ll, [q]uit) y Page [[Dálnice D2]] saved
https://bugzilla.wikimedia.org/show_bug.cgi?id=70985
Fabian CommodoreFabianus@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |CommodoreFabianus@gmx.de
--- Comment #4 from Fabian CommodoreFabianus@gmx.de --- Have you updated pwb but not the script? The newest version of replace.py shouldn't produce that output.
https://bugzilla.wikimedia.org/show_bug.cgi?id=70985
Fabian CommodoreFabianus@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID
--- Comment #5 from Fabian CommodoreFabianus@gmx.de --- I searched through the complete repository and don't find any call of 'replaceExcept' which would produce this warning. The usuage in replace.py has been also fixed a few days before the deprecation warning was added:
https://github.com/wikimedia/pywikibot-core/commit/1a1456157a266707b414d171b... https://github.com/wikimedia/pywikibot-core/commit/5426720bfe83e37aec032e8af...
pywikipedia-bugs@lists.wikimedia.org