Skip to content

Use binary file read/write for marshalling#8

Open
coezbek wants to merge 1 commit intojmervine:masterfrom
coezbek:patch-3
Open

Use binary file read/write for marshalling#8
coezbek wants to merge 1 commit intojmervine:masterfrom
coezbek:patch-3

Conversation

@coezbek
Copy link

@coezbek coezbek commented Jul 29, 2020

I have used diskcached (with joy) for many years but only now stumbled upon an issue where a serialized hash can't be read again. Looking into the code I found that diskcached doesn't use binary file mode. I believe this is an error and bound to cause issues with newlines (\r\n vs. \r vs. \n) at least under Windows.

Could you merge my pull request?

I have used diskcached (with joy) for many years but only now stumbled upon an issue where a serialized hash can't be read again. Looking into the code I found that diskcached doesn't use binary file mode. I believe this is an error and bound to cause issues with newlines (\r\n vs. \r vs. \n) at least under Windows.

Could you merge my pull request?
@coezbek
Copy link
Author

coezbek commented Jul 29, 2020

I think occurs simply when marshalling an integer such as 13 directly as integer (i.e. not as a string), which causes a read to split the input during reading.

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 this pull request may close these issues.

1 participant