Skip to content

cant pickle asyncpg.record #451

Open
@crazyhouse33

Description

@crazyhouse33

Hi, I would like to know what make a record not picklable and if you have a solution to do what I want to do.
Basically I am doing a program that use persistent sessions: in case of crash, the programs save its state on the disk. Next lunch wont redo what it did before with success

I implement that with a global try except. I put my python "Session class" on disk, and retrieve it with pickle. One of Session class attribute is a list of record I gather at the start and I need for the rest of the session. However, I got a "cant pickle asyncpg.record" error which prevent me to do that.

The problem is that I also cant make a record object from python, accordingly to the doc. So I cant see any workaround like casting to dict before serialization and casting to record after

Activity

1st1

1st1 commented on Jun 6, 2019

@1st1
Member

Yes, we can add support for pickling.

bofeng

bofeng commented on Sep 13, 2020

@bofeng

Just got this "cant pickle asyncpg.record" error, I am wondering is there a progress on this support?

wvolkov

wvolkov commented on Jan 13, 2021

@wvolkov

@1st1 hi! Is there any timelines about that feature going live? Thanks!

Feijo

Feijo commented on May 2, 2021

@Feijo

Any news about it?

added a commit that references this issue on Feb 8, 2023
ab05c7b
linked a pull request that will close this issue on Feb 8, 2023
vmarkovtsev

vmarkovtsev commented on Feb 8, 2023

@vmarkovtsev

I am backporting this feature from our company's optimized fork: #1000

added 2 commits that reference this issue on Feb 8, 2023
d53779b
bd3a229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @1st1@Feijo@vmarkovtsev@bofeng@crazyhouse33

      Issue actions

        cant pickle asyncpg.record · Issue #451 · MagicStack/asyncpg