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

cant pickle asyncpg.record #451

Open
crazyhouse33 opened this issue Jun 5, 2019 · 5 comments · May be fixed by #1000
Open

cant pickle asyncpg.record #451

crazyhouse33 opened this issue Jun 5, 2019 · 5 comments · May be fixed by #1000

Comments

@crazyhouse33
Copy link

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

@1st1
Copy link
Member

1st1 commented Jun 6, 2019

Yes, we can add support for pickling.

@bofeng
Copy link

bofeng commented Sep 13, 2020

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

@wvolkov
Copy link

wvolkov commented Jan 13, 2021

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

@Feijo
Copy link

Feijo commented May 2, 2021

Any news about it?

vmarkovtsev added a commit to athenianco/asyncpg-rkt that referenced this issue Feb 8, 2023
@vmarkovtsev vmarkovtsev linked a pull request Feb 8, 2023 that will close this issue
@vmarkovtsev
Copy link

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

vmarkovtsev added a commit to athenianco/asyncpg-rkt that referenced this issue Feb 8, 2023
vmarkovtsev added a commit to athenianco/asyncpg-rkt that referenced this issue Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants