-
Notifications
You must be signed in to change notification settings - Fork 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
Use full names for common.djangoapps imports; warn when using old style #25477
Conversation
03b9a3c
to
9d3f646
Compare
1c0ab81
to
259768f
Compare
@nedbat FYI, I amended a silly mistake in the "fix pylint violations" commit and rebased. I did the same for the canary PR. |
259768f
to
e0b062f
Compare
cc31f67
to
e92a6e3
Compare
Your PR has finished running tests. There were no failures. |
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
EdX Release Notice: This PR may have caused e2e tests to fail on Stage. If you're a member of the edX org, please visit #e2e-troubleshooting on Slack to help diagnose the cause of these failures. Otherwise, it is the reviewer's responsibility. E2E tests have failed. https://gocd.tools.edx.org/go/tab/pipeline/history/deploy_to_stage |
^ e2e failures should be fixed by https://github.com/edx/edx-platform/pull/25558 |
EdX Release Notice: This PR has been deployed to the production environment. |
EdX Release Notice: This PR has been rolled back from the production environment. |
This may smooth the re-rollout: https://github.com/edx/edx-platform/pull/25566 |
When rolling out #25477, we dropped hundreds of email activation tasks due to the renaming of student.send_activation_email to common.djangoapps.student.send_activation_email, and lost more when we rolled that PR back. This happens because of blue/green deployment: old workers are still online for a while after deploying, so there is a period of time when the task names are mismatched. To prevent this from happening again, this will make it so the import changes don't change the names of any of the Celery tasks.
EdX Release Notice: This PR has been deployed to the production environment. |
FYI @kdmccormick there is a change in this PR which is causing pylint to crash. To reproduce, run the following command:
The regexp that pylint chokes on is |
@regisb That PR I just linked is merged now; I can open a PR against koa.master later today. |
Yes, I think that would be great. Thanks @kdmccormick! |
Fix backport: https://github.com/edx/edx-platform/pull/25678 |
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477)
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477)
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477)
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477)
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477)
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477)
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477)
The short way of defining imports will be deprecated. (https://github.com/edx/edx-platform/pull/25477) (cherry picked from commit 472f0d0)
This is of the
sys.path
modification removal & cleanup, started by https://github.com/edx/edx-platform/pull/24616 . See the ADR for details.This PR fixes all imports of common/djangoapps code to use the preferred style (
import common.djangoapps.myapp..
) instead of the deprecated short version (import student...
). It also adds those modules toimport_shims/lms
andimport_shims/studio
to provide partial and temporary support for the old, shorter import style. Warnings of the classDeprecatedEdxPlatformImportWarning
are generated when the old style is used.Related ARCH-BOM ticket: https://openedx.atlassian.net/browse/ARCHBOM-1550