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

Give safe_unicode a more correct name #632

Closed
philippjfr opened this issue Apr 20, 2016 · 4 comments
Closed

Give safe_unicode a more correct name #632

philippjfr opened this issue Apr 20, 2016 · 4 comments
Assignees
Milestone

Comments

@philippjfr
Copy link
Member

The safe_unicode utility is very important in ensuring that bytes types are correctly cast to unicode but it does not safely cast all types to unicode as the name implies. We should come up with a more appropriate name.

@jlstevens
Copy link
Contributor

Thanks for filing this. I noticed the confusing name when reviewing a PR but I haven't managed to come up with a better name yet. It isn't 'safe' as there was an exception raised when using the built in unicode() was enough - what exactly does it do again?

@philippjfr
Copy link
Member Author

philippjfr commented Apr 20, 2016

It safely casts str types with various encodings to unicode in Python 2 but leaves non string types unaffected.

@jlstevens
Copy link
Contributor

So it goes from string encodings to unicode? Sounds like something I would expect to find in the standard library....

@jbednar
Copy link
Member

jbednar commented Apr 21, 2016

unicodify? ensure_unicode? to_unicode? promote_to_unicode?

@philippjfr philippjfr added this to the v1.6.0 milestone Apr 29, 2016
@philippjfr philippjfr self-assigned this Mar 4, 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

No branches or pull requests

3 participants