makecat has its main loop at the module level, rather than in a function main() like other scripts.
This causes a deadlock in handleArgs while trying to fetch the live API version.
Version: core-(2.0)
Severity: major
makecat has its main loop at the module level, rather than in a function main() like other scripts.
This causes a deadlock in handleArgs while trying to fetch the live API version.
Version: core-(2.0)
Severity: major
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Deadlock problem fixed by using requests | pywikibot/core | master | +3 -16 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | None | T72936 Important tasks to be solved (tracking) | |||
Resolved | jayvdb | T71781 makecat uses http on import, causing deadlock |
Change 155231 had a related patch set uploaded by John Vandenberg:
Add main() to makecat
Change 216407 had a related patch set uploaded (by John Vandenberg):
Deadlock problem fixed by using requests
The problem was the sequence of actions used to set up the threads and such. @valhallasw had a very nice graph of the import sequence which shows how the deadlock occurs, which I stumble across occasionally but can never find when I want it. :/
Putting code in main() means all imports complete before main starts.