sqlalchemy / sqlalchemy/dogpile.cache
unicode support in function_key_generator on Python2
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 299
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Migrated issue, originally created by Wolfgang Schnerring (wosc)
function_key_generator defines to_str=compat.string_type by default, which is str on Python2 (so breaks when the function gets non-ascii arguments).
The tests don't catch this, because they explicitly pass to_str=compat.text_type, which does the right thing.
Are the backwards-compatibility concerns, or could the default be changed to text_type, which would certainly be less... surprising, out-of-the-box.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate function_key_generator and the tests that currently pass to_str=compat.text_type. First inspect how compat.string_type and compat.text_type differ on Python 2, then reproduce the non-ASCII argument case using the default. Done means the default behavior is verified by a regression test while the stated backwards-compatibility concern is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100