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

Remove global register_schemes calls #246

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions environ/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,21 +785,3 @@ def _absolute_join(base, *paths, **kwargs):
raise ImproperlyConfigured(
"Create required path: {0}".format(absolute_path))
return absolute_path


def register_scheme(scheme):
for method in dir(urlparselib):
if method.startswith('uses_'):
getattr(urlparselib, method).append(scheme)


def register_schemes(schemes):
for scheme in schemes:
register_scheme(scheme)


# Register database and cache schemes in URLs.
register_schemes(Env.DB_SCHEMES.keys())
register_schemes(Env.CACHE_SCHEMES.keys())
register_schemes(Env.SEARCH_SCHEMES.keys())
register_schemes(Env.EMAIL_SCHEMES.keys())