Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
e51fae37
Commit
e51fae37
authored
5 years ago
by
Feanil Patel
Browse files
Options
Downloads
Patches
Plain Diff
letters doesn't exist in python 3.6
Use `ascii_letters` instead which is a reasonable alternative for our usecases.
parent
4d1a320f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/envs/test.py
+2
-2
2 additions, 2 deletions
lms/envs/test.py
openedx/core/djangoapps/user_api/accounts/utils.py
+1
-1
1 addition, 1 deletion
openedx/core/djangoapps/user_api/accounts/utils.py
with
3 additions
and
3 deletions
lms/envs/test.py
+
2
−
2
View file @
e51fae37
...
...
@@ -18,7 +18,7 @@ import logging
import
os
from
collections
import
OrderedDict
from
random
import
choice
from
string
import
digits
,
letters
,
punctuation
from
string
import
digits
,
ascii_
letters
,
punctuation
from
uuid
import
uuid4
import
openid.oidutil
...
...
@@ -292,7 +292,7 @@ FEATURES['ENABLE_PAYMENT_FAKE'] = True
# the same settings, we can generate this randomly and guarantee
# that they are using the same secret.
RANDOM_SHARED_SECRET
=
''
.
join
(
choice
(
letters
+
digits
+
punctuation
)
choice
(
ascii_
letters
+
digits
+
punctuation
)
for
x
in
range
(
250
)
)
...
...
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/user_api/accounts/utils.py
+
1
−
1
View file @
e51fae37
...
...
@@ -180,7 +180,7 @@ def retrieve_last_sitewide_block_completed(user):
)
def
generate_password
(
length
=
12
,
chars
=
string
.
letters
+
string
.
digits
):
def
generate_password
(
length
=
12
,
chars
=
string
.
ascii_
letters
+
string
.
digits
):
"""
Generate a valid random password
"""
if
length
<
8
:
raise
ValueError
(
"
password must be at least 8 characters
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment