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

Fix recently-introduced encoding/decoding bugs. #74

Closed
wants to merge 3 commits into from

Conversation

kmaglione
Copy link
Contributor

This mainly fixes two encoding/decoding bugs that were introduced since 1.53:

  • unicode values are not properly decoded when retrieved on Python 2, and bytes values are improperly decoded as UTF-8 when retrieved on Python 3.
  • Values with types which inherit from unicode (e.g., markupsafe.Markup) are pickled as plain unicode values, rather than as the derived type.

I also ran into quite a lot of issues after I added tests, and tried to run them on Python 3. It seems that a lot of things were broken there, so the final commit which adds tests, also fixes existing test failures.

@timgraham
Copy link
Collaborator

Could you rebase your branch? I think this will fix #79 and #80 and there are tests included in those reports if you could add them.

@edmorley
Copy link
Contributor

@kmaglione I don't suppose you might get a chance to rebase this/add the tests mentioned above? :-)

@dsully
Copy link

dsully commented Dec 21, 2016

Ping.

There are no versions of python-memcached that work with Python 3 storing bytes.

@danpalmer
Copy link

Ping on this, it's been open for nearly 2 years. If there's anything I can do to help this get merged please let me know.

@danpalmer
Copy link

danpalmer commented Jul 6, 2017

Update – pylibmc appears to support bytes just fine on Python 3 so we've switched to that.

@timgraham
Copy link
Collaborator

The main fix form here is merged in e1f72da. If there are additional issues, feel free to send a new pull request.

@timgraham timgraham closed this Nov 14, 2017
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.

None yet

5 participants