python-social-auth icon indicating copy to clipboard operation
python-social-auth copied to clipboard

Documentation gives regex for CLEAN_USERNAMES that isn't the one that's coded

Open TeckFA opened this issue 11 years ago • 1 comments

The docs say, in Username generation, that the regex for CLEAN_USERNAME is r'[^\w.@+-_]+', whereas the code has (in social.storage.base)

CLEAN_USERNAME_REGEX = re.compile(r'[^\w.@+_-]+', re.UNICODE)

The documented regex creates an interesting range, viz. '+-_'. The actual Python text puts '-' at the end, which is good; also, it has the re.UNICODE option, which, I think, is worth mentioning in the docs, as it provides guidance when thinking about locales for \w.

TeckFA avatar Sep 09 '15 10:09 TeckFA

Updated https://github.com/python-social-auth/social-docs/commit/551123cc61a545ef79b683592a0931f1a313cca5.

omab avatar Dec 27 '16 13:12 omab