-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 archaic monkey patches #15338
Conversation
for opt in ('ENGINE', 'NAME', 'USER', 'PASSWORD', 'HOST', 'PORT'): # pragma: no cover | ||
if os.environ.get('AWX_TEST_DATABASE_%s' % opt, None): | ||
settings.DATABASES['default'][opt] = os.environ['AWX_TEST_DATABASE_%s' % opt] | ||
# Disable capturing all SQL queries in memory when in DEBUG mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like the exact opposite of what I would ever want...
In Django itself It now defers to https://docs.python.org/3/library/pkgutil.html#pkgutil.ModuleInfo Exactly where that gets its stuff from is more complex, but appears to resolve to |
@@ -106,46 +89,13 @@ def prepare_env(): | |||
|
|||
if not settings.DEBUG: # pragma: no cover | |||
warnings.simplefilter('ignore', DeprecationWarning) | |||
# Monkeypatch Django find_commands to also work with .pyc files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is surely a relic of closed source tower
shipping without source .py
files
779cf88
to
29dfbd2
Compare
Quality Gate passedIssues Measures |
Initial ("yolo") test run is looking good! |
SUMMARY
I am about 95% sure that we don't need any of these for any reason anymore.
Some are fairly obvious, like, if it modifies
awx-manage runserver
behavior, then we should be good, because that's outrageously unsupported in every sense of the word.However,
find_commands
is the most likely to have fallout here. I believe this was written for a time when the source was not distributed along with the compiled files, which is an issue resolved by going open source. I find it incredibly unlikely that someone is distributing AWX without the source files, and if they are, I would ask them to stop.ISSUE TYPE
COMPONENT NAME