This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: MozillaCookieJar does not support Firefox3 cookie files
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 2.6
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: ghaering, gregory.p.smith, hongqn, jjlee, thekorn
Priority: normal Keywords: patch

Created on 2008-03-12 08:35 by thekorn, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
2277_handling_FF3_cookies.diff thekorn, 2008-03-13 21:36
Messages (5)
msg63470 - (view) Author: Markus Korn (thekorn) Date: 2008-03-12 08:35
In Firefox 3 the cookies are stored in a sqlite database instead of a
txt-file. It would be nice if cookielib.MozillaCookieJar().load() could
support this.

msg63518 - (view) Author: Markus Korn (thekorn) Date: 2008-03-13 21:36
I had some time this evening and tried to create a patch.
I don't know if such a solution makes sense nor do I know if this fits
in the process of fixing bugs in python.

msg69375 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-07 04:58
sounds like a good idea to add this.  yay firefox 3.  i'll review it.
msg70681 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-08-04 03:55
Thanks.  I've looked over your code.  The logic looks good, however I'd
like to propose a better design and that this not be included in 2.6.

Instead of putting this functionality in the MozCookieJar class, it
should be its own new Firefox3CookieJar class as it is an entirely new
file format.

A much better implementation could be made that actually works with the
sqlite3 file as a database rather than taking ownership of it and
deleting all cookies and rewriting the entire file on save:

The FileCookieJar.delayload flag could now be honored.

The save() method should only do the necessary update/insert/delete
commands rather than rewriting everything.

Its a bit late to get this into Python 2.6/3.0 as the final beta is due
out next week.  But thats fine.  People who need to manipulate ff3
cookie files can use sqlite directly and when a nicer FileCookieJar for
them has been written we can consider including it in python 2.7/3.1. 
Until then it can be an external just like the the one for IE currently is.
msg110119 - (view) Author: John J Lee (jjlee) Date: 2010-07-12 18:14
There is code in PyPI project mechanize that implements this feature.  That code is marked experimental though, due to lack of testing.
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46530
2010-07-12 18:14:25jjleesetnosy: + jjlee
messages: + msg110119
2008-08-04 03:55:55gregory.p.smithsetstatus: open -> closed
resolution: rejected
messages: + msg70681
2008-07-07 04:58:33gregory.p.smithsetversions: + Python 2.6
nosy: + gregory.p.smith
messages: + msg69375
priority: normal
assignee: gregory.p.smith
components: + Library (Lib)
type: enhancement
2008-06-20 15:58:58hongqnsetnosy: + hongqn
2008-04-14 18:59:35ghaeringsetnosy: + ghaering
2008-03-13 21:36:05thekornsetfiles: + 2277_handling_FF3_cookies.diff
keywords: + patch
messages: + msg63518
2008-03-12 08:35:52thekorncreate