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

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

Closed
TeckFA opened this issue Sep 9, 2015 · 1 comment

Comments

@TeckFA
Copy link

TeckFA commented Sep 9, 2015

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.

@omab
Copy link
Owner

omab commented Dec 27, 2016

@omab omab closed this as completed Dec 27, 2016
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

2 participants