Skip to content

Comments

Prevent storing bytes in cache (fixes #1142)#1143

Merged
Natim merged 4 commits intomasterfrom
1142-storing-bytes
Mar 8, 2017
Merged

Prevent storing bytes in cache (fixes #1142)#1143
Natim merged 4 commits intomasterfrom
1142-storing-bytes

Conversation

@Natim
Copy link
Member

@Natim Natim commented Mar 8, 2017

I wonder if we should do it like that or rather to raise an error when trying to cache bytes.

Fixes #1142

  • Add tests.
  • Add a changelog entry.

r? @leplatrem

@leplatrem
Copy link
Contributor

leplatrem commented Mar 8, 2017

I'd rather raise when trying to cache bytes, so that we have clean signature in the interface.

But if you have good reason to cast, please do!

@Natim
Copy link
Member Author

Natim commented Mar 8, 2017

Yes that was my opinion too. Let's do that then :) Also it might break a bunch of plugins but it doesn't matter.

@leplatrem
Copy link
Contributor

it might break a bunch of plugins

We can bump a major, no problem. #1144 also introduces breaking changes in kinto.core.testing

self.assertEqual(*setget('foobar', {'b': [1, 2]}))
self.assertEqual(*setget('foobar', 3.14))

def test_bytes_are_converted_to_unicode(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover: test title does not match

@leplatrem leplatrem changed the title Reproducing #1142 with a test. Prevent storing bytes in cache (fixes #1142) Mar 8, 2017
@Natim Natim merged commit ef7517c into master Mar 8, 2017
@Natim Natim deleted the 1142-storing-bytes branch March 8, 2017 15:49
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.

2 participants