Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MozillaCookieJar does not support Firefox3 cookie files #46530

Closed
thekorn mannequin opened this issue Mar 12, 2008 · 5 comments
Closed

MozillaCookieJar does not support Firefox3 cookie files #46530

thekorn mannequin opened this issue Mar 12, 2008 · 5 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@thekorn
Copy link
Mannequin

thekorn mannequin commented Mar 12, 2008

BPO 2277
Nosy @gpshead
Files
  • 2277_handling_FF3_cookies.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gpshead'
    closed_at = <Date 2008-08-04.03:55:55.042>
    created_at = <Date 2008-03-12.08:35:52.952>
    labels = ['type-feature', 'library']
    title = 'MozillaCookieJar does not support Firefox3 cookie files'
    updated_at = <Date 2010-07-12.18:14:25.508>
    user = 'https://bugs.python.org/thekorn'

    bugs.python.org fields:

    activity = <Date 2010-07-12.18:14:25.508>
    actor = 'jjlee'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2008-08-04.03:55:55.042>
    closer = 'gregory.p.smith'
    components = ['Library (Lib)']
    creation = <Date 2008-03-12.08:35:52.952>
    creator = 'thekorn'
    dependencies = []
    files = ['9669']
    hgrepos = []
    issue_num = 2277
    keywords = ['patch']
    message_count = 5.0
    messages = ['63470', '63518', '69375', '70681', '110119']
    nosy_count = 5.0
    nosy_names = ['gregory.p.smith', 'jjlee', 'ghaering', 'thekorn', 'hongqn']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue2277'
    versions = ['Python 2.6']

    @thekorn
    Copy link
    Mannequin Author

    thekorn mannequin commented Mar 12, 2008

    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.

    Markus

    @thekorn
    Copy link
    Mannequin Author

    thekorn mannequin commented Mar 13, 2008

    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.

    Markus

    @gpshead
    Copy link
    Member

    gpshead commented Jul 7, 2008

    sounds like a good idea to add this. yay firefox 3. i'll review it.

    @gpshead gpshead added the stdlib Python modules in the Lib dir label Jul 7, 2008
    @gpshead gpshead self-assigned this Jul 7, 2008
    @gpshead gpshead added the type-feature A feature request or enhancement label Jul 7, 2008
    @gpshead
    Copy link
    Member

    gpshead commented Aug 4, 2008

    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.

    @gpshead gpshead closed this as completed Aug 4, 2008
    @jjlee
    Copy link
    Mannequin

    jjlee mannequin commented Jul 12, 2010

    There is code in PyPI project mechanize that implements this feature. That code is marked experimental though, due to lack of testing.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant