Page MenuHomePhabricator

pywikibot cosmetic_changes.py only remove first empty section
Closed, ResolvedPublic

Description

Hello,
I have tried cosmetic_changes.py on some wikis, but it seems to be failing at removing subsequent empty sections. It only removes first empty section. Please see here for example.

I hope this ticket is not a duplicate from a similar issue. ;-)

Thanks!

Event Timeline

Rachmat04 created this task.Jun 4 2018, 1:32 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 4 2018, 1:32 AM

Hi @Rachmat04, thanks for taking the time to report this!
Which exact Pywikibot version do you use?

Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptJun 4 2018, 10:08 AM

Hi @Aklapper. It seems I'm using pywikibot 3.1.dev0.

PS C:\Users\Rachmat\Documents\Git\pywikibot\core> python.exe .\pwb.py .\scripts\version.py
Pywikibot: [https] r-pywikibot-core.git (4716daa, g9629, 2018/06/03, 22:46:35, OUTDATED)
Release version: 3.1.dev0
requests version: 2.14.2
  cacerts: C:\Users\Rachmat\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\cacert.pem
    certificate test: ok
Python: 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)]

Change 437227 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [bugfix] Remove multiple empty sections at once

https://gerrit.wikimedia.org/r/437227

Dvorapa claimed this task.Jun 4 2018, 11:56 AM
Dvorapa triaged this task as Low priority.
Dvorapa moved this task from Backlog to Doing on the good first task board.

Hello @Rachmat04, I made a patch for subsequent sections and soon this will be fixed, but I saw a section with only a * too in your example, which is still not removed by Pywikibot's cosmetic changes. I think these could be removed too, am I right?

Hello @Rachmat04, I made a patch for subsequent sections and soon this will be fixed,

Hello @Dvorapa. Thank you for the patch!

but I saw a section with only a * too in your example, which is still not removed by Pywikibot's cosmetic changes. I think these could be removed too, am I right?

Yes, I think so. That would be good if pywikibot can remove empty lists from the article as well.

Change 437227 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Remove multiple empty sections at once

https://gerrit.wikimedia.org/r/437227

Dvorapa closed this task as Resolved.Jun 12 2018, 7:11 PM

All we discussed should be fixed now, if you encounter any problems after the patch, please feel free to create a new task here.

Vvjjkkii renamed this task from pywikibot cosmetic_changes.py only remove first empty section to vpbaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Dvorapa as the assignee of this task.
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Dvorapa; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from vpbaaaaaaa to pywikibot cosmetic_changes.py only remove first empty section.Jul 2 2018, 8:11 AM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Dvorapa.
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: Dvorapa.