jayvdb created this task. jayvdb added subscribers: jayvdb, valhallasw. jayvdb added projects: pywikibot-core, Pywikibot-network, Pywikibot-OAuth. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION LockableCookieJar has only one feature: self.lock is a threading.Lock()
cookielib.LWPCookieJar (verified in py2.6) also has a lock: self._cookies_lock = _threading.RLock()
As threadedhttp threads do not re-enter the two cookiejar parts of the request method, I fail to see how _threading.RLock() is not sufficient.
If an RLock is sufficient, this class can be removed, and therefore doesnt need to be considered for alternative http clients. (e.g. T98439).
If a proper Lock is needed, more documentation is needed, and add_cookie_header and extract_cookies methods should be subclassed so that the locking is encapsulated within the class.
TASK DETAIL https://phabricator.wikimedia.org/T98670
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: valhallasw, jayvdb, Aklapper, pywikipedia-bugs
gerritbot added a subscriber: gerritbot. gerritbot added a comment.
Change 209963 had a related patch set uploaded (by John Vandenberg): Remove LockableCookieJar
https://gerrit.wikimedia.org/r/209963
TASK DETAIL https://phabricator.wikimedia.org/T98670
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: gerritbot Cc: gerritbot, valhallasw, jayvdb, Aklapper, pywikipedia-bugs
gerritbot added a project: Patch-For-Review.
TASK DETAIL https://phabricator.wikimedia.org/T98670
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: gerritbot Cc: gerritbot, valhallasw, jayvdb, Aklapper, pywikipedia-bugs
gerritbot added a comment.
Change 209963 merged by jenkins-bot: Remove LockableCookieJar
https://gerrit.wikimedia.org/r/209963
TASK DETAIL https://phabricator.wikimedia.org/T98670
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: gerritbot Cc: gerritbot, valhallasw, jayvdb, Aklapper, pywikipedia-bugs
jayvdb closed this task as "Resolved". jayvdb claimed this task.
TASK DETAIL https://phabricator.wikimedia.org/T98670
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: gerritbot, valhallasw, jayvdb, Aklapper, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org