From 9cf2f9f298e5e8be3b3abcaadaf0b7a96d0de0df Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 30 Dec 2019 10:35:30 -0500 Subject: [PATCH] Run `2to3 -f future . -w` This will remove imports from __future__ that are no longer needed. https://docs.python.org/3.5/library/2to3.html#2to3fixer-future --- cms/__init__.py | 2 +- cms/celery.py | 2 +- cms/conftest.py | 2 +- cms/djangoapps/api/apps.py | 2 +- cms/djangoapps/api/urls.py | 2 +- cms/djangoapps/api/v1/serializers/course_runs.py | 2 +- .../api/v1/tests/test_serializers/test_course_runs.py | 2 +- cms/djangoapps/api/v1/tests/test_views/test_course_runs.py | 2 +- cms/djangoapps/api/v1/urls.py | 2 +- cms/djangoapps/api/v1/views/course_runs.py | 2 +- cms/djangoapps/cms_user_tasks/apps.py | 2 +- cms/djangoapps/cms_user_tasks/signals.py | 2 +- cms/djangoapps/cms_user_tasks/tasks.py | 2 +- cms/djangoapps/cms_user_tasks/tests.py | 2 +- cms/djangoapps/contentstore/admin.py | 2 +- cms/djangoapps/contentstore/api/tests/base.py | 2 +- cms/djangoapps/contentstore/api/tests/test_import.py | 2 +- cms/djangoapps/contentstore/api/tests/test_quality.py | 2 +- cms/djangoapps/contentstore/api/tests/test_validation.py | 2 +- cms/djangoapps/contentstore/api/urls.py | 2 +- cms/djangoapps/contentstore/api/views/course_import.py | 2 +- cms/djangoapps/contentstore/api/views/course_quality.py | 2 +- cms/djangoapps/contentstore/api/views/course_validation.py | 2 +- cms/djangoapps/contentstore/api/views/utils.py | 2 +- cms/djangoapps/contentstore/apps.py | 2 +- cms/djangoapps/contentstore/config/waffle.py | 2 +- cms/djangoapps/contentstore/config/waffle_utils.py | 2 +- cms/djangoapps/contentstore/course_group_config.py | 2 +- cms/djangoapps/contentstore/course_info_model.py | 2 +- cms/djangoapps/contentstore/courseware_index.py | 2 +- cms/djangoapps/contentstore/debug_file_uploader.py | 2 +- cms/djangoapps/contentstore/git_export_utils.py | 2 +- .../contentstore/management/commands/clean_cert_name.py | 2 +- .../contentstore/management/commands/cleanup_assets.py | 2 +- .../contentstore/management/commands/create_course.py | 2 +- .../contentstore/management/commands/delete_course.py | 2 +- .../contentstore/management/commands/delete_orphans.py | 2 +- .../contentstore/management/commands/edit_course_tabs.py | 2 +- .../contentstore/management/commands/empty_asset_trashcan.py | 2 +- cms/djangoapps/contentstore/management/commands/export.py | 2 +- .../contentstore/management/commands/export_all_courses.py | 2 +- .../management/commands/export_content_library.py | 2 +- cms/djangoapps/contentstore/management/commands/export_olx.py | 2 +- .../contentstore/management/commands/fix_not_found.py | 2 +- .../contentstore/management/commands/force_publish.py | 2 +- .../contentstore/management/commands/generate_courses.py | 2 +- cms/djangoapps/contentstore/management/commands/git_export.py | 2 +- cms/djangoapps/contentstore/management/commands/import.py | 2 +- .../management/commands/import_content_library.py | 2 +- .../contentstore/management/commands/migrate_to_split.py | 2 +- .../contentstore/management/commands/migrate_transcripts.py | 2 +- cms/djangoapps/contentstore/management/commands/prompt.py | 2 +- .../contentstore/management/commands/reindex_course.py | 2 +- .../contentstore/management/commands/reindex_library.py | 2 +- .../management/commands/restore_asset_from_trashcan.py | 2 +- .../management/commands/tests/test_cleanup_assets.py | 2 +- .../management/commands/tests/test_create_course.py | 2 +- .../management/commands/tests/test_delete_course.py | 2 +- .../management/commands/tests/test_delete_orphans.py | 2 +- .../contentstore/management/commands/tests/test_export.py | 2 +- .../management/commands/tests/test_export_all_courses.py | 2 +- .../contentstore/management/commands/tests/test_export_olx.py | 2 +- .../management/commands/tests/test_fix_not_found.py | 2 +- .../management/commands/tests/test_force_publish.py | 2 +- .../management/commands/tests/test_generate_courses.py | 2 +- .../contentstore/management/commands/tests/test_git_export.py | 2 +- .../contentstore/management/commands/tests/test_import.py | 2 +- .../management/commands/tests/test_migrate_to_split.py | 2 +- .../management/commands/tests/test_migrate_transcripts.py | 2 +- .../management/commands/tests/test_reindex_courses.py | 2 +- .../management/commands/tests/test_reindex_library.py | 2 +- .../management/commands/tests/test_video_thumbnails.py | 2 +- cms/djangoapps/contentstore/management/commands/utils.py | 2 +- .../contentstore/management/commands/video_thumbnails.py | 2 +- cms/djangoapps/contentstore/management/commands/xlint.py | 2 +- cms/djangoapps/contentstore/migrations/0001_initial.py | 2 +- .../contentstore/migrations/0002_add_assets_page_flag.py | 2 +- .../contentstore/migrations/0003_remove_assets_page_flag.py | 2 +- .../0004_remove_push_notification_configmodel_table.py | 2 +- cms/djangoapps/contentstore/models.py | 2 +- cms/djangoapps/contentstore/proctoring.py | 2 +- cms/djangoapps/contentstore/rules.py | 2 +- cms/djangoapps/contentstore/signals/handlers.py | 2 +- cms/djangoapps/contentstore/signals/signals.py | 2 +- cms/djangoapps/contentstore/storage.py | 2 +- cms/djangoapps/contentstore/tasks.py | 2 +- cms/djangoapps/contentstore/tests/test_clone_course.py | 2 +- cms/djangoapps/contentstore/tests/test_contentstore.py | 2 +- cms/djangoapps/contentstore/tests/test_core_caching.py | 2 +- cms/djangoapps/contentstore/tests/test_course_create_rerun.py | 2 +- cms/djangoapps/contentstore/tests/test_course_listing.py | 2 +- cms/djangoapps/contentstore/tests/test_course_settings.py | 2 +- cms/djangoapps/contentstore/tests/test_courseware_index.py | 2 +- cms/djangoapps/contentstore/tests/test_crud.py | 2 +- cms/djangoapps/contentstore/tests/test_export_git.py | 2 +- cms/djangoapps/contentstore/tests/test_gating.py | 2 +- cms/djangoapps/contentstore/tests/test_i18n.py | 2 +- cms/djangoapps/contentstore/tests/test_import.py | 2 +- cms/djangoapps/contentstore/tests/test_import_draft_order.py | 2 +- cms/djangoapps/contentstore/tests/test_import_pure_xblock.py | 2 +- cms/djangoapps/contentstore/tests/test_libraries.py | 2 +- cms/djangoapps/contentstore/tests/test_orphan.py | 2 +- cms/djangoapps/contentstore/tests/test_permissions.py | 2 +- cms/djangoapps/contentstore/tests/test_proctoring.py | 2 +- cms/djangoapps/contentstore/tests/test_request_event.py | 2 +- cms/djangoapps/contentstore/tests/test_signals.py | 2 +- cms/djangoapps/contentstore/tests/test_tasks.py | 2 +- cms/djangoapps/contentstore/tests/test_transcripts_utils.py | 2 +- cms/djangoapps/contentstore/tests/test_users_default_role.py | 2 +- cms/djangoapps/contentstore/tests/test_utils.py | 2 +- cms/djangoapps/contentstore/tests/test_video_utils.py | 2 +- cms/djangoapps/contentstore/tests/tests.py | 2 +- cms/djangoapps/contentstore/tests/utils.py | 2 +- cms/djangoapps/contentstore/utils.py | 2 +- cms/djangoapps/contentstore/video_utils.py | 2 +- cms/djangoapps/contentstore/views/access.py | 2 +- cms/djangoapps/contentstore/views/assets.py | 2 +- cms/djangoapps/contentstore/views/certificates.py | 2 +- cms/djangoapps/contentstore/views/checklists.py | 2 +- cms/djangoapps/contentstore/views/component.py | 2 +- cms/djangoapps/contentstore/views/course.py | 2 +- cms/djangoapps/contentstore/views/dev.py | 2 +- cms/djangoapps/contentstore/views/entrance_exam.py | 2 +- cms/djangoapps/contentstore/views/error.py | 2 +- cms/djangoapps/contentstore/views/export_git.py | 2 +- cms/djangoapps/contentstore/views/helpers.py | 2 +- cms/djangoapps/contentstore/views/import_export.py | 2 +- cms/djangoapps/contentstore/views/item.py | 2 +- cms/djangoapps/contentstore/views/library.py | 2 +- cms/djangoapps/contentstore/views/organization.py | 2 +- cms/djangoapps/contentstore/views/preview.py | 2 +- cms/djangoapps/contentstore/views/public.py | 2 +- cms/djangoapps/contentstore/views/session_kv_store.py | 2 +- cms/djangoapps/contentstore/views/tabs.py | 2 +- cms/djangoapps/contentstore/views/tests/test_access.py | 2 +- cms/djangoapps/contentstore/views/tests/test_assets.py | 2 +- cms/djangoapps/contentstore/views/tests/test_certificates.py | 2 +- .../contentstore/views/tests/test_container_page.py | 2 +- cms/djangoapps/contentstore/views/tests/test_course_index.py | 2 +- .../contentstore/views/tests/test_course_updates.py | 2 +- .../contentstore/views/tests/test_credit_eligibility.py | 2 +- cms/djangoapps/contentstore/views/tests/test_entrance_exam.py | 2 +- cms/djangoapps/contentstore/views/tests/test_gating.py | 2 +- .../contentstore/views/tests/test_group_configurations.py | 2 +- cms/djangoapps/contentstore/views/tests/test_header_menu.py | 2 +- cms/djangoapps/contentstore/views/tests/test_helpers.py | 2 +- cms/djangoapps/contentstore/views/tests/test_import_export.py | 2 +- cms/djangoapps/contentstore/views/tests/test_item.py | 2 +- cms/djangoapps/contentstore/views/tests/test_library.py | 2 +- cms/djangoapps/contentstore/views/tests/test_organizations.py | 2 +- cms/djangoapps/contentstore/views/tests/test_preview.py | 2 +- cms/djangoapps/contentstore/views/tests/test_tabs.py | 2 +- cms/djangoapps/contentstore/views/tests/test_textbooks.py | 2 +- .../contentstore/views/tests/test_transcript_settings.py | 2 +- cms/djangoapps/contentstore/views/tests/test_transcripts.py | 2 +- cms/djangoapps/contentstore/views/tests/test_unit_page.py | 2 +- cms/djangoapps/contentstore/views/tests/test_user.py | 2 +- cms/djangoapps/contentstore/views/tests/test_videos.py | 2 +- cms/djangoapps/contentstore/views/tests/utils.py | 2 +- cms/djangoapps/contentstore/views/transcript_settings.py | 2 +- cms/djangoapps/contentstore/views/transcripts_ajax.py | 2 +- cms/djangoapps/contentstore/views/user.py | 2 +- cms/djangoapps/contentstore/views/videos.py | 2 +- cms/djangoapps/course_creators/admin.py | 2 +- cms/djangoapps/course_creators/migrations/0001_initial.py | 2 +- cms/djangoapps/course_creators/models.py | 2 +- cms/djangoapps/course_creators/tests/test_admin.py | 2 +- cms/djangoapps/course_creators/tests/test_views.py | 2 +- cms/djangoapps/course_creators/views.py | 2 +- cms/djangoapps/maintenance/tests.py | 2 +- cms/djangoapps/maintenance/urls.py | 2 +- cms/djangoapps/maintenance/views.py | 2 +- cms/djangoapps/models/settings/course_grading.py | 2 +- cms/djangoapps/models/settings/course_metadata.py | 2 +- cms/djangoapps/models/settings/encoder.py | 2 +- cms/djangoapps/pipeline_js/utils.py | 2 +- cms/djangoapps/xblock_config/admin.py | 2 +- cms/djangoapps/xblock_config/apps.py | 2 +- cms/djangoapps/xblock_config/forms.py | 2 +- cms/djangoapps/xblock_config/migrations/0001_initial.py | 2 +- .../migrations/0002_courseeditltifieldsenabledflag.py | 2 +- cms/djangoapps/xblock_config/models.py | 2 +- cms/djangoapps/xblock_config/tests/test_models.py | 2 +- cms/envs/bok_choy.py | 2 +- cms/envs/common.py | 2 +- cms/envs/devstack.py | 2 +- cms/envs/devstack_optimized.py | 2 +- cms/envs/devstack_with_worker.py | 2 +- cms/envs/production.py | 2 +- cms/envs/test.py | 2 +- cms/envs/test_static_optimized.py | 2 +- cms/lib/xblock/authoring_mixin.py | 2 +- cms/lib/xblock/field_data.py | 2 +- cms/lib/xblock/runtime.py | 2 +- cms/lib/xblock/tagging/admin.py | 2 +- cms/lib/xblock/tagging/migrations/0001_initial.py | 2 +- cms/lib/xblock/tagging/migrations/0002_auto_20170116_1541.py | 2 +- cms/lib/xblock/tagging/models.py | 2 +- cms/lib/xblock/tagging/tagging.py | 2 +- cms/lib/xblock/tagging/test.py | 2 +- cms/lib/xblock/test/test_authoring_mixin.py | 2 +- cms/lib/xblock/test/test_runtime.py | 2 +- cms/startup.py | 2 +- cms/urls.py | 2 +- cms/urls_dev.py | 2 +- cms/wsgi.py | 2 +- common/djangoapps/course_action_state/managers.py | 2 +- .../djangoapps/course_action_state/migrations/0001_initial.py | 2 +- common/djangoapps/course_action_state/models.py | 2 +- common/djangoapps/course_action_state/tests/test_managers.py | 2 +- .../course_action_state/tests/test_rerun_manager.py | 2 +- common/djangoapps/course_modes/admin.py | 2 +- common/djangoapps/course_modes/api/serializers.py | 2 +- common/djangoapps/course_modes/api/urls.py | 2 +- common/djangoapps/course_modes/api/v1/tests/test_views.py | 2 +- common/djangoapps/course_modes/api/v1/urls.py | 2 +- common/djangoapps/course_modes/api/v1/views.py | 2 +- common/djangoapps/course_modes/apps.py | 2 +- common/djangoapps/course_modes/helpers.py | 2 +- common/djangoapps/course_modes/migrations/0001_initial.py | 2 +- .../0002_coursemode_expiration_datetime_is_explicit.py | 2 +- .../course_modes/migrations/0003_auto_20151113_1443.py | 2 +- .../course_modes/migrations/0004_auto_20151113_1457.py | 2 +- .../course_modes/migrations/0005_auto_20151217_0958.py | 2 +- .../course_modes/migrations/0006_auto_20160208_1407.py | 2 +- .../course_modes/migrations/0007_coursemode_bulk_sku.py | 2 +- .../migrations/0008_course_key_field_to_foreign_key.py | 2 +- .../migrations/0009_suggested_prices_to_charfield.py | 2 +- .../migrations/0010_archived_suggested_prices_to_charfield.py | 2 +- .../migrations/0011_change_regex_for_comma_separated_ints.py | 2 +- .../course_modes/migrations/0012_historicalcoursemode.py | 2 +- common/djangoapps/course_modes/models.py | 2 +- common/djangoapps/course_modes/signals.py | 2 +- common/djangoapps/course_modes/tests/factories.py | 2 +- common/djangoapps/course_modes/tests/test_admin.py | 2 +- common/djangoapps/course_modes/tests/test_models.py | 2 +- common/djangoapps/course_modes/tests/test_signals.py | 2 +- common/djangoapps/course_modes/tests/test_views.py | 2 +- common/djangoapps/course_modes/urls.py | 2 +- common/djangoapps/course_modes/views.py | 2 +- common/djangoapps/database_fixups/migrations/0001_initial.py | 2 +- common/djangoapps/edxmako/apps.py | 2 +- common/djangoapps/edxmako/backend.py | 2 +- common/djangoapps/edxmako/makoloader.py | 2 +- common/djangoapps/edxmako/paths.py | 2 +- common/djangoapps/edxmako/request_context.py | 2 +- common/djangoapps/edxmako/shortcuts.py | 2 +- common/djangoapps/edxmako/template.py | 2 +- common/djangoapps/edxmako/tests.py | 2 +- common/djangoapps/entitlements/admin.py | 2 +- common/djangoapps/entitlements/api/urls.py | 2 +- common/djangoapps/entitlements/api/v1/filters.py | 2 +- common/djangoapps/entitlements/api/v1/permissions.py | 2 +- common/djangoapps/entitlements/api/v1/serializers.py | 2 +- .../djangoapps/entitlements/api/v1/tests/test_serializers.py | 2 +- common/djangoapps/entitlements/api/v1/tests/test_views.py | 2 +- common/djangoapps/entitlements/api/v1/urls.py | 2 +- common/djangoapps/entitlements/api/v1/views.py | 2 +- common/djangoapps/entitlements/apps.py | 2 +- .../management/commands/expire_old_entitlements.py | 2 +- .../management/commands/tests/test_expire_old_entitlements.py | 2 +- common/djangoapps/entitlements/migrations/0001_initial.py | 2 +- .../entitlements/migrations/0002_auto_20171102_0719.py | 2 +- .../entitlements/migrations/0003_auto_20171205_1431.py | 2 +- .../entitlements/migrations/0004_auto_20171206_1729.py | 2 +- .../migrations/0005_courseentitlementsupportdetail.py | 2 +- .../migrations/0006_courseentitlementsupportdetail_action.py | 2 +- .../migrations/0007_change_expiration_period_default.py | 2 +- .../entitlements/migrations/0008_auto_20180328_1107.py | 2 +- .../migrations/0009_courseentitlement_refund_locked.py | 2 +- .../entitlements/migrations/0010_backfill_refund_lock.py | 2 +- .../migrations/0011_historicalcourseentitlement.py | 2 +- .../migrations/0012_allow_blank_order_number_values.py | 2 +- .../0013_historicalcourseentitlementsupportdetail.py | 2 +- common/djangoapps/entitlements/models.py | 2 +- common/djangoapps/entitlements/signals.py | 2 +- common/djangoapps/entitlements/tasks.py | 2 +- common/djangoapps/entitlements/tests/factories.py | 2 +- common/djangoapps/entitlements/tests/test_models.py | 2 +- common/djangoapps/entitlements/tests/test_tasks.py | 2 +- common/djangoapps/entitlements/tests/test_utils.py | 2 +- common/djangoapps/entitlements/utils.py | 2 +- common/djangoapps/pipeline_mako/__init__.py | 2 +- common/djangoapps/pipeline_mako/helpers/studiofrontend.py | 2 +- common/djangoapps/pipeline_mako/tests/test_render.py | 2 +- common/djangoapps/pipeline_mako/tests/test_static_content.py | 2 +- common/djangoapps/static_replace/__init__.py | 2 +- common/djangoapps/static_replace/admin.py | 2 +- .../management/commands/clear_collectstatic_cache.py | 2 +- common/djangoapps/static_replace/migrations/0001_initial.py | 2 +- .../migrations/0002_assetexcludedextensionsconfig.py | 2 +- common/djangoapps/static_replace/models.py | 2 +- common/djangoapps/static_replace/test/test_static_replace.py | 2 +- common/djangoapps/status/migrations/0001_initial.py | 2 +- common/djangoapps/status/migrations/0002_update_help_text.py | 2 +- common/djangoapps/status/models.py | 2 +- common/djangoapps/status/status.py | 2 +- common/djangoapps/status/tests.py | 2 +- common/djangoapps/student/__init__.py | 2 +- common/djangoapps/student/admin.py | 2 +- common/djangoapps/student/apps.py | 2 +- common/djangoapps/student/auth.py | 2 +- common/djangoapps/student/forms.py | 2 +- common/djangoapps/student/helpers.py | 2 +- common/djangoapps/student/management/commands/add_to_group.py | 2 +- .../student/management/commands/anonymized_id_mapping.py | 2 +- common/djangoapps/student/management/commands/assigngroups.py | 2 +- .../student/management/commands/bulk_change_enrollment.py | 2 +- .../student/management/commands/bulk_change_enrollment_csv.py | 2 +- .../djangoapps/student/management/commands/bulk_unenroll.py | 2 +- .../student/management/commands/cert_restriction.py | 2 +- .../management/commands/change_eligibility_deadline.py | 2 +- .../student/management/commands/change_enrollment.py | 2 +- .../management/commands/change_enterprise_user_username.py | 2 +- .../student/management/commands/create_random_users.py | 2 +- .../management/commands/delete_historical_enrollment_data.py | 2 +- .../student/management/commands/export_staff_users.py | 2 +- common/djangoapps/student/management/commands/manage_group.py | 2 +- common/djangoapps/student/management/commands/manage_user.py | 2 +- .../commands/populate_created_on_site_user_attribute.py | 2 +- common/djangoapps/student/management/commands/set_staff.py | 2 +- .../djangoapps/student/management/commands/set_superuser.py | 2 +- .../student/management/commands/transfer_students.py | 2 +- .../student/management/tests/test_bulk_change_enrollment.py | 2 +- .../management/tests/test_bulk_change_enrollment_csv.py | 2 +- .../djangoapps/student/management/tests/test_bulk_unenroll.py | 2 +- .../management/tests/test_change_eligibility_deadline.py | 2 +- .../student/management/tests/test_change_enrollment.py | 2 +- .../management/tests/test_change_enterprise_user_username.py | 2 +- .../student/management/tests/test_create_random_users.py | 2 +- .../djangoapps/student/management/tests/test_manage_group.py | 2 +- .../djangoapps/student/management/tests/test_manage_user.py | 2 +- .../tests/test_populate_created_on_site_user_attribute.py | 2 +- .../student/management/tests/test_transfer_students.py | 2 +- common/djangoapps/student/message_types.py | 2 +- common/djangoapps/student/middleware.py | 2 +- common/djangoapps/student/migrations/0001_initial.py | 2 +- .../djangoapps/student/migrations/0002_auto_20151208_1034.py | 2 +- .../djangoapps/student/migrations/0003_auto_20160516_0938.py | 2 +- .../djangoapps/student/migrations/0004_auto_20160531_1422.py | 2 +- .../djangoapps/student/migrations/0005_auto_20160531_1653.py | 2 +- .../student/migrations/0006_logoutviewconfiguration.py | 2 +- .../migrations/0007_registrationcookieconfiguration.py | 2 +- .../djangoapps/student/migrations/0008_auto_20161117_1209.py | 2 +- .../djangoapps/student/migrations/0009_auto_20170111_0422.py | 2 +- .../djangoapps/student/migrations/0010_auto_20170207_0458.py | 2 +- .../migrations/0011_course_key_field_to_foreign_key.py | 2 +- common/djangoapps/student/migrations/0012_sociallink.py | 2 +- .../migrations/0013_delete_historical_enrollment_records.py | 2 +- .../student/migrations/0014_courseenrollmentallowed_user.py | 2 +- .../student/migrations/0015_manualenrollmentaudit_add_role.py | 2 +- .../0016_coursenrollment_course_on_delete_do_nothing.py | 2 +- common/djangoapps/student/migrations/0017_accountrecovery.py | 2 +- .../student/migrations/0018_remove_password_history.py | 2 +- .../djangoapps/student/migrations/0019_auto_20181221_0540.py | 2 +- .../djangoapps/student/migrations/0020_auto_20190227_2019.py | 2 +- .../student/migrations/0021_historicalcourseenrollment.py | 2 +- .../student/migrations/0022_indexing_in_courseenrollment.py | 2 +- .../student/migrations/0023_bulkunenrollconfiguration.py | 2 +- .../student/migrations/0024_fbeenrollmentexclusion.py | 2 +- .../djangoapps/student/migrations/0025_auto_20191101_1846.py | 2 +- common/djangoapps/student/migrations/0026_allowedauthuser.py | 2 +- .../migrations/0027_courseenrollment_mode_callable_default.py | 2 +- common/djangoapps/student/models.py | 2 +- common/djangoapps/student/role_helpers.py | 2 +- common/djangoapps/student/roles.py | 2 +- common/djangoapps/student/signals/__init__.py | 2 +- common/djangoapps/student/signals/receivers.py | 2 +- common/djangoapps/student/signals/signals.py | 2 +- common/djangoapps/student/tasks.py | 2 +- common/djangoapps/student/tests/factories.py | 2 +- common/djangoapps/student/tests/test_activate_account.py | 2 +- common/djangoapps/student/tests/test_admin_views.py | 2 +- common/djangoapps/student/tests/test_authz.py | 2 +- common/djangoapps/student/tests/test_bulk_email_settings.py | 2 +- common/djangoapps/student/tests/test_certificates.py | 2 +- .../djangoapps/student/tests/test_configuration_overrides.py | 2 +- common/djangoapps/student/tests/test_course_listing.py | 2 +- common/djangoapps/student/tests/test_credit.py | 2 +- common/djangoapps/student/tests/test_email.py | 2 +- common/djangoapps/student/tests/test_enrollment.py | 2 +- common/djangoapps/student/tests/test_events.py | 2 +- common/djangoapps/student/tests/test_helpers.py | 2 +- common/djangoapps/student/tests/test_linkedin.py | 2 +- common/djangoapps/student/tests/test_long_username_email.py | 2 +- common/djangoapps/student/tests/test_models.py | 2 +- common/djangoapps/student/tests/test_parental_controls.py | 2 +- common/djangoapps/student/tests/test_password_policy.py | 2 +- common/djangoapps/student/tests/test_recent_enrollments.py | 2 +- common/djangoapps/student/tests/test_refunds.py | 2 +- common/djangoapps/student/tests/test_retirement.py | 2 +- common/djangoapps/student/tests/test_roles.py | 2 +- common/djangoapps/student/tests/test_tasks.py | 2 +- .../djangoapps/student/tests/test_user_profile_properties.py | 2 +- common/djangoapps/student/tests/test_userstanding.py | 2 +- common/djangoapps/student/tests/test_verification_status.py | 2 +- common/djangoapps/student/tests/test_views.py | 2 +- common/djangoapps/student/tests/tests.py | 2 +- common/djangoapps/student/text_me_the_app.py | 2 +- common/djangoapps/student/urls.py | 2 +- common/djangoapps/student/views/__init__.py | 2 +- common/djangoapps/student/views/dashboard.py | 2 +- common/djangoapps/student/views/management.py | 2 +- common/djangoapps/terrain/stubs/catalog.py | 2 +- common/djangoapps/terrain/stubs/comments.py | 2 +- common/djangoapps/terrain/stubs/ecommerce.py | 2 +- common/djangoapps/terrain/stubs/edxnotes.py | 2 +- common/djangoapps/terrain/stubs/http.py | 2 +- common/djangoapps/terrain/stubs/lti.py | 2 +- common/djangoapps/terrain/stubs/start.py | 2 +- common/djangoapps/terrain/stubs/tests/test_edxnotes.py | 2 +- common/djangoapps/terrain/stubs/tests/test_http.py | 2 +- common/djangoapps/terrain/stubs/tests/test_lti_stub.py | 2 +- common/djangoapps/terrain/stubs/tests/test_video.py | 2 +- common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py | 2 +- common/djangoapps/terrain/stubs/tests/test_youtube_stub.py | 2 +- common/djangoapps/terrain/stubs/video_source.py | 2 +- common/djangoapps/terrain/stubs/xqueue.py | 2 +- common/djangoapps/terrain/stubs/youtube.py | 2 +- common/djangoapps/third_party_auth/__init__.py | 2 +- common/djangoapps/third_party_auth/admin.py | 2 +- common/djangoapps/third_party_auth/api/permissions.py | 2 +- common/djangoapps/third_party_auth/api/serializers.py | 2 +- .../djangoapps/third_party_auth/api/tests/test_permissions.py | 2 +- common/djangoapps/third_party_auth/api/tests/test_views.py | 2 +- common/djangoapps/third_party_auth/api/urls.py | 2 +- common/djangoapps/third_party_auth/api/views.py | 2 +- common/djangoapps/third_party_auth/apps.py | 2 +- common/djangoapps/third_party_auth/decorators.py | 2 +- common/djangoapps/third_party_auth/dummy.py | 2 +- common/djangoapps/third_party_auth/exceptions.py | 2 +- common/djangoapps/third_party_auth/lti.py | 2 +- .../management/commands/remove_social_auth_users.py | 2 +- .../djangoapps/third_party_auth/management/commands/saml.py | 2 +- .../commands/tests/test_remove_social_auth_users.py | 2 +- .../third_party_auth/management/commands/tests/test_saml.py | 2 +- common/djangoapps/third_party_auth/middleware.py | 2 +- common/djangoapps/third_party_auth/migrations/0001_initial.py | 2 +- .../migrations/0002_schema__provider_icon_image.py | 2 +- .../migrations/0003_samlproviderconfig_debug_mode.py | 2 +- .../third_party_auth/migrations/0004_add_visible_field.py | 2 +- .../third_party_auth/migrations/0005_add_site_field.py | 2 +- .../0006_samlproviderconfig_automatic_refresh_enabled.py | 2 +- .../third_party_auth/migrations/0007_auto_20170406_0912.py | 2 +- .../third_party_auth/migrations/0008_auto_20170413_1455.py | 2 +- .../third_party_auth/migrations/0009_auto_20170415_1144.py | 2 +- .../migrations/0010_add_skip_hinted_login_dialog_field.py | 2 +- .../third_party_auth/migrations/0011_auto_20170616_0112.py | 2 +- .../third_party_auth/migrations/0012_auto_20170626_1135.py | 2 +- .../migrations/0013_sync_learner_profile_data.py | 2 +- .../third_party_auth/migrations/0014_auto_20171222_1233.py | 2 +- .../migrations/0015_samlproviderconfig_archived.py | 2 +- .../third_party_auth/migrations/0016_auto_20180130_0938.py | 2 +- .../0017_remove_icon_class_image_secondary_fields.py | 2 +- .../third_party_auth/migrations/0018_auto_20180327_1631.py | 2 +- .../third_party_auth/migrations/0019_consolidate_slug.py | 2 +- .../third_party_auth/migrations/0020_cleanup_slug_fields.py | 2 +- .../third_party_auth/migrations/0021_sso_id_verification.py | 2 +- .../third_party_auth/migrations/0022_auto_20181012_0307.py | 2 +- .../third_party_auth/migrations/0023_auto_20190418_2033.py | 2 +- .../third_party_auth/migrations/0024_fix_edit_disallowed.py | 2 +- common/djangoapps/third_party_auth/models.py | 2 +- common/djangoapps/third_party_auth/pipeline.py | 2 +- common/djangoapps/third_party_auth/provider.py | 2 +- common/djangoapps/third_party_auth/saml.py | 2 +- common/djangoapps/third_party_auth/settings.py | 2 +- common/djangoapps/third_party_auth/strategy.py | 2 +- common/djangoapps/third_party_auth/tasks.py | 2 +- .../tests/data/saml_identity_provider_mock_data.py | 2 +- common/djangoapps/third_party_auth/tests/factories.py | 2 +- common/djangoapps/third_party_auth/tests/specs/base.py | 2 +- .../djangoapps/third_party_auth/tests/specs/test_azuread.py | 2 +- .../djangoapps/third_party_auth/tests/specs/test_generic.py | 2 +- common/djangoapps/third_party_auth/tests/specs/test_google.py | 2 +- .../djangoapps/third_party_auth/tests/specs/test_linkedin.py | 2 +- common/djangoapps/third_party_auth/tests/specs/test_lti.py | 2 +- .../djangoapps/third_party_auth/tests/specs/test_testshib.py | 2 +- .../djangoapps/third_party_auth/tests/specs/test_twitter.py | 2 +- common/djangoapps/third_party_auth/tests/test_admin.py | 2 +- common/djangoapps/third_party_auth/tests/test_decorators.py | 2 +- common/djangoapps/third_party_auth/tests/test_lti.py | 2 +- common/djangoapps/third_party_auth/tests/test_middleware.py | 2 +- common/djangoapps/third_party_auth/tests/test_pipeline.py | 2 +- .../third_party_auth/tests/test_pipeline_integration.py | 2 +- common/djangoapps/third_party_auth/tests/test_provider.py | 2 +- common/djangoapps/third_party_auth/tests/test_saml.py | 2 +- common/djangoapps/third_party_auth/tests/test_settings.py | 2 +- common/djangoapps/third_party_auth/tests/test_utils.py | 2 +- common/djangoapps/third_party_auth/tests/test_views.py | 2 +- common/djangoapps/third_party_auth/tests/testutil.py | 2 +- common/djangoapps/third_party_auth/tests/utils.py | 2 +- common/djangoapps/third_party_auth/urls.py | 2 +- common/djangoapps/third_party_auth/utils.py | 2 +- common/djangoapps/third_party_auth/views.py | 2 +- common/djangoapps/track/admin.py | 2 +- common/djangoapps/track/backends/__init__.py | 2 +- common/djangoapps/track/backends/django.py | 2 +- common/djangoapps/track/backends/logger.py | 2 +- common/djangoapps/track/backends/mongodb.py | 2 +- common/djangoapps/track/backends/tests/test_django.py | 2 +- common/djangoapps/track/backends/tests/test_logger.py | 2 +- common/djangoapps/track/backends/tests/test_mongodb.py | 2 +- common/djangoapps/track/contexts.py | 2 +- common/djangoapps/track/event_transaction_utils.py | 2 +- .../track/management/commands/tracked_dummy_command.py | 2 +- .../djangoapps/track/management/tests/test_tracked_command.py | 2 +- common/djangoapps/track/management/tracked_command.py | 2 +- common/djangoapps/track/middleware.py | 2 +- common/djangoapps/track/migrations/0001_initial.py | 2 +- common/djangoapps/track/models.py | 2 +- common/djangoapps/track/segment.py | 2 +- common/djangoapps/track/shim.py | 2 +- common/djangoapps/track/tests/__init__.py | 2 +- common/djangoapps/track/tests/test_contexts.py | 2 +- common/djangoapps/track/tests/test_logs.py | 2 +- common/djangoapps/track/tests/test_middleware.py | 2 +- common/djangoapps/track/tests/test_segment.py | 2 +- common/djangoapps/track/tests/test_shim.py | 2 +- common/djangoapps/track/tests/test_tracker.py | 2 +- common/djangoapps/track/tests/test_util.py | 2 +- common/djangoapps/track/tracker.py | 2 +- common/djangoapps/track/transformers.py | 2 +- common/djangoapps/track/urls.py | 2 +- common/djangoapps/track/utils.py | 2 +- common/djangoapps/track/views/__init__.py | 2 +- common/djangoapps/track/views/segmentio.py | 2 +- common/djangoapps/track/views/tests/base.py | 2 +- common/djangoapps/track/views/tests/test_segmentio.py | 2 +- common/djangoapps/track/views/tests/test_views.py | 2 +- common/djangoapps/util/admin.py | 2 +- common/djangoapps/util/cache.py | 2 +- common/djangoapps/util/config_parse.py | 2 +- common/djangoapps/util/course.py | 2 +- common/djangoapps/util/date_utils.py | 2 +- common/djangoapps/util/db.py | 2 +- common/djangoapps/util/disable_rate_limit.py | 2 +- common/djangoapps/util/file.py | 2 +- common/djangoapps/util/json_request.py | 2 +- common/djangoapps/util/keyword_substitution.py | 2 +- common/djangoapps/util/memcache.py | 2 +- common/djangoapps/util/migrations/0001_initial.py | 2 +- .../util/migrations/0002_data__default_rate_limit_config.py | 2 +- common/djangoapps/util/milestones_helpers.py | 2 +- common/djangoapps/util/model_utils.py | 2 +- common/djangoapps/util/models.py | 2 +- common/djangoapps/util/organizations_helpers.py | 2 +- common/djangoapps/util/password_policy_validators.py | 2 +- common/djangoapps/util/query.py | 2 +- common/djangoapps/util/request_rate_limiter.py | 2 +- common/djangoapps/util/testing.py | 2 +- common/djangoapps/util/tests/mixins/discovery.py | 2 +- common/djangoapps/util/tests/test_course.py | 2 +- common/djangoapps/util/tests/test_date_utils.py | 2 +- common/djangoapps/util/tests/test_db.py | 2 +- common/djangoapps/util/tests/test_disable_rate_limit.py | 2 +- common/djangoapps/util/tests/test_django_utils.py | 2 +- common/djangoapps/util/tests/test_file.py | 2 +- common/djangoapps/util/tests/test_json_request.py | 2 +- common/djangoapps/util/tests/test_keyword_sub_utils.py | 2 +- common/djangoapps/util/tests/test_memcache.py | 2 +- common/djangoapps/util/tests/test_milestones_helpers.py | 2 +- common/djangoapps/util/tests/test_organizations_helpers.py | 2 +- .../djangoapps/util/tests/test_password_policy_validators.py | 2 +- common/djangoapps/util/tests/test_sandboxing.py | 2 +- common/djangoapps/util/tests/test_string_utils.py | 2 +- common/djangoapps/util/url.py | 2 +- common/djangoapps/util/views.py | 2 +- common/djangoapps/xblock_django/admin.py | 2 +- common/djangoapps/xblock_django/api.py | 2 +- .../xblock_django/management/commands/ensure_indexes.py | 2 +- common/djangoapps/xblock_django/migrations/0001_initial.py | 2 +- .../xblock_django/migrations/0002_auto_20160204_0809.py | 2 +- .../xblock_django/migrations/0003_add_new_config_models.py | 2 +- .../migrations/0004_delete_xblock_disable_config.py | 2 +- common/djangoapps/xblock_django/models.py | 2 +- common/djangoapps/xblock_django/tests/test_api.py | 2 +- common/djangoapps/xblock_django/tests/test_user_service.py | 2 +- common/djangoapps/xblock_django/user_service.py | 2 +- common/lib/capa/capa/capa_problem.py | 2 +- common/lib/capa/capa/checker.py | 2 +- common/lib/capa/capa/customrender.py | 2 +- common/lib/capa/capa/inputtypes.py | 2 +- common/lib/capa/capa/responsetypes.py | 2 +- common/lib/capa/capa/safe_exec/safe_exec.py | 2 +- common/lib/capa/capa/safe_exec/tests/test_lazymod.py | 2 +- common/lib/capa/capa/safe_exec/tests/test_safe_exec.py | 2 +- common/lib/capa/capa/tests/helpers.py | 2 +- common/lib/capa/capa/tests/response_xml_factory.py | 2 +- common/lib/capa/capa/tests/test_answer_pool.py | 2 +- common/lib/capa/capa/tests/test_capa_problem.py | 2 +- common/lib/capa/capa/tests/test_correctmap.py | 2 +- common/lib/capa/capa/tests/test_customrender.py | 2 +- common/lib/capa/capa/tests/test_hint_functionality.py | 2 +- common/lib/capa/capa/tests/test_html_render.py | 2 +- common/lib/capa/capa/tests/test_input_templates.py | 2 +- common/lib/capa/capa/tests/test_inputtypes.py | 2 +- common/lib/capa/capa/tests/test_responsetypes.py | 2 +- common/lib/capa/capa/tests/test_shuffle.py | 2 +- common/lib/capa/capa/tests/test_targeted_feedback.py | 2 +- common/lib/capa/capa/tests/test_util.py | 2 +- common/lib/capa/capa/util.py | 2 +- common/lib/capa/capa/xqueue_interface.py | 2 +- common/lib/capa/setup.py | 2 +- common/lib/conftest.py | 2 +- common/lib/safe_lxml/safe_lxml/__init__.py | 2 +- common/lib/safe_lxml/safe_lxml/etree.py | 2 +- common/lib/safe_lxml/safe_lxml/tests.py | 2 +- common/lib/safe_lxml/setup.py | 2 +- common/lib/sandbox-packages/eia.py | 2 +- common/lib/sandbox-packages/loncapa/loncapa_check.py | 2 +- common/lib/sandbox-packages/setup.py | 2 +- common/lib/sandbox-packages/verifiers/draganddrop.py | 2 +- common/lib/sandbox-packages/verifiers/tests_draganddrop.py | 2 +- common/lib/symmath/setup.py | 2 +- common/lib/symmath/symmath/formula.py | 2 +- common/lib/symmath/symmath/symmath_check.py | 2 +- common/lib/symmath/symmath/test_formula.py | 2 +- common/lib/symmath/symmath/test_symmath_check.py | 2 +- common/lib/xmodule/setup.py | 2 +- common/lib/xmodule/xmodule/annotatable_module.py | 2 +- common/lib/xmodule/xmodule/annotator_mixin.py | 2 +- common/lib/xmodule/xmodule/assetstore/__init__.py | 2 +- common/lib/xmodule/xmodule/assetstore/assetmgr.py | 2 +- common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py | 2 +- common/lib/xmodule/xmodule/backcompat_module.py | 2 +- common/lib/xmodule/xmodule/capa_base.py | 2 +- common/lib/xmodule/xmodule/capa_module.py | 2 +- common/lib/xmodule/xmodule/conditional_module.py | 2 +- common/lib/xmodule/xmodule/contentstore/content.py | 2 +- common/lib/xmodule/xmodule/contentstore/django.py | 2 +- common/lib/xmodule/xmodule/contentstore/mongo.py | 2 +- common/lib/xmodule/xmodule/contentstore/utils.py | 2 +- common/lib/xmodule/xmodule/course_metadata_utils.py | 2 +- common/lib/xmodule/xmodule/course_module.py | 2 +- common/lib/xmodule/xmodule/editing_module.py | 2 +- common/lib/xmodule/xmodule/edxnotes_utils.py | 2 +- common/lib/xmodule/xmodule/error_module.py | 2 +- common/lib/xmodule/xmodule/errortracker.py | 2 +- common/lib/xmodule/xmodule/fields.py | 2 +- common/lib/xmodule/xmodule/graders.py | 2 +- common/lib/xmodule/xmodule/hidden_module.py | 2 +- common/lib/xmodule/xmodule/html_checker.py | 2 +- common/lib/xmodule/xmodule/html_module.py | 2 +- common/lib/xmodule/xmodule/library_content_module.py | 2 +- common/lib/xmodule/xmodule/library_root_xblock.py | 2 +- common/lib/xmodule/xmodule/library_tools.py | 2 +- common/lib/xmodule/xmodule/lti_2_util.py | 2 +- common/lib/xmodule/xmodule/lti_module.py | 2 +- common/lib/xmodule/xmodule/mako_module.py | 2 +- common/lib/xmodule/xmodule/modulestore/__init__.py | 2 +- common/lib/xmodule/xmodule/modulestore/django.py | 2 +- common/lib/xmodule/xmodule/modulestore/draft.py | 2 +- common/lib/xmodule/xmodule/modulestore/draft_and_published.py | 2 +- common/lib/xmodule/xmodule/modulestore/edit_info.py | 2 +- common/lib/xmodule/xmodule/modulestore/inheritance.py | 2 +- common/lib/xmodule/xmodule/modulestore/mixed.py | 2 +- .../lib/xmodule/xmodule/modulestore/modulestore_settings.py | 2 +- common/lib/xmodule/xmodule/modulestore/mongo/__init__.py | 2 +- common/lib/xmodule/xmodule/modulestore/mongo/base.py | 2 +- common/lib/xmodule/xmodule/modulestore/mongo/draft.py | 2 +- common/lib/xmodule/xmodule/modulestore/mongoengine_fields.py | 2 +- .../xmodule/modulestore/perf_tests/generate_asset_xml.py | 2 +- .../xmodule/xmodule/modulestore/perf_tests/generate_report.py | 2 +- .../modulestore/perf_tests/test_asset_import_export.py | 2 +- common/lib/xmodule/xmodule/modulestore/search.py | 2 +- common/lib/xmodule/xmodule/modulestore/split_migrator.py | 2 +- .../lib/xmodule/xmodule/modulestore/split_mongo/__init__.py | 2 +- .../modulestore/split_mongo/caching_descriptor_system.py | 2 +- .../xmodule/modulestore/split_mongo/definition_lazy_loader.py | 2 +- .../lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py | 2 +- .../xmodule/modulestore/split_mongo/mongo_connection.py | 2 +- common/lib/xmodule/xmodule/modulestore/split_mongo/split.py | 2 +- .../xmodule/xmodule/modulestore/split_mongo/split_draft.py | 2 +- .../xmodule/modulestore/split_mongo/split_mongo_kvs.py | 2 +- common/lib/xmodule/xmodule/modulestore/store_utilities.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/django_utils.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/factories.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/mongo_connection.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/sample_courses.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/test_abstraction.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/test_asides.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/test_assetstore.py | 2 +- .../xmodule/xmodule/modulestore/tests/test_contentstore.py | 2 +- .../modulestore/tests/test_cross_modulestore_import_export.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/test_inheritance.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/test_libraries.py | 2 +- .../xmodule/modulestore/tests/test_mixed_modulestore.py | 2 +- .../xmodule/modulestore/tests/test_modulestore_settings.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py | 2 +- .../xmodule/modulestore/tests/test_mongo_call_count.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/test_publish.py | 2 +- .../lib/xmodule/xmodule/modulestore/tests/test_semantics.py | 2 +- .../modulestore/tests/test_split_copy_from_template.py | 2 +- .../xmodule/xmodule/modulestore/tests/test_split_migrator.py | 2 +- .../xmodule/modulestore/tests/test_split_modulestore.py | 2 +- .../tests/test_split_modulestore_bulk_operations.py | 2 +- .../modulestore/tests/test_split_mongo_mongo_connection.py | 2 +- .../xmodule/modulestore/tests/test_split_w_old_mongo.py | 2 +- .../xmodule/xmodule/modulestore/tests/test_store_utilities.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/test_xml.py | 2 +- .../xmodule/xmodule/modulestore/tests/test_xml_importer.py | 2 +- common/lib/xmodule/xmodule/modulestore/tests/utils.py | 2 +- common/lib/xmodule/xmodule/modulestore/xml.py | 2 +- common/lib/xmodule/xmodule/modulestore/xml_exporter.py | 2 +- common/lib/xmodule/xmodule/modulestore/xml_importer.py | 2 +- common/lib/xmodule/xmodule/mongo_utils.py | 2 +- common/lib/xmodule/xmodule/partitions/partitions.py | 2 +- common/lib/xmodule/xmodule/partitions/partitions_service.py | 2 +- .../lib/xmodule/xmodule/partitions/tests/test_partitions.py | 2 +- common/lib/xmodule/xmodule/poll_module.py | 2 +- common/lib/xmodule/xmodule/progress.py | 2 +- common/lib/xmodule/xmodule/randomize_module.py | 2 +- common/lib/xmodule/xmodule/raw_module.py | 2 +- common/lib/xmodule/xmodule/seq_module.py | 2 +- common/lib/xmodule/xmodule/services.py | 2 +- common/lib/xmodule/xmodule/split_test_module.py | 2 +- common/lib/xmodule/xmodule/static_content.py | 2 +- common/lib/xmodule/xmodule/stringify.py | 2 +- common/lib/xmodule/xmodule/studio_editable.py | 2 +- common/lib/xmodule/xmodule/tabs.py | 2 +- common/lib/xmodule/xmodule/template_module.py | 2 +- common/lib/xmodule/xmodule/templates.py | 2 +- common/lib/xmodule/xmodule/tests/__init__.py | 2 +- common/lib/xmodule/xmodule/tests/helpers.py | 2 +- common/lib/xmodule/xmodule/tests/rendering/__init__.py | 2 +- common/lib/xmodule/xmodule/tests/rendering/core.py | 2 +- common/lib/xmodule/xmodule/tests/test_annotatable_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_annotator_mixin.py | 2 +- common/lib/xmodule/xmodule/tests/test_capa_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_conditional.py | 2 +- common/lib/xmodule/xmodule/tests/test_conditional_logic.py | 2 +- common/lib/xmodule/xmodule/tests/test_content.py | 2 +- .../lib/xmodule/xmodule/tests/test_course_metadata_utils.py | 2 +- common/lib/xmodule/xmodule/tests/test_course_module.py | 2 +- .../lib/xmodule/xmodule/tests/test_delay_between_attempts.py | 2 +- common/lib/xmodule/xmodule/tests/test_editing_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_error_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_export.py | 2 +- common/lib/xmodule/xmodule/tests/test_fields.py | 2 +- common/lib/xmodule/xmodule/tests/test_graders.py | 2 +- common/lib/xmodule/xmodule/tests/test_html_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_import.py | 2 +- common/lib/xmodule/xmodule/tests/test_import_static.py | 2 +- common/lib/xmodule/xmodule/tests/test_library_content.py | 2 +- common/lib/xmodule/xmodule/tests/test_library_root.py | 2 +- common/lib/xmodule/xmodule/tests/test_library_tools.py | 2 +- common/lib/xmodule/xmodule/tests/test_lti20_unit.py | 2 +- common/lib/xmodule/xmodule/tests/test_lti_unit.py | 2 +- common/lib/xmodule/xmodule/tests/test_mako_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_mongo_utils.py | 2 +- common/lib/xmodule/xmodule/tests/test_poll.py | 2 +- common/lib/xmodule/xmodule/tests/test_progress.py | 2 +- common/lib/xmodule/xmodule/tests/test_randomize_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_resource_templates.py | 2 +- common/lib/xmodule/xmodule/tests/test_sequence.py | 2 +- common/lib/xmodule/xmodule/tests/test_services.py | 2 +- common/lib/xmodule/xmodule/tests/test_split_test_module.py | 2 +- common/lib/xmodule/xmodule/tests/test_stringify.py | 2 +- common/lib/xmodule/xmodule/tests/test_studio_editable.py | 2 +- common/lib/xmodule/xmodule/tests/test_unit_block.py | 2 +- common/lib/xmodule/xmodule/tests/test_util_duedate.py | 2 +- common/lib/xmodule/xmodule/tests/test_utils_django.py | 2 +- .../xmodule/tests/test_utils_escape_html_characters.py | 2 +- common/lib/xmodule/xmodule/tests/test_validation.py | 2 +- common/lib/xmodule/xmodule/tests/test_vertical.py | 2 +- common/lib/xmodule/xmodule/tests/test_video.py | 2 +- common/lib/xmodule/xmodule/tests/test_word_cloud.py | 2 +- common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py | 2 +- common/lib/xmodule/xmodule/tests/test_xml_module.py | 2 +- common/lib/xmodule/xmodule/tests/xml/__init__.py | 2 +- common/lib/xmodule/xmodule/tests/xml/factories.py | 2 +- common/lib/xmodule/xmodule/tests/xml/test_inheritance.py | 2 +- common/lib/xmodule/xmodule/tests/xml/test_policy.py | 2 +- common/lib/xmodule/xmodule/timeinfo.py | 2 +- common/lib/xmodule/xmodule/unit_block.py | 2 +- common/lib/xmodule/xmodule/util/duedate.py | 2 +- common/lib/xmodule/xmodule/util/misc.py | 2 +- common/lib/xmodule/xmodule/util/sandboxing.py | 2 +- common/lib/xmodule/xmodule/util/xmodule_django.py | 2 +- common/lib/xmodule/xmodule/validation.py | 2 +- common/lib/xmodule/xmodule/vertical_block.py | 2 +- common/lib/xmodule/xmodule/video_module/bumper_utils.py | 2 +- common/lib/xmodule/xmodule/video_module/transcripts_utils.py | 2 +- common/lib/xmodule/xmodule/video_module/video_handlers.py | 2 +- common/lib/xmodule/xmodule/video_module/video_module.py | 2 +- common/lib/xmodule/xmodule/video_module/video_utils.py | 2 +- common/lib/xmodule/xmodule/video_module/video_xfields.py | 2 +- common/lib/xmodule/xmodule/word_cloud_module.py | 2 +- common/lib/xmodule/xmodule/wrapper_module.py | 2 +- common/lib/xmodule/xmodule/x_module.py | 2 +- common/lib/xmodule/xmodule/xml_module.py | 2 +- common/test/acceptance/fixtures/__init__.py | 2 +- common/test/acceptance/fixtures/base.py | 2 +- common/test/acceptance/fixtures/catalog.py | 2 +- common/test/acceptance/fixtures/certificates.py | 2 +- common/test/acceptance/fixtures/config.py | 2 +- common/test/acceptance/fixtures/course.py | 2 +- common/test/acceptance/fixtures/discussion.py | 2 +- common/test/acceptance/fixtures/edxnotes.py | 2 +- common/test/acceptance/fixtures/library.py | 2 +- common/test/acceptance/fixtures/programs.py | 2 +- common/test/acceptance/fixtures/xqueue.py | 2 +- common/test/acceptance/pages/common/__init__.py | 2 +- common/test/acceptance/pages/common/auto_auth.py | 2 +- common/test/acceptance/pages/common/logout.py | 2 +- common/test/acceptance/pages/common/paging.py | 2 +- common/test/acceptance/pages/common/utils.py | 2 +- common/test/acceptance/pages/lms/__init__.py | 2 +- common/test/acceptance/pages/lms/account_settings.py | 2 +- common/test/acceptance/pages/lms/admin.py | 2 +- common/test/acceptance/pages/lms/annotation_component.py | 2 +- common/test/acceptance/pages/lms/bookmarks.py | 2 +- common/test/acceptance/pages/lms/catalog.py | 2 +- common/test/acceptance/pages/lms/ccx_dashboard_page.py | 2 +- common/test/acceptance/pages/lms/certificate_page.py | 2 +- common/test/acceptance/pages/lms/conditional.py | 2 +- common/test/acceptance/pages/lms/course_about.py | 2 +- common/test/acceptance/pages/lms/course_home.py | 2 +- common/test/acceptance/pages/lms/course_info.py | 2 +- common/test/acceptance/pages/lms/course_page.py | 2 +- common/test/acceptance/pages/lms/course_wiki.py | 2 +- common/test/acceptance/pages/lms/courseware.py | 2 +- common/test/acceptance/pages/lms/courseware_search.py | 2 +- common/test/acceptance/pages/lms/create_mode.py | 2 +- common/test/acceptance/pages/lms/dashboard.py | 2 +- common/test/acceptance/pages/lms/dashboard_search.py | 2 +- common/test/acceptance/pages/lms/discovery.py | 2 +- common/test/acceptance/pages/lms/discussion.py | 2 +- common/test/acceptance/pages/lms/edxnotes.py | 2 +- common/test/acceptance/pages/lms/fields.py | 2 +- common/test/acceptance/pages/lms/find_courses.py | 2 +- common/test/acceptance/pages/lms/index.py | 2 +- common/test/acceptance/pages/lms/instructor_dashboard.py | 2 +- common/test/acceptance/pages/lms/learner_profile.py | 2 +- common/test/acceptance/pages/lms/library.py | 2 +- common/test/acceptance/pages/lms/login.py | 2 +- common/test/acceptance/pages/lms/login_and_register.py | 2 +- common/test/acceptance/pages/lms/matlab_problem.py | 2 +- common/test/acceptance/pages/lms/oauth2_confirmation.py | 2 +- common/test/acceptance/pages/lms/pay_and_verify.py | 2 +- common/test/acceptance/pages/lms/peer_calibrate.py | 2 +- common/test/acceptance/pages/lms/peer_confirm.py | 2 +- common/test/acceptance/pages/lms/peer_grade.py | 2 +- common/test/acceptance/pages/lms/problem.py | 2 +- common/test/acceptance/pages/lms/programs.py | 2 +- common/test/acceptance/pages/lms/progress.py | 2 +- common/test/acceptance/pages/lms/staff_view.py | 2 +- common/test/acceptance/pages/lms/tab_nav.py | 2 +- common/test/acceptance/pages/lms/teams.py | 2 +- common/test/acceptance/pages/lms/textbook_view.py | 2 +- common/test/acceptance/pages/lms/track_selection.py | 2 +- common/test/acceptance/pages/lms/video/video.py | 2 +- common/test/acceptance/pages/studio/__init__.py | 2 +- common/test/acceptance/pages/studio/asset_index.py | 2 +- common/test/acceptance/pages/studio/checklists.py | 2 +- common/test/acceptance/pages/studio/container.py | 2 +- common/test/acceptance/pages/studio/course_info.py | 2 +- common/test/acceptance/pages/studio/course_page.py | 2 +- common/test/acceptance/pages/studio/course_rerun.py | 2 +- .../acceptance/pages/studio/discussion_component_editor.py | 2 +- common/test/acceptance/pages/studio/edit_subsection.py | 2 +- common/test/acceptance/pages/studio/edit_tabs.py | 2 +- common/test/acceptance/pages/studio/html_component_editor.py | 2 +- common/test/acceptance/pages/studio/import_export.py | 2 +- common/test/acceptance/pages/studio/index.py | 2 +- common/test/acceptance/pages/studio/library.py | 2 +- common/test/acceptance/pages/studio/login.py | 2 +- common/test/acceptance/pages/studio/move_xblock.py | 2 +- common/test/acceptance/pages/studio/overview.py | 2 +- common/test/acceptance/pages/studio/pagination.py | 2 +- common/test/acceptance/pages/studio/problem_editor.py | 2 +- common/test/acceptance/pages/studio/settings.py | 2 +- common/test/acceptance/pages/studio/settings_advanced.py | 2 +- common/test/acceptance/pages/studio/settings_certificates.py | 2 +- common/test/acceptance/pages/studio/settings_graders.py | 2 +- .../acceptance/pages/studio/settings_group_configurations.py | 2 +- common/test/acceptance/pages/studio/signup.py | 2 +- common/test/acceptance/pages/studio/textbook_upload.py | 2 +- common/test/acceptance/pages/studio/users.py | 2 +- common/test/acceptance/pages/studio/utils.py | 2 +- common/test/acceptance/pages/studio/video/video.py | 2 +- common/test/acceptance/pages/studio/xblock_editor.py | 2 +- common/test/acceptance/pages/xblock/acid.py | 2 +- .../test/acceptance/pages/xblock/crowdsourcehinter_problem.py | 2 +- common/test/acceptance/pages/xblock/utils.py | 2 +- common/test/acceptance/setup.py | 2 +- common/test/acceptance/tests/__init__.py | 2 +- common/test/acceptance/tests/discussion/helpers.py | 2 +- .../acceptance/tests/discussion/test_cohort_management.py | 2 +- common/test/acceptance/tests/discussion/test_cohorts.py | 2 +- common/test/acceptance/tests/discussion/test_discussion.py | 2 +- .../acceptance/tests/discussion/test_discussion_management.py | 2 +- common/test/acceptance/tests/helpers.py | 2 +- common/test/acceptance/tests/lms/test_account_settings.py | 2 +- common/test/acceptance/tests/lms/test_bookmarks.py | 2 +- common/test/acceptance/tests/lms/test_ccx.py | 2 +- common/test/acceptance/tests/lms/test_certificate_web_view.py | 2 +- common/test/acceptance/tests/lms/test_conditional.py | 2 +- common/test/acceptance/tests/lms/test_learner_profile.py | 2 +- common/test/acceptance/tests/lms/test_library.py | 2 +- common/test/acceptance/tests/lms/test_lms.py | 2 +- common/test/acceptance/tests/lms/test_lms_acid_xblock.py | 2 +- .../tests/lms/test_lms_cohorted_courseware_search.py | 2 +- common/test/acceptance/tests/lms/test_lms_course_discovery.py | 2 +- common/test/acceptance/tests/lms/test_lms_course_home.py | 2 +- common/test/acceptance/tests/lms/test_lms_courseware.py | 2 +- .../test/acceptance/tests/lms/test_lms_courseware_search.py | 2 +- common/test/acceptance/tests/lms/test_lms_dashboard.py | 2 +- common/test/acceptance/tests/lms/test_lms_dashboard_search.py | 2 +- common/test/acceptance/tests/lms/test_lms_edxnotes.py | 2 +- common/test/acceptance/tests/lms/test_lms_entrance_exams.py | 2 +- common/test/acceptance/tests/lms/test_lms_gating.py | 2 +- common/test/acceptance/tests/lms/test_lms_help.py | 2 +- common/test/acceptance/tests/lms/test_lms_index.py | 2 +- .../acceptance/tests/lms/test_lms_instructor_dashboard.py | 2 +- common/test/acceptance/tests/lms/test_lms_lti.py | 2 +- common/test/acceptance/tests/lms/test_lms_problems.py | 2 +- .../tests/lms/test_lms_split_test_courseware_search.py | 2 +- common/test/acceptance/tests/lms/test_lms_user_preview.py | 2 +- common/test/acceptance/tests/lms/test_oauth2.py | 2 +- common/test/acceptance/tests/lms/test_problem_types.py | 2 +- common/test/acceptance/tests/lms/test_programs.py | 2 +- common/test/acceptance/tests/lms/test_progress_page.py | 2 +- common/test/acceptance/tests/lms/test_teams.py | 2 +- .../test/acceptance/tests/lms/test_unicode_username_admin.py | 2 +- common/test/acceptance/tests/studio/base_studio_test.py | 2 +- common/test/acceptance/tests/studio/test_import_export.py | 2 +- .../acceptance/tests/studio/test_studio_accessibility_form.py | 2 +- .../test/acceptance/tests/studio/test_studio_acid_xblock.py | 2 +- common/test/acceptance/tests/studio/test_studio_asset.py | 2 +- common/test/acceptance/tests/studio/test_studio_bad_data.py | 2 +- common/test/acceptance/tests/studio/test_studio_components.py | 2 +- common/test/acceptance/tests/studio/test_studio_container.py | 2 +- .../test/acceptance/tests/studio/test_studio_course_create.py | 2 +- .../test/acceptance/tests/studio/test_studio_course_info.py | 2 +- .../test/acceptance/tests/studio/test_studio_course_team.py | 2 +- .../tests/studio/test_studio_discussion_component.py | 2 +- common/test/acceptance/tests/studio/test_studio_general.py | 2 +- common/test/acceptance/tests/studio/test_studio_grading.py | 2 +- common/test/acceptance/tests/studio/test_studio_help.py | 2 +- common/test/acceptance/tests/studio/test_studio_home.py | 2 +- .../test/acceptance/tests/studio/test_studio_html_editor.py | 2 +- common/test/acceptance/tests/studio/test_studio_library.py | 2 +- .../acceptance/tests/studio/test_studio_library_container.py | 2 +- common/test/acceptance/tests/studio/test_studio_outline.py | 2 +- .../acceptance/tests/studio/test_studio_problem_editor.py | 2 +- common/test/acceptance/tests/studio/test_studio_rerun.py | 2 +- common/test/acceptance/tests/studio/test_studio_settings.py | 2 +- .../tests/studio/test_studio_settings_certificates.py | 2 +- .../acceptance/tests/studio/test_studio_settings_details.py | 2 +- common/test/acceptance/tests/studio/test_studio_split_test.py | 2 +- common/test/acceptance/tests/studio/test_studio_tabs.py | 2 +- common/test/acceptance/tests/studio/test_studio_textbooks.py | 2 +- common/test/acceptance/tests/test_annotatable.py | 2 +- common/test/acceptance/tests/test_cohorted_courseware.py | 2 +- .../test/acceptance/tests/video/test_studio_video_editor.py | 2 +- .../test/acceptance/tests/video/test_studio_video_module.py | 2 +- .../acceptance/tests/video/test_studio_video_transcript.py | 2 +- common/test/acceptance/tests/video/test_video_events.py | 2 +- common/test/acceptance/tests/video/test_video_handout.py | 2 +- common/test/acceptance/tests/video/test_video_license.py | 2 +- common/test/acceptance/tests/video/test_video_module.py | 2 +- common/test/acceptance/tests/video/test_video_times.py | 2 +- .../acceptance/tests/xblock/test_crowdsourcehinter_problem.py | 2 +- common/test/conftest.py | 2 +- common/test/utils.py | 2 +- conftest.py | 2 +- docs/api/conf.py | 2 +- docs/docs_settings.py | 2 +- docs/guides/conf.py | 2 +- docs/sw2sphinxopenapi.py | 2 +- lms/__init__.py | 2 +- lms/celery.py | 2 +- lms/djangoapps/badges/admin.py | 2 +- lms/djangoapps/badges/api/serializers.py | 2 +- lms/djangoapps/badges/api/tests.py | 2 +- lms/djangoapps/badges/api/urls.py | 2 +- lms/djangoapps/badges/api/views.py | 2 +- lms/djangoapps/badges/apps.py | 2 +- lms/djangoapps/badges/backends/badgr.py | 2 +- lms/djangoapps/badges/backends/base.py | 2 +- lms/djangoapps/badges/backends/tests/dummy_backend.py | 2 +- lms/djangoapps/badges/backends/tests/test_badgr_backend.py | 2 +- lms/djangoapps/badges/events/course_complete.py | 2 +- lms/djangoapps/badges/events/course_meta.py | 2 +- lms/djangoapps/badges/events/tests/test_course_complete.py | 2 +- lms/djangoapps/badges/events/tests/test_course_meta.py | 2 +- lms/djangoapps/badges/handlers.py | 2 +- lms/djangoapps/badges/migrations/0001_initial.py | 2 +- .../badges/migrations/0002_data__migrate_assertions.py | 2 +- .../badges/migrations/0003_schema__add_event_configuration.py | 2 +- lms/djangoapps/badges/models.py | 2 +- lms/djangoapps/badges/service.py | 2 +- lms/djangoapps/badges/tests/factories.py | 2 +- lms/djangoapps/badges/tests/test_models.py | 2 +- lms/djangoapps/badges/utils.py | 2 +- lms/djangoapps/branding/__init__.py | 2 +- lms/djangoapps/branding/admin.py | 2 +- lms/djangoapps/branding/api.py | 2 +- lms/djangoapps/branding/api_urls.py | 2 +- lms/djangoapps/branding/migrations/0001_initial.py | 4 ++-- lms/djangoapps/branding/models.py | 2 +- lms/djangoapps/branding/tests/test_api.py | 2 +- lms/djangoapps/branding/tests/test_models.py | 2 +- lms/djangoapps/branding/tests/test_page.py | 2 +- lms/djangoapps/branding/tests/test_views.py | 2 +- lms/djangoapps/branding/views.py | 2 +- lms/djangoapps/bulk_email/admin.py | 2 +- lms/djangoapps/bulk_email/api.py | 2 +- lms/djangoapps/bulk_email/forms.py | 2 +- lms/djangoapps/bulk_email/migrations/0001_initial.py | 2 +- .../migrations/0002_data__load_course_email_template.py | 2 +- .../bulk_email/migrations/0003_config_model_feature_flag.py | 2 +- .../bulk_email/migrations/0004_add_email_targets.py | 2 +- lms/djangoapps/bulk_email/migrations/0005_move_target_data.py | 2 +- .../bulk_email/migrations/0006_course_mode_targets.py | 2 +- lms/djangoapps/bulk_email/models.py | 2 +- lms/djangoapps/bulk_email/models_api.py | 2 +- lms/djangoapps/bulk_email/policies.py | 2 +- lms/djangoapps/bulk_email/signals.py | 2 +- lms/djangoapps/bulk_email/tasks.py | 2 +- lms/djangoapps/bulk_email/tests/test_course_optout.py | 2 +- lms/djangoapps/bulk_email/tests/test_email.py | 2 +- lms/djangoapps/bulk_email/tests/test_err_handling.py | 2 +- lms/djangoapps/bulk_email/tests/test_forms.py | 2 +- lms/djangoapps/bulk_email/tests/test_models.py | 2 +- lms/djangoapps/bulk_email/tests/test_signals.py | 2 +- lms/djangoapps/bulk_email/tests/test_tasks.py | 2 +- lms/djangoapps/bulk_email/views.py | 2 +- lms/djangoapps/bulk_enroll/serializers.py | 2 +- lms/djangoapps/bulk_enroll/tests/test_views.py | 2 +- lms/djangoapps/bulk_enroll/urls.py | 2 +- lms/djangoapps/bulk_enroll/views.py | 2 +- lms/djangoapps/ccx/api/urls.py | 2 +- lms/djangoapps/ccx/api/v0/paginators.py | 2 +- lms/djangoapps/ccx/api/v0/serializers.py | 2 +- lms/djangoapps/ccx/api/v0/tests/test_views.py | 2 +- lms/djangoapps/ccx/api/v0/urls.py | 2 +- lms/djangoapps/ccx/api/v0/views.py | 2 +- lms/djangoapps/ccx/migrations/0001_initial.py | 2 +- .../ccx/migrations/0002_customcourseforedx_structure_json.py | 2 +- .../ccx/migrations/0003_add_master_course_staff_in_ccx.py | 2 +- .../ccx/migrations/0004_seed_forum_roles_in_ccx_courses.py | 2 +- .../ccx/migrations/0005_change_ccx_coach_to_staff.py | 2 +- .../ccx/migrations/0006_set_display_name_as_override.py | 2 +- lms/djangoapps/ccx/models.py | 2 +- lms/djangoapps/ccx/modulestore.py | 2 +- lms/djangoapps/ccx/overrides.py | 2 +- lms/djangoapps/ccx/plugins.py | 2 +- lms/djangoapps/ccx/tasks.py | 2 +- lms/djangoapps/ccx/tests/factories.py | 2 +- lms/djangoapps/ccx/tests/test_ccx_modulestore.py | 2 +- lms/djangoapps/ccx/tests/test_field_override_performance.py | 2 +- lms/djangoapps/ccx/tests/test_models.py | 2 +- lms/djangoapps/ccx/tests/test_overrides.py | 2 +- lms/djangoapps/ccx/tests/test_tasks.py | 2 +- lms/djangoapps/ccx/tests/test_utils.py | 2 +- lms/djangoapps/ccx/tests/test_views.py | 2 +- lms/djangoapps/ccx/tests/utils.py | 2 +- lms/djangoapps/ccx/urls.py | 2 +- lms/djangoapps/ccx/utils.py | 2 +- lms/djangoapps/ccx/views.py | 2 +- lms/djangoapps/certificates/admin.py | 2 +- lms/djangoapps/certificates/api.py | 2 +- lms/djangoapps/certificates/apis/urls.py | 2 +- lms/djangoapps/certificates/apis/v0/tests/test_views.py | 2 +- lms/djangoapps/certificates/apis/v0/urls.py | 2 +- lms/djangoapps/certificates/apis/v0/views.py | 2 +- lms/djangoapps/certificates/apps.py | 2 +- .../certificates/management/commands/cert_whitelist.py | 2 +- .../certificates/management/commands/create_fake_cert.py | 2 +- .../certificates/management/commands/fix_ungraded_certs.py | 2 +- .../certificates/management/commands/gen_cert_report.py | 2 +- .../certificates/management/commands/regenerate_user.py | 2 +- .../management/commands/resubmit_error_certificates.py | 2 +- .../management/commands/tests/test_cert_whitelist.py | 2 +- .../management/commands/tests/test_fix_ungraded_certs.py | 2 +- .../management/commands/tests/test_gen_cert_report.py | 2 +- .../certificates/management/commands/ungenerated_certs.py | 2 +- lms/djangoapps/certificates/migrations/0001_initial.py | 2 +- .../0002_data__certificatehtmlviewconfiguration_data.py | 2 +- .../certificates/migrations/0003_data__default_modes.py | 2 +- .../migrations/0004_certificategenerationhistory.py | 2 +- .../certificates/migrations/0005_auto_20151208_0801.py | 2 +- .../migrations/0006_certificatetemplateasset_asset_slug.py | 2 +- .../certificates/migrations/0007_certificateinvalidation.py | 2 +- .../certificates/migrations/0008_schema__remove_badges.py | 2 +- ...ificategenerationcoursesetting_language_self_generation.py | 2 +- .../migrations/0010_certificatetemplate_language.py | 2 +- .../migrations/0011_certificatetemplate_alter_unique.py | 2 +- ...tificategenerationcoursesetting_include_hours_of_effort.py | 2 +- .../0013_remove_certificategenerationcoursesetting_enabled.py | 2 +- .../migrations/0014_change_eligible_certs_manager.py | 2 +- .../certificates/migrations/0015_add_masters_choice.py | 2 +- .../migrations/0016_historicalgeneratedcertificate.py | 2 +- lms/djangoapps/certificates/models.py | 2 +- lms/djangoapps/certificates/queue.py | 2 +- lms/djangoapps/certificates/services.py | 2 +- lms/djangoapps/certificates/signals.py | 2 +- lms/djangoapps/certificates/tasks.py | 2 +- lms/djangoapps/certificates/tests/factories.py | 2 +- lms/djangoapps/certificates/tests/test_api.py | 2 +- lms/djangoapps/certificates/tests/test_cert_management.py | 2 +- lms/djangoapps/certificates/tests/test_create_fake_cert.py | 2 +- lms/djangoapps/certificates/tests/test_models.py | 2 +- lms/djangoapps/certificates/tests/test_queue.py | 2 +- lms/djangoapps/certificates/tests/test_services.py | 2 +- lms/djangoapps/certificates/tests/test_signals.py | 2 +- lms/djangoapps/certificates/tests/test_support_views.py | 2 +- lms/djangoapps/certificates/tests/test_tasks.py | 2 +- lms/djangoapps/certificates/tests/test_views.py | 2 +- lms/djangoapps/certificates/tests/test_webview_views.py | 2 +- lms/djangoapps/certificates/tests/tests.py | 2 +- lms/djangoapps/certificates/urls.py | 2 +- lms/djangoapps/certificates/views/support.py | 2 +- lms/djangoapps/certificates/views/webview.py | 2 +- lms/djangoapps/certificates/views/xqueue.py | 2 +- lms/djangoapps/class_dashboard/dashboard_data.py | 2 +- lms/djangoapps/class_dashboard/tests/test_dashboard_data.py | 2 +- lms/djangoapps/class_dashboard/tests/test_views.py | 2 +- lms/djangoapps/class_dashboard/urls.py | 2 +- lms/djangoapps/class_dashboard/views.py | 2 +- lms/djangoapps/commerce/admin.py | 2 +- lms/djangoapps/commerce/api/urls.py | 2 +- lms/djangoapps/commerce/api/v0/tests/test_views.py | 2 +- lms/djangoapps/commerce/api/v0/urls.py | 2 +- lms/djangoapps/commerce/api/v0/views.py | 2 +- lms/djangoapps/commerce/api/v1/models.py | 2 +- lms/djangoapps/commerce/api/v1/permissions.py | 2 +- lms/djangoapps/commerce/api/v1/serializers.py | 2 +- lms/djangoapps/commerce/api/v1/tests/test_models.py | 2 +- lms/djangoapps/commerce/api/v1/tests/test_serializers.py | 2 +- lms/djangoapps/commerce/api/v1/tests/test_views.py | 2 +- lms/djangoapps/commerce/api/v1/urls.py | 2 +- lms/djangoapps/commerce/api/v1/views.py | 2 +- lms/djangoapps/commerce/apps.py | 2 +- lms/djangoapps/commerce/http.py | 2 +- .../commerce/management/commands/configure_commerce.py | 2 +- .../management/commands/tests/test_configure_commerce.py | 2 +- .../migrations/0001_data__add_ecommerce_service_user.py | 2 +- .../commerce/migrations/0002_commerceconfiguration.py | 2 +- lms/djangoapps/commerce/migrations/0003_auto_20160329_0709.py | 2 +- lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py | 2 +- ..._commerceconfiguration_enable_automatic_refund_approval.py | 2 +- lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py | 2 +- lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py | 2 +- lms/djangoapps/commerce/migrations/0008_auto_20191024_2048.py | 2 +- lms/djangoapps/commerce/models.py | 2 +- lms/djangoapps/commerce/signals.py | 2 +- lms/djangoapps/commerce/tests/__init__.py | 2 +- lms/djangoapps/commerce/tests/factories.py | 2 +- lms/djangoapps/commerce/tests/mocks.py | 2 +- lms/djangoapps/commerce/tests/test_signals.py | 2 +- lms/djangoapps/commerce/tests/test_utils.py | 2 +- lms/djangoapps/commerce/tests/test_views.py | 2 +- lms/djangoapps/commerce/urls.py | 2 +- lms/djangoapps/commerce/utils.py | 2 +- lms/djangoapps/commerce/views.py | 2 +- lms/djangoapps/course_api/__init__.py | 2 +- lms/djangoapps/course_api/api.py | 2 +- lms/djangoapps/course_api/blocks/api.py | 2 +- lms/djangoapps/course_api/blocks/forms.py | 2 +- lms/djangoapps/course_api/blocks/permissions.py | 2 +- lms/djangoapps/course_api/blocks/serializers.py | 2 +- lms/djangoapps/course_api/blocks/tests/helpers.py | 2 +- lms/djangoapps/course_api/blocks/tests/test_api.py | 2 +- lms/djangoapps/course_api/blocks/tests/test_forms.py | 2 +- lms/djangoapps/course_api/blocks/tests/test_serializers.py | 2 +- lms/djangoapps/course_api/blocks/tests/test_views.py | 2 +- lms/djangoapps/course_api/blocks/toggles.py | 2 +- lms/djangoapps/course_api/blocks/transformers/__init__.py | 2 +- .../course_api/blocks/transformers/block_completion.py | 2 +- lms/djangoapps/course_api/blocks/transformers/block_counts.py | 2 +- lms/djangoapps/course_api/blocks/transformers/block_depth.py | 2 +- lms/djangoapps/course_api/blocks/transformers/blocks_api.py | 2 +- lms/djangoapps/course_api/blocks/transformers/milestones.py | 2 +- lms/djangoapps/course_api/blocks/transformers/navigation.py | 2 +- lms/djangoapps/course_api/blocks/transformers/student_view.py | 2 +- .../blocks/transformers/tests/test_block_completion.py | 2 +- .../course_api/blocks/transformers/tests/test_block_counts.py | 2 +- .../course_api/blocks/transformers/tests/test_block_depth.py | 2 +- .../course_api/blocks/transformers/tests/test_milestones.py | 2 +- .../course_api/blocks/transformers/tests/test_navigation.py | 2 +- .../course_api/blocks/transformers/tests/test_student_view.py | 2 +- .../course_api/blocks/transformers/tests/test_video_urls.py | 2 +- lms/djangoapps/course_api/blocks/transformers/video_urls.py | 2 +- lms/djangoapps/course_api/blocks/urls.py | 2 +- lms/djangoapps/course_api/blocks/views.py | 2 +- lms/djangoapps/course_api/forms.py | 2 +- lms/djangoapps/course_api/permissions.py | 2 +- lms/djangoapps/course_api/serializers.py | 2 +- lms/djangoapps/course_api/tests/mixins.py | 2 +- lms/djangoapps/course_api/tests/test_api.py | 2 +- lms/djangoapps/course_api/tests/test_forms.py | 2 +- lms/djangoapps/course_api/tests/test_permissions.py | 2 +- lms/djangoapps/course_api/tests/test_serializers.py | 2 +- lms/djangoapps/course_api/tests/test_views.py | 2 +- lms/djangoapps/course_api/urls.py | 2 +- lms/djangoapps/course_api/views.py | 2 +- lms/djangoapps/course_blocks/api.py | 2 +- .../course_blocks/transformers/access_denied_filter.py | 2 +- lms/djangoapps/course_blocks/transformers/hidden_content.py | 2 +- lms/djangoapps/course_blocks/transformers/hide_empty.py | 2 +- lms/djangoapps/course_blocks/transformers/library_content.py | 2 +- .../course_blocks/transformers/load_override_data.py | 2 +- lms/djangoapps/course_blocks/transformers/split_test.py | 2 +- lms/djangoapps/course_blocks/transformers/start_date.py | 2 +- lms/djangoapps/course_blocks/transformers/tests/helpers.py | 2 +- .../course_blocks/transformers/tests/test_hidden_content.py | 2 +- .../course_blocks/transformers/tests/test_library_content.py | 2 +- .../transformers/tests/test_load_override_data.py | 2 +- .../course_blocks/transformers/tests/test_split_test.py | 2 +- .../course_blocks/transformers/tests/test_start_date.py | 2 +- .../course_blocks/transformers/tests/test_user_partitions.py | 2 +- .../course_blocks/transformers/tests/test_visibility.py | 2 +- lms/djangoapps/course_blocks/transformers/user_partitions.py | 2 +- lms/djangoapps/course_blocks/transformers/visibility.py | 2 +- lms/djangoapps/course_blocks/usage_info.py | 2 +- lms/djangoapps/course_blocks/utils.py | 2 +- lms/djangoapps/course_goals/api.py | 2 +- lms/djangoapps/course_goals/apps.py | 2 +- lms/djangoapps/course_goals/handlers.py | 2 +- lms/djangoapps/course_goals/migrations/0001_initial.py | 4 ++-- .../course_goals/migrations/0002_auto_20171010_1129.py | 4 ++-- lms/djangoapps/course_goals/models.py | 2 +- lms/djangoapps/course_goals/tests/test_api.py | 2 +- lms/djangoapps/course_goals/urls.py | 2 +- lms/djangoapps/course_goals/views.py | 2 +- lms/djangoapps/course_wiki/editors.py | 2 +- lms/djangoapps/course_wiki/middleware.py | 2 +- lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py | 2 +- lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py | 2 +- lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py | 2 +- lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py | 2 +- lms/djangoapps/course_wiki/settings.py | 2 +- lms/djangoapps/course_wiki/tab.py | 2 +- lms/djangoapps/course_wiki/tests/test_access.py | 2 +- .../course_wiki/tests/test_comprehensive_theming.py | 2 +- lms/djangoapps/course_wiki/tests/test_middleware.py | 2 +- lms/djangoapps/course_wiki/tests/test_tab.py | 2 +- lms/djangoapps/course_wiki/tests/tests.py | 2 +- lms/djangoapps/course_wiki/utils.py | 2 +- lms/djangoapps/course_wiki/views.py | 2 +- lms/djangoapps/courseware/__init__.py | 2 +- lms/djangoapps/courseware/access.py | 2 +- lms/djangoapps/courseware/access_response.py | 2 +- lms/djangoapps/courseware/access_utils.py | 2 +- lms/djangoapps/courseware/admin.py | 2 +- lms/djangoapps/courseware/context_processor.py | 2 +- lms/djangoapps/courseware/course_tools.py | 2 +- lms/djangoapps/courseware/courses.py | 2 +- lms/djangoapps/courseware/courseware_access_exception.py | 2 +- lms/djangoapps/courseware/date_summary.py | 2 +- lms/djangoapps/courseware/entrance_exams.py | 2 +- lms/djangoapps/courseware/field_overrides.py | 2 +- lms/djangoapps/courseware/fields.py | 2 +- lms/djangoapps/courseware/management/commands/clean_xml.py | 2 +- .../courseware/management/commands/dump_course_ids.py | 2 +- .../courseware/management/commands/dump_course_structure.py | 2 +- lms/djangoapps/courseware/management/commands/import.py | 2 +- .../courseware/management/commands/tests/test_dump_course.py | 2 +- lms/djangoapps/courseware/masquerade.py | 2 +- lms/djangoapps/courseware/middleware.py | 2 +- lms/djangoapps/courseware/migrations/0001_initial.py | 2 +- ...adlineconfiguration_dynamicupgradedeadlineconfiguration.py | 2 +- .../courseware/migrations/0003_auto_20170825_0935.py | 2 +- .../courseware/migrations/0004_auto_20171010_1639.py | 2 +- .../migrations/0005_orgdynamicupgradedeadlineconfiguration.py | 2 +- .../courseware/migrations/0006_remove_module_id_index.py | 2 +- .../courseware/migrations/0007_remove_done_index.py | 2 +- .../courseware/migrations/0008_move_idde_to_edx_when.py | 2 +- .../courseware/migrations/0009_auto_20190703_1955.py | 2 +- .../courseware/migrations/0010_auto_20190709_1559.py | 2 +- lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py | 2 +- lms/djangoapps/courseware/migrations/0012_adjust_fields.py | 2 +- .../courseware/migrations/0013_auto_20191001_1858.py | 2 +- lms/djangoapps/courseware/model_data.py | 2 +- lms/djangoapps/courseware/models.py | 2 +- lms/djangoapps/courseware/module_render.py | 2 +- lms/djangoapps/courseware/rules.py | 2 +- lms/djangoapps/courseware/services.py | 2 +- lms/djangoapps/courseware/student_field_overrides.py | 2 +- lms/djangoapps/courseware/tabs.py | 2 +- lms/djangoapps/courseware/tests/factories.py | 2 +- lms/djangoapps/courseware/tests/helpers.py | 2 +- lms/djangoapps/courseware/tests/test_about.py | 2 +- lms/djangoapps/courseware/tests/test_access.py | 2 +- lms/djangoapps/courseware/tests/test_comprehensive_theming.py | 2 +- lms/djangoapps/courseware/tests/test_context_processor.py | 2 +- lms/djangoapps/courseware/tests/test_course_info.py | 2 +- lms/djangoapps/courseware/tests/test_course_survey.py | 2 +- lms/djangoapps/courseware/tests/test_course_tools.py | 2 +- lms/djangoapps/courseware/tests/test_courses.py | 2 +- lms/djangoapps/courseware/tests/test_credit_requirements.py | 2 +- lms/djangoapps/courseware/tests/test_date_summary.py | 2 +- lms/djangoapps/courseware/tests/test_discussion_xblock.py | 2 +- lms/djangoapps/courseware/tests/test_draft_modulestore.py | 2 +- lms/djangoapps/courseware/tests/test_entrance_exam.py | 2 +- lms/djangoapps/courseware/tests/test_favicon.py | 2 +- lms/djangoapps/courseware/tests/test_field_overrides.py | 2 +- lms/djangoapps/courseware/tests/test_footer.py | 2 +- lms/djangoapps/courseware/tests/test_group_access.py | 2 +- lms/djangoapps/courseware/tests/test_i18n.py | 2 +- lms/djangoapps/courseware/tests/test_lti_integration.py | 2 +- lms/djangoapps/courseware/tests/test_masquerade.py | 2 +- lms/djangoapps/courseware/tests/test_middleware.py | 2 +- lms/djangoapps/courseware/tests/test_model_data.py | 2 +- lms/djangoapps/courseware/tests/test_module_render.py | 2 +- lms/djangoapps/courseware/tests/test_navigation.py | 2 +- lms/djangoapps/courseware/tests/test_rules.py | 2 +- lms/djangoapps/courseware/tests/test_self_paced_overrides.py | 2 +- lms/djangoapps/courseware/tests/test_services.py | 2 +- lms/djangoapps/courseware/tests/test_split_module.py | 2 +- lms/djangoapps/courseware/tests/test_submitting_problems.py | 2 +- lms/djangoapps/courseware/tests/test_tabs.py | 2 +- lms/djangoapps/courseware/tests/test_user_state_client.py | 2 +- lms/djangoapps/courseware/tests/test_video_handlers.py | 2 +- lms/djangoapps/courseware/tests/test_video_mongo.py | 2 +- lms/djangoapps/courseware/tests/test_video_xml.py | 2 +- lms/djangoapps/courseware/tests/test_view_authentication.py | 2 +- lms/djangoapps/courseware/tests/test_views.py | 2 +- lms/djangoapps/courseware/tests/test_word_cloud.py | 2 +- lms/djangoapps/courseware/tests/tests.py | 2 +- lms/djangoapps/courseware/testutils.py | 2 +- lms/djangoapps/courseware/url_helpers.py | 2 +- lms/djangoapps/courseware/user_state_client.py | 2 +- lms/djangoapps/courseware/views/index.py | 2 +- lms/djangoapps/courseware/views/views.py | 4 ++-- .../coursewarehistoryextended/migrations/0001_initial.py | 4 ++-- .../migrations/0002_force_studentmodule_index.py | 4 ++-- lms/djangoapps/coursewarehistoryextended/models.py | 2 +- lms/djangoapps/coursewarehistoryextended/tests.py | 2 +- lms/djangoapps/dashboard/git_import.py | 2 +- .../dashboard/management/commands/git_add_course.py | 2 +- .../management/commands/tests/test_git_add_course.py | 2 +- lms/djangoapps/dashboard/models.py | 2 +- lms/djangoapps/dashboard/sysadmin.py | 2 +- lms/djangoapps/dashboard/sysadmin_urls.py | 2 +- lms/djangoapps/dashboard/tests/test_sysadmin.py | 2 +- lms/djangoapps/debug/management/commands/dump_xml_courses.py | 2 +- lms/djangoapps/debug/views.py | 2 +- lms/djangoapps/discussion/apps.py | 2 +- lms/djangoapps/discussion/config/__init__.py | 2 +- .../discussion/django_comment_client/base/__init__.py | 2 +- .../django_comment_client/base/event_transformers.py | 2 +- lms/djangoapps/discussion/django_comment_client/base/tests.py | 2 +- lms/djangoapps/discussion/django_comment_client/base/urls.py | 2 +- lms/djangoapps/discussion/django_comment_client/base/views.py | 2 +- lms/djangoapps/discussion/django_comment_client/middleware.py | 2 +- .../discussion/django_comment_client/permissions.py | 2 +- lms/djangoapps/discussion/django_comment_client/settings.py | 2 +- .../discussion/django_comment_client/tests/factories.py | 2 +- .../discussion/django_comment_client/tests/group_id.py | 2 +- .../tests/mock_cs_server/mock_cs_server.py | 2 +- .../tests/mock_cs_server/test_mock_cs_server.py | 2 +- .../discussion/django_comment_client/tests/test_middleware.py | 2 +- .../discussion/django_comment_client/tests/test_models.py | 2 +- .../discussion/django_comment_client/tests/test_utils.py | 2 +- .../discussion/django_comment_client/tests/utils.py | 2 +- lms/djangoapps/discussion/django_comment_client/urls.py | 2 +- lms/djangoapps/discussion/django_comment_client/utils.py | 2 +- lms/djangoapps/discussion/management/commands/assign_role.py | 2 +- .../discussion/management/commands/assign_roles_for_course.py | 2 +- .../management/commands/create_roles_for_existing.py | 2 +- .../discussion/management/commands/get_discussion_link.py | 2 +- .../discussion/management/commands/reload_forum_users.py | 2 +- .../discussion/management/commands/seed_permissions_roles.py | 2 +- .../discussion/management/commands/show_permissions.py | 2 +- .../discussion/management/commands/sync_user_info.py | 2 +- lms/djangoapps/discussion/notification_prefs/tests.py | 2 +- lms/djangoapps/discussion/notification_prefs/views.py | 2 +- lms/djangoapps/discussion/notifier_api/serializers.py | 2 +- lms/djangoapps/discussion/notifier_api/tests.py | 2 +- lms/djangoapps/discussion/notifier_api/urls.py | 2 +- lms/djangoapps/discussion/notifier_api/views.py | 2 +- lms/djangoapps/discussion/plugins.py | 2 +- lms/djangoapps/discussion/rest_api/api.py | 2 +- lms/djangoapps/discussion/rest_api/exceptions.py | 2 +- lms/djangoapps/discussion/rest_api/forms.py | 2 +- lms/djangoapps/discussion/rest_api/pagination.py | 2 +- lms/djangoapps/discussion/rest_api/permissions.py | 2 +- lms/djangoapps/discussion/rest_api/render.py | 2 +- lms/djangoapps/discussion/rest_api/serializers.py | 2 +- lms/djangoapps/discussion/rest_api/tests/test_api.py | 2 +- lms/djangoapps/discussion/rest_api/tests/test_forms.py | 2 +- lms/djangoapps/discussion/rest_api/tests/test_pagination.py | 2 +- lms/djangoapps/discussion/rest_api/tests/test_permissions.py | 2 +- lms/djangoapps/discussion/rest_api/tests/test_render.py | 2 +- lms/djangoapps/discussion/rest_api/tests/test_serializers.py | 2 +- lms/djangoapps/discussion/rest_api/tests/test_views.py | 2 +- lms/djangoapps/discussion/rest_api/tests/utils.py | 2 +- lms/djangoapps/discussion/rest_api/urls.py | 2 +- lms/djangoapps/discussion/rest_api/views.py | 2 +- lms/djangoapps/discussion/signals/handlers.py | 2 +- lms/djangoapps/discussion/tasks.py | 2 +- lms/djangoapps/discussion/tests/test_signals.py | 2 +- lms/djangoapps/discussion/tests/test_tasks.py | 2 +- lms/djangoapps/discussion/tests/test_views.py | 2 +- lms/djangoapps/discussion/urls.py | 2 +- lms/djangoapps/discussion/views.py | 2 +- lms/djangoapps/edxnotes/api_urls.py | 2 +- lms/djangoapps/edxnotes/decorators.py | 2 +- lms/djangoapps/edxnotes/helpers.py | 2 +- lms/djangoapps/edxnotes/plugins.py | 2 +- lms/djangoapps/edxnotes/tests.py | 2 +- lms/djangoapps/edxnotes/urls.py | 2 +- lms/djangoapps/edxnotes/views.py | 2 +- lms/djangoapps/email_marketing/admin.py | 2 +- lms/djangoapps/email_marketing/apps.py | 2 +- lms/djangoapps/email_marketing/migrations/0001_initial.py | 2 +- .../email_marketing/migrations/0002_auto_20160623_1656.py | 2 +- .../email_marketing/migrations/0003_auto_20160715_1145.py | 2 +- ...04_emailmarketingconfiguration_welcome_email_send_delay.py | 2 +- ...ingconfiguration_user_registration_cookie_timeout_delay.py | 2 +- .../email_marketing/migrations/0006_auto_20170711_0615.py | 2 +- .../email_marketing/migrations/0007_auto_20170809_0653.py | 2 +- .../email_marketing/migrations/0008_auto_20170809_0539.py | 2 +- ...mailmarketingconfiguration_sailthru_activation_template.py | 2 +- .../email_marketing/migrations/0010_auto_20180425_0800.py | 2 +- lms/djangoapps/email_marketing/models.py | 2 +- lms/djangoapps/email_marketing/signals.py | 2 +- lms/djangoapps/email_marketing/tasks.py | 2 +- lms/djangoapps/email_marketing/tests/test_signals.py | 2 +- lms/djangoapps/experiments/admin.py | 2 +- lms/djangoapps/experiments/factories.py | 2 +- lms/djangoapps/experiments/filters.py | 2 +- lms/djangoapps/experiments/migrations/0001_initial.py | 4 ++-- .../experiments/migrations/0002_auto_20170627_1402.py | 4 ++-- .../experiments/migrations/0003_auto_20170713_1148.py | 4 ++-- lms/djangoapps/experiments/models.py | 2 +- lms/djangoapps/experiments/permissions.py | 2 +- lms/djangoapps/experiments/routers.py | 2 +- lms/djangoapps/experiments/serializers.py | 2 +- lms/djangoapps/experiments/tests/test_utils.py | 2 +- lms/djangoapps/experiments/tests/test_views.py | 2 +- lms/djangoapps/experiments/tests/test_views_custom.py | 2 +- lms/djangoapps/experiments/urls.py | 2 +- lms/djangoapps/experiments/utils.py | 2 +- lms/djangoapps/experiments/views.py | 2 +- lms/djangoapps/experiments/views_custom.py | 2 +- lms/djangoapps/gating/api.py | 2 +- lms/djangoapps/gating/apps.py | 2 +- lms/djangoapps/gating/signals.py | 2 +- lms/djangoapps/gating/tasks.py | 2 +- lms/djangoapps/gating/tests/test_api.py | 2 +- lms/djangoapps/gating/tests/test_integration.py | 2 +- lms/djangoapps/gating/tests/test_signals.py | 2 +- lms/djangoapps/grades/admin.py | 2 +- lms/djangoapps/grades/api.py | 2 +- lms/djangoapps/grades/apps.py | 2 +- lms/djangoapps/grades/config/__init__.py | 2 +- lms/djangoapps/grades/config/forms.py | 2 +- lms/djangoapps/grades/config/models.py | 2 +- lms/djangoapps/grades/config/tests/test_models.py | 2 +- lms/djangoapps/grades/config/tests/utils.py | 2 +- lms/djangoapps/grades/config/waffle.py | 2 +- lms/djangoapps/grades/context.py | 2 +- lms/djangoapps/grades/course_data.py | 2 +- lms/djangoapps/grades/course_grade.py | 2 +- lms/djangoapps/grades/course_grade_factory.py | 2 +- lms/djangoapps/grades/events.py | 2 +- lms/djangoapps/grades/grade_utils.py | 2 +- lms/djangoapps/grades/management/commands/compute_grades.py | 2 +- .../grades/management/commands/recalculate_learner_grades.py | 2 +- .../management/commands/recalculate_subsection_grades.py | 2 +- .../grades/management/commands/tests/test_compute_grades.py | 2 +- .../commands/tests/test_recalculate_learner_grades.py | 2 +- .../commands/tests/test_recalculate_subsection_grades.py | 2 +- lms/djangoapps/grades/migrations/0001_initial.py | 2 +- .../grades/migrations/0002_rename_last_edited_field.py | 2 +- ..._coursepersistentgradesflag_persistentgradesenabledflag.py | 2 +- .../grades/migrations/0004_visibleblocks_course_id.py | 2 +- .../grades/migrations/0005_multiple_course_flags.py | 2 +- .../grades/migrations/0006_persistent_course_grades.py | 2 +- .../grades/migrations/0007_add_passed_timestamp_column.py | 2 +- .../0008_persistentsubsectiongrade_first_attempted.py | 2 +- lms/djangoapps/grades/migrations/0009_auto_20170111_1507.py | 2 +- lms/djangoapps/grades/migrations/0010_auto_20170112_1156.py | 2 +- lms/djangoapps/grades/migrations/0011_null_edited_time.py | 2 +- lms/djangoapps/grades/migrations/0012_computegradessetting.py | 2 +- .../migrations/0013_persistentsubsectiongradeoverride.py | 2 +- .../0014_persistentsubsectiongradeoverridehistory.py | 2 +- .../0015_historicalpersistentsubsectiongradeoverride.py | 2 +- lms/djangoapps/grades/migrations/0016_auto_20190703_1446.py | 2 +- lms/djangoapps/grades/models.py | 2 +- lms/djangoapps/grades/models_api.py | 2 +- lms/djangoapps/grades/rest_api/serializers.py | 2 +- lms/djangoapps/grades/rest_api/urls.py | 2 +- lms/djangoapps/grades/rest_api/v1/gradebook_views.py | 2 +- lms/djangoapps/grades/rest_api/v1/tests/mixins.py | 2 +- .../grades/rest_api/v1/tests/test_gradebook_views.py | 2 +- .../grades/rest_api/v1/tests/test_grading_policy_view.py | 2 +- lms/djangoapps/grades/rest_api/v1/tests/test_views.py | 2 +- lms/djangoapps/grades/rest_api/v1/urls.py | 2 +- lms/djangoapps/grades/rest_api/v1/utils.py | 2 +- lms/djangoapps/grades/rest_api/v1/views.py | 2 +- lms/djangoapps/grades/scores.py | 2 +- lms/djangoapps/grades/services.py | 2 +- lms/djangoapps/grades/signals/handlers.py | 2 +- lms/djangoapps/grades/signals/signals.py | 2 +- lms/djangoapps/grades/subsection_grade.py | 2 +- lms/djangoapps/grades/subsection_grade_factory.py | 2 +- lms/djangoapps/grades/tasks.py | 2 +- lms/djangoapps/grades/tests/base.py | 2 +- lms/djangoapps/grades/tests/integration/test_access.py | 2 +- lms/djangoapps/grades/tests/integration/test_events.py | 2 +- lms/djangoapps/grades/tests/integration/test_problems.py | 2 +- lms/djangoapps/grades/tests/test_api.py | 2 +- lms/djangoapps/grades/tests/test_course_data.py | 2 +- lms/djangoapps/grades/tests/test_course_grade.py | 2 +- lms/djangoapps/grades/tests/test_course_grade_factory.py | 2 +- lms/djangoapps/grades/tests/test_models.py | 2 +- lms/djangoapps/grades/tests/test_scores.py | 2 +- lms/djangoapps/grades/tests/test_services.py | 2 +- lms/djangoapps/grades/tests/test_signals.py | 2 +- lms/djangoapps/grades/tests/test_subsection_grade.py | 2 +- lms/djangoapps/grades/tests/test_subsection_grade_factory.py | 2 +- lms/djangoapps/grades/tests/test_tasks.py | 2 +- lms/djangoapps/grades/tests/test_transformer.py | 2 +- lms/djangoapps/grades/tests/utils.py | 2 +- lms/djangoapps/grades/transformer.py | 2 +- lms/djangoapps/grades/util_services.py | 2 +- lms/djangoapps/instructor/access.py | 2 +- lms/djangoapps/instructor/apps.py | 2 +- lms/djangoapps/instructor/enrollment.py | 2 +- lms/djangoapps/instructor/enrollment_report.py | 2 +- lms/djangoapps/instructor/message_types.py | 2 +- lms/djangoapps/instructor/paidcourse_enrollment_report.py | 2 +- lms/djangoapps/instructor/services.py | 2 +- lms/djangoapps/instructor/settings/common.py | 2 +- lms/djangoapps/instructor/settings/production.py | 2 +- lms/djangoapps/instructor/tests/test_access.py | 2 +- lms/djangoapps/instructor/tests/test_api.py | 2 +- .../instructor/tests/test_api_email_localization.py | 2 +- lms/djangoapps/instructor/tests/test_certificates.py | 2 +- lms/djangoapps/instructor/tests/test_ecommerce.py | 2 +- lms/djangoapps/instructor/tests/test_email.py | 2 +- lms/djangoapps/instructor/tests/test_enrollment.py | 2 +- .../instructor/tests/test_enrollment_store_provider.py | 2 +- lms/djangoapps/instructor/tests/test_proctoring.py | 2 +- lms/djangoapps/instructor/tests/test_registration_codes.py | 2 +- lms/djangoapps/instructor/tests/test_services.py | 2 +- lms/djangoapps/instructor/tests/test_spoc_gradebook.py | 2 +- lms/djangoapps/instructor/tests/test_tools.py | 2 +- lms/djangoapps/instructor/tests/utils.py | 2 +- .../instructor/tests/views/test_instructor_dashboard.py | 2 +- lms/djangoapps/instructor/utils.py | 2 +- lms/djangoapps/instructor/views/api.py | 2 +- lms/djangoapps/instructor/views/api_urls.py | 2 +- lms/djangoapps/instructor/views/coupons.py | 2 +- lms/djangoapps/instructor/views/gradebook_api.py | 2 +- lms/djangoapps/instructor/views/instructor_dashboard.py | 2 +- lms/djangoapps/instructor/views/instructor_task_helpers.py | 2 +- lms/djangoapps/instructor/views/registration_codes.py | 2 +- lms/djangoapps/instructor/views/tools.py | 2 +- lms/djangoapps/instructor_analytics/basic.py | 2 +- lms/djangoapps/instructor_analytics/csvs.py | 2 +- lms/djangoapps/instructor_analytics/distributions.py | 2 +- lms/djangoapps/instructor_analytics/tests/test_basic.py | 2 +- lms/djangoapps/instructor_analytics/tests/test_csvs.py | 2 +- .../instructor_analytics/tests/test_distributions.py | 2 +- lms/djangoapps/instructor_task/admin.py | 2 +- lms/djangoapps/instructor_task/api.py | 2 +- lms/djangoapps/instructor_task/api_helper.py | 2 +- lms/djangoapps/instructor_task/config/models.py | 2 +- lms/djangoapps/instructor_task/config/waffle.py | 2 +- .../instructor_task/management/commands/fail_old_tasks.py | 2 +- .../management/commands/tests/test_fail_old_tasks.py | 2 +- lms/djangoapps/instructor_task/migrations/0001_initial.py | 2 +- .../instructor_task/migrations/0002_gradereportsetting.py | 2 +- .../instructor_task/migrations/0003_alter_task_input_field.py | 2 +- lms/djangoapps/instructor_task/models.py | 2 +- lms/djangoapps/instructor_task/subtasks.py | 2 +- lms/djangoapps/instructor_task/tasks.py | 2 +- lms/djangoapps/instructor_task/tasks_base.py | 2 +- lms/djangoapps/instructor_task/tasks_helper/certs.py | 2 +- lms/djangoapps/instructor_task/tasks_helper/enrollments.py | 2 +- lms/djangoapps/instructor_task/tasks_helper/grades.py | 2 +- lms/djangoapps/instructor_task/tasks_helper/misc.py | 2 +- lms/djangoapps/instructor_task/tasks_helper/module_state.py | 2 +- lms/djangoapps/instructor_task/tasks_helper/runner.py | 2 +- lms/djangoapps/instructor_task/tasks_helper/utils.py | 2 +- lms/djangoapps/instructor_task/tests/factories.py | 2 +- lms/djangoapps/instructor_task/tests/test_api.py | 2 +- lms/djangoapps/instructor_task/tests/test_base.py | 2 +- lms/djangoapps/instructor_task/tests/test_integration.py | 2 +- lms/djangoapps/instructor_task/tests/test_models.py | 2 +- lms/djangoapps/instructor_task/tests/test_subtasks.py | 2 +- lms/djangoapps/instructor_task/tests/test_tasks.py | 2 +- lms/djangoapps/instructor_task/tests/test_tasks_helper.py | 2 +- lms/djangoapps/instructor_task/tests/test_views.py | 2 +- lms/djangoapps/instructor_task/views.py | 2 +- lms/djangoapps/learner_dashboard/programs.py | 2 +- lms/djangoapps/learner_dashboard/tests/test_programs.py | 2 +- lms/djangoapps/learner_dashboard/tests/test_utils.py | 2 +- lms/djangoapps/learner_dashboard/urls.py | 2 +- lms/djangoapps/learner_dashboard/utils.py | 2 +- lms/djangoapps/learner_dashboard/views.py | 2 +- lms/djangoapps/lms_initialization/apps.py | 2 +- lms/djangoapps/lms_xblock/admin.py | 2 +- lms/djangoapps/lms_xblock/apps.py | 2 +- lms/djangoapps/lms_xblock/field_data.py | 2 +- lms/djangoapps/lms_xblock/migrations/0001_initial.py | 2 +- lms/djangoapps/lms_xblock/mixin.py | 2 +- lms/djangoapps/lms_xblock/models.py | 2 +- lms/djangoapps/lms_xblock/runtime.py | 2 +- lms/djangoapps/lms_xblock/test/test_runtime.py | 2 +- lms/djangoapps/lti_provider/admin.py | 2 +- lms/djangoapps/lti_provider/apps.py | 2 +- .../lti_provider/management/commands/resend_lti_scores.py | 2 +- .../management/commands/tests/test_resend_lti_scores.py | 2 +- lms/djangoapps/lti_provider/migrations/0001_initial.py | 2 +- .../lti_provider/migrations/0002_auto_20160325_0407.py | 2 +- .../lti_provider/migrations/0003_auto_20161118_1040.py | 2 +- lms/djangoapps/lti_provider/models.py | 2 +- lms/djangoapps/lti_provider/outcomes.py | 2 +- lms/djangoapps/lti_provider/signals.py | 2 +- lms/djangoapps/lti_provider/signature_validator.py | 2 +- lms/djangoapps/lti_provider/tasks.py | 2 +- lms/djangoapps/lti_provider/tests/test_outcomes.py | 2 +- lms/djangoapps/lti_provider/tests/test_signature_validator.py | 2 +- lms/djangoapps/lti_provider/tests/test_tasks.py | 2 +- lms/djangoapps/lti_provider/tests/test_users.py | 2 +- lms/djangoapps/lti_provider/tests/test_views.py | 2 +- lms/djangoapps/lti_provider/urls.py | 2 +- lms/djangoapps/lti_provider/users.py | 2 +- lms/djangoapps/lti_provider/views.py | 2 +- lms/djangoapps/mailing/management/commands/mailchimp_id.py | 2 +- .../management/commands/mailchimp_sync_announcements.py | 2 +- .../mailing/management/commands/mailchimp_sync_course.py | 2 +- lms/djangoapps/mobile_api/admin.py | 2 +- lms/djangoapps/mobile_api/context_processor.py | 2 +- lms/djangoapps/mobile_api/course_info/tests.py | 2 +- lms/djangoapps/mobile_api/course_info/urls.py | 2 +- lms/djangoapps/mobile_api/course_info/views.py | 2 +- lms/djangoapps/mobile_api/decorators.py | 2 +- lms/djangoapps/mobile_api/middleware.py | 2 +- lms/djangoapps/mobile_api/migrations/0001_initial.py | 2 +- .../mobile_api/migrations/0002_auto_20160406_0904.py | 2 +- .../migrations/0003_ignore_mobile_available_flag.py | 2 +- lms/djangoapps/mobile_api/mobile_platform.py | 2 +- lms/djangoapps/mobile_api/models.py | 2 +- lms/djangoapps/mobile_api/tests/test_context_processor.py | 2 +- lms/djangoapps/mobile_api/tests/test_decorator.py | 2 +- lms/djangoapps/mobile_api/tests/test_middleware.py | 2 +- lms/djangoapps/mobile_api/tests/test_milestones.py | 2 +- lms/djangoapps/mobile_api/tests/test_mobile_platform.py | 2 +- lms/djangoapps/mobile_api/tests/test_model.py | 2 +- lms/djangoapps/mobile_api/testutils.py | 2 +- lms/djangoapps/mobile_api/urls.py | 2 +- lms/djangoapps/mobile_api/users/serializers.py | 2 +- lms/djangoapps/mobile_api/users/tests.py | 2 +- lms/djangoapps/mobile_api/users/urls.py | 2 +- lms/djangoapps/mobile_api/users/views.py | 2 +- lms/djangoapps/oauth2_handler/__init__.py | 2 +- lms/djangoapps/oauth2_handler/handlers.py | 2 +- lms/djangoapps/oauth2_handler/tests.py | 2 +- lms/djangoapps/program_enrollments/admin.py | 2 +- lms/djangoapps/program_enrollments/api/__init__.py | 2 +- lms/djangoapps/program_enrollments/api/grades.py | 2 +- lms/djangoapps/program_enrollments/api/linking.py | 2 +- lms/djangoapps/program_enrollments/api/reading.py | 2 +- lms/djangoapps/program_enrollments/api/tests/test_grades.py | 2 +- lms/djangoapps/program_enrollments/api/tests/test_linking.py | 2 +- lms/djangoapps/program_enrollments/api/tests/test_reading.py | 2 +- lms/djangoapps/program_enrollments/api/tests/test_writing.py | 2 +- lms/djangoapps/program_enrollments/api/writing.py | 2 +- lms/djangoapps/program_enrollments/apps.py | 2 +- lms/djangoapps/program_enrollments/constants.py | 2 +- lms/djangoapps/program_enrollments/exceptions.py | 2 +- .../management/commands/expire_waiting_enrollments.py | 2 +- .../management/commands/link_program_enrollments.py | 2 +- .../management/commands/migrate_saml_uids.py | 2 +- .../management/commands/reset_enrollment_data.py | 2 +- .../commands/tests/test_expire_waiting_enrollments.py | 2 +- .../commands/tests/test_link_program_enrollments.py | 2 +- .../management/commands/tests/test_migrate_saml_uids.py | 2 +- .../management/commands/tests/test_reset_enrollment_data.py | 2 +- lms/djangoapps/program_enrollments/migrations/0001_initial.py | 2 +- ...storicalprogramcourseenrollment_programcourseenrollment.py | 2 +- .../program_enrollments/migrations/0003_auto_20190424_1622.py | 2 +- .../0004_add_programcourseenrollment_relatedname.py | 2 +- .../migrations/0005_canceled_not_withdrawn.py | 2 +- .../migrations/0006_add_the_correct_constraints.py | 2 +- .../0007_waiting_programcourseenrollment_constraint.py | 2 +- .../migrations/0008_add_ended_programenrollment_status.py | 2 +- lms/djangoapps/program_enrollments/models.py | 2 +- lms/djangoapps/program_enrollments/rest_api/urls.py | 2 +- lms/djangoapps/program_enrollments/rest_api/v1/constants.py | 2 +- lms/djangoapps/program_enrollments/rest_api/v1/serializers.py | 2 +- .../program_enrollments/rest_api/v1/tests/test_views.py | 2 +- lms/djangoapps/program_enrollments/rest_api/v1/urls.py | 2 +- lms/djangoapps/program_enrollments/rest_api/v1/utils.py | 2 +- lms/djangoapps/program_enrollments/rest_api/v1/views.py | 2 +- lms/djangoapps/program_enrollments/signals.py | 2 +- lms/djangoapps/program_enrollments/tasks.py | 2 +- lms/djangoapps/program_enrollments/tests/factories.py | 2 +- lms/djangoapps/program_enrollments/tests/test_admin.py | 2 +- lms/djangoapps/program_enrollments/tests/test_models.py | 2 +- lms/djangoapps/program_enrollments/tests/test_signals.py | 2 +- lms/djangoapps/program_enrollments/tests/test_tasks.py | 2 +- lms/djangoapps/rss_proxy/admin.py | 2 +- lms/djangoapps/rss_proxy/migrations/0001_initial.py | 4 ++-- lms/djangoapps/rss_proxy/models.py | 2 +- lms/djangoapps/rss_proxy/tests/test_models.py | 2 +- lms/djangoapps/rss_proxy/tests/test_views.py | 2 +- lms/djangoapps/rss_proxy/urls.py | 2 +- lms/djangoapps/rss_proxy/views.py | 2 +- lms/djangoapps/shoppingcart/admin.py | 2 +- lms/djangoapps/shoppingcart/api.py | 2 +- lms/djangoapps/shoppingcart/decorators.py | 2 +- .../shoppingcart/management/commands/retire_order.py | 2 +- .../shoppingcart/management/tests/test_retire_order.py | 2 +- lms/djangoapps/shoppingcart/migrations/0001_initial.py | 2 +- .../shoppingcart/migrations/0002_auto_20151208_1034.py | 2 +- .../shoppingcart/migrations/0003_auto_20151217_0958.py | 2 +- .../shoppingcart/migrations/0004_change_meta_options.py | 2 +- lms/djangoapps/shoppingcart/models.py | 2 +- lms/djangoapps/shoppingcart/processors/CyberSource2.py | 2 +- lms/djangoapps/shoppingcart/processors/__init__.py | 2 +- lms/djangoapps/shoppingcart/processors/exceptions.py | 2 +- lms/djangoapps/shoppingcart/processors/helpers.py | 2 +- .../shoppingcart/processors/tests/test_CyberSource2.py | 2 +- lms/djangoapps/shoppingcart/reports.py | 2 +- lms/djangoapps/shoppingcart/tests/payment_fake.py | 2 +- .../shoppingcart/tests/test_configuration_overrides.py | 2 +- lms/djangoapps/shoppingcart/tests/test_context_processor.py | 2 +- lms/djangoapps/shoppingcart/tests/test_models.py | 2 +- lms/djangoapps/shoppingcart/tests/test_payment_fake.py | 2 +- lms/djangoapps/shoppingcart/tests/test_reports.py | 2 +- lms/djangoapps/shoppingcart/tests/test_views.py | 2 +- lms/djangoapps/shoppingcart/urls.py | 2 +- lms/djangoapps/shoppingcart/utils.py | 2 +- lms/djangoapps/shoppingcart/views.py | 2 +- lms/djangoapps/static_template_view/tests/test_views.py | 2 +- lms/djangoapps/static_template_view/urls.py | 2 +- lms/djangoapps/static_template_view/views.py | 2 +- lms/djangoapps/staticbook/tests.py | 2 +- lms/djangoapps/staticbook/views.py | 2 +- lms/djangoapps/support/decorators.py | 2 +- lms/djangoapps/support/serializers.py | 2 +- lms/djangoapps/support/tests/test_refund.py | 2 +- lms/djangoapps/support/tests/test_views.py | 2 +- lms/djangoapps/support/urls.py | 2 +- lms/djangoapps/support/views/certificate.py | 2 +- lms/djangoapps/support/views/contact_us.py | 2 +- lms/djangoapps/support/views/course_entitlements.py | 2 +- lms/djangoapps/support/views/enrollments.py | 2 +- lms/djangoapps/support/views/feature_based_enrollments.py | 2 +- lms/djangoapps/support/views/index.py | 2 +- lms/djangoapps/support/views/manage_user.py | 2 +- lms/djangoapps/support/views/program_enrollments.py | 2 +- lms/djangoapps/support/views/refund.py | 2 +- lms/djangoapps/survey/admin.py | 2 +- lms/djangoapps/survey/apps.py | 2 +- lms/djangoapps/survey/migrations/0001_initial.py | 4 ++-- lms/djangoapps/survey/models.py | 2 +- lms/djangoapps/survey/signals.py | 2 +- lms/djangoapps/survey/tests/factories.py | 2 +- lms/djangoapps/survey/tests/test_models.py | 2 +- lms/djangoapps/survey/tests/test_signals.py | 2 +- lms/djangoapps/survey/tests/test_utils.py | 2 +- lms/djangoapps/survey/tests/test_views.py | 2 +- lms/djangoapps/survey/urls.py | 2 +- lms/djangoapps/survey/utils.py | 2 +- lms/djangoapps/survey/views.py | 2 +- lms/djangoapps/teams/__init__.py | 2 +- lms/djangoapps/teams/admin.py | 2 +- lms/djangoapps/teams/api.py | 2 +- lms/djangoapps/teams/api_urls.py | 2 +- lms/djangoapps/teams/errors.py | 2 +- .../teams/management/commands/reindex_course_team.py | 2 +- .../management/commands/tests/test_reindex_course_team.py | 2 +- lms/djangoapps/teams/migrations/0001_initial.py | 2 +- lms/djangoapps/teams/migrations/0002_slug_field_ids.py | 2 +- .../migrations/0003_courseteam_organization_protected.py | 2 +- lms/djangoapps/teams/models.py | 2 +- lms/djangoapps/teams/plugins.py | 2 +- lms/djangoapps/teams/search_indexes.py | 2 +- lms/djangoapps/teams/serializers.py | 2 +- lms/djangoapps/teams/services.py | 2 +- lms/djangoapps/teams/tests/factories.py | 2 +- lms/djangoapps/teams/tests/test_api.py | 2 +- lms/djangoapps/teams/tests/test_models.py | 2 +- lms/djangoapps/teams/tests/test_serializers.py | 2 +- lms/djangoapps/teams/tests/test_services.py | 2 +- lms/djangoapps/teams/tests/test_views.py | 2 +- lms/djangoapps/teams/urls.py | 2 +- lms/djangoapps/teams/utils.py | 2 +- lms/djangoapps/teams/views.py | 2 +- lms/djangoapps/tests/test_utils.py | 2 +- lms/djangoapps/verify_student/admin.py | 2 +- lms/djangoapps/verify_student/apps.py | 2 +- lms/djangoapps/verify_student/image.py | 2 +- .../commands/delete_historical_verify_student_data.py | 2 +- .../management/commands/manual_verifications.py | 2 +- .../management/commands/populate_expiry_date.py | 2 +- .../management/commands/retry_failed_photo_verifications.py | 2 +- .../management/commands/send_verification_expiry_email.py | 2 +- .../management/commands/tests/test_manual_verify_student.py | 2 +- .../management/commands/tests/test_populate_expiry_date.py | 2 +- .../commands/tests/test_send_verification_expiry_email.py | 2 +- .../management/commands/tests/test_verify_student.py | 2 +- lms/djangoapps/verify_student/message_types.py | 2 +- lms/djangoapps/verify_student/migrations/0001_initial.py | 2 +- .../verify_student/migrations/0002_auto_20151124_1024.py | 2 +- .../verify_student/migrations/0003_auto_20151113_1443.py | 2 +- .../migrations/0004_delete_historical_records.py | 2 +- .../migrations/0005_remove_deprecated_models.py | 2 +- .../verify_student/migrations/0006_ssoverification.py | 2 +- .../verify_student/migrations/0007_idverificationaggregate.py | 2 +- .../migrations/0008_populate_idverificationaggregate.py | 2 +- .../migrations/0009_remove_id_verification_aggregate.py | 2 +- .../verify_student/migrations/0010_manualverification.py | 2 +- .../verify_student/migrations/0011_add_fields_to_sspv.py | 2 +- .../migrations/0012_sspverificationretryconfig.py | 2 +- lms/djangoapps/verify_student/models.py | 2 +- lms/djangoapps/verify_student/services.py | 2 +- lms/djangoapps/verify_student/signals.py | 2 +- lms/djangoapps/verify_student/ssencrypt.py | 2 +- lms/djangoapps/verify_student/tasks.py | 2 +- lms/djangoapps/verify_student/tests/factories.py | 2 +- lms/djangoapps/verify_student/tests/fake_software_secure.py | 2 +- .../verify_student/tests/test_fake_software_secure.py | 2 +- lms/djangoapps/verify_student/tests/test_integration.py | 2 +- lms/djangoapps/verify_student/tests/test_models.py | 2 +- lms/djangoapps/verify_student/tests/test_services.py | 2 +- lms/djangoapps/verify_student/tests/test_signals.py | 2 +- lms/djangoapps/verify_student/tests/test_ssencrypt.py | 2 +- lms/djangoapps/verify_student/tests/test_utils.py | 2 +- lms/djangoapps/verify_student/tests/test_views.py | 2 +- lms/djangoapps/verify_student/urls.py | 2 +- lms/djangoapps/verify_student/utils.py | 2 +- lms/djangoapps/verify_student/views.py | 2 +- lms/envs/bok_choy.py | 2 +- lms/envs/common.py | 2 +- lms/envs/devstack.py | 2 +- lms/envs/devstack_optimized.py | 2 +- lms/envs/devstack_with_worker.py | 2 +- lms/envs/load_test.py | 2 +- lms/envs/production.py | 2 +- lms/envs/static.py | 2 +- lms/envs/test.py | 2 +- lms/envs/test_static_optimized.py | 2 +- lms/lib/courseware_search/lms_filter_generator.py | 2 +- lms/lib/courseware_search/lms_result_processor.py | 2 +- lms/lib/courseware_search/lms_search_initializer.py | 2 +- lms/lib/courseware_search/test/test_lms_filter_generator.py | 2 +- lms/lib/courseware_search/test/test_lms_result_processor.py | 2 +- lms/lib/tests/test_utils.py | 2 +- lms/lib/xblock/test/test_mixin.py | 2 +- lms/startup.py | 2 +- lms/tests.py | 2 +- lms/urls.py | 2 +- lms/wsgi.py | 2 +- lms/wsgi_apache_lms.py | 2 +- manage.py | 2 +- openedx/core/djangoapps/ace_common/apps.py | 2 +- openedx/core/djangoapps/ace_common/message.py | 2 +- openedx/core/djangoapps/ace_common/settings/devstack.py | 2 +- openedx/core/djangoapps/ace_common/template_context.py | 2 +- openedx/core/djangoapps/ace_common/templatetags/ace.py | 2 +- openedx/core/djangoapps/ace_common/tests/mixins.py | 2 +- openedx/core/djangoapps/ace_common/tests/test_message.py | 2 +- openedx/core/djangoapps/ace_common/tests/test_templatetags.py | 2 +- openedx/core/djangoapps/ace_common/tests/test_tracking.py | 2 +- openedx/core/djangoapps/ace_common/tracking.py | 2 +- openedx/core/djangoapps/api_admin/admin.py | 2 +- openedx/core/djangoapps/api_admin/api/filters.py | 2 +- openedx/core/djangoapps/api_admin/api/urls.py | 2 +- openedx/core/djangoapps/api_admin/api/v1/serializers.py | 2 +- openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py | 2 +- openedx/core/djangoapps/api_admin/api/v1/urls.py | 2 +- openedx/core/djangoapps/api_admin/api/v1/views.py | 2 +- openedx/core/djangoapps/api_admin/decorators.py | 2 +- openedx/core/djangoapps/api_admin/forms.py | 2 +- .../management/commands/create_api_access_request.py | 2 +- .../management/commands/delete_historical_api_admin_data.py | 2 +- openedx/core/djangoapps/api_admin/migrations/0001_initial.py | 2 +- .../api_admin/migrations/0002_auto_20160325_1604.py | 2 +- .../api_admin/migrations/0003_auto_20160404_1618.py | 2 +- .../api_admin/migrations/0004_auto_20160412_1506.py | 2 +- .../api_admin/migrations/0005_auto_20160414_1232.py | 2 +- openedx/core/djangoapps/api_admin/migrations/0006_catalog.py | 2 +- .../migrations/0007_delete_historical_api_records.py | 2 +- openedx/core/djangoapps/api_admin/models.py | 2 +- openedx/core/djangoapps/api_admin/tests/factories.py | 2 +- openedx/core/djangoapps/api_admin/tests/test_forms.py | 2 +- openedx/core/djangoapps/api_admin/tests/test_models.py | 2 +- openedx/core/djangoapps/api_admin/tests/test_views.py | 2 +- openedx/core/djangoapps/api_admin/urls.py | 2 +- openedx/core/djangoapps/api_admin/views.py | 2 +- openedx/core/djangoapps/api_admin/widgets.py | 2 +- openedx/core/djangoapps/auth_exchange/forms.py | 2 +- openedx/core/djangoapps/auth_exchange/tests/mixins.py | 2 +- openedx/core/djangoapps/auth_exchange/tests/test_forms.py | 2 +- openedx/core/djangoapps/auth_exchange/tests/test_views.py | 2 +- openedx/core/djangoapps/auth_exchange/tests/utils.py | 2 +- openedx/core/djangoapps/auth_exchange/views.py | 2 +- openedx/core/djangoapps/bookmarks/__init__.py | 2 +- openedx/core/djangoapps/bookmarks/api.py | 2 +- openedx/core/djangoapps/bookmarks/apps.py | 2 +- openedx/core/djangoapps/bookmarks/migrations/0001_initial.py | 4 ++-- openedx/core/djangoapps/bookmarks/models.py | 2 +- openedx/core/djangoapps/bookmarks/serializers.py | 2 +- openedx/core/djangoapps/bookmarks/services.py | 2 +- openedx/core/djangoapps/bookmarks/signals.py | 2 +- openedx/core/djangoapps/bookmarks/tasks.py | 2 +- openedx/core/djangoapps/bookmarks/tests/factories.py | 2 +- openedx/core/djangoapps/bookmarks/tests/test_api.py | 2 +- openedx/core/djangoapps/bookmarks/tests/test_models.py | 2 +- openedx/core/djangoapps/bookmarks/tests/test_services.py | 2 +- openedx/core/djangoapps/bookmarks/tests/test_tasks.py | 2 +- openedx/core/djangoapps/bookmarks/tests/test_views.py | 2 +- openedx/core/djangoapps/bookmarks/urls.py | 2 +- openedx/core/djangoapps/bookmarks/views.py | 2 +- openedx/core/djangoapps/cache_toolbox/app_settings.py | 2 +- openedx/core/djangoapps/cache_toolbox/core.py | 2 +- openedx/core/djangoapps/cache_toolbox/middleware.py | 2 +- openedx/core/djangoapps/cache_toolbox/model.py | 2 +- .../djangoapps/cache_toolbox/templatetags/cache_toolbox.py | 2 +- .../core/djangoapps/cache_toolbox/tests/test_middleware.py | 2 +- openedx/core/djangoapps/catalog/admin.py | 2 +- openedx/core/djangoapps/catalog/constants.py | 2 +- .../djangoapps/catalog/management/commands/cache_programs.py | 2 +- .../management/commands/create_catalog_integrations.py | 2 +- .../catalog/management/commands/sync_course_runs.py | 2 +- .../catalog/management/commands/tests/test_cache_programs.py | 2 +- .../commands/tests/test_create_catalog_integrations.py | 2 +- .../management/commands/tests/test_sync_course_runs.py | 2 +- openedx/core/djangoapps/catalog/migrations/0001_initial.py | 2 +- .../catalog/migrations/0002_catalogintegration_username.py | 2 +- .../catalog/migrations/0003_catalogintegration_page_size.py | 2 +- .../djangoapps/catalog/migrations/0004_auto_20170616_0618.py | 2 +- .../migrations/0005_catalogintegration_long_term_cache_ttl.py | 2 +- openedx/core/djangoapps/catalog/models.py | 2 +- openedx/core/djangoapps/catalog/tests/factories.py | 2 +- openedx/core/djangoapps/catalog/tests/mixins.py | 2 +- openedx/core/djangoapps/catalog/tests/test_models.py | 2 +- openedx/core/djangoapps/catalog/tests/test_utils.py | 2 +- openedx/core/djangoapps/catalog/urls.py | 2 +- openedx/core/djangoapps/catalog/utils.py | 2 +- openedx/core/djangoapps/catalog/views.py | 2 +- openedx/core/djangoapps/ccxcon/admin.py | 2 +- openedx/core/djangoapps/ccxcon/api.py | 2 +- openedx/core/djangoapps/ccxcon/apps.py | 2 +- .../djangoapps/ccxcon/migrations/0001_initial_ccxcon_model.py | 2 +- .../djangoapps/ccxcon/migrations/0002_auto_20160325_0407.py | 2 +- openedx/core/djangoapps/ccxcon/models.py | 2 +- openedx/core/djangoapps/ccxcon/signals.py | 2 +- openedx/core/djangoapps/ccxcon/tasks.py | 2 +- openedx/core/djangoapps/ccxcon/tests/factories.py | 2 +- openedx/core/djangoapps/ccxcon/tests/test_api.py | 2 +- openedx/core/djangoapps/ccxcon/tests/test_signals.py | 2 +- openedx/core/djangoapps/ccxcon/tests/test_tasks.py | 2 +- openedx/core/djangoapps/certificates/api.py | 2 +- openedx/core/djangoapps/certificates/config/waffle.py | 2 +- openedx/core/djangoapps/certificates/tests/test_api.py | 2 +- openedx/core/djangoapps/commerce/utils.py | 2 +- openedx/core/djangoapps/common_initialization/apps.py | 2 +- openedx/core/djangoapps/common_initialization/checks.py | 2 +- openedx/core/djangoapps/common_views/xblock.py | 2 +- openedx/core/djangoapps/config_model_utils/admin.py | 2 +- openedx/core/djangoapps/config_model_utils/apps.py | 2 +- openedx/core/djangoapps/config_model_utils/models.py | 2 +- openedx/core/djangoapps/config_model_utils/utils.py | 2 +- openedx/core/djangoapps/content/block_structure/admin.py | 2 +- openedx/core/djangoapps/content/block_structure/api.py | 2 +- openedx/core/djangoapps/content/block_structure/apps.py | 2 +- .../djangoapps/content/block_structure/block_structure.py | 2 +- .../djangoapps/content/block_structure/config/__init__.py | 2 +- .../core/djangoapps/content/block_structure/config/models.py | 2 +- .../management/commands/generate_course_blocks.py | 2 +- .../management/commands/tests/test_generate_course_blocks.py | 2 +- openedx/core/djangoapps/content/block_structure/manager.py | 2 +- .../content/block_structure/migrations/0001_config.py | 2 +- .../block_structure/migrations/0002_blockstructuremodel.py | 2 +- .../migrations/0003_blockstructuremodel_storage.py | 2 +- .../migrations/0004_blockstructuremodel_usagekeywithrun.py | 2 +- openedx/core/djangoapps/content/block_structure/models.py | 2 +- openedx/core/djangoapps/content/block_structure/signals.py | 2 +- openedx/core/djangoapps/content/block_structure/store.py | 2 +- openedx/core/djangoapps/content/block_structure/tasks.py | 2 +- .../core/djangoapps/content/block_structure/tests/helpers.py | 2 +- .../content/block_structure/tests/test_block_structure.py | 2 +- .../djangoapps/content/block_structure/tests/test_factory.py | 2 +- .../djangoapps/content/block_structure/tests/test_manager.py | 2 +- .../djangoapps/content/block_structure/tests/test_models.py | 2 +- .../djangoapps/content/block_structure/tests/test_signals.py | 2 +- .../djangoapps/content/block_structure/tests/test_store.py | 2 +- .../djangoapps/content/block_structure/tests/test_tasks.py | 2 +- .../block_structure/tests/test_transformer_registry.py | 2 +- .../content/block_structure/tests/test_transformers.py | 2 +- .../core/djangoapps/content/block_structure/transformer.py | 2 +- .../content/block_structure/transformer_registry.py | 2 +- .../core/djangoapps/content/block_structure/transformers.py | 2 +- openedx/core/djangoapps/content/course_overviews/admin.py | 2 +- openedx/core/djangoapps/content/course_overviews/apps.py | 2 +- .../management/commands/generate_course_overview.py | 2 +- .../course_overviews/management/commands/simulate_publish.py | 2 +- .../commands/tests/test_generate_course_overview.py | 2 +- .../management/commands/tests/test_simulate_publish.py | 2 +- .../content/course_overviews/migrations/0001_initial.py | 2 +- .../migrations/0002_add_course_catalog_fields.py | 2 +- .../migrations/0003_courseoverviewgeneratedhistory.py | 2 +- .../course_overviews/migrations/0004_courseoverview_org.py | 2 +- .../migrations/0005_delete_courseoverviewgeneratedhistory.py | 2 +- .../migrations/0006_courseoverviewimageset.py | 2 +- .../migrations/0007_courseoverviewimageconfig.py | 2 +- .../migrations/0008_remove_courseoverview_facebook_url.py | 2 +- .../course_overviews/migrations/0009_readd_facebook_url.py | 2 +- .../course_overviews/migrations/0010_auto_20160329_2317.py | 2 +- .../migrations/0011_courseoverview_marketing_url.py | 2 +- .../0012_courseoverview_eligible_for_financial_aid.py | 2 +- .../migrations/0013_courseoverview_language.py | 2 +- .../0014_courseoverview_certificate_available_date.py | 2 +- .../migrations/0015_historicalcourseoverview.py | 2 +- .../migrations/0016_simulatecoursepublishconfig.py | 2 +- .../course_overviews/migrations/0017_auto_20191002_0823.py | 2 +- openedx/core/djangoapps/content/course_overviews/models.py | 2 +- openedx/core/djangoapps/content/course_overviews/signals.py | 2 +- openedx/core/djangoapps/content/course_overviews/tasks.py | 2 +- .../djangoapps/content/course_overviews/tests/factories.py | 2 +- .../content/course_overviews/tests/test_course_overviews.py | 2 +- .../djangoapps/content/course_overviews/tests/test_signals.py | 2 +- .../djangoapps/content/course_overviews/tests/test_tasks.py | 2 +- openedx/core/djangoapps/content_libraries/api.py | 2 +- openedx/core/djangoapps/content_libraries/apps.py | 2 +- openedx/core/djangoapps/content_libraries/library_bundle.py | 2 +- openedx/core/djangoapps/content_libraries/library_context.py | 2 +- .../djangoapps/content_libraries/migrations/0001_initial.py | 2 +- openedx/core/djangoapps/content_libraries/models.py | 2 +- openedx/core/djangoapps/content_libraries/serializers.py | 2 +- openedx/core/djangoapps/content_libraries/tests/base.py | 2 +- .../content_libraries/tests/test_content_libraries.py | 2 +- .../core/djangoapps/content_libraries/tests/test_runtime.py | 2 +- .../djangoapps/content_libraries/tests/test_static_assets.py | 2 +- .../djangoapps/content_libraries/tests/user_state_block.py | 2 +- openedx/core/djangoapps/content_libraries/urls.py | 2 +- openedx/core/djangoapps/content_libraries/views.py | 2 +- openedx/core/djangoapps/contentserver/admin.py | 2 +- openedx/core/djangoapps/contentserver/caching.py | 2 +- openedx/core/djangoapps/contentserver/middleware.py | 2 +- .../core/djangoapps/contentserver/migrations/0001_initial.py | 2 +- .../contentserver/migrations/0002_cdnuseragentsconfig.py | 2 +- openedx/core/djangoapps/contentserver/models.py | 2 +- .../core/djangoapps/contentserver/test/test_contentserver.py | 2 +- openedx/core/djangoapps/cors_csrf/admin.py | 2 +- openedx/core/djangoapps/cors_csrf/authentication.py | 2 +- openedx/core/djangoapps/cors_csrf/decorators.py | 2 +- openedx/core/djangoapps/cors_csrf/helpers.py | 2 +- openedx/core/djangoapps/cors_csrf/middleware.py | 2 +- openedx/core/djangoapps/cors_csrf/migrations/0001_initial.py | 2 +- openedx/core/djangoapps/cors_csrf/models.py | 2 +- .../core/djangoapps/cors_csrf/tests/test_authentication.py | 2 +- openedx/core/djangoapps/cors_csrf/tests/test_decorators.py | 2 +- openedx/core/djangoapps/cors_csrf/tests/test_middleware.py | 2 +- openedx/core/djangoapps/cors_csrf/tests/test_views.py | 2 +- openedx/core/djangoapps/cors_csrf/views.py | 2 +- openedx/core/djangoapps/course_groups/api.py | 2 +- openedx/core/djangoapps/course_groups/cohorts.py | 2 +- .../core/djangoapps/course_groups/migrations/0001_initial.py | 2 +- .../migrations/0002_change_inline_default_cohort_value.py | 2 +- .../course_groups/migrations/0003_auto_20170609_1455.py | 2 +- openedx/core/djangoapps/course_groups/models.py | 2 +- openedx/core/djangoapps/course_groups/partition_scheme.py | 2 +- openedx/core/djangoapps/course_groups/serializers.py | 2 +- openedx/core/djangoapps/course_groups/signals/signals.py | 2 +- openedx/core/djangoapps/course_groups/tests/helpers.py | 2 +- openedx/core/djangoapps/course_groups/tests/test_api_views.py | 2 +- openedx/core/djangoapps/course_groups/tests/test_cohorts.py | 2 +- .../djangoapps/course_groups/tests/test_partition_scheme.py | 2 +- openedx/core/djangoapps/course_groups/tests/test_views.py | 2 +- openedx/core/djangoapps/course_groups/urls.py | 2 +- openedx/core/djangoapps/course_groups/views.py | 2 +- openedx/core/djangoapps/coursegraph/apps.py | 2 +- .../coursegraph/management/commands/dump_to_neo4j.py | 2 +- .../management/commands/tests/test_dump_to_neo4j.py | 2 +- .../djangoapps/coursegraph/management/commands/tests/utils.py | 2 +- openedx/core/djangoapps/coursegraph/tasks.py | 2 +- openedx/core/djangoapps/crawlers/admin.py | 2 +- openedx/core/djangoapps/crawlers/migrations/0001_initial.py | 2 +- .../djangoapps/crawlers/migrations/0002_auto_20170419_0018.py | 2 +- openedx/core/djangoapps/crawlers/models.py | 2 +- openedx/core/djangoapps/crawlers/tests/test_models.py | 2 +- openedx/core/djangoapps/credentials/admin.py | 2 +- openedx/core/djangoapps/credentials/apps.py | 2 +- .../credentials/management/commands/notify_credentials.py | 2 +- .../management/commands/tests/test_notify_credentials.py | 4 ++-- .../core/djangoapps/credentials/migrations/0001_initial.py | 2 +- .../credentials/migrations/0002_auto_20160325_0631.py | 2 +- .../credentials/migrations/0003_auto_20170525_1109.py | 2 +- .../credentials/migrations/0004_notifycredentialsconfig.py | 2 +- openedx/core/djangoapps/credentials/models.py | 2 +- openedx/core/djangoapps/credentials/signals.py | 2 +- openedx/core/djangoapps/credentials/tasks/v1/tasks.py | 2 +- openedx/core/djangoapps/credentials/tests/factories.py | 2 +- openedx/core/djangoapps/credentials/tests/mixins.py | 2 +- openedx/core/djangoapps/credentials/tests/test_models.py | 2 +- openedx/core/djangoapps/credentials/tests/test_signals.py | 2 +- openedx/core/djangoapps/credentials/tests/test_tasks.py | 2 +- openedx/core/djangoapps/credentials/tests/test_utils.py | 2 +- openedx/core/djangoapps/credentials/utils.py | 2 +- openedx/core/djangoapps/credit/admin.py | 2 +- openedx/core/djangoapps/credit/api/eligibility.py | 2 +- openedx/core/djangoapps/credit/api/provider.py | 2 +- openedx/core/djangoapps/credit/apps.py | 2 +- openedx/core/djangoapps/credit/email_utils.py | 2 +- openedx/core/djangoapps/credit/exceptions.py | 2 +- .../management/commands/delete_historical_credit_data.py | 2 +- openedx/core/djangoapps/credit/migrations/0001_initial.py | 2 +- .../core/djangoapps/credit/migrations/0002_creditconfig.py | 2 +- .../djangoapps/credit/migrations/0003_auto_20160511_2227.py | 2 +- .../migrations/0004_delete_historical_credit_records.py | 2 +- .../credit/migrations/0005_creditrequirement_sort_value.py | 2 +- openedx/core/djangoapps/credit/models.py | 2 +- openedx/core/djangoapps/credit/routers.py | 2 +- openedx/core/djangoapps/credit/serializers.py | 2 +- openedx/core/djangoapps/credit/services.py | 2 +- openedx/core/djangoapps/credit/signals.py | 2 +- openedx/core/djangoapps/credit/signature.py | 2 +- openedx/core/djangoapps/credit/tasks.py | 2 +- openedx/core/djangoapps/credit/tests/factories.py | 2 +- openedx/core/djangoapps/credit/tests/test_api.py | 2 +- openedx/core/djangoapps/credit/tests/test_models.py | 2 +- openedx/core/djangoapps/credit/tests/test_serializers.py | 2 +- openedx/core/djangoapps/credit/tests/test_services.py | 2 +- openedx/core/djangoapps/credit/tests/test_signals.py | 2 +- openedx/core/djangoapps/credit/tests/test_signature.py | 2 +- openedx/core/djangoapps/credit/tests/test_tasks.py | 2 +- openedx/core/djangoapps/credit/tests/test_views.py | 2 +- openedx/core/djangoapps/credit/urls.py | 2 +- openedx/core/djangoapps/credit/utils.py | 2 +- openedx/core/djangoapps/credit/views.py | 2 +- openedx/core/djangoapps/dark_lang/admin.py | 2 +- openedx/core/djangoapps/dark_lang/middleware.py | 2 +- openedx/core/djangoapps/dark_lang/migrations/0001_initial.py | 2 +- .../dark_lang/migrations/0002_data__enable_on_install.py | 2 +- .../dark_lang/migrations/0003_auto_20180425_0359.py | 2 +- openedx/core/djangoapps/dark_lang/models.py | 2 +- openedx/core/djangoapps/dark_lang/tests.py | 2 +- openedx/core/djangoapps/dark_lang/urls.py | 2 +- openedx/core/djangoapps/dark_lang/views.py | 2 +- openedx/core/djangoapps/debug/views.py | 2 +- openedx/core/djangoapps/django_comment_common/admin.py | 2 +- .../django_comment_common/comment_client/comment.py | 2 +- .../django_comment_common/comment_client/commentable.py | 2 +- .../djangoapps/django_comment_common/comment_client/models.py | 2 +- .../django_comment_common/comment_client/settings.py | 2 +- .../djangoapps/django_comment_common/comment_client/thread.py | 2 +- .../djangoapps/django_comment_common/comment_client/user.py | 2 +- .../djangoapps/django_comment_common/comment_client/utils.py | 2 +- .../django_comment_common/migrations/0001_initial.py | 2 +- .../django_comment_common/migrations/0002_forumsconfig.py | 2 +- .../django_comment_common/migrations/0003_enable_forums.py | 2 +- .../migrations/0004_auto_20161117_1209.py | 2 +- .../migrations/0005_coursediscussionsettings.py | 2 +- .../0006_coursediscussionsettings_discussions_id_map.py | 2 +- .../migrations/0007_discussionsidmapping.py | 2 +- .../django_comment_common/migrations/0008_role_user_index.py | 2 +- openedx/core/djangoapps/django_comment_common/models.py | 2 +- openedx/core/djangoapps/django_comment_common/signals.py | 2 +- openedx/core/djangoapps/django_comment_common/tests.py | 2 +- openedx/core/djangoapps/django_comment_common/utils.py | 2 +- openedx/core/djangoapps/embargo/admin.py | 2 +- openedx/core/djangoapps/embargo/api.py | 2 +- openedx/core/djangoapps/embargo/forms.py | 2 +- openedx/core/djangoapps/embargo/messages.py | 2 +- openedx/core/djangoapps/embargo/middleware.py | 2 +- openedx/core/djangoapps/embargo/migrations/0001_initial.py | 2 +- .../djangoapps/embargo/migrations/0002_data__add_countries.py | 2 +- openedx/core/djangoapps/embargo/models.py | 2 +- openedx/core/djangoapps/embargo/test_utils.py | 2 +- openedx/core/djangoapps/embargo/tests/factories.py | 2 +- openedx/core/djangoapps/embargo/tests/test_api.py | 2 +- openedx/core/djangoapps/embargo/tests/test_forms.py | 2 +- openedx/core/djangoapps/embargo/tests/test_middleware.py | 2 +- openedx/core/djangoapps/embargo/tests/test_models.py | 2 +- openedx/core/djangoapps/embargo/tests/test_views.py | 2 +- openedx/core/djangoapps/embargo/urls.py | 2 +- openedx/core/djangoapps/embargo/views.py | 2 +- openedx/core/djangoapps/enrollments/api.py | 2 +- openedx/core/djangoapps/enrollments/data.py | 2 +- openedx/core/djangoapps/enrollments/forms.py | 2 +- .../enrollments/management/commands/enroll_user_in_course.py | 2 +- .../management/tests/test_enroll_user_in_course.py | 2 +- openedx/core/djangoapps/enrollments/paginators.py | 2 +- openedx/core/djangoapps/enrollments/serializers.py | 2 +- openedx/core/djangoapps/enrollments/tests/fake_data_api.py | 2 +- openedx/core/djangoapps/enrollments/tests/test_api.py | 2 +- openedx/core/djangoapps/enrollments/tests/test_data.py | 2 +- openedx/core/djangoapps/enrollments/tests/test_views.py | 2 +- openedx/core/djangoapps/enrollments/urls.py | 2 +- openedx/core/djangoapps/enrollments/views.py | 2 +- openedx/core/djangoapps/geoinfo/middleware.py | 2 +- openedx/core/djangoapps/geoinfo/tests/test_middleware.py | 2 +- openedx/core/djangoapps/header_control/decorators.py | 2 +- openedx/core/djangoapps/header_control/middleware.py | 2 +- .../core/djangoapps/header_control/tests/test_decorators.py | 2 +- .../core/djangoapps/header_control/tests/test_middleware.py | 2 +- openedx/core/djangoapps/heartbeat/default_checks.py | 2 +- openedx/core/djangoapps/heartbeat/runchecks.py | 2 +- openedx/core/djangoapps/heartbeat/tasks.py | 2 +- openedx/core/djangoapps/heartbeat/tests/test_heartbeat.py | 2 +- openedx/core/djangoapps/heartbeat/urls.py | 2 +- openedx/core/djangoapps/heartbeat/views.py | 2 +- openedx/core/djangoapps/lang_pref/api.py | 2 +- openedx/core/djangoapps/lang_pref/middleware.py | 2 +- openedx/core/djangoapps/lang_pref/tests/test_api.py | 2 +- openedx/core/djangoapps/lang_pref/tests/test_middleware.py | 2 +- openedx/core/djangoapps/lang_pref/tests/test_views.py | 2 +- openedx/core/djangoapps/lang_pref/views.py | 2 +- openedx/core/djangoapps/models/course_details.py | 2 +- openedx/core/djangoapps/models/tests/test_course_details.py | 2 +- openedx/core/djangoapps/oauth_dispatch/adapters/dop.py | 2 +- openedx/core/djangoapps/oauth_dispatch/adapters/dot.py | 2 +- openedx/core/djangoapps/oauth_dispatch/admin.py | 2 +- openedx/core/djangoapps/oauth_dispatch/api.py | 2 +- openedx/core/djangoapps/oauth_dispatch/apps.py | 2 +- .../core/djangoapps/oauth_dispatch/dot_overrides/backends.py | 2 +- .../djangoapps/oauth_dispatch/dot_overrides/validators.py | 2 +- openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py | 2 +- openedx/core/djangoapps/oauth_dispatch/jwt.py | 2 +- .../management/commands/create_dot_application.py | 2 +- .../management/commands/edx_clear_expired_tokens.py | 2 +- .../management/commands/generate_jwt_signing_key.py | 2 +- .../management/commands/tests/test_clear_expired_tokens.py | 2 +- .../management/commands/tests/test_create_dot_application.py | 2 +- .../commands/tests/test_generate_jwt_signing_key.py | 2 +- .../core/djangoapps/oauth_dispatch/migrations/0001_initial.py | 2 +- .../0002_scopedapplication_scopedapplicationorganization.py | 2 +- .../oauth_dispatch/migrations/0003_application_data.py | 2 +- .../oauth_dispatch/migrations/0004_auto_20180626_1349.py | 2 +- .../oauth_dispatch/migrations/0005_applicationaccess_type.py | 2 +- .../migrations/0006_drop_application_id_constraints.py | 2 +- .../migrations/0007_restore_application_id_constraints.py | 2 +- openedx/core/djangoapps/oauth_dispatch/models.py | 2 +- openedx/core/djangoapps/oauth_dispatch/scopes.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/factories.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/mixins.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/test_api.py | 2 +- .../oauth_dispatch/tests/test_client_credentials.py | 2 +- .../core/djangoapps/oauth_dispatch/tests/test_dop_adapter.py | 2 +- .../core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py | 2 +- .../djangoapps/oauth_dispatch/tests/test_dot_overrides.py | 2 +- .../core/djangoapps/oauth_dispatch/tests/test_factories.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/test_models.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/test_scopes.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/test_views.py | 2 +- openedx/core/djangoapps/oauth_dispatch/toggles.py | 2 +- openedx/core/djangoapps/oauth_dispatch/urls.py | 2 +- openedx/core/djangoapps/oauth_dispatch/views.py | 2 +- openedx/core/djangoapps/password_policy/apps.py | 2 +- openedx/core/djangoapps/password_policy/compliance.py | 2 +- openedx/core/djangoapps/password_policy/forms.py | 2 +- openedx/core/djangoapps/password_policy/tests/test_apps.py | 2 +- .../core/djangoapps/password_policy/tests/test_compliance.py | 2 +- openedx/core/djangoapps/password_policy/tests/test_forms.py | 2 +- openedx/core/djangoapps/plugin_api/views.py | 2 +- openedx/core/djangoapps/plugins/apps.py | 2 +- openedx/core/djangoapps/plugins/plugin_apps.py | 2 +- openedx/core/djangoapps/plugins/plugin_settings.py | 2 +- openedx/core/djangoapps/plugins/plugin_signals.py | 2 +- openedx/core/djangoapps/plugins/plugin_urls.py | 2 +- openedx/core/djangoapps/plugins/registry.py | 2 +- openedx/core/djangoapps/plugins/utils.py | 2 +- openedx/core/djangoapps/profile_images/exceptions.py | 2 +- openedx/core/djangoapps/profile_images/images.py | 2 +- openedx/core/djangoapps/profile_images/tests/helpers.py | 2 +- openedx/core/djangoapps/profile_images/tests/test_images.py | 2 +- openedx/core/djangoapps/profile_images/tests/test_views.py | 2 +- openedx/core/djangoapps/profile_images/urls.py | 2 +- openedx/core/djangoapps/profile_images/views.py | 2 +- openedx/core/djangoapps/programs/__init__.py | 2 +- openedx/core/djangoapps/programs/admin.py | 2 +- openedx/core/djangoapps/programs/apps.py | 2 +- .../management/commands/backpopulate_program_credentials.py | 2 +- openedx/core/djangoapps/programs/migrations/0001_initial.py | 2 +- .../programs/migrations/0002_programsapiconfig_cache_ttl.py | 2 +- .../djangoapps/programs/migrations/0003_auto_20151120_1613.py | 2 +- .../migrations/0004_programsapiconfig_enable_certification.py | 2 +- .../programs/migrations/0005_programsapiconfig_max_retries.py | 2 +- .../migrations/0006_programsapiconfig_xseries_ad_enabled.py | 2 +- .../0007_programsapiconfig_program_listing_enabled.py | 2 +- .../0008_programsapiconfig_program_details_enabled.py | 2 +- .../migrations/0009_programsapiconfig_marketing_path.py | 2 +- .../djangoapps/programs/migrations/0010_auto_20170204_2332.py | 2 +- .../djangoapps/programs/migrations/0011_auto_20170301_1844.py | 2 +- .../djangoapps/programs/migrations/0012_auto_20170419_0018.py | 2 +- .../programs/migrations/0013_customprogramsconfig.py | 2 +- openedx/core/djangoapps/programs/models.py | 2 +- openedx/core/djangoapps/programs/signals.py | 2 +- openedx/core/djangoapps/programs/tasks/v1/tasks.py | 2 +- openedx/core/djangoapps/programs/tasks/v1/tests/test_tasks.py | 2 +- openedx/core/djangoapps/programs/tests/factories.py | 2 +- openedx/core/djangoapps/programs/tests/mixins.py | 2 +- .../programs/tests/test_backpopulate_program_credentials.py | 2 +- openedx/core/djangoapps/programs/tests/test_signals.py | 2 +- openedx/core/djangoapps/programs/tests/test_utils.py | 2 +- openedx/core/djangoapps/programs/utils.py | 2 +- openedx/core/djangoapps/safe_sessions/middleware.py | 2 +- openedx/core/djangoapps/safe_sessions/testing.py | 2 +- .../core/djangoapps/safe_sessions/tests/test_middleware.py | 2 +- .../djangoapps/safe_sessions/tests/test_safe_cookie_data.py | 2 +- openedx/core/djangoapps/safe_sessions/tests/test_utils.py | 2 +- openedx/core/djangoapps/schedules/admin.py | 2 +- openedx/core/djangoapps/schedules/apps.py | 2 +- openedx/core/djangoapps/schedules/config.py | 2 +- openedx/core/djangoapps/schedules/content_highlights.py | 2 +- .../core/djangoapps/schedules/management/commands/__init__.py | 2 +- .../schedules/management/commands/send_course_update.py | 2 +- .../schedules/management/commands/send_recurring_nudge.py | 2 +- .../schedules/management/commands/send_upgrade_reminder.py | 2 +- .../management/commands/setup_models_to_send_test_emails.py | 2 +- .../schedules/management/commands/tests/send_email_base.py | 2 +- .../management/commands/tests/test_send_course_update.py | 2 +- .../management/commands/tests/test_send_email_base_command.py | 2 +- .../management/commands/tests/test_send_recurring_nudge.py | 2 +- .../management/commands/tests/test_send_upgrade_reminder.py | 2 +- .../schedules/management/commands/tests/upsell_base.py | 2 +- openedx/core/djangoapps/schedules/message_types.py | 2 +- openedx/core/djangoapps/schedules/migrations/0001_initial.py | 2 +- .../schedules/migrations/0002_auto_20170816_1532.py | 2 +- .../djangoapps/schedules/migrations/0003_scheduleconfig.py | 2 +- .../schedules/migrations/0004_auto_20170922_1428.py | 2 +- .../schedules/migrations/0005_auto_20171010_1722.py | 2 +- .../schedules/migrations/0006_scheduleexperience.py | 2 +- .../migrations/0007_scheduleconfig_hold_back_ratio.py | 2 +- .../schedules/migrations/0008_add_new_start_date_field.py | 2 +- openedx/core/djangoapps/schedules/models.py | 2 +- openedx/core/djangoapps/schedules/resolvers.py | 2 +- openedx/core/djangoapps/schedules/signals.py | 2 +- openedx/core/djangoapps/schedules/tasks.py | 2 +- openedx/core/djangoapps/schedules/tests/factories.py | 2 +- .../djangoapps/schedules/tests/test_content_highlights.py | 2 +- openedx/core/djangoapps/schedules/tests/test_resolvers.py | 2 +- openedx/core/djangoapps/schedules/tests/test_signals.py | 2 +- openedx/core/djangoapps/schedules/tests/test_tasks.py | 2 +- openedx/core/djangoapps/schedules/utils.py | 2 +- openedx/core/djangoapps/self_paced/admin.py | 2 +- openedx/core/djangoapps/self_paced/migrations/0001_initial.py | 2 +- openedx/core/djangoapps/self_paced/models.py | 2 +- openedx/core/djangoapps/service_status/tasks.py | 2 +- openedx/core/djangoapps/service_status/test.py | 2 +- openedx/core/djangoapps/service_status/urls.py | 2 +- openedx/core/djangoapps/service_status/views.py | 2 +- .../core/djangoapps/session_inactivity_timeout/middleware.py | 2 +- openedx/core/djangoapps/signals/signals.py | 2 +- openedx/core/djangoapps/site_configuration/admin.py | 2 +- .../core/djangoapps/site_configuration/context_processors.py | 2 +- openedx/core/djangoapps/site_configuration/helpers.py | 2 +- openedx/core/djangoapps/site_configuration/middleware.py | 2 +- .../djangoapps/site_configuration/migrations/0001_initial.py | 2 +- .../site_configuration/migrations/0002_auto_20160720_0231.py | 2 +- openedx/core/djangoapps/site_configuration/models.py | 2 +- .../site_configuration/templatetags/configuration.py | 2 +- openedx/core/djangoapps/site_configuration/tests/factories.py | 2 +- openedx/core/djangoapps/site_configuration/tests/mixins.py | 2 +- .../site_configuration/tests/test_context_processors.py | 2 +- .../core/djangoapps/site_configuration/tests/test_helpers.py | 2 +- .../djangoapps/site_configuration/tests/test_middleware.py | 2 +- .../core/djangoapps/site_configuration/tests/test_models.py | 2 +- openedx/core/djangoapps/site_configuration/tests/test_util.py | 2 +- .../0001_SystemWideRole_SystemWideRoleAssignment.py | 2 +- .../migrations/0002_add_system_wide_student_support_role.py | 2 +- openedx/core/djangoapps/system_wide_roles/models.py | 2 +- .../core/djangoapps/system_wide_roles/tests/test_models.py | 2 +- openedx/core/djangoapps/theming/admin.py | 2 +- openedx/core/djangoapps/theming/apps.py | 2 +- openedx/core/djangoapps/theming/checks.py | 2 +- openedx/core/djangoapps/theming/finders.py | 2 +- openedx/core/djangoapps/theming/helpers.py | 2 +- openedx/core/djangoapps/theming/helpers_dirs.py | 2 +- openedx/core/djangoapps/theming/helpers_static.py | 2 +- .../djangoapps/theming/management/commands/compile_sass.py | 2 +- .../management/commands/create_sites_and_configurations.py | 2 +- .../commands/tests/test_create_sites_and_configurations.py | 2 +- openedx/core/djangoapps/theming/middleware.py | 2 +- openedx/core/djangoapps/theming/migrations/0001_initial.py | 2 +- openedx/core/djangoapps/theming/models.py | 2 +- openedx/core/djangoapps/theming/paver_helpers.py | 2 +- openedx/core/djangoapps/theming/storage.py | 2 +- openedx/core/djangoapps/theming/template_loaders.py | 2 +- .../core/djangoapps/theming/templatetags/optional_include.py | 2 +- .../core/djangoapps/theming/templatetags/theme_pipeline.py | 2 +- openedx/core/djangoapps/theming/tests/test_commands.py | 2 +- openedx/core/djangoapps/theming/tests/test_finders.py | 2 +- openedx/core/djangoapps/theming/tests/test_helpers.py | 2 +- openedx/core/djangoapps/theming/tests/test_middleware.py | 2 +- openedx/core/djangoapps/theming/tests/test_storage.py | 2 +- openedx/core/djangoapps/theming/tests/test_theme_locales.py | 2 +- .../djangoapps/theming/tests/test_theme_style_overrides.py | 2 +- openedx/core/djangoapps/theming/tests/test_util.py | 2 +- openedx/core/djangoapps/theming/tests/test_views.py | 2 +- openedx/core/djangoapps/theming/urls.py | 2 +- openedx/core/djangoapps/theming/views.py | 2 +- openedx/core/djangoapps/user_api/accounts/__init__.py | 2 +- openedx/core/djangoapps/user_api/accounts/api.py | 2 +- openedx/core/djangoapps/user_api/accounts/forms.py | 2 +- openedx/core/djangoapps/user_api/accounts/image_helpers.py | 2 +- openedx/core/djangoapps/user_api/accounts/permissions.py | 2 +- openedx/core/djangoapps/user_api/accounts/serializers.py | 2 +- openedx/core/djangoapps/user_api/accounts/settings_views.py | 2 +- openedx/core/djangoapps/user_api/accounts/signals.py | 2 +- .../djangoapps/user_api/accounts/tests/retirement_helpers.py | 2 +- openedx/core/djangoapps/user_api/accounts/tests/test_api.py | 2 +- .../djangoapps/user_api/accounts/tests/test_image_helpers.py | 2 +- .../core/djangoapps/user_api/accounts/tests/test_models.py | 2 +- .../djangoapps/user_api/accounts/tests/test_permissions.py | 2 +- .../user_api/accounts/tests/test_retirement_views.py | 2 +- .../djangoapps/user_api/accounts/tests/test_serializers.py | 2 +- .../djangoapps/user_api/accounts/tests/test_settings_views.py | 2 +- openedx/core/djangoapps/user_api/accounts/tests/test_utils.py | 2 +- openedx/core/djangoapps/user_api/accounts/tests/test_views.py | 2 +- openedx/core/djangoapps/user_api/accounts/tests/testutils.py | 2 +- openedx/core/djangoapps/user_api/accounts/toggles.py | 2 +- openedx/core/djangoapps/user_api/accounts/utils.py | 2 +- openedx/core/djangoapps/user_api/accounts/views.py | 2 +- openedx/core/djangoapps/user_api/admin.py | 2 +- openedx/core/djangoapps/user_api/config/waffle.py | 2 +- openedx/core/djangoapps/user_api/course_tag/api.py | 2 +- openedx/core/djangoapps/user_api/course_tag/tests/test_api.py | 2 +- openedx/core/djangoapps/user_api/helpers.py | 2 +- openedx/core/djangoapps/user_api/legacy_urls.py | 2 +- .../management/commands/bulk_user_org_email_optout.py | 2 +- .../management/commands/cancel_user_retirement_request.py | 2 +- .../user_api/management/commands/create_user_gdpr_testing.py | 2 +- .../user_api/management/commands/email_opt_in_list.py | 2 +- .../management/commands/migrate_user_profile_langs.py | 2 +- .../management/commands/populate_retirement_states.py | 2 +- .../user_api/management/commands/sync_hubspot_contacts.py | 2 +- .../management/tests/test_bulk_user_org_email_optout.py | 2 +- .../user_api/management/tests/test_cancel_retirement.py | 2 +- .../user_api/management/tests/test_email_opt_in_list.py | 2 +- .../management/tests/test_populate_retirement_states.py | 2 +- .../user_api/management/tests/test_sync_hubspot_contacts.py | 2 +- openedx/core/djangoapps/user_api/message_types.py | 2 +- openedx/core/djangoapps/user_api/middleware.py | 2 +- openedx/core/djangoapps/user_api/migrations/0001_initial.py | 2 +- .../migrations/0002_retirementstate_userretirementstatus.py | 2 +- .../user_api/migrations/0003_userretirementrequest.py | 2 +- .../migrations/0004_userretirementpartnerreportingstatus.py | 2 +- openedx/core/djangoapps/user_api/models.py | 2 +- openedx/core/djangoapps/user_api/partition_schemes.py | 2 +- openedx/core/djangoapps/user_api/permissions.py | 2 +- openedx/core/djangoapps/user_api/preferences/api.py | 2 +- .../core/djangoapps/user_api/preferences/tests/test_api.py | 2 +- .../core/djangoapps/user_api/preferences/tests/test_views.py | 2 +- openedx/core/djangoapps/user_api/preferences/views.py | 2 +- openedx/core/djangoapps/user_api/rules.py | 2 +- openedx/core/djangoapps/user_api/serializers.py | 2 +- openedx/core/djangoapps/user_api/tests/factories.py | 2 +- openedx/core/djangoapps/user_api/tests/test_helpers.py | 2 +- openedx/core/djangoapps/user_api/tests/test_middleware.py | 2 +- openedx/core/djangoapps/user_api/tests/test_models.py | 2 +- .../core/djangoapps/user_api/tests/test_partition_schemes.py | 2 +- openedx/core/djangoapps/user_api/tests/test_views.py | 2 +- openedx/core/djangoapps/user_api/urls.py | 2 +- .../djangoapps/user_api/verification_api/tests/test_views.py | 2 +- openedx/core/djangoapps/user_api/verification_api/views.py | 2 +- openedx/core/djangoapps/user_api/views.py | 2 +- openedx/core/djangoapps/user_authn/apps.py | 2 +- openedx/core/djangoapps/user_authn/config/waffle.py | 2 +- openedx/core/djangoapps/user_authn/cookies.py | 2 +- openedx/core/djangoapps/user_authn/exceptions.py | 2 +- openedx/core/djangoapps/user_authn/message_types.py | 2 +- .../user_authn/migrations/0001_data__add_login_service.py | 2 +- openedx/core/djangoapps/user_authn/tests/test_cookies.py | 2 +- openedx/core/djangoapps/user_authn/tests/test_exceptions.py | 2 +- openedx/core/djangoapps/user_authn/tests/test_utils.py | 2 +- openedx/core/djangoapps/user_authn/tests/utils.py | 2 +- openedx/core/djangoapps/user_authn/urls.py | 2 +- openedx/core/djangoapps/user_authn/urls_common.py | 2 +- openedx/core/djangoapps/user_authn/utils.py | 2 +- openedx/core/djangoapps/user_authn/views/auto_auth.py | 2 +- openedx/core/djangoapps/user_authn/views/login.py | 2 +- openedx/core/djangoapps/user_authn/views/login_form.py | 2 +- openedx/core/djangoapps/user_authn/views/logout.py | 2 +- openedx/core/djangoapps/user_authn/views/register.py | 2 +- openedx/core/djangoapps/user_authn/views/registration_form.py | 2 +- .../core/djangoapps/user_authn/views/tests/test_auto_auth.py | 2 +- openedx/core/djangoapps/user_authn/views/tests/test_login.py | 2 +- .../djangoapps/user_authn/views/tests/test_logistration.py | 2 +- openedx/core/djangoapps/user_authn/views/tests/test_logout.py | 2 +- .../core/djangoapps/user_authn/views/tests/test_register.py | 2 +- .../djangoapps/user_authn/views/tests/test_reset_password.py | 2 +- openedx/core/djangoapps/util/apps.py | 2 +- openedx/core/djangoapps/util/forms.py | 2 +- openedx/core/djangoapps/util/log_utils.py | 2 +- openedx/core/djangoapps/util/maintenance_banner.py | 2 +- .../core/djangoapps/util/management/commands/print_setting.py | 2 +- openedx/core/djangoapps/util/management/commands/reset_db.py | 2 +- .../djangoapps/util/management/commands/update_fixtures.py | 2 +- openedx/core/djangoapps/util/ratelimit.py | 2 +- openedx/core/djangoapps/util/row_delete.py | 2 +- openedx/core/djangoapps/util/signals.py | 2 +- openedx/core/djangoapps/util/testing.py | 2 +- openedx/core/djangoapps/util/tests/test_print_setting.py | 2 +- openedx/core/djangoapps/util/tests/test_signals.py | 2 +- openedx/core/djangoapps/util/tests/test_update_fixtures.py | 2 +- openedx/core/djangoapps/util/tests/test_user_messages.py | 2 +- openedx/core/djangoapps/util/tests/test_user_utils.py | 2 +- openedx/core/djangoapps/util/user_messages.py | 2 +- openedx/core/djangoapps/util/user_utils.py | 2 +- openedx/core/djangoapps/util/waffle.py | 2 +- openedx/core/djangoapps/verified_track_content/admin.py | 2 +- openedx/core/djangoapps/verified_track_content/forms.py | 2 +- .../management/commands/swap_from_auto_track_cohort_pilot.py | 2 +- .../verified_track_content/migrations/0001_initial.py | 2 +- .../0002_verifiedtrackcohortedcourse_verified_cohort_name.py | 2 +- .../migrations/0003_migrateverifiedtrackcohortssetting.py | 2 +- openedx/core/djangoapps/verified_track_content/models.py | 2 +- .../djangoapps/verified_track_content/partition_scheme.py | 2 +- openedx/core/djangoapps/verified_track_content/tasks.py | 2 +- .../djangoapps/verified_track_content/tests/test_forms.py | 2 +- .../djangoapps/verified_track_content/tests/test_models.py | 2 +- .../verified_track_content/tests/test_partition_scheme.py | 2 +- .../djangoapps/verified_track_content/tests/test_views.py | 2 +- openedx/core/djangoapps/verified_track_content/views.py | 2 +- openedx/core/djangoapps/video_config/admin.py | 2 +- openedx/core/djangoapps/video_config/forms.py | 2 +- .../core/djangoapps/video_config/migrations/0001_initial.py | 2 +- ...sevideotranscriptenabledflag_videotranscriptenabledflag.py | 2 +- .../migrations/0003_transcriptmigrationsetting.py | 2 +- .../migrations/0004_transcriptmigrationsetting_command_run.py | 2 +- .../video_config/migrations/0005_auto_20180719_0752.py | 2 +- .../0006_videothumbnailetting_updatedcoursevideos.py | 2 +- .../migrations/0007_videothumbnailsetting_offset.py | 2 +- .../video_config/migrations/0008_courseyoutubeblockedflag.py | 2 +- openedx/core/djangoapps/video_config/models.py | 2 +- openedx/core/djangoapps/video_config/tests/test_models.py | 2 +- openedx/core/djangoapps/video_pipeline/admin.py | 2 +- openedx/core/djangoapps/video_pipeline/api.py | 2 +- openedx/core/djangoapps/video_pipeline/config/waffle.py | 2 +- openedx/core/djangoapps/video_pipeline/forms.py | 2 +- .../management/commands/create_video_pipeline_integration.py | 2 +- .../commands/tests/test_create_video_pipeline_integration.py | 2 +- .../core/djangoapps/video_pipeline/migrations/0001_initial.py | 4 ++-- .../video_pipeline/migrations/0002_auto_20171114_0704.py | 4 ++-- ...deouploadsenabledbydefault_videouploadsenabledbydefault.py | 4 ++-- openedx/core/djangoapps/video_pipeline/models.py | 2 +- openedx/core/djangoapps/video_pipeline/tests/mixins.py | 2 +- openedx/core/djangoapps/video_pipeline/tests/test_api.py | 2 +- openedx/core/djangoapps/video_pipeline/tests/test_models.py | 2 +- openedx/core/djangoapps/video_pipeline/utils.py | 2 +- openedx/core/djangoapps/waffle_utils/__init__.py | 2 +- openedx/core/djangoapps/waffle_utils/admin.py | 2 +- openedx/core/djangoapps/waffle_utils/forms.py | 2 +- .../core/djangoapps/waffle_utils/migrations/0001_initial.py | 4 ++-- openedx/core/djangoapps/waffle_utils/models.py | 2 +- openedx/core/djangoapps/waffle_utils/tests/test_init.py | 2 +- openedx/core/djangoapps/waffle_utils/tests/test_models.py | 2 +- openedx/core/djangoapps/waffle_utils/tests/test_testutils.py | 2 +- openedx/core/djangoapps/waffle_utils/testutils.py | 2 +- openedx/core/djangoapps/xblock/api.py | 2 +- openedx/core/djangoapps/xblock/apps.py | 2 +- .../djangoapps/xblock/learning_context/learning_context.py | 2 +- openedx/core/djangoapps/xblock/learning_context/manager.py | 2 +- openedx/core/djangoapps/xblock/rest_api/views.py | 2 +- .../core/djangoapps/xblock/runtime/blockstore_field_data.py | 2 +- openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py | 2 +- .../core/djangoapps/xblock/runtime/ephemeral_field_data.py | 2 +- openedx/core/djangoapps/xblock/runtime/id_managers.py | 2 +- openedx/core/djangoapps/xblock/runtime/mixin.py | 2 +- openedx/core/djangoapps/xblock/runtime/olx_parsing.py | 2 +- openedx/core/djangoapps/xblock/runtime/runtime.py | 2 +- openedx/core/djangoapps/xblock/runtime/serializer.py | 2 +- openedx/core/djangoapps/xblock/runtime/shims.py | 2 +- openedx/core/djangoapps/xblock/utils.py | 2 +- openedx/core/djangoapps/xmodule_django/models.py | 2 +- openedx/core/djangoapps/zendesk_proxy/apps.py | 2 +- openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py | 2 +- openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py | 2 +- openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py | 2 +- openedx/core/djangoapps/zendesk_proxy/urls.py | 2 +- openedx/core/djangoapps/zendesk_proxy/utils.py | 2 +- openedx/core/djangoapps/zendesk_proxy/v0/views.py | 2 +- openedx/core/djangoapps/zendesk_proxy/v1/views.py | 2 +- openedx/core/djangolib/blockstore_cache.py | 2 +- openedx/core/djangolib/fields.py | 2 +- openedx/core/djangolib/js_utils.py | 2 +- openedx/core/djangolib/markup.py | 2 +- openedx/core/djangolib/oauth2_retirement_utils.py | 2 +- openedx/core/djangolib/testing/tests/test_utils.py | 2 +- openedx/core/djangolib/testing/utils.py | 2 +- openedx/core/djangolib/tests/test_blockstore_cache.py | 2 +- openedx/core/djangolib/tests/test_js_utils.py | 2 +- openedx/core/djangolib/tests/test_markup.py | 2 +- openedx/core/djangolib/tests/test_oauth2_retirement_utils.py | 2 +- openedx/core/djangolib/tests/test_translation_utils.py | 2 +- openedx/core/djangolib/translation_utils.py | 2 +- openedx/core/lib/api/authentication.py | 2 +- openedx/core/lib/api/fields.py | 2 +- openedx/core/lib/api/mixins.py | 2 +- openedx/core/lib/api/parsers.py | 2 +- openedx/core/lib/api/permissions.py | 2 +- openedx/core/lib/api/serializers.py | 2 +- openedx/core/lib/api/test_utils.py | 2 +- openedx/core/lib/api/tests/mixins.py | 2 +- openedx/core/lib/api/tests/test_authentication.py | 4 ++-- openedx/core/lib/api/tests/test_exceptions.py | 2 +- openedx/core/lib/api/tests/test_fields.py | 2 +- openedx/core/lib/api/tests/test_parsers.py | 2 +- openedx/core/lib/api/tests/test_permissions.py | 2 +- openedx/core/lib/api/view_utils.py | 2 +- openedx/core/lib/blockstore_api/exceptions.py | 2 +- openedx/core/lib/blockstore_api/methods.py | 2 +- openedx/core/lib/blockstore_api/models.py | 2 +- openedx/core/lib/blockstore_api/tests/test_blockstore_api.py | 2 +- openedx/core/lib/cache_utils.py | 2 +- openedx/core/lib/celery/routers.py | 2 +- openedx/core/lib/celery/task_utils.py | 2 +- openedx/core/lib/command_utils.py | 2 +- openedx/core/lib/course_tabs.py | 2 +- openedx/core/lib/courses.py | 2 +- openedx/core/lib/derived.py | 2 +- openedx/core/lib/django_require/staticstorage.py | 2 +- openedx/core/lib/edx_api_utils.py | 4 ++-- openedx/core/lib/exceptions.py | 2 +- openedx/core/lib/extract_tar.py | 2 +- openedx/core/lib/gating/api.py | 2 +- openedx/core/lib/gating/services.py | 2 +- openedx/core/lib/gating/tests/test_api.py | 2 +- openedx/core/lib/graph_traversals.py | 2 +- openedx/core/lib/html_to_text.py | 2 +- openedx/core/lib/json_utils.py | 2 +- openedx/core/lib/license/mixin.py | 2 +- openedx/core/lib/log_utils.py | 2 +- openedx/core/lib/logsettings.py | 2 +- openedx/core/lib/mail_utils.py | 2 +- openedx/core/lib/mobile_utils.py | 2 +- openedx/core/lib/plugins.py | 2 +- openedx/core/lib/request_utils.py | 2 +- openedx/core/lib/rooted_paths.py | 2 +- openedx/core/lib/teams_config.py | 2 +- openedx/core/lib/tempdir.py | 2 +- openedx/core/lib/tests/__init__.py | 2 +- openedx/core/lib/tests/assertions/events.py | 2 +- openedx/core/lib/tests/test_cache_utils.py | 2 +- openedx/core/lib/tests/test_command_utils.py | 2 +- openedx/core/lib/tests/test_course_tab_api.py | 2 +- openedx/core/lib/tests/test_course_tabs.py | 2 +- openedx/core/lib/tests/test_courses.py | 2 +- openedx/core/lib/tests/test_derived.py | 2 +- openedx/core/lib/tests/test_edx_api_utils.py | 2 +- openedx/core/lib/tests/test_grade_utils.py | 2 +- openedx/core/lib/tests/test_graph_traversals.py | 2 +- openedx/core/lib/tests/test_request_utils.py | 2 +- openedx/core/lib/tests/test_teams_config.py | 2 +- openedx/core/lib/tests/test_time_zone_utils.py | 2 +- openedx/core/lib/tests/test_url_utils.py | 2 +- openedx/core/lib/tests/test_xblock_utils.py | 2 +- openedx/core/lib/time_zone_utils.py | 2 +- openedx/core/lib/url_utils.py | 2 +- openedx/core/lib/xblock_builtin/__init__.py | 2 +- openedx/core/lib/xblock_builtin/xblock_discussion/setup.py | 2 +- openedx/core/lib/xblock_builtin/xblock_discussion/tests.py | 4 ++-- .../xblock_discussion/xblock_discussion/__init__.py | 2 +- openedx/core/lib/xblock_pipeline/finder.py | 2 +- openedx/core/lib/xblock_utils/__init__.py | 2 +- openedx/core/release.py | 2 +- openedx/core/storage.py | 2 +- openedx/features/announcements/apps.py | 2 +- openedx/features/announcements/forms.py | 2 +- openedx/features/announcements/migrations/0001_initial.py | 2 +- openedx/features/announcements/models.py | 2 +- openedx/features/announcements/tests/test_announcements.py | 2 +- openedx/features/announcements/urls.py | 2 +- openedx/features/announcements/views.py | 2 +- openedx/features/content_type_gating/admin.py | 2 +- openedx/features/content_type_gating/apps.py | 2 +- openedx/features/content_type_gating/block_transformers.py | 2 +- openedx/features/content_type_gating/field_override.py | 2 +- openedx/features/content_type_gating/helpers.py | 2 +- .../features/content_type_gating/migrations/0001_initial.py | 2 +- .../content_type_gating/migrations/0002_auto_20181119_0959.py | 2 +- .../content_type_gating/migrations/0003_auto_20181128_1407.py | 2 +- .../content_type_gating/migrations/0004_auto_20181128_1521.py | 2 +- .../content_type_gating/migrations/0005_auto_20190306_1547.py | 2 +- .../content_type_gating/migrations/0006_auto_20190308_1447.py | 2 +- .../content_type_gating/migrations/0007_auto_20190311_1919.py | 2 +- .../content_type_gating/migrations/0008_auto_20190313_1634.py | 2 +- openedx/features/content_type_gating/models.py | 2 +- openedx/features/content_type_gating/partitions.py | 2 +- openedx/features/content_type_gating/tests/test_access.py | 2 +- openedx/features/content_type_gating/tests/test_models.py | 2 +- openedx/features/content_type_gating/tests/test_partitions.py | 2 +- openedx/features/course_bookmarks/plugins.py | 2 +- .../features/course_bookmarks/tests/test_course_bookmarks.py | 2 +- openedx/features/course_bookmarks/urls.py | 2 +- openedx/features/course_bookmarks/views/course_bookmarks.py | 2 +- openedx/features/course_duration_limits/access.py | 2 +- openedx/features/course_duration_limits/admin.py | 2 +- openedx/features/course_duration_limits/apps.py | 2 +- .../course_duration_limits/migrations/0001_initial.py | 2 +- .../migrations/0002_auto_20181119_0959.py | 2 +- .../migrations/0003_auto_20181128_1407.py | 2 +- .../migrations/0004_auto_20181128_1521.py | 2 +- .../migrations/0005_auto_20190306_1546.py | 2 +- .../migrations/0006_auto_20190308_1447.py | 2 +- .../migrations/0007_auto_20190311_1919.py | 2 +- .../migrations/0008_auto_20190313_1634.py | 2 +- openedx/features/course_duration_limits/models.py | 2 +- openedx/features/course_duration_limits/tests/test_access.py | 2 +- .../course_duration_limits/tests/test_course_expiration.py | 2 +- openedx/features/course_duration_limits/tests/test_models.py | 2 +- openedx/features/course_experience/__init__.py | 2 +- openedx/features/course_experience/course_tools.py | 2 +- openedx/features/course_experience/plugins.py | 2 +- openedx/features/course_experience/tests/views/helpers.py | 2 +- .../course_experience/tests/views/test_course_dates.py | 2 +- .../course_experience/tests/views/test_course_home.py | 2 +- .../course_experience/tests/views/test_course_outline.py | 2 +- .../course_experience/tests/views/test_course_sock.py | 2 +- .../course_experience/tests/views/test_course_updates.py | 2 +- .../course_experience/tests/views/test_welcome_message.py | 2 +- openedx/features/course_experience/urls.py | 2 +- openedx/features/course_experience/utils.py | 2 +- openedx/features/course_experience/views/course_dates.py | 2 +- openedx/features/course_experience/views/course_home.py | 2 +- .../features/course_experience/views/course_home_messages.py | 2 +- openedx/features/course_experience/views/course_outline.py | 2 +- openedx/features/course_experience/views/course_reviews.py | 2 +- openedx/features/course_experience/views/course_sock.py | 2 +- openedx/features/course_experience/views/course_updates.py | 2 +- openedx/features/course_experience/views/latest_update.py | 2 +- openedx/features/course_experience/views/welcome_message.py | 2 +- openedx/features/course_experience/waffle.py | 2 +- openedx/features/course_search/urls.py | 2 +- openedx/features/course_search/views/course_search.py | 2 +- openedx/features/coursetalk/migrations/0001_initial.py | 4 ++-- .../features/coursetalk/migrations/0002_auto_20160325_0631.py | 4 ++-- openedx/features/discounts/admin.py | 2 +- openedx/features/discounts/applicability.py | 2 +- openedx/features/discounts/apps.py | 2 +- openedx/features/discounts/migrations/0001_initial.py | 2 +- .../features/discounts/migrations/0002_auto_20191022_1720.py | 2 +- openedx/features/discounts/models.py | 2 +- openedx/features/discounts/tests/test_applicability.py | 2 +- .../discounts/tests/test_discount_restriction_models.py | 2 +- openedx/features/discounts/tests/test_views.py | 2 +- openedx/features/discounts/urls.py | 2 +- openedx/features/discounts/views.py | 2 +- openedx/features/enterprise_support/api.py | 2 +- openedx/features/enterprise_support/apps.py | 2 +- openedx/features/enterprise_support/signals.py | 2 +- openedx/features/enterprise_support/tasks.py | 2 +- openedx/features/enterprise_support/tests/__init__.py | 2 +- openedx/features/enterprise_support/tests/factories.py | 2 +- .../features/enterprise_support/tests/mixins/enterprise.py | 2 +- openedx/features/enterprise_support/tests/test_api.py | 2 +- openedx/features/enterprise_support/tests/test_logout.py | 2 +- openedx/features/enterprise_support/tests/test_signals.py | 2 +- openedx/features/enterprise_support/utils.py | 2 +- .../learner_profile/tests/views/test_learner_profile.py | 2 +- openedx/features/learner_profile/toggles.py | 2 +- openedx/features/learner_profile/urls.py | 2 +- .../features/learner_profile/views/learner_achievements.py | 2 +- openedx/features/learner_profile/views/learner_profile.py | 2 +- openedx/tests/completion_integration/test_handlers.py | 2 +- openedx/tests/completion_integration/test_models.py | 2 +- openedx/tests/completion_integration/test_services.py | 2 +- openedx/tests/completion_integration/test_views.py | 2 +- openedx/tests/settings.py | 2 +- openedx/tests/xblock_integration/test_crowdsource_hinter.py | 2 +- openedx/tests/xblock_integration/test_done.py | 2 +- openedx/tests/xblock_integration/test_external_xblocks.py | 2 +- openedx/tests/xblock_integration/test_recommender.py | 2 +- openedx/tests/xblock_integration/xblock_testcase.py | 2 +- pavelib/__init__.py | 2 +- pavelib/assets.py | 2 +- pavelib/bok_choy.py | 2 +- pavelib/database.py | 2 +- pavelib/docs.py | 2 +- pavelib/i18n.py | 2 +- pavelib/js_test.py | 2 +- pavelib/paver_tests/conftest.py | 2 +- pavelib/paver_tests/test_assets.py | 2 +- pavelib/paver_tests/test_database.py | 2 +- pavelib/paver_tests/test_eslint.py | 2 +- pavelib/paver_tests/test_extract_and_generate.py | 2 +- pavelib/paver_tests/test_i18n.py | 2 +- pavelib/paver_tests/test_js_test.py | 2 +- pavelib/paver_tests/test_paver_bok_choy_cmds.py | 2 +- pavelib/paver_tests/test_paver_get_quality_reports.py | 2 +- pavelib/paver_tests/test_paver_quality.py | 2 +- pavelib/paver_tests/test_pii_check.py | 2 +- pavelib/paver_tests/test_prereqs.py | 2 +- pavelib/paver_tests/test_servers.py | 2 +- pavelib/paver_tests/test_stylelint.py | 2 +- pavelib/paver_tests/test_timer.py | 2 +- pavelib/paver_tests/test_utils.py | 2 +- pavelib/paver_tests/test_xsscommitlint.py | 2 +- pavelib/paver_tests/test_xsslint.py | 2 +- pavelib/paver_tests/utils.py | 2 +- pavelib/prereqs.py | 2 +- pavelib/quality.py | 2 +- pavelib/servers.py | 2 +- pavelib/tests.py | 2 +- pavelib/utils/db_utils.py | 2 +- pavelib/utils/envs.py | 2 +- pavelib/utils/passthrough_opts.py | 2 +- pavelib/utils/process.py | 2 +- pavelib/utils/test/bokchoy_options.py | 2 +- pavelib/utils/test/bokchoy_utils.py | 2 +- pavelib/utils/test/suites/bokchoy_suite.py | 2 +- pavelib/utils/test/suites/js_suite.py | 2 +- pavelib/utils/test/suites/pytest_suite.py | 2 +- pavelib/utils/test/suites/python_suite.py | 2 +- pavelib/utils/test/suites/suite.py | 2 +- pavelib/utils/test/utils.py | 2 +- pavelib/utils/timer.py | 2 +- scripts/show_events.py | 2 +- scripts/vulture/whitelist.py | 2 +- scripts/xblock/xblock_counts.py | 2 +- scripts/xdist/get_worker_test_list.py | 2 +- scripts/xdist/pytest_worker_manager.py | 2 +- scripts/xsslint/tests/test_linters.py | 2 +- scripts/xsslint/tests/test_main.py | 2 +- scripts/xsslint/tests/test_utils.py | 2 +- scripts/xsslint/xss_linter.py | 2 +- scripts/xsslint/xsslint/default_config.py | 2 +- scripts/xsslint/xsslint/linters.py | 2 +- scripts/xsslint/xsslint/main.py | 2 +- scripts/xsslint/xsslint/reporting.py | 2 +- scripts/xsslint/xsslint/utils.py | 2 +- scripts/xsslint/xsslint/visitors.py | 2 +- scripts/xsslint_config.py | 2 +- 2829 files changed, 2851 insertions(+), 2851 deletions(-) diff --git a/cms/__init__.py b/cms/__init__.py index 294b4436ce..e4f4b580af 100644 --- a/cms/__init__.py +++ b/cms/__init__.py @@ -2,7 +2,7 @@ Celery needs to be loaded when the cms modules are so that task registration and discovery can work correctly. """ -from __future__ import absolute_import + # We monkey patch Kombu's entrypoints listing because scanning through this # accounts for the majority of LMS/Studio startup time for tests, and we don't diff --git a/cms/celery.py b/cms/celery.py index aab79398f2..d0619a8187 100644 --- a/cms/celery.py +++ b/cms/celery.py @@ -4,7 +4,7 @@ and auto discover tasks in all installed django apps. Taken from: https://celery.readthedocs.org/en/latest/django/first-steps-with-django.html """ -from __future__ import absolute_import + import os diff --git a/cms/conftest.py b/cms/conftest.py index 9e1e46fc93..e1e4f8abb5 100644 --- a/cms/conftest.py +++ b/cms/conftest.py @@ -6,7 +6,7 @@ pytest from looking for the conftest.py module in the parent directory when only running cms tests. """ -from __future__ import absolute_import, unicode_literals + import importlib import os diff --git a/cms/djangoapps/api/apps.py b/cms/djangoapps/api/apps.py index d09fba2266..717e68383a 100644 --- a/cms/djangoapps/api/apps.py +++ b/cms/djangoapps/api/apps.py @@ -2,7 +2,7 @@ Configuration for Studio API Django application """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/cms/djangoapps/api/urls.py b/cms/djangoapps/api/urls.py index c2776e5548..44d36022a6 100644 --- a/cms/djangoapps/api/urls.py +++ b/cms/djangoapps/api/urls.py @@ -2,7 +2,7 @@ URLs for the Studio API app """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/cms/djangoapps/api/v1/serializers/course_runs.py b/cms/djangoapps/api/v1/serializers/course_runs.py index 90de622bac..55790bc59d 100644 --- a/cms/djangoapps/api/v1/serializers/course_runs.py +++ b/cms/djangoapps/api/v1/serializers/course_runs.py @@ -1,5 +1,5 @@ """ Course run serializers. """ -from __future__ import absolute_import + import logging import time # pylint: disable=unused-import diff --git a/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py b/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py index d73595674f..cc276c5749 100644 --- a/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py +++ b/cms/djangoapps/api/v1/tests/test_serializers/test_course_runs.py @@ -1,6 +1,6 @@ """Tests for course run serializers""" -from __future__ import absolute_import + import datetime diff --git a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py index fd58859526..72094e5e01 100644 --- a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py +++ b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py @@ -1,6 +1,6 @@ """Tests for Course run views""" -from __future__ import absolute_import + import datetime diff --git a/cms/djangoapps/api/v1/urls.py b/cms/djangoapps/api/v1/urls.py index 10b87e0e70..c1df658c90 100644 --- a/cms/djangoapps/api/v1/urls.py +++ b/cms/djangoapps/api/v1/urls.py @@ -2,7 +2,7 @@ URLs for the Studio API [Course Run] """ -from __future__ import absolute_import + from rest_framework.routers import DefaultRouter diff --git a/cms/djangoapps/api/v1/views/course_runs.py b/cms/djangoapps/api/v1/views/course_runs.py index 7f90bdbda2..c22aff323e 100644 --- a/cms/djangoapps/api/v1/views/course_runs.py +++ b/cms/djangoapps/api/v1/views/course_runs.py @@ -1,6 +1,6 @@ """HTTP endpoints for the Course Run API.""" -from __future__ import absolute_import + from django.conf import settings from django.http import Http404 diff --git a/cms/djangoapps/cms_user_tasks/apps.py b/cms/djangoapps/cms_user_tasks/apps.py index 95edb59d8c..e314b76611 100644 --- a/cms/djangoapps/cms_user_tasks/apps.py +++ b/cms/djangoapps/cms_user_tasks/apps.py @@ -3,7 +3,7 @@ CMS user tasks application configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/cms/djangoapps/cms_user_tasks/signals.py b/cms/djangoapps/cms_user_tasks/signals.py index f4761264df..55d8288b00 100644 --- a/cms/djangoapps/cms_user_tasks/signals.py +++ b/cms/djangoapps/cms_user_tasks/signals.py @@ -1,7 +1,7 @@ """ Receivers of signals sent from django-user-tasks """ -from __future__ import absolute_import, print_function, unicode_literals + import logging diff --git a/cms/djangoapps/cms_user_tasks/tasks.py b/cms/djangoapps/cms_user_tasks/tasks.py index bd7fe85819..9232706915 100644 --- a/cms/djangoapps/cms_user_tasks/tasks.py +++ b/cms/djangoapps/cms_user_tasks/tasks.py @@ -2,7 +2,7 @@ Celery tasks used by cms_user_tasks """ -from __future__ import absolute_import + from boto.exception import NoAuthHandlerFound from celery.exceptions import MaxRetriesExceededError diff --git a/cms/djangoapps/cms_user_tasks/tests.py b/cms/djangoapps/cms_user_tasks/tests.py index da899a6fc5..a90e1ce3e1 100644 --- a/cms/djangoapps/cms_user_tasks/tests.py +++ b/cms/djangoapps/cms_user_tasks/tests.py @@ -2,7 +2,7 @@ Unit tests for integration of the django-user-tasks app and its REST API. """ -from __future__ import absolute_import, print_function, unicode_literals + import logging from uuid import uuid4 diff --git a/cms/djangoapps/contentstore/admin.py b/cms/djangoapps/contentstore/admin.py index 54adb440b8..1716f31aff 100644 --- a/cms/djangoapps/contentstore/admin.py +++ b/cms/djangoapps/contentstore/admin.py @@ -2,7 +2,7 @@ Admin site bindings for contentstore """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/cms/djangoapps/contentstore/api/tests/base.py b/cms/djangoapps/contentstore/api/tests/base.py index 619b0ad502..283ec83a57 100644 --- a/cms/djangoapps/contentstore/api/tests/base.py +++ b/cms/djangoapps/contentstore/api/tests/base.py @@ -1,7 +1,7 @@ """ Base test case for the course API views. """ -from __future__ import absolute_import + from django.core.urlresolvers import reverse from rest_framework.test import APITestCase diff --git a/cms/djangoapps/contentstore/api/tests/test_import.py b/cms/djangoapps/contentstore/api/tests/test_import.py index 6df2efb690..85511a0a8e 100644 --- a/cms/djangoapps/contentstore/api/tests/test_import.py +++ b/cms/djangoapps/contentstore/api/tests/test_import.py @@ -1,7 +1,7 @@ """ Tests for the course import API views """ -from __future__ import absolute_import + import os import tarfile diff --git a/cms/djangoapps/contentstore/api/tests/test_quality.py b/cms/djangoapps/contentstore/api/tests/test_quality.py index e6c9898d4f..1f5e055705 100644 --- a/cms/djangoapps/contentstore/api/tests/test_quality.py +++ b/cms/djangoapps/contentstore/api/tests/test_quality.py @@ -1,7 +1,7 @@ """ Tests for the course import API views """ -from __future__ import absolute_import + from rest_framework import status diff --git a/cms/djangoapps/contentstore/api/tests/test_validation.py b/cms/djangoapps/contentstore/api/tests/test_validation.py index 8330db9855..63475ab0cc 100644 --- a/cms/djangoapps/contentstore/api/tests/test_validation.py +++ b/cms/djangoapps/contentstore/api/tests/test_validation.py @@ -1,7 +1,7 @@ """ Tests for the course import API views """ -from __future__ import absolute_import + from datetime import datetime diff --git a/cms/djangoapps/contentstore/api/urls.py b/cms/djangoapps/contentstore/api/urls.py index 20357254fc..21a60c0342 100644 --- a/cms/djangoapps/contentstore/api/urls.py +++ b/cms/djangoapps/contentstore/api/urls.py @@ -1,5 +1,5 @@ """ Course API URLs. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/cms/djangoapps/contentstore/api/views/course_import.py b/cms/djangoapps/contentstore/api/views/course_import.py index 18d9a2fb21..dba0da0e3e 100644 --- a/cms/djangoapps/contentstore/api/views/course_import.py +++ b/cms/djangoapps/contentstore/api/views/course_import.py @@ -1,7 +1,7 @@ """ APIs related to Course Import. """ -from __future__ import absolute_import + import base64 import logging diff --git a/cms/djangoapps/contentstore/api/views/course_quality.py b/cms/djangoapps/contentstore/api/views/course_quality.py index e90b948f06..caebbcf4c9 100644 --- a/cms/djangoapps/contentstore/api/views/course_quality.py +++ b/cms/djangoapps/contentstore/api/views/course_quality.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import logging import time diff --git a/cms/djangoapps/contentstore/api/views/course_validation.py b/cms/djangoapps/contentstore/api/views/course_validation.py index 5594440142..af5812fac4 100644 --- a/cms/djangoapps/contentstore/api/views/course_validation.py +++ b/cms/djangoapps/contentstore/api/views/course_validation.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/api/views/utils.py b/cms/djangoapps/contentstore/api/views/utils.py index 7ae2fb456c..e758c71610 100644 --- a/cms/djangoapps/contentstore/api/views/utils.py +++ b/cms/djangoapps/contentstore/api/views/utils.py @@ -1,7 +1,7 @@ """ Common utilities for Contentstore APIs. """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/cms/djangoapps/contentstore/apps.py b/cms/djangoapps/contentstore/apps.py index 65388470ec..940a69ac2c 100644 --- a/cms/djangoapps/contentstore/apps.py +++ b/cms/djangoapps/contentstore/apps.py @@ -4,7 +4,7 @@ Contentstore Application Configuration Above-modulestore level signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/cms/djangoapps/contentstore/config/waffle.py b/cms/djangoapps/contentstore/config/waffle.py index 3fb8bb0979..f1087c6520 100644 --- a/cms/djangoapps/contentstore/config/waffle.py +++ b/cms/djangoapps/contentstore/config/waffle.py @@ -2,7 +2,7 @@ This module contains various configuration settings via waffle switches for the contentstore app. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlagNamespace, WaffleSwitchNamespace diff --git a/cms/djangoapps/contentstore/config/waffle_utils.py b/cms/djangoapps/contentstore/config/waffle_utils.py index ac25116922..4c734b1436 100644 --- a/cms/djangoapps/contentstore/config/waffle_utils.py +++ b/cms/djangoapps/contentstore/config/waffle_utils.py @@ -1,6 +1,6 @@ """Util methods for Waffle checks""" -from __future__ import absolute_import + from cms.djangoapps.contentstore.config.waffle import ENABLE_CHECKLISTS_QUALITY diff --git a/cms/djangoapps/contentstore/course_group_config.py b/cms/djangoapps/contentstore/course_group_config.py index 911c356d18..a9472ee34f 100644 --- a/cms/djangoapps/contentstore/course_group_config.py +++ b/cms/djangoapps/contentstore/course_group_config.py @@ -1,7 +1,7 @@ """ Class for manipulating groups configuration on a course object. """ -from __future__ import absolute_import + import json import logging diff --git a/cms/djangoapps/contentstore/course_info_model.py b/cms/djangoapps/contentstore/course_info_model.py index d9e647d032..4b056b6fcc 100644 --- a/cms/djangoapps/contentstore/course_info_model.py +++ b/cms/djangoapps/contentstore/course_info_model.py @@ -12,7 +12,7 @@ Current db representation: } """ -from __future__ import absolute_import + import logging import re diff --git a/cms/djangoapps/contentstore/courseware_index.py b/cms/djangoapps/contentstore/courseware_index.py index 2ca873688d..76a9328339 100644 --- a/cms/djangoapps/contentstore/courseware_index.py +++ b/cms/djangoapps/contentstore/courseware_index.py @@ -1,5 +1,5 @@ """ Code to allow module store to interface with courseware index """ -from __future__ import absolute_import + import logging import re diff --git a/cms/djangoapps/contentstore/debug_file_uploader.py b/cms/djangoapps/contentstore/debug_file_uploader.py index 30c0651f6d..b0226aa654 100644 --- a/cms/djangoapps/contentstore/debug_file_uploader.py +++ b/cms/djangoapps/contentstore/debug_file_uploader.py @@ -1,6 +1,6 @@ """ Upload file handler to help test progress bars in uploads. """ -from __future__ import absolute_import + import time diff --git a/cms/djangoapps/contentstore/git_export_utils.py b/cms/djangoapps/contentstore/git_export_utils.py index 31739364fd..3ad246d6a9 100644 --- a/cms/djangoapps/contentstore/git_export_utils.py +++ b/cms/djangoapps/contentstore/git_export_utils.py @@ -3,7 +3,7 @@ Utilities for export a course's XML into a git repository, committing and pushing the changes. """ -from __future__ import absolute_import + import logging import os diff --git a/cms/djangoapps/contentstore/management/commands/clean_cert_name.py b/cms/djangoapps/contentstore/management/commands/clean_cert_name.py index 4477a146ca..1a9224c247 100644 --- a/cms/djangoapps/contentstore/management/commands/clean_cert_name.py +++ b/cms/djangoapps/contentstore/management/commands/clean_cert_name.py @@ -3,7 +3,7 @@ A single-use management command that provides an interactive way to remove erroneous certificate names. """ -from __future__ import absolute_import + from collections import namedtuple diff --git a/cms/djangoapps/contentstore/management/commands/cleanup_assets.py b/cms/djangoapps/contentstore/management/commands/cleanup_assets.py index f335b11c66..b6a41587da 100644 --- a/cms/djangoapps/contentstore/management/commands/cleanup_assets.py +++ b/cms/djangoapps/contentstore/management/commands/cleanup_assets.py @@ -2,7 +2,7 @@ Script for removing all redundant Mac OS metadata files (with filename ".DS_Store" or with filename which starts with "._") for all courses """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/management/commands/create_course.py b/cms/djangoapps/contentstore/management/commands/create_course.py index 0f4c7877bc..9142166cf8 100644 --- a/cms/djangoapps/contentstore/management/commands/create_course.py +++ b/cms/djangoapps/contentstore/management/commands/create_course.py @@ -1,7 +1,7 @@ """ Django management command to create a course in a specific modulestore """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/cms/djangoapps/contentstore/management/commands/delete_course.py b/cms/djangoapps/contentstore/management/commands/delete_course.py index f16ea35a68..6a5728ea5d 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/delete_course.py @@ -1,7 +1,7 @@ """ Management Command to delete course. """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError diff --git a/cms/djangoapps/contentstore/management/commands/delete_orphans.py b/cms/djangoapps/contentstore/management/commands/delete_orphans.py index 0c1b7c427c..3e92bf3211 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_orphans.py +++ b/cms/djangoapps/contentstore/management/commands/delete_orphans.py @@ -1,5 +1,5 @@ """Script for deleting orphans""" -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError diff --git a/cms/djangoapps/contentstore/management/commands/edit_course_tabs.py b/cms/djangoapps/contentstore/management/commands/edit_course_tabs.py index 9cb787be5f..89894ec8dd 100644 --- a/cms/djangoapps/contentstore/management/commands/edit_course_tabs.py +++ b/cms/djangoapps/contentstore/management/commands/edit_course_tabs.py @@ -6,7 +6,7 @@ # Run it this way: # ./manage.py cms --settings dev edit_course_tabs --course Stanford/CS99/2013_spring # -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand, CommandError from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py b/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py index c4c78f33aa..e6e2b27ce9 100644 --- a/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py +++ b/cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py @@ -1,6 +1,6 @@ """Script to Empty the trashcan""" -from __future__ import absolute_import + from django.core.management.base import BaseCommand from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/management/commands/export.py b/cms/djangoapps/contentstore/management/commands/export.py index db188a87bf..99fab8105f 100644 --- a/cms/djangoapps/contentstore/management/commands/export.py +++ b/cms/djangoapps/contentstore/management/commands/export.py @@ -1,7 +1,7 @@ """ Script for exporting courseware from Mongo to a tar.gz file """ -from __future__ import absolute_import, print_function + import os diff --git a/cms/djangoapps/contentstore/management/commands/export_all_courses.py b/cms/djangoapps/contentstore/management/commands/export_all_courses.py index b6933f9309..33e7d5b10e 100644 --- a/cms/djangoapps/contentstore/management/commands/export_all_courses.py +++ b/cms/djangoapps/contentstore/management/commands/export_all_courses.py @@ -1,7 +1,7 @@ """ Script for exporting all courseware from Mongo to a directory and listing the courses which failed to export """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand from six import text_type diff --git a/cms/djangoapps/contentstore/management/commands/export_content_library.py b/cms/djangoapps/contentstore/management/commands/export_content_library.py index fd47644d30..8a9e6b82cb 100644 --- a/cms/djangoapps/contentstore/management/commands/export_content_library.py +++ b/cms/djangoapps/contentstore/management/commands/export_content_library.py @@ -1,7 +1,7 @@ """ Script for exporting a content library from Mongo to a tar.gz file """ -from __future__ import absolute_import, print_function + import os import shutil diff --git a/cms/djangoapps/contentstore/management/commands/export_olx.py b/cms/djangoapps/contentstore/management/commands/export_olx.py index 1f4336fb88..61abcdcf9d 100644 --- a/cms/djangoapps/contentstore/management/commands/export_olx.py +++ b/cms/djangoapps/contentstore/management/commands/export_olx.py @@ -14,7 +14,7 @@ At present, it differs from Studio exports in several ways: * It only supports the export of courses. It does not export libraries. """ -from __future__ import absolute_import + import os import re diff --git a/cms/djangoapps/contentstore/management/commands/fix_not_found.py b/cms/djangoapps/contentstore/management/commands/fix_not_found.py index 05ddf9009f..6d6e3fd797 100644 --- a/cms/djangoapps/contentstore/management/commands/fix_not_found.py +++ b/cms/djangoapps/contentstore/management/commands/fix_not_found.py @@ -1,7 +1,7 @@ """ Script for fixing the item not found errors in a course """ -from __future__ import absolute_import + from django.core.management.base import BaseCommand, CommandError from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/management/commands/force_publish.py b/cms/djangoapps/contentstore/management/commands/force_publish.py index f02a3404fd..88931cdf98 100644 --- a/cms/djangoapps/contentstore/management/commands/force_publish.py +++ b/cms/djangoapps/contentstore/management/commands/force_publish.py @@ -1,7 +1,7 @@ """ Script for force publishing a course """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError diff --git a/cms/djangoapps/contentstore/management/commands/generate_courses.py b/cms/djangoapps/contentstore/management/commands/generate_courses.py index eaa4a530a2..2a3f82e284 100644 --- a/cms/djangoapps/contentstore/management/commands/generate_courses.py +++ b/cms/djangoapps/contentstore/management/commands/generate_courses.py @@ -1,7 +1,7 @@ """ Django management command to generate a test course from a course config json """ -from __future__ import absolute_import + import json import logging diff --git a/cms/djangoapps/contentstore/management/commands/git_export.py b/cms/djangoapps/contentstore/management/commands/git_export.py index dd33c3cde5..42b9f70854 100644 --- a/cms/djangoapps/contentstore/management/commands/git_export.py +++ b/cms/djangoapps/contentstore/management/commands/git_export.py @@ -13,7 +13,7 @@ This functionality is also available as an export view in studio if the giturl attribute is set and the FEATURE['ENABLE_EXPORT_GIT'] is set. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/management/commands/import.py b/cms/djangoapps/contentstore/management/commands/import.py index c2e9d54df4..24ea39cbf9 100644 --- a/cms/djangoapps/contentstore/management/commands/import.py +++ b/cms/djangoapps/contentstore/management/commands/import.py @@ -1,7 +1,7 @@ """ Script for importing courseware from XML format """ -from __future__ import absolute_import + from django.core.management.base import BaseCommand diff --git a/cms/djangoapps/contentstore/management/commands/import_content_library.py b/cms/djangoapps/contentstore/management/commands/import_content_library.py index 20f63a1e87..6b22340916 100644 --- a/cms/djangoapps/contentstore/management/commands/import_content_library.py +++ b/cms/djangoapps/contentstore/management/commands/import_content_library.py @@ -1,7 +1,7 @@ """ Script for importing a content library from a tar.gz file """ -from __future__ import absolute_import, print_function + import base64 import os diff --git a/cms/djangoapps/contentstore/management/commands/migrate_to_split.py b/cms/djangoapps/contentstore/management/commands/migrate_to_split.py index 2003058646..82510fabd9 100644 --- a/cms/djangoapps/contentstore/management/commands/migrate_to_split.py +++ b/cms/djangoapps/contentstore/management/commands/migrate_to_split.py @@ -2,7 +2,7 @@ Django management command to migrate a course from the old Mongo modulestore to the new split-Mongo modulestore. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError diff --git a/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py b/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py index 5c66732a64..da2515f8cf 100644 --- a/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py +++ b/cms/djangoapps/contentstore/management/commands/migrate_transcripts.py @@ -2,7 +2,7 @@ Command to migrate transcripts to django storage. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/management/commands/prompt.py b/cms/djangoapps/contentstore/management/commands/prompt.py index 927c5c916c..eaafbe18de 100644 --- a/cms/djangoapps/contentstore/management/commands/prompt.py +++ b/cms/djangoapps/contentstore/management/commands/prompt.py @@ -1,7 +1,7 @@ """ Takes user input. """ -from __future__ import absolute_import + import sys diff --git a/cms/djangoapps/contentstore/management/commands/reindex_course.py b/cms/djangoapps/contentstore/management/commands/reindex_course.py index 0055dbd31f..a0da6dbece 100644 --- a/cms/djangoapps/contentstore/management/commands/reindex_course.py +++ b/cms/djangoapps/contentstore/management/commands/reindex_course.py @@ -1,5 +1,5 @@ """ Management command to update courses' search index """ -from __future__ import absolute_import + import logging from textwrap import dedent diff --git a/cms/djangoapps/contentstore/management/commands/reindex_library.py b/cms/djangoapps/contentstore/management/commands/reindex_library.py index 71d2f1fe13..66957de002 100644 --- a/cms/djangoapps/contentstore/management/commands/reindex_library.py +++ b/cms/djangoapps/contentstore/management/commands/reindex_library.py @@ -1,5 +1,5 @@ """ Management command to update libraries' search index """ -from __future__ import absolute_import, print_function + from textwrap import dedent diff --git a/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py b/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py index 72ee2c5afa..7cbb39c009 100644 --- a/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py +++ b/cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py @@ -1,6 +1,6 @@ """Management command to restore assets from trash""" -from __future__ import absolute_import + from django.core.management.base import BaseCommand diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py b/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py index b48d3e507e..c106701dfd 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py @@ -2,7 +2,7 @@ Test for assets cleanup of courses for Mac OS metadata files (with filename ".DS_Store" or with filename which starts with "._") """ -from __future__ import absolute_import + from django.conf import settings from django.core.management import call_command diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_create_course.py b/cms/djangoapps/contentstore/management/commands/tests/test_create_course.py index d9e90d57ee..19c1cae88a 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_create_course.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_create_course.py @@ -1,7 +1,7 @@ """ Unittests for creating a course in an chosen modulestore """ -from __future__ import absolute_import + from six import StringIO diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py b/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py index d5b915a7c8..1ede4cb6d6 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py @@ -1,7 +1,7 @@ """ Delete course tests. """ -from __future__ import absolute_import + import mock from django.core.management import CommandError, call_command diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py index 8d4dbf720e..7f1aa44671 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py @@ -1,6 +1,6 @@ """Tests running the delete_orphan command""" -from __future__ import absolute_import + import ddt import six diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_export.py b/cms/djangoapps/contentstore/management/commands/tests/test_export.py index 4e02926125..267d7fe9a0 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_export.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_export.py @@ -1,7 +1,7 @@ """ Tests for exporting courseware to the desired path """ -from __future__ import absolute_import + import shutil import unittest diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_export_all_courses.py b/cms/djangoapps/contentstore/management/commands/tests/test_export_all_courses.py index 6d843eb6c8..beb9686ce7 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_export_all_courses.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_export_all_courses.py @@ -1,7 +1,7 @@ """ Test for export all courses. """ -from __future__ import absolute_import + import shutil from tempfile import mkdtemp diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py b/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py index b950f89ce0..819af90be5 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_export_olx.py @@ -2,7 +2,7 @@ Tests for exporting OLX content. """ -from __future__ import absolute_import + import shutil import tarfile diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py b/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py index 4902606b70..08afba0afb 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py @@ -2,7 +2,7 @@ Tests for the fix_not_found management command """ -from __future__ import absolute_import + import six from django.core.management import CommandError, call_command diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py b/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py index 600deaba86..0589fce137 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py @@ -1,7 +1,7 @@ """ Tests for the force_publish management command """ -from __future__ import absolute_import + import mock import six diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_generate_courses.py b/cms/djangoapps/contentstore/management/commands/tests/test_generate_courses.py index 9d2e560dd4..9d219caf0e 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_generate_courses.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_generate_courses.py @@ -1,7 +1,7 @@ """ Unittest for generate a test course in an given modulestore """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py b/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py index 3b4fe60ae2..24e8c72f3f 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py @@ -2,7 +2,7 @@ Unittests for exporting to git via management command. """ -from __future__ import absolute_import + import copy import os diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_import.py b/cms/djangoapps/contentstore/management/commands/tests/test_import.py index 9c19a5474c..8011976652 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_import.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_import.py @@ -2,7 +2,7 @@ Unittests for importing a course via management command """ -from __future__ import absolute_import + import os import shutil diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_migrate_to_split.py b/cms/djangoapps/contentstore/management/commands/tests/test_migrate_to_split.py index 9ed7bf52e7..a1e946daad 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_migrate_to_split.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_migrate_to_split.py @@ -1,7 +1,7 @@ """ Unittests for migrating a course to split mongo """ -from __future__ import absolute_import + import six diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_migrate_transcripts.py b/cms/djangoapps/contentstore/management/commands/tests/test_migrate_transcripts.py index d2b3c77d4a..a7e8c47738 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_migrate_transcripts.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_migrate_transcripts.py @@ -2,7 +2,7 @@ """ Tests for course transcript migration management command. """ -from __future__ import absolute_import + import itertools import logging diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py index 339bc5f769..43f33ff8b3 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py @@ -1,5 +1,5 @@ """ Tests for course reindex command """ -from __future__ import absolute_import + import ddt import mock diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py index 88ce8753d9..1f338c29d5 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py @@ -1,5 +1,5 @@ """ Tests for library reindex command """ -from __future__ import absolute_import + import ddt import mock diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_video_thumbnails.py b/cms/djangoapps/contentstore/management/commands/tests/test_video_thumbnails.py index 617b3383b2..48effda107 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_video_thumbnails.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_video_thumbnails.py @@ -2,7 +2,7 @@ """ Tests for course video thumbnails management command. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/management/commands/utils.py b/cms/djangoapps/contentstore/management/commands/utils.py index 99de627194..d970d23e6d 100644 --- a/cms/djangoapps/contentstore/management/commands/utils.py +++ b/cms/djangoapps/contentstore/management/commands/utils.py @@ -1,7 +1,7 @@ """ Common methods for cms commands to use """ -from __future__ import absolute_import + from django.contrib.auth.models import User from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/management/commands/video_thumbnails.py b/cms/djangoapps/contentstore/management/commands/video_thumbnails.py index 7bfe8c2611..f34b6c1766 100644 --- a/cms/djangoapps/contentstore/management/commands/video_thumbnails.py +++ b/cms/djangoapps/contentstore/management/commands/video_thumbnails.py @@ -1,7 +1,7 @@ """ Command to scrape thumbnails and add them to the course-videos. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/management/commands/xlint.py b/cms/djangoapps/contentstore/management/commands/xlint.py index 09dd5c764d..1fc33cc17d 100644 --- a/cms/djangoapps/contentstore/management/commands/xlint.py +++ b/cms/djangoapps/contentstore/management/commands/xlint.py @@ -1,7 +1,7 @@ """ Verify the structure of courseware as to it's suitability for import """ -from __future__ import absolute_import, print_function + from argparse import REMAINDER diff --git a/cms/djangoapps/contentstore/migrations/0001_initial.py b/cms/djangoapps/contentstore/migrations/0001_initial.py index f436c1f648..edae499bb9 100644 --- a/cms/djangoapps/contentstore/migrations/0001_initial.py +++ b/cms/djangoapps/contentstore/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/cms/djangoapps/contentstore/migrations/0002_add_assets_page_flag.py b/cms/djangoapps/contentstore/migrations/0002_add_assets_page_flag.py index 8282223c5f..eec99e24d2 100644 --- a/cms/djangoapps/contentstore/migrations/0002_add_assets_page_flag.py +++ b/cms/djangoapps/contentstore/migrations/0002_add_assets_page_flag.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/cms/djangoapps/contentstore/migrations/0003_remove_assets_page_flag.py b/cms/djangoapps/contentstore/migrations/0003_remove_assets_page_flag.py index 29c4627bc9..08f8f73d3c 100644 --- a/cms/djangoapps/contentstore/migrations/0003_remove_assets_page_flag.py +++ b/cms/djangoapps/contentstore/migrations/0003_remove_assets_page_flag.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/cms/djangoapps/contentstore/migrations/0004_remove_push_notification_configmodel_table.py b/cms/djangoapps/contentstore/migrations/0004_remove_push_notification_configmodel_table.py index 947d4eac93..28e17ab72e 100644 --- a/cms/djangoapps/contentstore/migrations/0004_remove_push_notification_configmodel_table.py +++ b/cms/djangoapps/contentstore/migrations/0004_remove_push_notification_configmodel_table.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-26 20:12 -from __future__ import unicode_literals + from django.db import migrations diff --git a/cms/djangoapps/contentstore/models.py b/cms/djangoapps/contentstore/models.py index 126c948561..e5d5510e97 100644 --- a/cms/djangoapps/contentstore/models.py +++ b/cms/djangoapps/contentstore/models.py @@ -2,7 +2,7 @@ Models for contentstore """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db.models.fields import TextField diff --git a/cms/djangoapps/contentstore/proctoring.py b/cms/djangoapps/contentstore/proctoring.py index 474180d21b..49ceeb021c 100644 --- a/cms/djangoapps/contentstore/proctoring.py +++ b/cms/djangoapps/contentstore/proctoring.py @@ -2,7 +2,7 @@ Code related to the handling of Proctored Exams in Studio """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/rules.py b/cms/djangoapps/contentstore/rules.py index 14cb77bc12..6b63eb0932 100644 --- a/cms/djangoapps/contentstore/rules.py +++ b/cms/djangoapps/contentstore/rules.py @@ -2,7 +2,7 @@ Authorization rules related to content management. """ -from __future__ import absolute_import, unicode_literals + import user_tasks.rules diff --git a/cms/djangoapps/contentstore/signals/handlers.py b/cms/djangoapps/contentstore/signals/handlers.py index fbf088da65..253487052a 100644 --- a/cms/djangoapps/contentstore/signals/handlers.py +++ b/cms/djangoapps/contentstore/signals/handlers.py @@ -1,6 +1,6 @@ """ receivers of course_published and library_updated events in order to trigger indexing task """ -from __future__ import absolute_import + import logging from datetime import datetime diff --git a/cms/djangoapps/contentstore/signals/signals.py b/cms/djangoapps/contentstore/signals/signals.py index 660f608183..b74eb415fb 100644 --- a/cms/djangoapps/contentstore/signals/signals.py +++ b/cms/djangoapps/contentstore/signals/signals.py @@ -1,7 +1,7 @@ """ Contentstore signals """ -from __future__ import absolute_import + from django.dispatch import Signal diff --git a/cms/djangoapps/contentstore/storage.py b/cms/djangoapps/contentstore/storage.py index 76bd5b54bd..e8aed444e1 100644 --- a/cms/djangoapps/contentstore/storage.py +++ b/cms/djangoapps/contentstore/storage.py @@ -1,7 +1,7 @@ """ Storage backend for course import and export. """ -from __future__ import absolute_import + from django.conf import settings from django.core.files.storage import get_storage_class diff --git a/cms/djangoapps/contentstore/tasks.py b/cms/djangoapps/contentstore/tasks.py index c04eef315d..593692528e 100644 --- a/cms/djangoapps/contentstore/tasks.py +++ b/cms/djangoapps/contentstore/tasks.py @@ -1,7 +1,7 @@ """ This file contains celery tasks for contentstore views """ -from __future__ import absolute_import + import base64 import json diff --git a/cms/djangoapps/contentstore/tests/test_clone_course.py b/cms/djangoapps/contentstore/tests/test_clone_course.py index 92cfded0ab..0fe3abcd47 100644 --- a/cms/djangoapps/contentstore/tests/test_clone_course.py +++ b/cms/djangoapps/contentstore/tests/test_clone_course.py @@ -1,7 +1,7 @@ """ Unit tests for cloning a course between the same and different module stores. """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 6c156db191..c944082184 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, print_function + import copy import shutil diff --git a/cms/djangoapps/contentstore/tests/test_core_caching.py b/cms/djangoapps/contentstore/tests/test_core_caching.py index 2421b8e2a0..28d4797669 100644 --- a/cms/djangoapps/contentstore/tests/test_core_caching.py +++ b/cms/djangoapps/contentstore/tests/test_core_caching.py @@ -2,7 +2,7 @@ Tests core caching facilities. """ -from __future__ import absolute_import + from django.test import TestCase from opaque_keys.edx.locator import AssetLocator, CourseLocator diff --git a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py index d7189c016c..357a437555 100644 --- a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py +++ b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py @@ -1,7 +1,7 @@ """ Test view handler for rerun (and eventually create) """ -from __future__ import absolute_import + import datetime diff --git a/cms/djangoapps/contentstore/tests/test_course_listing.py b/cms/djangoapps/contentstore/tests/test_course_listing.py index 0bdd81459d..d87094fc2c 100644 --- a/cms/djangoapps/contentstore/tests/test_course_listing.py +++ b/cms/djangoapps/contentstore/tests/test_course_listing.py @@ -2,7 +2,7 @@ Unit tests for getting the list of courses for a user through iterating all courses and by reversing group name formats. """ -from __future__ import absolute_import + import random diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index 5e641dbf3f..5ea2d50524 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -1,7 +1,7 @@ """ Tests for Studio Course Settings. """ -from __future__ import absolute_import + import copy import datetime diff --git a/cms/djangoapps/contentstore/tests/test_courseware_index.py b/cms/djangoapps/contentstore/tests/test_courseware_index.py index 89f0357868..cfa0ddb458 100644 --- a/cms/djangoapps/contentstore/tests/test_courseware_index.py +++ b/cms/djangoapps/contentstore/tests/test_courseware_index.py @@ -1,7 +1,7 @@ """ Testing indexing of the courseware as it is changed """ -from __future__ import absolute_import, print_function + import json import time diff --git a/cms/djangoapps/contentstore/tests/test_crud.py b/cms/djangoapps/contentstore/tests/test_crud.py index 86db5dd30c..12c6485cad 100644 --- a/cms/djangoapps/contentstore/tests/test_crud.py +++ b/cms/djangoapps/contentstore/tests/test_crud.py @@ -1,6 +1,6 @@ """Tests for CRUD Operations""" -from __future__ import absolute_import + from xmodule import templates from xmodule.capa_module import ProblemBlock diff --git a/cms/djangoapps/contentstore/tests/test_export_git.py b/cms/djangoapps/contentstore/tests/test_export_git.py index 8d11af6b12..6bb1ea5817 100644 --- a/cms/djangoapps/contentstore/tests/test_export_git.py +++ b/cms/djangoapps/contentstore/tests/test_export_git.py @@ -2,7 +2,7 @@ Test the ability to export courses to xml from studio """ -from __future__ import absolute_import + import copy import os diff --git a/cms/djangoapps/contentstore/tests/test_gating.py b/cms/djangoapps/contentstore/tests/test_gating.py index e39f78564b..3bf7239a1c 100644 --- a/cms/djangoapps/contentstore/tests/test_gating.py +++ b/cms/djangoapps/contentstore/tests/test_gating.py @@ -1,7 +1,7 @@ """ Unit tests for the gating feature in Studio """ -from __future__ import absolute_import + from milestones.tests.utils import MilestonesTestCaseMixin from mock import patch diff --git a/cms/djangoapps/contentstore/tests/test_i18n.py b/cms/djangoapps/contentstore/tests/test_i18n.py index 7a45186b8a..415da9f18b 100644 --- a/cms/djangoapps/contentstore/tests/test_i18n.py +++ b/cms/djangoapps/contentstore/tests/test_i18n.py @@ -2,7 +2,7 @@ """ Tests for validate Internationalization and Module i18n service. """ -from __future__ import absolute_import + import gettext from unittest import skip diff --git a/cms/djangoapps/contentstore/tests/test_import.py b/cms/djangoapps/contentstore/tests/test_import.py index 1aeab0618c..2e808ccfcb 100644 --- a/cms/djangoapps/contentstore/tests/test_import.py +++ b/cms/djangoapps/contentstore/tests/test_import.py @@ -3,7 +3,7 @@ """ Tests for import_course_from_xml using the mongo modulestore. """ -from __future__ import absolute_import, print_function + import copy from uuid import uuid4 diff --git a/cms/djangoapps/contentstore/tests/test_import_draft_order.py b/cms/djangoapps/contentstore/tests/test_import_draft_order.py index c81016898f..95764ab9b2 100644 --- a/cms/djangoapps/contentstore/tests/test_import_draft_order.py +++ b/cms/djangoapps/contentstore/tests/test_import_draft_order.py @@ -1,7 +1,7 @@ """ Tests Draft import order. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py b/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py index 72a1ba661c..9e76e43080 100644 --- a/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py +++ b/cms/djangoapps/contentstore/tests/test_import_pure_xblock.py @@ -2,7 +2,7 @@ Integration tests for importing courses containing pure XBlocks. """ -from __future__ import absolute_import + from django.conf import settings from xblock.core import XBlock diff --git a/cms/djangoapps/contentstore/tests/test_libraries.py b/cms/djangoapps/contentstore/tests/test_libraries.py index 5030deccbf..0426f4c392 100644 --- a/cms/djangoapps/contentstore/tests/test_libraries.py +++ b/cms/djangoapps/contentstore/tests/test_libraries.py @@ -1,7 +1,7 @@ """ Content library unit tests that require the CMS runtime. """ -from __future__ import absolute_import + import ddt import six diff --git a/cms/djangoapps/contentstore/tests/test_orphan.py b/cms/djangoapps/contentstore/tests/test_orphan.py index 92e076740a..a7c3c80dc4 100644 --- a/cms/djangoapps/contentstore/tests/test_orphan.py +++ b/cms/djangoapps/contentstore/tests/test_orphan.py @@ -1,7 +1,7 @@ """ Test finding orphans via the view and django config """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/tests/test_permissions.py b/cms/djangoapps/contentstore/tests/test_permissions.py index 30f7a61242..4f939f0325 100644 --- a/cms/djangoapps/contentstore/tests/test_permissions.py +++ b/cms/djangoapps/contentstore/tests/test_permissions.py @@ -1,7 +1,7 @@ """ Test CRUD for authorization. """ -from __future__ import absolute_import + import copy diff --git a/cms/djangoapps/contentstore/tests/test_proctoring.py b/cms/djangoapps/contentstore/tests/test_proctoring.py index e842259a50..4c1948e223 100644 --- a/cms/djangoapps/contentstore/tests/test_proctoring.py +++ b/cms/djangoapps/contentstore/tests/test_proctoring.py @@ -2,7 +2,7 @@ Tests for the edx_proctoring integration into Studio """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/cms/djangoapps/contentstore/tests/test_request_event.py b/cms/djangoapps/contentstore/tests/test_request_event.py index a9b84d14d9..95cc52c84f 100644 --- a/cms/djangoapps/contentstore/tests/test_request_event.py +++ b/cms/djangoapps/contentstore/tests/test_request_event.py @@ -1,5 +1,5 @@ """Tests for CMS's requests to logs""" -from __future__ import absolute_import + import mock from django.test import TestCase diff --git a/cms/djangoapps/contentstore/tests/test_signals.py b/cms/djangoapps/contentstore/tests/test_signals.py index c9c1f724a1..8c26e1d853 100644 --- a/cms/djangoapps/contentstore/tests/test_signals.py +++ b/cms/djangoapps/contentstore/tests/test_signals.py @@ -1,6 +1,6 @@ """Tests for verifying availability of resources for locking""" -from __future__ import absolute_import + import ddt import six diff --git a/cms/djangoapps/contentstore/tests/test_tasks.py b/cms/djangoapps/contentstore/tests/test_tasks.py index e125886037..2ac18b78b6 100644 --- a/cms/djangoapps/contentstore/tests/test_tasks.py +++ b/cms/djangoapps/contentstore/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Unit tests for course import and export Celery tasks """ -from __future__ import absolute_import, division, print_function + import copy import json diff --git a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py index 927c68845a..3bcceb5472 100644 --- a/cms/djangoapps/contentstore/tests/test_transcripts_utils.py +++ b/cms/djangoapps/contentstore/tests/test_transcripts_utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ Tests for transcripts_utils. """ -from __future__ import absolute_import + import copy import json diff --git a/cms/djangoapps/contentstore/tests/test_users_default_role.py b/cms/djangoapps/contentstore/tests/test_users_default_role.py index f4b613a4a0..5c81de7942 100644 --- a/cms/djangoapps/contentstore/tests/test_users_default_role.py +++ b/cms/djangoapps/contentstore/tests/test_users_default_role.py @@ -2,7 +2,7 @@ Unit tests for checking default forum role "Student" of a user when he creates a course or after deleting it creates same course again """ -from __future__ import absolute_import + from contentstore.tests.utils import AjaxEnabledTestClient from contentstore.utils import delete_course, reverse_url diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index 487ab0afec..212cc50f11 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -1,5 +1,5 @@ """ Tests for utils. """ -from __future__ import absolute_import + import collections from datetime import datetime, timedelta diff --git a/cms/djangoapps/contentstore/tests/test_video_utils.py b/cms/djangoapps/contentstore/tests/test_video_utils.py index 8747bc9cef..7c12366e50 100644 --- a/cms/djangoapps/contentstore/tests/test_video_utils.py +++ b/cms/djangoapps/contentstore/tests/test_video_utils.py @@ -3,7 +3,7 @@ Unit tests for video utils. """ -from __future__ import absolute_import + from datetime import datetime from unittest import TestCase diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 4d25aac60c..d580d15f8d 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -1,7 +1,7 @@ """ This test file will test registration, login, activation, and session activity timeouts """ -from __future__ import absolute_import, print_function + import datetime import time diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 53fb93693e..7a2bcf6222 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -1,7 +1,7 @@ ''' Utilities for contentstore tests ''' -from __future__ import absolute_import + import json import textwrap diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 28c21f8242..ef91d03703 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -1,7 +1,7 @@ """ Common utility functions useful throughout the contentstore """ -from __future__ import absolute_import, print_function + import logging from datetime import datetime diff --git a/cms/djangoapps/contentstore/video_utils.py b/cms/djangoapps/contentstore/video_utils.py index 39260b1385..cbee8ce619 100644 --- a/cms/djangoapps/contentstore/video_utils.py +++ b/cms/djangoapps/contentstore/video_utils.py @@ -2,7 +2,7 @@ """ Utils related to the videos. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/views/access.py b/cms/djangoapps/contentstore/views/access.py index 2ed9de9453..4d4fda6032 100644 --- a/cms/djangoapps/contentstore/views/access.py +++ b/cms/djangoapps/contentstore/views/access.py @@ -1,6 +1,6 @@ """ Helper methods for determining user access permissions in Studio """ -from __future__ import absolute_import + from student import auth from student.roles import CourseInstructorRole diff --git a/cms/djangoapps/contentstore/views/assets.py b/cms/djangoapps/contentstore/views/assets.py index c914063283..0bd9c585b1 100644 --- a/cms/djangoapps/contentstore/views/assets.py +++ b/cms/djangoapps/contentstore/views/assets.py @@ -1,5 +1,5 @@ """Views for assets""" -from __future__ import absolute_import + import json import logging diff --git a/cms/djangoapps/contentstore/views/certificates.py b/cms/djangoapps/contentstore/views/certificates.py index 626524bfe1..cb17627255 100644 --- a/cms/djangoapps/contentstore/views/certificates.py +++ b/cms/djangoapps/contentstore/views/certificates.py @@ -21,7 +21,7 @@ course.certificates: { ] } """ -from __future__ import absolute_import + import json import logging diff --git a/cms/djangoapps/contentstore/views/checklists.py b/cms/djangoapps/contentstore/views/checklists.py index ebea256a50..51b82c0f3e 100644 --- a/cms/djangoapps/contentstore/views/checklists.py +++ b/cms/djangoapps/contentstore/views/checklists.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index a0f865d2fd..42b3d8a60a 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -1,7 +1,7 @@ """ Studio component views """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 7da12fb4ca..26732dd1be 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -1,7 +1,7 @@ """ Views related to operations on course objects """ -from __future__ import absolute_import + import copy import json diff --git a/cms/djangoapps/contentstore/views/dev.py b/cms/djangoapps/contentstore/views/dev.py index a2fc3f7f14..21c4646aea 100644 --- a/cms/djangoapps/contentstore/views/dev.py +++ b/cms/djangoapps/contentstore/views/dev.py @@ -4,7 +4,7 @@ These views will NOT be shown on production: trying to access them will result in a 404 error. """ # pylint: disable=unused-argument -from __future__ import absolute_import + from edxmako.shortcuts import render_to_response diff --git a/cms/djangoapps/contentstore/views/entrance_exam.py b/cms/djangoapps/contentstore/views/entrance_exam.py index b1d9d0d5db..35f44de0ef 100644 --- a/cms/djangoapps/contentstore/views/entrance_exam.py +++ b/cms/djangoapps/contentstore/views/entrance_exam.py @@ -2,7 +2,7 @@ Entrance Exams view module -- handles all requests related to entrance exam management via Studio Intended to be utilized as an AJAX callback handler, versus a proper view/screen """ -from __future__ import absolute_import + import logging from functools import wraps diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index 8045b0fd4a..d855d4624f 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring,unused-argument -from __future__ import absolute_import + import functools diff --git a/cms/djangoapps/contentstore/views/export_git.py b/cms/djangoapps/contentstore/views/export_git.py index eb0c0d364b..187ef4f7bb 100644 --- a/cms/djangoapps/contentstore/views/export_git.py +++ b/cms/djangoapps/contentstore/views/export_git.py @@ -3,7 +3,7 @@ This views handles exporting the course xml to a git repository if the giturl attribute is set. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/views/helpers.py b/cms/djangoapps/contentstore/views/helpers.py index 4eb087dfb8..13d88c4ffc 100644 --- a/cms/djangoapps/contentstore/views/helpers.py +++ b/cms/djangoapps/contentstore/views/helpers.py @@ -2,7 +2,7 @@ Helper methods for Studio views. """ -from __future__ import absolute_import + from uuid import uuid4 diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index c77647134b..02e69cb0c6 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -2,7 +2,7 @@ These views handle all actions in Studio related to import and exporting of courses """ -from __future__ import absolute_import + import base64 import json diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index f40188b806..8ddc24e864 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -1,5 +1,5 @@ """Views for items (modules).""" -from __future__ import absolute_import + import hashlib import logging diff --git a/cms/djangoapps/contentstore/views/library.py b/cms/djangoapps/contentstore/views/library.py index a9bdc0dace..8fc60dc9ad 100644 --- a/cms/djangoapps/contentstore/views/library.py +++ b/cms/djangoapps/contentstore/views/library.py @@ -3,7 +3,7 @@ Views related to content libraries. A content library is a structure containing XBlocks which can be re-used in the multiple courses. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/contentstore/views/organization.py b/cms/djangoapps/contentstore/views/organization.py index 7fa03d51ce..04000259bb 100644 --- a/cms/djangoapps/contentstore/views/organization.py +++ b/cms/djangoapps/contentstore/views/organization.py @@ -1,5 +1,5 @@ """Organizations views for use with Studio.""" -from __future__ import absolute_import + from django.contrib.auth.decorators import login_required from django.http import HttpResponse diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 68a26fb9ba..1a874e3c1a 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging from functools import partial diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index f0c81023de..498e0fe46f 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -1,7 +1,7 @@ """ Public views """ -from __future__ import absolute_import + from django.conf import settings from django.shortcuts import redirect diff --git a/cms/djangoapps/contentstore/views/session_kv_store.py b/cms/djangoapps/contentstore/views/session_kv_store.py index 6e121ff508..34eb146913 100644 --- a/cms/djangoapps/contentstore/views/session_kv_store.py +++ b/cms/djangoapps/contentstore/views/session_kv_store.py @@ -1,7 +1,7 @@ """ An :class:`~xblock.runtime.KeyValueStore` that stores data in the django session """ -from __future__ import absolute_import + from xblock.runtime import KeyValueStore diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index f5438f1ab5..7b03b0b225 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -1,7 +1,7 @@ """ Views related to course tabs """ -from __future__ import absolute_import + import six from django.contrib.auth.decorators import login_required diff --git a/cms/djangoapps/contentstore/views/tests/test_access.py b/cms/djangoapps/contentstore/views/tests/test_access.py index 5a17c31e0d..d2180cb82a 100644 --- a/cms/djangoapps/contentstore/views/tests/test_access.py +++ b/cms/djangoapps/contentstore/views/tests/test_access.py @@ -1,7 +1,7 @@ """ Tests access.py """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.test import TestCase diff --git a/cms/djangoapps/contentstore/views/tests/test_assets.py b/cms/djangoapps/contentstore/views/tests/test_assets.py index c924b9f1d2..ba90413ca9 100644 --- a/cms/djangoapps/contentstore/views/tests/test_assets.py +++ b/cms/djangoapps/contentstore/views/tests/test_assets.py @@ -1,7 +1,7 @@ """ Unit tests for the asset upload endpoint. """ -from __future__ import absolute_import + import json from datetime import datetime diff --git a/cms/djangoapps/contentstore/views/tests/test_certificates.py b/cms/djangoapps/contentstore/views/tests/test_certificates.py index 9f2c54ba58..a4ae6cad02 100644 --- a/cms/djangoapps/contentstore/views/tests/test_certificates.py +++ b/cms/djangoapps/contentstore/views/tests/test_certificates.py @@ -3,7 +3,7 @@ """ Certificates Tests. """ -from __future__ import absolute_import + import itertools import json diff --git a/cms/djangoapps/contentstore/views/tests/test_container_page.py b/cms/djangoapps/contentstore/views/tests/test_container_page.py index b9e3f82aa5..52b85668ac 100644 --- a/cms/djangoapps/contentstore/views/tests/test_container_page.py +++ b/cms/djangoapps/contentstore/views/tests/test_container_page.py @@ -1,7 +1,7 @@ """ Unit tests for the container page. """ -from __future__ import absolute_import + import datetime import re diff --git a/cms/djangoapps/contentstore/views/tests/test_course_index.py b/cms/djangoapps/contentstore/views/tests/test_course_index.py index 959bd5fd4f..2d93599f5c 100644 --- a/cms/djangoapps/contentstore/views/tests/test_course_index.py +++ b/cms/djangoapps/contentstore/views/tests/test_course_index.py @@ -1,7 +1,7 @@ """ Unit tests for getting the list of courses and the course outline. """ -from __future__ import absolute_import + import datetime import json diff --git a/cms/djangoapps/contentstore/views/tests/test_course_updates.py b/cms/djangoapps/contentstore/views/tests/test_course_updates.py index 98856e6e07..8b94d08fab 100644 --- a/cms/djangoapps/contentstore/views/tests/test_course_updates.py +++ b/cms/djangoapps/contentstore/views/tests/test_course_updates.py @@ -1,7 +1,7 @@ """ unit tests for course_info views and models. """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py b/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py index 68710b34eb..2296ba31ae 100644 --- a/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py +++ b/cms/djangoapps/contentstore/views/tests/test_credit_eligibility.py @@ -2,7 +2,7 @@ Unit tests for credit eligibility UI in Studio. """ -from __future__ import absolute_import + import mock import six diff --git a/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py b/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py index 7e7a2dc84d..6dc39852ba 100644 --- a/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py +++ b/cms/djangoapps/contentstore/views/tests/test_entrance_exam.py @@ -1,7 +1,7 @@ """ Test module for Entrance Exams AJAX callback handler workflows """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/views/tests/test_gating.py b/cms/djangoapps/contentstore/views/tests/test_gating.py index 4cf4ddbca7..0d02001ded 100644 --- a/cms/djangoapps/contentstore/views/tests/test_gating.py +++ b/cms/djangoapps/contentstore/views/tests/test_gating.py @@ -1,7 +1,7 @@ """ Unit tests for the gating feature in Studio """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/views/tests/test_group_configurations.py b/cms/djangoapps/contentstore/views/tests/test_group_configurations.py index 3c3ab85e6b..744047e2eb 100644 --- a/cms/djangoapps/contentstore/views/tests/test_group_configurations.py +++ b/cms/djangoapps/contentstore/views/tests/test_group_configurations.py @@ -3,7 +3,7 @@ """ Group Configuration Tests. """ -from __future__ import absolute_import + import json from operator import itemgetter diff --git a/cms/djangoapps/contentstore/views/tests/test_header_menu.py b/cms/djangoapps/contentstore/views/tests/test_header_menu.py index a5334f97cb..1109327910 100644 --- a/cms/djangoapps/contentstore/views/tests/test_header_menu.py +++ b/cms/djangoapps/contentstore/views/tests/test_header_menu.py @@ -3,7 +3,7 @@ """ Course Header Menu Tests. """ -from __future__ import absolute_import + from django.conf import settings from django.test.utils import override_settings diff --git a/cms/djangoapps/contentstore/views/tests/test_helpers.py b/cms/djangoapps/contentstore/views/tests/test_helpers.py index e141adcd62..8c2646d589 100644 --- a/cms/djangoapps/contentstore/views/tests/test_helpers.py +++ b/cms/djangoapps/contentstore/views/tests/test_helpers.py @@ -2,7 +2,7 @@ Unit tests for helpers.py. """ -from __future__ import absolute_import + import six from django.utils import http diff --git a/cms/djangoapps/contentstore/views/tests/test_import_export.py b/cms/djangoapps/contentstore/views/tests/test_import_export.py index dd63e8cda1..1693cdbe88 100644 --- a/cms/djangoapps/contentstore/views/tests/test_import_export.py +++ b/cms/djangoapps/contentstore/views/tests/test_import_export.py @@ -1,7 +1,7 @@ """ Unit tests for course import and export """ -from __future__ import absolute_import + import copy import json diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index 823ad4012a..2a058255d0 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -1,5 +1,5 @@ """Tests for items views.""" -from __future__ import absolute_import + import json import re diff --git a/cms/djangoapps/contentstore/views/tests/test_library.py b/cms/djangoapps/contentstore/views/tests/test_library.py index 2b052db99c..2344761500 100644 --- a/cms/djangoapps/contentstore/views/tests/test_library.py +++ b/cms/djangoapps/contentstore/views/tests/test_library.py @@ -3,7 +3,7 @@ Unit tests for contentstore.views.library More important high-level tests are in contentstore/tests/test_libraries.py """ -from __future__ import absolute_import + import ddt import mock diff --git a/cms/djangoapps/contentstore/views/tests/test_organizations.py b/cms/djangoapps/contentstore/views/tests/test_organizations.py index 17f4f77f43..1b7fabe653 100644 --- a/cms/djangoapps/contentstore/views/tests/test_organizations.py +++ b/cms/djangoapps/contentstore/views/tests/test_organizations.py @@ -1,5 +1,5 @@ """Tests covering the Organizations listing on the Studio home.""" -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/views/tests/test_preview.py b/cms/djangoapps/contentstore/views/tests/test_preview.py index 4aa284ecd9..a9dbad6b71 100644 --- a/cms/djangoapps/contentstore/views/tests/test_preview.py +++ b/cms/djangoapps/contentstore/views/tests/test_preview.py @@ -1,7 +1,7 @@ """ Tests for contentstore.views.preview.py """ -from __future__ import absolute_import + import re diff --git a/cms/djangoapps/contentstore/views/tests/test_tabs.py b/cms/djangoapps/contentstore/views/tests/test_tabs.py index 87bf42d609..561997df15 100644 --- a/cms/djangoapps/contentstore/views/tests/test_tabs.py +++ b/cms/djangoapps/contentstore/views/tests/test_tabs.py @@ -1,6 +1,6 @@ """ Tests for tab functions (just primitive). """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/views/tests/test_textbooks.py b/cms/djangoapps/contentstore/views/tests/test_textbooks.py index 036ebcf681..5840a62a43 100644 --- a/cms/djangoapps/contentstore/views/tests/test_textbooks.py +++ b/cms/djangoapps/contentstore/views/tests/test_textbooks.py @@ -1,6 +1,6 @@ """ Test cases for the textbook index page. """ -from __future__ import absolute_import + import json from unittest import TestCase diff --git a/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py b/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py index f13705a121..d7b6351c42 100644 --- a/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py +++ b/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import + import json from io import BytesIO diff --git a/cms/djangoapps/contentstore/views/tests/test_transcripts.py b/cms/djangoapps/contentstore/views/tests/test_transcripts.py index d8edf79a7c..5053afdc8e 100644 --- a/cms/djangoapps/contentstore/views/tests/test_transcripts.py +++ b/cms/djangoapps/contentstore/views/tests/test_transcripts.py @@ -1,6 +1,6 @@ """Tests for items views.""" -from __future__ import absolute_import + import copy import json diff --git a/cms/djangoapps/contentstore/views/tests/test_unit_page.py b/cms/djangoapps/contentstore/views/tests/test_unit_page.py index 1c018f60ee..0ff303ed6e 100644 --- a/cms/djangoapps/contentstore/views/tests/test_unit_page.py +++ b/cms/djangoapps/contentstore/views/tests/test_unit_page.py @@ -2,7 +2,7 @@ Unit tests for the unit page. """ -from __future__ import absolute_import + from contentstore.views.tests.utils import StudioPageTestCase from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/views/tests/test_user.py b/cms/djangoapps/contentstore/views/tests/test_user.py index 1ee9b8db14..eebfac75ae 100644 --- a/cms/djangoapps/contentstore/views/tests/test_user.py +++ b/cms/djangoapps/contentstore/views/tests/test_user.py @@ -1,7 +1,7 @@ """ Tests for contentstore/views/user.py. """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/views/tests/test_videos.py b/cms/djangoapps/contentstore/views/tests/test_videos.py index a851aac47d..0c2092e126 100644 --- a/cms/djangoapps/contentstore/views/tests/test_videos.py +++ b/cms/djangoapps/contentstore/views/tests/test_videos.py @@ -2,7 +2,7 @@ """ Unit tests for video-related REST APIs. """ -from __future__ import absolute_import + import csv import json diff --git a/cms/djangoapps/contentstore/views/tests/utils.py b/cms/djangoapps/contentstore/views/tests/utils.py index e7e70661d4..bbfa28b99e 100644 --- a/cms/djangoapps/contentstore/views/tests/utils.py +++ b/cms/djangoapps/contentstore/views/tests/utils.py @@ -2,7 +2,7 @@ Utilities for view tests. """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/contentstore/views/transcript_settings.py b/cms/djangoapps/contentstore/views/transcript_settings.py index 03105f005b..61208c4008 100644 --- a/cms/djangoapps/contentstore/views/transcript_settings.py +++ b/cms/djangoapps/contentstore/views/transcript_settings.py @@ -1,7 +1,7 @@ """ Views related to the transcript preferences feature """ -from __future__ import absolute_import + import logging import os diff --git a/cms/djangoapps/contentstore/views/transcripts_ajax.py b/cms/djangoapps/contentstore/views/transcripts_ajax.py index 537538dcf9..90e14c1bfd 100644 --- a/cms/djangoapps/contentstore/views/transcripts_ajax.py +++ b/cms/djangoapps/contentstore/views/transcripts_ajax.py @@ -5,7 +5,7 @@ Actions manager for transcripts ajax calls. Module do not support rollback (pressing "Cancel" button in Studio) All user changes are saved immediately. """ -from __future__ import absolute_import + import copy import json diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index cc6fc565a9..3617b2f921 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -1,6 +1,6 @@ """Views for users""" -from __future__ import absolute_import + from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User diff --git a/cms/djangoapps/contentstore/views/videos.py b/cms/djangoapps/contentstore/views/videos.py index fc67664bc9..1782a3dab8 100644 --- a/cms/djangoapps/contentstore/views/videos.py +++ b/cms/djangoapps/contentstore/views/videos.py @@ -1,7 +1,7 @@ """ Views related to the video upload feature """ -from __future__ import absolute_import + import csv import json diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index 1366a1891f..81b8a6e048 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -2,7 +2,7 @@ django admin page for the course creators table """ -from __future__ import absolute_import + import logging from smtplib import SMTPException diff --git a/cms/djangoapps/course_creators/migrations/0001_initial.py b/cms/djangoapps/course_creators/migrations/0001_initial.py index e46a1c3955..d2a13be28b 100644 --- a/cms/djangoapps/course_creators/migrations/0001_initial.py +++ b/cms/djangoapps/course_creators/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/cms/djangoapps/course_creators/models.py b/cms/djangoapps/course_creators/models.py index f9728fa1af..bfb09a0c30 100644 --- a/cms/djangoapps/course_creators/models.py +++ b/cms/djangoapps/course_creators/models.py @@ -1,7 +1,7 @@ """ Table for storing information about whether or not Studio users have course creation privileges. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.db import models diff --git a/cms/djangoapps/course_creators/tests/test_admin.py b/cms/djangoapps/course_creators/tests/test_admin.py index 73dd089723..8d31d74ef8 100644 --- a/cms/djangoapps/course_creators/tests/test_admin.py +++ b/cms/djangoapps/course_creators/tests/test_admin.py @@ -2,7 +2,7 @@ Tests course_creators.admin.py. """ -from __future__ import absolute_import + import mock from django.contrib.admin.sites import AdminSite diff --git a/cms/djangoapps/course_creators/tests/test_views.py b/cms/djangoapps/course_creators/tests/test_views.py index 15ba1de242..85b3ef9a76 100644 --- a/cms/djangoapps/course_creators/tests/test_views.py +++ b/cms/djangoapps/course_creators/tests/test_views.py @@ -2,7 +2,7 @@ Tests course_creators.views.py. """ -from __future__ import absolute_import + import mock from django.contrib.auth.models import User diff --git a/cms/djangoapps/course_creators/views.py b/cms/djangoapps/course_creators/views.py index 9729270057..efc3bf6653 100644 --- a/cms/djangoapps/course_creators/views.py +++ b/cms/djangoapps/course_creators/views.py @@ -1,7 +1,7 @@ """ Methods for interacting programmatically with the user creator table. """ -from __future__ import absolute_import + from course_creators.models import CourseCreator from student import auth diff --git a/cms/djangoapps/maintenance/tests.py b/cms/djangoapps/maintenance/tests.py index d6719adbd6..ba4092546a 100644 --- a/cms/djangoapps/maintenance/tests.py +++ b/cms/djangoapps/maintenance/tests.py @@ -1,7 +1,7 @@ """ Tests for the maintenance app views. """ -from __future__ import absolute_import + import json diff --git a/cms/djangoapps/maintenance/urls.py b/cms/djangoapps/maintenance/urls.py index 1d5c15da8e..a7c11f93e6 100644 --- a/cms/djangoapps/maintenance/urls.py +++ b/cms/djangoapps/maintenance/urls.py @@ -1,7 +1,7 @@ """ URLs for the maintenance app. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/cms/djangoapps/maintenance/views.py b/cms/djangoapps/maintenance/views.py index 8c68598dd0..1f287965d0 100644 --- a/cms/djangoapps/maintenance/views.py +++ b/cms/djangoapps/maintenance/views.py @@ -1,7 +1,7 @@ """ Views for the maintenance app. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/models/settings/course_grading.py b/cms/djangoapps/models/settings/course_grading.py index a8dd7c52df..9601936c9e 100644 --- a/cms/djangoapps/models/settings/course_grading.py +++ b/cms/djangoapps/models/settings/course_grading.py @@ -1,5 +1,5 @@ """Grading policy""" -from __future__ import absolute_import + import json from base64 import b64encode diff --git a/cms/djangoapps/models/settings/course_metadata.py b/cms/djangoapps/models/settings/course_metadata.py index 7f2057c888..3483f09fed 100644 --- a/cms/djangoapps/models/settings/course_metadata.py +++ b/cms/djangoapps/models/settings/course_metadata.py @@ -1,7 +1,7 @@ """ Django module for Course Metadata class -- manages advanced settings and related parameters """ -from __future__ import absolute_import + import six from crum import get_current_user diff --git a/cms/djangoapps/models/settings/encoder.py b/cms/djangoapps/models/settings/encoder.py index fcd58cbc95..8451207a35 100644 --- a/cms/djangoapps/models/settings/encoder.py +++ b/cms/djangoapps/models/settings/encoder.py @@ -1,7 +1,7 @@ """ CourseSettingsEncoder """ -from __future__ import absolute_import + import datetime import json diff --git a/cms/djangoapps/pipeline_js/utils.py b/cms/djangoapps/pipeline_js/utils.py index 90a0c1f976..c281d8a67d 100644 --- a/cms/djangoapps/pipeline_js/utils.py +++ b/cms/djangoapps/pipeline_js/utils.py @@ -2,7 +2,7 @@ Utilities for returning XModule JS (used by requirejs) """ -from __future__ import absolute_import + from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage diff --git a/cms/djangoapps/xblock_config/admin.py b/cms/djangoapps/xblock_config/admin.py index b1b341d733..1a3a24f73f 100644 --- a/cms/djangoapps/xblock_config/admin.py +++ b/cms/djangoapps/xblock_config/admin.py @@ -2,7 +2,7 @@ Django admin dashboard configuration for LMS XBlock infrastructure. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin diff --git a/cms/djangoapps/xblock_config/apps.py b/cms/djangoapps/xblock_config/apps.py index 2961140f91..13a910c714 100644 --- a/cms/djangoapps/xblock_config/apps.py +++ b/cms/djangoapps/xblock_config/apps.py @@ -1,7 +1,7 @@ """ xblock_config Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/cms/djangoapps/xblock_config/forms.py b/cms/djangoapps/xblock_config/forms.py index b33fd382db..715ac25256 100644 --- a/cms/djangoapps/xblock_config/forms.py +++ b/cms/djangoapps/xblock_config/forms.py @@ -1,7 +1,7 @@ """ Defines a form for providing validation of LTI consumer course-specific configuration. """ -from __future__ import absolute_import + import logging diff --git a/cms/djangoapps/xblock_config/migrations/0001_initial.py b/cms/djangoapps/xblock_config/migrations/0001_initial.py index 721036b40f..f9a64bdbb3 100644 --- a/cms/djangoapps/xblock_config/migrations/0001_initial.py +++ b/cms/djangoapps/xblock_config/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/cms/djangoapps/xblock_config/migrations/0002_courseeditltifieldsenabledflag.py b/cms/djangoapps/xblock_config/migrations/0002_courseeditltifieldsenabledflag.py index a21f9dba10..c2acbfcbf8 100644 --- a/cms/djangoapps/xblock_config/migrations/0002_courseeditltifieldsenabledflag.py +++ b/cms/djangoapps/xblock_config/migrations/0002_courseeditltifieldsenabledflag.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/cms/djangoapps/xblock_config/models.py b/cms/djangoapps/xblock_config/models.py index ad0f05cb34..57943b0880 100644 --- a/cms/djangoapps/xblock_config/models.py +++ b/cms/djangoapps/xblock_config/models.py @@ -5,7 +5,7 @@ Includes: StudioConfig: A ConfigurationModel for managing Studio. """ -from __future__ import absolute_import + import six from config_models.models import ConfigurationModel diff --git a/cms/djangoapps/xblock_config/tests/test_models.py b/cms/djangoapps/xblock_config/tests/test_models.py index 537ac3c881..11b3b5c278 100644 --- a/cms/djangoapps/xblock_config/tests/test_models.py +++ b/cms/djangoapps/xblock_config/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the models that configures Edit LTI fields feature. """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index 30be2bb448..f9ffd8cc6c 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -11,7 +11,7 @@ support both generating static assets to a directory and also serving static from the same directory. """ -from __future__ import absolute_import + # Silence noisy logs import logging diff --git a/cms/envs/common.py b/cms/envs/common.py index e382f6c1e8..a48a06a8a0 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -39,7 +39,7 @@ When refering to XBlocks, we use the entry-point name. For example, # want to import all variables from base settings files # pylint: disable=unused-import -from __future__ import absolute_import + import imp import os diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 1f178ccefb..0aa93cc69e 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -2,7 +2,7 @@ Specific overrides to the base prod settings to make development easier. """ -from __future__ import absolute_import + import logging from os.path import abspath, dirname, join diff --git a/cms/envs/devstack_optimized.py b/cms/envs/devstack_optimized.py index 132357358b..2dc4f42f42 100644 --- a/cms/envs/devstack_optimized.py +++ b/cms/envs/devstack_optimized.py @@ -18,7 +18,7 @@ as they are for non-optimized devstack. Instead, update_assets must be invoked each time that changes have been made. """ -from __future__ import absolute_import + import os diff --git a/cms/envs/devstack_with_worker.py b/cms/envs/devstack_with_worker.py index 0fdedf2ed3..f94303b296 100644 --- a/cms/envs/devstack_with_worker.py +++ b/cms/envs/devstack_with_worker.py @@ -11,7 +11,7 @@ In two separate processes on devstack: ./manage.py cms celery worker --settings=devstack_with_worker """ -from __future__ import absolute_import + import os diff --git a/cms/envs/production.py b/cms/envs/production.py index dd7c51c2f8..6fd835e25b 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -6,7 +6,7 @@ This is the default template for our main set of AWS servers. # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-order -from __future__ import absolute_import + import codecs import os diff --git a/cms/envs/test.py b/cms/envs/test.py index 012b5a06ca..80a2d7b2fa 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -13,7 +13,7 @@ sessions. Assumes structure: # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-order -from __future__ import absolute_import + from .common import * import os diff --git a/cms/envs/test_static_optimized.py b/cms/envs/test_static_optimized.py index ef3ad79639..39d9a74ba0 100644 --- a/cms/envs/test_static_optimized.py +++ b/cms/envs/test_static_optimized.py @@ -11,7 +11,7 @@ from the same directory. """ # Start with the common settings -from __future__ import absolute_import + from .common import * # pylint: disable=wildcard-import, unused-wildcard-import diff --git a/cms/lib/xblock/authoring_mixin.py b/cms/lib/xblock/authoring_mixin.py index 44b6f31158..24ebe3175e 100644 --- a/cms/lib/xblock/authoring_mixin.py +++ b/cms/lib/xblock/authoring_mixin.py @@ -2,7 +2,7 @@ Mixin class that provides authoring capabilities for XBlocks. """ -from __future__ import absolute_import + import logging diff --git a/cms/lib/xblock/field_data.py b/cms/lib/xblock/field_data.py index 53015d188b..d5d920c63e 100644 --- a/cms/lib/xblock/field_data.py +++ b/cms/lib/xblock/field_data.py @@ -2,7 +2,7 @@ :class:`~xblock.field_data.FieldData` subclasses used by the CMS """ -from __future__ import absolute_import + from xblock.field_data import SplitFieldData from xblock.fields import Scope diff --git a/cms/lib/xblock/runtime.py b/cms/lib/xblock/runtime.py index 016717fbe2..6137bac0ea 100644 --- a/cms/lib/xblock/runtime.py +++ b/cms/lib/xblock/runtime.py @@ -2,7 +2,7 @@ XBlock runtime implementations for edX Studio """ -from __future__ import absolute_import + import six from django.urls import reverse diff --git a/cms/lib/xblock/tagging/admin.py b/cms/lib/xblock/tagging/admin.py index e9566befa7..15b7c4e0e4 100644 --- a/cms/lib/xblock/tagging/admin.py +++ b/cms/lib/xblock/tagging/admin.py @@ -1,7 +1,7 @@ """ Admin registration for tags models """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/cms/lib/xblock/tagging/migrations/0001_initial.py b/cms/lib/xblock/tagging/migrations/0001_initial.py index a8c8ec6630..f0b478045b 100644 --- a/cms/lib/xblock/tagging/migrations/0001_initial.py +++ b/cms/lib/xblock/tagging/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/cms/lib/xblock/tagging/migrations/0002_auto_20170116_1541.py b/cms/lib/xblock/tagging/migrations/0002_auto_20170116_1541.py index 70769dec84..6f9ab75b6e 100644 --- a/cms/lib/xblock/tagging/migrations/0002_auto_20170116_1541.py +++ b/cms/lib/xblock/tagging/migrations/0002_auto_20170116_1541.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/cms/lib/xblock/tagging/models.py b/cms/lib/xblock/tagging/models.py index 78b819f0a5..c671ef9b16 100644 --- a/cms/lib/xblock/tagging/models.py +++ b/cms/lib/xblock/tagging/models.py @@ -1,7 +1,7 @@ """ Django Model for tags """ -from __future__ import absolute_import + from django.db import models from django.utils.encoding import python_2_unicode_compatible diff --git a/cms/lib/xblock/tagging/tagging.py b/cms/lib/xblock/tagging/tagging.py index 9ff22a03f7..ad678f645c 100644 --- a/cms/lib/xblock/tagging/tagging.py +++ b/cms/lib/xblock/tagging/tagging.py @@ -3,7 +3,7 @@ Structured Tagging based on XBlockAsides """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/cms/lib/xblock/tagging/test.py b/cms/lib/xblock/tagging/test.py index f0b9c5e034..e8f3e391ed 100644 --- a/cms/lib/xblock/tagging/test.py +++ b/cms/lib/xblock/tagging/test.py @@ -2,7 +2,7 @@ Tests for the Studio Tagging XBlockAside """ -from __future__ import absolute_import + import json from datetime import datetime diff --git a/cms/lib/xblock/test/test_authoring_mixin.py b/cms/lib/xblock/test/test_authoring_mixin.py index 8c2c0aaa18..1193e16827 100644 --- a/cms/lib/xblock/test/test_authoring_mixin.py +++ b/cms/lib/xblock/test/test_authoring_mixin.py @@ -1,7 +1,7 @@ """ Tests for the Studio authoring XBlock mixin. """ -from __future__ import absolute_import + from django.conf import settings from django.test.utils import override_settings diff --git a/cms/lib/xblock/test/test_runtime.py b/cms/lib/xblock/test/test_runtime.py index 27aaa49228..7b7df1bf23 100644 --- a/cms/lib/xblock/test/test_runtime.py +++ b/cms/lib/xblock/test/test_runtime.py @@ -1,7 +1,7 @@ """ Tests of edX Studio runtime functionality """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/cms/startup.py b/cms/startup.py index 53d6494810..6a8d767934 100644 --- a/cms/startup.py +++ b/cms/startup.py @@ -2,7 +2,7 @@ Module for code that should run during Studio startup (deprecated) """ -from __future__ import absolute_import + import django from django.conf import settings diff --git a/cms/urls.py b/cms/urls.py index 9c92ea0dde..560a93f941 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -1,7 +1,7 @@ """ Urls of Studio. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/cms/urls_dev.py b/cms/urls_dev.py index 530a5c58f2..e7a6b85d45 100644 --- a/cms/urls_dev.py +++ b/cms/urls_dev.py @@ -3,7 +3,7 @@ URLconf for development-only views. This gets imported by urls.py and added to its URLconf if we are running in development mode; otherwise, it is ignored. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/cms/wsgi.py b/cms/wsgi.py index 0a4d276460..e842fa7ec9 100644 --- a/cms/wsgi.py +++ b/cms/wsgi.py @@ -7,7 +7,7 @@ It exposes a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting. """ -from __future__ import absolute_import + from openedx.core.lib.logsettings import log_python_warnings log_python_warnings() diff --git a/common/djangoapps/course_action_state/managers.py b/common/djangoapps/course_action_state/managers.py index 3743895f56..decbeeb26b 100644 --- a/common/djangoapps/course_action_state/managers.py +++ b/common/djangoapps/course_action_state/managers.py @@ -1,7 +1,7 @@ """ Model Managers for Course Actions """ -from __future__ import absolute_import + import six import traceback from django.db import models, transaction diff --git a/common/djangoapps/course_action_state/migrations/0001_initial.py b/common/djangoapps/course_action_state/migrations/0001_initial.py index 4e589c9178..597f49df3b 100644 --- a/common/djangoapps/course_action_state/migrations/0001_initial.py +++ b/common/djangoapps/course_action_state/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + import django.db.models.deletion from django.conf import settings from django.db import migrations, models diff --git a/common/djangoapps/course_action_state/models.py b/common/djangoapps/course_action_state/models.py index f1ef19e710..2867ddf8a1 100644 --- a/common/djangoapps/course_action_state/models.py +++ b/common/djangoapps/course_action_state/models.py @@ -9,7 +9,7 @@ file and check it in at the same time as your model changes. To do that, 3. It adds the migration file to edx-platform/common/djangoapps/course_action_state/migrations/ """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.db import models from opaque_keys.edx.django.models import CourseKeyField diff --git a/common/djangoapps/course_action_state/tests/test_managers.py b/common/djangoapps/course_action_state/tests/test_managers.py index f0664edebe..8ad9c69907 100644 --- a/common/djangoapps/course_action_state/tests/test_managers.py +++ b/common/djangoapps/course_action_state/tests/test_managers.py @@ -2,7 +2,7 @@ """ Tests for basic common operations related to Course Action State managers """ -from __future__ import absolute_import + from six.moves import range from collections import namedtuple diff --git a/common/djangoapps/course_action_state/tests/test_rerun_manager.py b/common/djangoapps/course_action_state/tests/test_rerun_manager.py index 519a9ac1e2..eab8ffd7ba 100644 --- a/common/djangoapps/course_action_state/tests/test_rerun_manager.py +++ b/common/djangoapps/course_action_state/tests/test_rerun_manager.py @@ -2,7 +2,7 @@ Tests specific to the CourseRerunState Model and Manager. """ -from __future__ import absolute_import + from django.test import TestCase from opaque_keys.edx.locations import CourseLocator diff --git a/common/djangoapps/course_modes/admin.py b/common/djangoapps/course_modes/admin.py index f2bc35edbb..cb9da9b41b 100644 --- a/common/djangoapps/course_modes/admin.py +++ b/common/djangoapps/course_modes/admin.py @@ -1,5 +1,5 @@ """Django admin for course_modes""" -from __future__ import absolute_import, unicode_literals + import six from django import forms diff --git a/common/djangoapps/course_modes/api/serializers.py b/common/djangoapps/course_modes/api/serializers.py index 7c287ac54d..94e459e392 100644 --- a/common/djangoapps/course_modes/api/serializers.py +++ b/common/djangoapps/course_modes/api/serializers.py @@ -1,7 +1,7 @@ """ Course modes API serializers. """ -from __future__ import absolute_import + from rest_framework import serializers diff --git a/common/djangoapps/course_modes/api/urls.py b/common/djangoapps/course_modes/api/urls.py index ce149243b2..e4cf046def 100644 --- a/common/djangoapps/course_modes/api/urls.py +++ b/common/djangoapps/course_modes/api/urls.py @@ -1,7 +1,7 @@ """ URL definitions for the course_modes API. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/common/djangoapps/course_modes/api/v1/tests/test_views.py b/common/djangoapps/course_modes/api/v1/tests/test_views.py index 6b94189972..aa39f9d30c 100644 --- a/common/djangoapps/course_modes/api/v1/tests/test_views.py +++ b/common/djangoapps/course_modes/api/v1/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the course modes API. """ -from __future__ import absolute_import, unicode_literals + import json import unittest diff --git a/common/djangoapps/course_modes/api/v1/urls.py b/common/djangoapps/course_modes/api/v1/urls.py index 1e28b19535..8933b3a4ac 100644 --- a/common/djangoapps/course_modes/api/v1/urls.py +++ b/common/djangoapps/course_modes/api/v1/urls.py @@ -1,7 +1,7 @@ """ URL definitions for the course_modes v1 API. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/course_modes/api/v1/views.py b/common/djangoapps/course_modes/api/v1/views.py index 42a19d6121..03a38f1076 100644 --- a/common/djangoapps/course_modes/api/v1/views.py +++ b/common/djangoapps/course_modes/api/v1/views.py @@ -2,7 +2,7 @@ Defines the "ReSTful" API for course modes. """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/course_modes/apps.py b/common/djangoapps/course_modes/apps.py index 12f2869139..fa84221508 100644 --- a/common/djangoapps/course_modes/apps.py +++ b/common/djangoapps/course_modes/apps.py @@ -1,5 +1,5 @@ """Django App config for course_modes""" -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/common/djangoapps/course_modes/helpers.py b/common/djangoapps/course_modes/helpers.py index 9d90cefcc1..42e33f6d77 100644 --- a/common/djangoapps/course_modes/helpers.py +++ b/common/djangoapps/course_modes/helpers.py @@ -1,5 +1,5 @@ """ Helper methods for CourseModes. """ -from __future__ import absolute_import, unicode_literals + import six from django.utils.translation import ugettext_lazy as _ diff --git a/common/djangoapps/course_modes/migrations/0001_initial.py b/common/djangoapps/course_modes/migrations/0001_initial.py index 1dcfad38cc..094f8a037b 100644 --- a/common/djangoapps/course_modes/migrations/0001_initial.py +++ b/common/djangoapps/course_modes/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField diff --git a/common/djangoapps/course_modes/migrations/0002_coursemode_expiration_datetime_is_explicit.py b/common/djangoapps/course_modes/migrations/0002_coursemode_expiration_datetime_is_explicit.py index ad010d9a3b..86124fc13c 100644 --- a/common/djangoapps/course_modes/migrations/0002_coursemode_expiration_datetime_is_explicit.py +++ b/common/djangoapps/course_modes/migrations/0002_coursemode_expiration_datetime_is_explicit.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/course_modes/migrations/0003_auto_20151113_1443.py b/common/djangoapps/course_modes/migrations/0003_auto_20151113_1443.py index bca415f6d8..c65f5932dc 100644 --- a/common/djangoapps/course_modes/migrations/0003_auto_20151113_1443.py +++ b/common/djangoapps/course_modes/migrations/0003_auto_20151113_1443.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/course_modes/migrations/0004_auto_20151113_1457.py b/common/djangoapps/course_modes/migrations/0004_auto_20151113_1457.py index de21813631..24e842eb7e 100644 --- a/common/djangoapps/course_modes/migrations/0004_auto_20151113_1457.py +++ b/common/djangoapps/course_modes/migrations/0004_auto_20151113_1457.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from datetime import timedelta diff --git a/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py b/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py index b08347568f..2842c255b8 100644 --- a/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py +++ b/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/course_modes/migrations/0006_auto_20160208_1407.py b/common/djangoapps/course_modes/migrations/0006_auto_20160208_1407.py index 7355c03817..6cc63a3a6b 100644 --- a/common/djangoapps/course_modes/migrations/0006_auto_20160208_1407.py +++ b/common/djangoapps/course_modes/migrations/0006_auto_20160208_1407.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py b/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py index 47123d7b0e..f82e852807 100644 --- a/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py +++ b/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/course_modes/migrations/0008_course_key_field_to_foreign_key.py b/common/djangoapps/course_modes/migrations/0008_course_key_field_to_foreign_key.py index 2ed4bfaf74..b844e4009d 100644 --- a/common/djangoapps/course_modes/migrations/0008_course_key_field_to_foreign_key.py +++ b/common/djangoapps/course_modes/migrations/0008_course_key_field_to_foreign_key.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField diff --git a/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py b/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py index 967f6d8d32..66e5ef5391 100644 --- a/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py +++ b/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import re diff --git a/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py b/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py index ee15a7cb00..979b75afb2 100644 --- a/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py +++ b/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import re diff --git a/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py b/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py index 0c36dbfacc..cc6c0db2d9 100644 --- a/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py +++ b/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-01-30 17:38 -from __future__ import absolute_import, unicode_literals + import re diff --git a/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py b/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py index ab748c583b..5885baa806 100644 --- a/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py +++ b/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-19 01:31 -from __future__ import unicode_literals + from django.conf import settings import django.core.validators diff --git a/common/djangoapps/course_modes/models.py b/common/djangoapps/course_modes/models.py index 0bd8a1f6d6..540145d711 100644 --- a/common/djangoapps/course_modes/models.py +++ b/common/djangoapps/course_modes/models.py @@ -1,7 +1,7 @@ """ Add and create new modes for running courses on this particular LMS """ -from __future__ import absolute_import + from collections import defaultdict, namedtuple from datetime import timedelta diff --git a/common/djangoapps/course_modes/signals.py b/common/djangoapps/course_modes/signals.py index f225dc021f..02dbe129fb 100644 --- a/common/djangoapps/course_modes/signals.py +++ b/common/djangoapps/course_modes/signals.py @@ -1,7 +1,7 @@ """ Signal handler for setting default course mode expiration dates """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/common/djangoapps/course_modes/tests/factories.py b/common/djangoapps/course_modes/tests/factories.py index cbffbe05a1..25717d8d9b 100644 --- a/common/djangoapps/course_modes/tests/factories.py +++ b/common/djangoapps/course_modes/tests/factories.py @@ -1,7 +1,7 @@ """ Factories for course mode models. """ -from __future__ import absolute_import + import random diff --git a/common/djangoapps/course_modes/tests/test_admin.py b/common/djangoapps/course_modes/tests/test_admin.py index 18dbd08a3b..d0b8c91aa6 100644 --- a/common/djangoapps/course_modes/tests/test_admin.py +++ b/common/djangoapps/course_modes/tests/test_admin.py @@ -1,7 +1,7 @@ """ Tests for the course modes Django admin interface. """ -from __future__ import absolute_import, unicode_literals + import unittest from datetime import datetime, timedelta diff --git a/common/djangoapps/course_modes/tests/test_models.py b/common/djangoapps/course_modes/tests/test_models.py index 9a2df874c7..117ba30032 100644 --- a/common/djangoapps/course_modes/tests/test_models.py +++ b/common/djangoapps/course_modes/tests/test_models.py @@ -4,7 +4,7 @@ when you run "manage.py test". Replace this with more appropriate tests for your application. """ -from __future__ import absolute_import, unicode_literals + import itertools from datetime import timedelta diff --git a/common/djangoapps/course_modes/tests/test_signals.py b/common/djangoapps/course_modes/tests/test_signals.py index 71ce637634..6730d42600 100644 --- a/common/djangoapps/course_modes/tests/test_signals.py +++ b/common/djangoapps/course_modes/tests/test_signals.py @@ -1,7 +1,7 @@ """ Unit tests for the course_mode signals """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime, timedelta diff --git a/common/djangoapps/course_modes/tests/test_views.py b/common/djangoapps/course_modes/tests/test_views.py index b20d8e3d9a..f180e2a775 100644 --- a/common/djangoapps/course_modes/tests/test_views.py +++ b/common/djangoapps/course_modes/tests/test_views.py @@ -2,7 +2,7 @@ Tests for course_modes views. """ -from __future__ import absolute_import + import decimal import unittest diff --git a/common/djangoapps/course_modes/urls.py b/common/djangoapps/course_modes/urls.py index 96b8d1e4fe..c1c8fbe392 100644 --- a/common/djangoapps/course_modes/urls.py +++ b/common/djangoapps/course_modes/urls.py @@ -1,5 +1,5 @@ """URLs for course_mode API""" -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index c669875403..4848e7a440 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -1,7 +1,7 @@ """ Views for the course_mode module """ -from __future__ import absolute_import, unicode_literals + import decimal import json diff --git a/common/djangoapps/database_fixups/migrations/0001_initial.py b/common/djangoapps/database_fixups/migrations/0001_initial.py index 5423beb883..f15f8abf54 100644 --- a/common/djangoapps/database_fixups/migrations/0001_initial.py +++ b/common/djangoapps/database_fixups/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/edxmako/apps.py b/common/djangoapps/edxmako/apps.py index c52ed044ef..7ac79c3089 100644 --- a/common/djangoapps/edxmako/apps.py +++ b/common/djangoapps/edxmako/apps.py @@ -1,7 +1,7 @@ """ Configuration for the edxmako Django application. """ -from __future__ import absolute_import + from django.apps import AppConfig from django.conf import settings diff --git a/common/djangoapps/edxmako/backend.py b/common/djangoapps/edxmako/backend.py index 43690901a5..6979e9b4c3 100644 --- a/common/djangoapps/edxmako/backend.py +++ b/common/djangoapps/edxmako/backend.py @@ -1,7 +1,7 @@ """ Django template system engine for Mako templates. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/common/djangoapps/edxmako/makoloader.py b/common/djangoapps/edxmako/makoloader.py index 8a5833be24..0f2e35b952 100644 --- a/common/djangoapps/edxmako/makoloader.py +++ b/common/djangoapps/edxmako/makoloader.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/edxmako/paths.py b/common/djangoapps/edxmako/paths.py index 75e846acb3..6254db39e0 100644 --- a/common/djangoapps/edxmako/paths.py +++ b/common/djangoapps/edxmako/paths.py @@ -2,7 +2,7 @@ Set up lookup paths for mako templates. """ -from __future__ import absolute_import + import contextlib import hashlib diff --git a/common/djangoapps/edxmako/request_context.py b/common/djangoapps/edxmako/request_context.py index 081fd5f7f2..04d345c958 100644 --- a/common/djangoapps/edxmako/request_context.py +++ b/common/djangoapps/edxmako/request_context.py @@ -19,7 +19,7 @@ Methods for creating RequestContext for using with Mako templates. """ -from __future__ import absolute_import + from crum import get_current_request from django.template import RequestContext diff --git a/common/djangoapps/edxmako/shortcuts.py b/common/djangoapps/edxmako/shortcuts.py index 64838852a4..dce0c1c5b4 100644 --- a/common/djangoapps/edxmako/shortcuts.py +++ b/common/djangoapps/edxmako/shortcuts.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/edxmako/template.py b/common/djangoapps/edxmako/template.py index a8ade8f09e..32ac011971 100644 --- a/common/djangoapps/edxmako/template.py +++ b/common/djangoapps/edxmako/template.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import + from django.conf import settings from django.template import Context, engines diff --git a/common/djangoapps/edxmako/tests.py b/common/djangoapps/edxmako/tests.py index 2a02af33d0..109621217f 100644 --- a/common/djangoapps/edxmako/tests.py +++ b/common/djangoapps/edxmako/tests.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/entitlements/admin.py b/common/djangoapps/entitlements/admin.py index f3567729dc..1d2dbb6dbe 100644 --- a/common/djangoapps/entitlements/admin.py +++ b/common/djangoapps/entitlements/admin.py @@ -1,5 +1,5 @@ """Admin forms for Course Entitlements""" -from __future__ import absolute_import + from django import forms from django.contrib import admin diff --git a/common/djangoapps/entitlements/api/urls.py b/common/djangoapps/entitlements/api/urls.py index c07b35b8c7..d3d5a52d63 100644 --- a/common/djangoapps/entitlements/api/urls.py +++ b/common/djangoapps/entitlements/api/urls.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/common/djangoapps/entitlements/api/v1/filters.py b/common/djangoapps/entitlements/api/v1/filters.py index 9fcf2ffdbe..3edad226c4 100644 --- a/common/djangoapps/entitlements/api/v1/filters.py +++ b/common/djangoapps/entitlements/api/v1/filters.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django_filters import rest_framework as filters diff --git a/common/djangoapps/entitlements/api/v1/permissions.py b/common/djangoapps/entitlements/api/v1/permissions.py index 66c41e55a5..fc6d89e226 100644 --- a/common/djangoapps/entitlements/api/v1/permissions.py +++ b/common/djangoapps/entitlements/api/v1/permissions.py @@ -3,7 +3,7 @@ This module provides a custom DRF Permission class for supporting SAFE_METHODS t requiring Superuser access for all other Request types on an API endpoint. """ -from __future__ import absolute_import + from rest_framework.permissions import SAFE_METHODS, BasePermission diff --git a/common/djangoapps/entitlements/api/v1/serializers.py b/common/djangoapps/entitlements/api/v1/serializers.py index 6df61f8ac5..3a7084c4e9 100644 --- a/common/djangoapps/entitlements/api/v1/serializers.py +++ b/common/djangoapps/entitlements/api/v1/serializers.py @@ -1,7 +1,7 @@ """ Serializers for all Course Entitlement related return objects. """ -from __future__ import absolute_import + from django.contrib.auth import get_user_model from rest_framework import serializers diff --git a/common/djangoapps/entitlements/api/v1/tests/test_serializers.py b/common/djangoapps/entitlements/api/v1/tests/test_serializers.py index f282dc9116..88831aa4d4 100644 --- a/common/djangoapps/entitlements/api/v1/tests/test_serializers.py +++ b/common/djangoapps/entitlements/api/v1/tests/test_serializers.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/entitlements/api/v1/tests/test_views.py b/common/djangoapps/entitlements/api/v1/tests/test_views.py index c0475d48ad..2006b9f520 100644 --- a/common/djangoapps/entitlements/api/v1/tests/test_views.py +++ b/common/djangoapps/entitlements/api/v1/tests/test_views.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import json import logging diff --git a/common/djangoapps/entitlements/api/v1/urls.py b/common/djangoapps/entitlements/api/v1/urls.py index cc4f11735c..ac1b9b71ac 100644 --- a/common/djangoapps/entitlements/api/v1/urls.py +++ b/common/djangoapps/entitlements/api/v1/urls.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django.conf.urls import include, url from rest_framework.routers import DefaultRouter diff --git a/common/djangoapps/entitlements/api/v1/views.py b/common/djangoapps/entitlements/api/v1/views.py index 0afb622b70..84ba3953e5 100644 --- a/common/djangoapps/entitlements/api/v1/views.py +++ b/common/djangoapps/entitlements/api/v1/views.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/entitlements/apps.py b/common/djangoapps/entitlements/apps.py index f41e6e8903..8e5e1e4548 100644 --- a/common/djangoapps/entitlements/apps.py +++ b/common/djangoapps/entitlements/apps.py @@ -4,7 +4,7 @@ Entitlements Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py b/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py index c3a94c0a63..93e5505238 100644 --- a/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py +++ b/common/djangoapps/entitlements/management/commands/expire_old_entitlements.py @@ -2,7 +2,7 @@ Management command for expiring old entitlements. """ -from __future__ import absolute_import + import logging from textwrap import dedent diff --git a/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py b/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py index 96b5892142..64483a8b02 100644 --- a/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py +++ b/common/djangoapps/entitlements/management/commands/tests/test_expire_old_entitlements.py @@ -1,6 +1,6 @@ """Test Entitlements models""" -from __future__ import absolute_import + import mock from django.core.management import call_command diff --git a/common/djangoapps/entitlements/migrations/0001_initial.py b/common/djangoapps/entitlements/migrations/0001_initial.py index 0fd7abf927..51c2fb2d69 100644 --- a/common/djangoapps/entitlements/migrations/0001_initial.py +++ b/common/djangoapps/entitlements/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import uuid diff --git a/common/djangoapps/entitlements/migrations/0002_auto_20171102_0719.py b/common/djangoapps/entitlements/migrations/0002_auto_20171102_0719.py index 02c46b3cc4..6dfb5218da 100644 --- a/common/djangoapps/entitlements/migrations/0002_auto_20171102_0719.py +++ b/common/djangoapps/entitlements/migrations/0002_auto_20171102_0719.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/entitlements/migrations/0003_auto_20171205_1431.py b/common/djangoapps/entitlements/migrations/0003_auto_20171205_1431.py index 7a708c22df..af8cae0cc5 100644 --- a/common/djangoapps/entitlements/migrations/0003_auto_20171205_1431.py +++ b/common/djangoapps/entitlements/migrations/0003_auto_20171205_1431.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import datetime diff --git a/common/djangoapps/entitlements/migrations/0004_auto_20171206_1729.py b/common/djangoapps/entitlements/migrations/0004_auto_20171206_1729.py index 09dba6a695..81836f3ac3 100644 --- a/common/djangoapps/entitlements/migrations/0004_auto_20171206_1729.py +++ b/common/djangoapps/entitlements/migrations/0004_auto_20171206_1729.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import uuid diff --git a/common/djangoapps/entitlements/migrations/0005_courseentitlementsupportdetail.py b/common/djangoapps/entitlements/migrations/0005_courseentitlementsupportdetail.py index d21ca03472..8dfcb89a21 100644 --- a/common/djangoapps/entitlements/migrations/0005_courseentitlementsupportdetail.py +++ b/common/djangoapps/entitlements/migrations/0005_courseentitlementsupportdetail.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/common/djangoapps/entitlements/migrations/0006_courseentitlementsupportdetail_action.py b/common/djangoapps/entitlements/migrations/0006_courseentitlementsupportdetail_action.py index b401a07e11..a390465e48 100644 --- a/common/djangoapps/entitlements/migrations/0006_courseentitlementsupportdetail_action.py +++ b/common/djangoapps/entitlements/migrations/0006_courseentitlementsupportdetail_action.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/entitlements/migrations/0007_change_expiration_period_default.py b/common/djangoapps/entitlements/migrations/0007_change_expiration_period_default.py index 64af1f1b66..a32f5b691d 100644 --- a/common/djangoapps/entitlements/migrations/0007_change_expiration_period_default.py +++ b/common/djangoapps/entitlements/migrations/0007_change_expiration_period_default.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import datetime diff --git a/common/djangoapps/entitlements/migrations/0008_auto_20180328_1107.py b/common/djangoapps/entitlements/migrations/0008_auto_20180328_1107.py index 63783d8ecf..1733c64b40 100644 --- a/common/djangoapps/entitlements/migrations/0008_auto_20180328_1107.py +++ b/common/djangoapps/entitlements/migrations/0008_auto_20180328_1107.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/entitlements/migrations/0009_courseentitlement_refund_locked.py b/common/djangoapps/entitlements/migrations/0009_courseentitlement_refund_locked.py index 21b584cdcd..74ae85e059 100644 --- a/common/djangoapps/entitlements/migrations/0009_courseentitlement_refund_locked.py +++ b/common/djangoapps/entitlements/migrations/0009_courseentitlement_refund_locked.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-12 12:00 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/entitlements/migrations/0010_backfill_refund_lock.py b/common/djangoapps/entitlements/migrations/0010_backfill_refund_lock.py index 6adeeabb84..cacb7f8271 100644 --- a/common/djangoapps/entitlements/migrations/0010_backfill_refund_lock.py +++ b/common/djangoapps/entitlements/migrations/0010_backfill_refund_lock.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from datetime import datetime diff --git a/common/djangoapps/entitlements/migrations/0011_historicalcourseentitlement.py b/common/djangoapps/entitlements/migrations/0011_historicalcourseentitlement.py index cb606f7d8f..d39484af02 100644 --- a/common/djangoapps/entitlements/migrations/0011_historicalcourseentitlement.py +++ b/common/djangoapps/entitlements/migrations/0011_historicalcourseentitlement.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-30 21:13 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/common/djangoapps/entitlements/migrations/0012_allow_blank_order_number_values.py b/common/djangoapps/entitlements/migrations/0012_allow_blank_order_number_values.py index f902fa64b0..278b7d716f 100644 --- a/common/djangoapps/entitlements/migrations/0012_allow_blank_order_number_values.py +++ b/common/djangoapps/entitlements/migrations/0012_allow_blank_order_number_values.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-10-23 15:47 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/entitlements/migrations/0013_historicalcourseentitlementsupportdetail.py b/common/djangoapps/entitlements/migrations/0013_historicalcourseentitlementsupportdetail.py index 3c1f646c89..fddb220317 100644 --- a/common/djangoapps/entitlements/migrations/0013_historicalcourseentitlementsupportdetail.py +++ b/common/djangoapps/entitlements/migrations/0013_historicalcourseentitlementsupportdetail.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-12-17 14:08 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/common/djangoapps/entitlements/models.py b/common/djangoapps/entitlements/models.py index 2aa1d87372..844ec9bd9b 100644 --- a/common/djangoapps/entitlements/models.py +++ b/common/djangoapps/entitlements/models.py @@ -1,6 +1,6 @@ """Entitlement Models""" -from __future__ import absolute_import + import logging import uuid as uuid_tools diff --git a/common/djangoapps/entitlements/signals.py b/common/djangoapps/entitlements/signals.py index 77cf9d6fba..9beef439de 100644 --- a/common/djangoapps/entitlements/signals.py +++ b/common/djangoapps/entitlements/signals.py @@ -2,7 +2,7 @@ Entitlements related signal handlers. """ -from __future__ import absolute_import + from django.dispatch import receiver diff --git a/common/djangoapps/entitlements/tasks.py b/common/djangoapps/entitlements/tasks.py index 37e7c378f1..d70c8344e2 100644 --- a/common/djangoapps/entitlements/tasks.py +++ b/common/djangoapps/entitlements/tasks.py @@ -2,7 +2,7 @@ This file contains celery tasks for entitlements-related functionality. """ -from __future__ import absolute_import + from celery import task from celery.utils.log import get_task_logger diff --git a/common/djangoapps/entitlements/tests/factories.py b/common/djangoapps/entitlements/tests/factories.py index cd94e93f05..b3028db152 100644 --- a/common/djangoapps/entitlements/tests/factories.py +++ b/common/djangoapps/entitlements/tests/factories.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import string from uuid import uuid4 diff --git a/common/djangoapps/entitlements/tests/test_models.py b/common/djangoapps/entitlements/tests/test_models.py index b610b11586..319ca79f3f 100644 --- a/common/djangoapps/entitlements/tests/test_models.py +++ b/common/djangoapps/entitlements/tests/test_models.py @@ -1,6 +1,6 @@ """Test Entitlements models""" -from __future__ import absolute_import + import unittest from datetime import timedelta diff --git a/common/djangoapps/entitlements/tests/test_tasks.py b/common/djangoapps/entitlements/tests/test_tasks.py index dcec11dc29..58f6a77698 100644 --- a/common/djangoapps/entitlements/tests/test_tasks.py +++ b/common/djangoapps/entitlements/tests/test_tasks.py @@ -2,7 +2,7 @@ Test entitlements tasks """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/common/djangoapps/entitlements/tests/test_utils.py b/common/djangoapps/entitlements/tests/test_utils.py index aa8d190304..f3bd668d8e 100644 --- a/common/djangoapps/entitlements/tests/test_utils.py +++ b/common/djangoapps/entitlements/tests/test_utils.py @@ -2,7 +2,7 @@ Test entitlements utilities """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/common/djangoapps/entitlements/utils.py b/common/djangoapps/entitlements/utils.py index 597ffb0cea..6839bab687 100644 --- a/common/djangoapps/entitlements/utils.py +++ b/common/djangoapps/entitlements/utils.py @@ -2,7 +2,7 @@ Utility methods for the entitlement application. """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/pipeline_mako/__init__.py b/common/djangoapps/pipeline_mako/__init__.py index 082681939d..81a00b9427 100644 --- a/common/djangoapps/pipeline_mako/__init__.py +++ b/common/djangoapps/pipeline_mako/__init__.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from edxmako.shortcuts import render_to_string diff --git a/common/djangoapps/pipeline_mako/helpers/studiofrontend.py b/common/djangoapps/pipeline_mako/helpers/studiofrontend.py index 0b0b2f8fdc..dfdbb4b8ef 100644 --- a/common/djangoapps/pipeline_mako/helpers/studiofrontend.py +++ b/common/djangoapps/pipeline_mako/helpers/studiofrontend.py @@ -2,7 +2,7 @@ Contains code that gets run inside our mako template Debugging python-in-mako is terrible, so we've moved the actual code out to its own file """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/pipeline_mako/tests/test_render.py b/common/djangoapps/pipeline_mako/tests/test_render.py index e3a1d784ec..5ff9d2addb 100644 --- a/common/djangoapps/pipeline_mako/tests/test_render.py +++ b/common/djangoapps/pipeline_mako/tests/test_render.py @@ -1,6 +1,6 @@ """ Tests for rendering functions in the mako pipeline. """ -from __future__ import absolute_import + import ddt from mock import patch diff --git a/common/djangoapps/pipeline_mako/tests/test_static_content.py b/common/djangoapps/pipeline_mako/tests/test_static_content.py index dd2e1abf55..796ced76d9 100644 --- a/common/djangoapps/pipeline_mako/tests/test_static_content.py +++ b/common/djangoapps/pipeline_mako/tests/test_static_content.py @@ -2,7 +2,7 @@ Tests of pipeline_mako/templates/static_content.html """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index 84786835cf..9f64caf009 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import re diff --git a/common/djangoapps/static_replace/admin.py b/common/djangoapps/static_replace/admin.py index d93746d36f..a2ab7443cf 100644 --- a/common/djangoapps/static_replace/admin.py +++ b/common/djangoapps/static_replace/admin.py @@ -2,7 +2,7 @@ Django admin page for AssetBaseUrlConfig, which allows you to set the base URL that gets prepended to asset URLs in order to serve them from, say, a CDN. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py index cd407bde07..44edd4d2d7 100644 --- a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py +++ b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py @@ -2,7 +2,7 @@ Django management command to clear the 'staticfiles' Django cache """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand from django.core.cache import caches diff --git a/common/djangoapps/static_replace/migrations/0001_initial.py b/common/djangoapps/static_replace/migrations/0001_initial.py index 556bf1a921..875813fd7a 100644 --- a/common/djangoapps/static_replace/migrations/0001_initial.py +++ b/common/djangoapps/static_replace/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/static_replace/migrations/0002_assetexcludedextensionsconfig.py b/common/djangoapps/static_replace/migrations/0002_assetexcludedextensionsconfig.py index cdc86a805f..d086230002 100644 --- a/common/djangoapps/static_replace/migrations/0002_assetexcludedextensionsconfig.py +++ b/common/djangoapps/static_replace/migrations/0002_assetexcludedextensionsconfig.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/static_replace/models.py b/common/djangoapps/static_replace/models.py index 72d7887331..6af8216190 100644 --- a/common/djangoapps/static_replace/models.py +++ b/common/djangoapps/static_replace/models.py @@ -2,7 +2,7 @@ Models for static_replace """ -from __future__ import absolute_import + import six from six.moves import map diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index e49cbd81a7..5a4a954109 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for static_replace""" -from __future__ import absolute_import, print_function + import re from six import BytesIO diff --git a/common/djangoapps/status/migrations/0001_initial.py b/common/djangoapps/status/migrations/0001_initial.py index 4c98321a04..db71ab541e 100644 --- a/common/djangoapps/status/migrations/0001_initial.py +++ b/common/djangoapps/status/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/status/migrations/0002_update_help_text.py b/common/djangoapps/status/migrations/0002_update_help_text.py index 66098e2820..bc6425de55 100644 --- a/common/djangoapps/status/migrations/0002_update_help_text.py +++ b/common/djangoapps/status/migrations/0002_update_help_text.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/status/models.py b/common/djangoapps/status/models.py index 74b8db77ec..35c9a5e842 100644 --- a/common/djangoapps/status/models.py +++ b/common/djangoapps/status/models.py @@ -2,7 +2,7 @@ Store status messages in the database. """ -from __future__ import absolute_import + import six from config_models.admin import ConfigurationModelAdmin diff --git a/common/djangoapps/status/status.py b/common/djangoapps/status/status.py index 333be9e85d..7f48435e3a 100644 --- a/common/djangoapps/status/status.py +++ b/common/djangoapps/status/status.py @@ -2,7 +2,7 @@ A tiny app that checks for a status message. """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/status/tests.py b/common/djangoapps/status/tests.py index 0d3451f76c..5c21f03f5d 100644 --- a/common/djangoapps/status/tests.py +++ b/common/djangoapps/status/tests.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ Tests for setting and displaying the site status message. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/student/__init__.py b/common/djangoapps/student/__init__.py index fe279caa86..3ff722059e 100644 --- a/common/djangoapps/student/__init__.py +++ b/common/djangoapps/student/__init__.py @@ -1,7 +1,7 @@ """ Student app helpers and settings """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace diff --git a/common/djangoapps/student/admin.py b/common/djangoapps/student/admin.py index 1220c90a7d..2d536e749c 100644 --- a/common/djangoapps/student/admin.py +++ b/common/djangoapps/student/admin.py @@ -1,5 +1,5 @@ """ Django admin pages for student app """ -from __future__ import absolute_import + from functools import wraps diff --git a/common/djangoapps/student/apps.py b/common/djangoapps/student/apps.py index 4966cbb7b6..b884ebfbbb 100644 --- a/common/djangoapps/student/apps.py +++ b/common/djangoapps/student/apps.py @@ -1,7 +1,7 @@ """ Configuration for the ``student`` Django application. """ -from __future__ import absolute_import + import os diff --git a/common/djangoapps/student/auth.py b/common/djangoapps/student/auth.py index d2423d20d9..1215972b28 100644 --- a/common/djangoapps/student/auth.py +++ b/common/djangoapps/student/auth.py @@ -4,7 +4,7 @@ authorization has authorization to do so, which infers authorization via role hi (GlobalStaff is superset of auths of course instructor, ...), which consults the config to decide whether to check course creator role, and other such functions. """ -from __future__ import absolute_import + from ccx_keys.locator import CCXBlockUsageLocator, CCXLocator from django.conf import settings diff --git a/common/djangoapps/student/forms.py b/common/djangoapps/student/forms.py index 5ce5d019bf..dffe1a2a28 100644 --- a/common/djangoapps/student/forms.py +++ b/common/djangoapps/student/forms.py @@ -1,7 +1,7 @@ """ Utility functions for validating forms """ -from __future__ import absolute_import + import re from importlib import import_module diff --git a/common/djangoapps/student/helpers.py b/common/djangoapps/student/helpers.py index e84d440a4b..c4b55f6718 100644 --- a/common/djangoapps/student/helpers.py +++ b/common/djangoapps/student/helpers.py @@ -1,7 +1,7 @@ """ Helpers for the student app. """ -from __future__ import absolute_import + import json import logging diff --git a/common/djangoapps/student/management/commands/add_to_group.py b/common/djangoapps/student/management/commands/add_to_group.py index 00a8eaa887..01298f20a8 100644 --- a/common/djangoapps/student/management/commands/add_to_group.py +++ b/common/djangoapps/student/management/commands/add_to_group.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + from django.contrib.auth.models import Group, User from django.core.management.base import BaseCommand, CommandError diff --git a/common/djangoapps/student/management/commands/anonymized_id_mapping.py b/common/djangoapps/student/management/commands/anonymized_id_mapping.py index 11c518a6d8..8411401676 100644 --- a/common/djangoapps/student/management/commands/anonymized_id_mapping.py +++ b/common/djangoapps/student/management/commands/anonymized_id_mapping.py @@ -8,7 +8,7 @@ the following: ./manage.py lms anonymized_id_mapping COURSE_ID """ -from __future__ import absolute_import + import csv diff --git a/common/djangoapps/student/management/commands/assigngroups.py b/common/djangoapps/student/management/commands/assigngroups.py index e6b3d279bc..eda3ad5dcb 100644 --- a/common/djangoapps/student/management/commands/assigngroups.py +++ b/common/djangoapps/student/management/commands/assigngroups.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + import datetime import json diff --git a/common/djangoapps/student/management/commands/bulk_change_enrollment.py b/common/djangoapps/student/management/commands/bulk_change_enrollment.py index 7991cc6890..0c95dd8bca 100644 --- a/common/djangoapps/student/management/commands/bulk_change_enrollment.py +++ b/common/djangoapps/student/management/commands/bulk_change_enrollment.py @@ -1,5 +1,5 @@ """Management command to change many user enrollments at once.""" -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py b/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py index bd0e4a4270..c233784f06 100644 --- a/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py +++ b/common/djangoapps/student/management/commands/bulk_change_enrollment_csv.py @@ -2,7 +2,7 @@ Management command to change many user enrollments in many courses using csv file. """ -from __future__ import absolute_import + import csv import logging diff --git a/common/djangoapps/student/management/commands/bulk_unenroll.py b/common/djangoapps/student/management/commands/bulk_unenroll.py index 1412a0ba63..b1b4f87d83 100644 --- a/common/djangoapps/student/management/commands/bulk_unenroll.py +++ b/common/djangoapps/student/management/commands/bulk_unenroll.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/student/management/commands/cert_restriction.py b/common/djangoapps/student/management/commands/cert_restriction.py index e6479b7e7a..450665fff1 100644 --- a/common/djangoapps/student/management/commands/cert_restriction.py +++ b/common/djangoapps/student/management/commands/cert_restriction.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + import csv import os diff --git a/common/djangoapps/student/management/commands/change_eligibility_deadline.py b/common/djangoapps/student/management/commands/change_eligibility_deadline.py index 59ec1b9847..7cf381acf0 100644 --- a/common/djangoapps/student/management/commands/change_eligibility_deadline.py +++ b/common/djangoapps/student/management/commands/change_eligibility_deadline.py @@ -1,6 +1,6 @@ """ Command line script to change credit course eligibility deadline. """ -from __future__ import absolute_import + import logging from datetime import datetime, timedelta diff --git a/common/djangoapps/student/management/commands/change_enrollment.py b/common/djangoapps/student/management/commands/change_enrollment.py index 6cd5dd4f80..5b3e7a149e 100644 --- a/common/djangoapps/student/management/commands/change_enrollment.py +++ b/common/djangoapps/student/management/commands/change_enrollment.py @@ -1,6 +1,6 @@ """ Command line script to change user enrollments. """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/student/management/commands/change_enterprise_user_username.py b/common/djangoapps/student/management/commands/change_enterprise_user_username.py index b2fbfa8a14..017ddbd52a 100644 --- a/common/djangoapps/student/management/commands/change_enterprise_user_username.py +++ b/common/djangoapps/student/management/commands/change_enterprise_user_username.py @@ -2,7 +2,7 @@ """ Django management command for changing an enterprise user's username. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/common/djangoapps/student/management/commands/create_random_users.py b/common/djangoapps/student/management/commands/create_random_users.py index e3bfb38bd8..9dfab7976e 100644 --- a/common/djangoapps/student/management/commands/create_random_users.py +++ b/common/djangoapps/student/management/commands/create_random_users.py @@ -1,7 +1,7 @@ """ A script to create some dummy users """ -from __future__ import absolute_import, print_function + import uuid diff --git a/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py b/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py index 2393aa5d09..3fdc879f3a 100644 --- a/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py +++ b/common/djangoapps/student/management/commands/delete_historical_enrollment_data.py @@ -2,7 +2,7 @@ Command to delete all rows from the student_historicalcourseenrollment table. """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/student/management/commands/export_staff_users.py b/common/djangoapps/student/management/commands/export_staff_users.py index 964f1dc712..9abcb17d85 100644 --- a/common/djangoapps/student/management/commands/export_staff_users.py +++ b/common/djangoapps/student/management/commands/export_staff_users.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + import csv import logging diff --git a/common/djangoapps/student/management/commands/manage_group.py b/common/djangoapps/student/management/commands/manage_group.py index 59a70d7be8..6e4b0e5104 100644 --- a/common/djangoapps/student/management/commands/manage_group.py +++ b/common/djangoapps/student/management/commands/manage_group.py @@ -3,7 +3,7 @@ Management command `manage_group` is used to idempotently create Django groups and set their permissions by name. """ -from __future__ import absolute_import + from django.apps import apps from django.contrib.auth.models import Group, Permission diff --git a/common/djangoapps/student/management/commands/manage_user.py b/common/djangoapps/student/management/commands/manage_user.py index d1fd4684fe..4d1f36c58d 100644 --- a/common/djangoapps/student/management/commands/manage_user.py +++ b/common/djangoapps/student/management/commands/manage_user.py @@ -3,7 +3,7 @@ Management command `manage_user` is used to idempotently create or remove Django users, set/unset permission bits, and associate groups by name. """ -from __future__ import absolute_import + from django.contrib.auth import get_user_model from django.contrib.auth.hashers import is_password_usable diff --git a/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py b/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py index 1ea49a42c1..ff025428c9 100644 --- a/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py +++ b/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py @@ -1,7 +1,7 @@ """ Command to back-populate domain of the site the user account was created on. """ -from __future__ import absolute_import + import six from django.contrib.auth.models import User diff --git a/common/djangoapps/student/management/commands/set_staff.py b/common/djangoapps/student/management/commands/set_staff.py index e0f8492c40..9037df8a18 100644 --- a/common/djangoapps/student/management/commands/set_staff.py +++ b/common/djangoapps/student/management/commands/set_staff.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + import re diff --git a/common/djangoapps/student/management/commands/set_superuser.py b/common/djangoapps/student/management/commands/set_superuser.py index fd6845893d..389c366e49 100644 --- a/common/djangoapps/student/management/commands/set_superuser.py +++ b/common/djangoapps/student/management/commands/set_superuser.py @@ -1,5 +1,5 @@ """Management command to grant or revoke superuser access for one or more users""" -from __future__ import absolute_import, print_function + from django.contrib.auth.models import User from django.core.management.base import BaseCommand diff --git a/common/djangoapps/student/management/commands/transfer_students.py b/common/djangoapps/student/management/commands/transfer_students.py index d4472c221a..c152a4ecae 100644 --- a/common/djangoapps/student/management/commands/transfer_students.py +++ b/common/djangoapps/student/management/commands/transfer_students.py @@ -1,7 +1,7 @@ """ Transfer Student Management Command """ -from __future__ import absolute_import, print_function, unicode_literals + from textwrap import dedent diff --git a/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py b/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py index 53840cbddd..7f1bf9524b 100644 --- a/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py +++ b/common/djangoapps/student/management/tests/test_bulk_change_enrollment.py @@ -1,5 +1,5 @@ """Tests for the bulk_change_enrollment command.""" -from __future__ import absolute_import + import ddt from django.core.management import call_command diff --git a/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py b/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py index bff7a102e0..09b894383b 100644 --- a/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py +++ b/common/djangoapps/student/management/tests/test_bulk_change_enrollment_csv.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import six import unittest diff --git a/common/djangoapps/student/management/tests/test_bulk_unenroll.py b/common/djangoapps/student/management/tests/test_bulk_unenroll.py index 02ecc0da25..a755b9dbbf 100644 --- a/common/djangoapps/student/management/tests/test_bulk_unenroll.py +++ b/common/djangoapps/student/management/tests/test_bulk_unenroll.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import six diff --git a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py index 7eb0c4b791..f6274b1e48 100644 --- a/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py +++ b/common/djangoapps/student/management/tests/test_change_eligibility_deadline.py @@ -1,6 +1,6 @@ """ Test the change_eligibility_deadline command line script.""" -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/common/djangoapps/student/management/tests/test_change_enrollment.py b/common/djangoapps/student/management/tests/test_change_enrollment.py index 72f2c92970..c4a4689f15 100644 --- a/common/djangoapps/student/management/tests/test_change_enrollment.py +++ b/common/djangoapps/student/management/tests/test_change_enrollment.py @@ -1,6 +1,6 @@ """ Test the change_enrollment command line script.""" -from __future__ import absolute_import + import ddt from django.core.management import call_command diff --git a/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py b/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py index 17cc44ce80..6959a032a1 100644 --- a/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py +++ b/common/djangoapps/student/management/tests/test_change_enterprise_user_username.py @@ -2,7 +2,7 @@ """ Tests for the django management command `change_enterprise_user_username`. """ -from __future__ import absolute_import, unicode_literals + import mock from django.contrib.auth.models import User diff --git a/common/djangoapps/student/management/tests/test_create_random_users.py b/common/djangoapps/student/management/tests/test_create_random_users.py index fb7d009009..fdd1012464 100644 --- a/common/djangoapps/student/management/tests/test_create_random_users.py +++ b/common/djangoapps/student/management/tests/test_create_random_users.py @@ -2,7 +2,7 @@ Test the create_random_users command line script """ -from __future__ import absolute_import + import pytest from django.contrib.auth import get_user_model diff --git a/common/djangoapps/student/management/tests/test_manage_group.py b/common/djangoapps/student/management/tests/test_manage_group.py index eb480ab2f1..e92c896385 100644 --- a/common/djangoapps/student/management/tests/test_manage_group.py +++ b/common/djangoapps/student/management/tests/test_manage_group.py @@ -1,7 +1,7 @@ """ Unit tests for user_management management commands. """ -from __future__ import absolute_import + import sys diff --git a/common/djangoapps/student/management/tests/test_manage_user.py b/common/djangoapps/student/management/tests/test_manage_user.py index e19974022d..0298964d5b 100644 --- a/common/djangoapps/student/management/tests/test_manage_user.py +++ b/common/djangoapps/student/management/tests/test_manage_user.py @@ -1,7 +1,7 @@ """ Unit tests for user_management management commands. """ -from __future__ import absolute_import + import itertools diff --git a/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py b/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py index 9dc93840c5..1dc8854271 100644 --- a/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py +++ b/common/djangoapps/student/management/tests/test_populate_created_on_site_user_attribute.py @@ -1,7 +1,7 @@ """ Unittests for populate_created_on_site_user_attribute management command. """ -from __future__ import absolute_import + import ddt import mock diff --git a/common/djangoapps/student/management/tests/test_transfer_students.py b/common/djangoapps/student/management/tests/test_transfer_students.py index 1a06dc4556..ee055c1676 100644 --- a/common/djangoapps/student/management/tests/test_transfer_students.py +++ b/common/djangoapps/student/management/tests/test_transfer_students.py @@ -1,7 +1,7 @@ """ Tests the transfer student management command """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/student/message_types.py b/common/djangoapps/student/message_types.py index e9da1966f0..9feb19cfd4 100644 --- a/common/djangoapps/student/message_types.py +++ b/common/djangoapps/student/message_types.py @@ -2,7 +2,7 @@ ACE message types for the student module. """ -from __future__ import absolute_import + from openedx.core.djangoapps.ace_common.message import BaseMessageType diff --git a/common/djangoapps/student/middleware.py b/common/djangoapps/student/middleware.py index e56c36cd02..ca2a4eedf5 100644 --- a/common/djangoapps/student/middleware.py +++ b/common/djangoapps/student/middleware.py @@ -2,7 +2,7 @@ Middleware that checks user standing for the purpose of keeping users with disabled accounts from accessing the site. """ -from __future__ import absolute_import + from django.conf import settings from django.http import HttpResponseForbidden diff --git a/common/djangoapps/student/migrations/0001_initial.py b/common/djangoapps/student/migrations/0001_initial.py index f7aac2b787..fbb2de5736 100644 --- a/common/djangoapps/student/migrations/0001_initial.py +++ b/common/djangoapps/student/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/common/djangoapps/student/migrations/0002_auto_20151208_1034.py b/common/djangoapps/student/migrations/0002_auto_20151208_1034.py index f0d9d4c260..7c0a9519f4 100644 --- a/common/djangoapps/student/migrations/0002_auto_20151208_1034.py +++ b/common/djangoapps/student/migrations/0002_auto_20151208_1034.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0003_auto_20160516_0938.py b/common/djangoapps/student/migrations/0003_auto_20160516_0938.py index 4f64d33ccc..73b77a7261 100644 --- a/common/djangoapps/student/migrations/0003_auto_20160516_0938.py +++ b/common/djangoapps/student/migrations/0003_auto_20160516_0938.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/common/djangoapps/student/migrations/0004_auto_20160531_1422.py b/common/djangoapps/student/migrations/0004_auto_20160531_1422.py index 56213c6768..fc43adc288 100644 --- a/common/djangoapps/student/migrations/0004_auto_20160531_1422.py +++ b/common/djangoapps/student/migrations/0004_auto_20160531_1422.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0005_auto_20160531_1653.py b/common/djangoapps/student/migrations/0005_auto_20160531_1653.py index af58ad3489..afeea332db 100644 --- a/common/djangoapps/student/migrations/0005_auto_20160531_1653.py +++ b/common/djangoapps/student/migrations/0005_auto_20160531_1653.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0006_logoutviewconfiguration.py b/common/djangoapps/student/migrations/0006_logoutviewconfiguration.py index 5d82c572d9..e124c59d38 100644 --- a/common/djangoapps/student/migrations/0006_logoutviewconfiguration.py +++ b/common/djangoapps/student/migrations/0006_logoutviewconfiguration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/student/migrations/0007_registrationcookieconfiguration.py b/common/djangoapps/student/migrations/0007_registrationcookieconfiguration.py index ba99133e9c..7b491063c2 100644 --- a/common/djangoapps/student/migrations/0007_registrationcookieconfiguration.py +++ b/common/djangoapps/student/migrations/0007_registrationcookieconfiguration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/student/migrations/0008_auto_20161117_1209.py b/common/djangoapps/student/migrations/0008_auto_20161117_1209.py index d84651b254..37d0cac36c 100644 --- a/common/djangoapps/student/migrations/0008_auto_20161117_1209.py +++ b/common/djangoapps/student/migrations/0008_auto_20161117_1209.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0009_auto_20170111_0422.py b/common/djangoapps/student/migrations/0009_auto_20170111_0422.py index c709214f96..a093a4a108 100644 --- a/common/djangoapps/student/migrations/0009_auto_20170111_0422.py +++ b/common/djangoapps/student/migrations/0009_auto_20170111_0422.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0010_auto_20170207_0458.py b/common/djangoapps/student/migrations/0010_auto_20170207_0458.py index e2d896b687..7e67311af7 100644 --- a/common/djangoapps/student/migrations/0010_auto_20170207_0458.py +++ b/common/djangoapps/student/migrations/0010_auto_20170207_0458.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0011_course_key_field_to_foreign_key.py b/common/djangoapps/student/migrations/0011_course_key_field_to_foreign_key.py index de32f95a73..7c29455628 100644 --- a/common/djangoapps/student/migrations/0011_course_key_field_to_foreign_key.py +++ b/common/djangoapps/student/migrations/0011_course_key_field_to_foreign_key.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0012_sociallink.py b/common/djangoapps/student/migrations/0012_sociallink.py index 6bfd1dbd96..73e929d130 100644 --- a/common/djangoapps/student/migrations/0012_sociallink.py +++ b/common/djangoapps/student/migrations/0012_sociallink.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0013_delete_historical_enrollment_records.py b/common/djangoapps/student/migrations/0013_delete_historical_enrollment_records.py index 911400ce9d..9ad7793789 100644 --- a/common/djangoapps/student/migrations/0013_delete_historical_enrollment_records.py +++ b/common/djangoapps/student/migrations/0013_delete_historical_enrollment_records.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0014_courseenrollmentallowed_user.py b/common/djangoapps/student/migrations/0014_courseenrollmentallowed_user.py index e6b7ecc11a..261d810127 100644 --- a/common/djangoapps/student/migrations/0014_courseenrollmentallowed_user.py +++ b/common/djangoapps/student/migrations/0014_courseenrollmentallowed_user.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0015_manualenrollmentaudit_add_role.py b/common/djangoapps/student/migrations/0015_manualenrollmentaudit_add_role.py index 2eb319c70a..7d2c2c1dfc 100644 --- a/common/djangoapps/student/migrations/0015_manualenrollmentaudit_add_role.py +++ b/common/djangoapps/student/migrations/0015_manualenrollmentaudit_add_role.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0016_coursenrollment_course_on_delete_do_nothing.py b/common/djangoapps/student/migrations/0016_coursenrollment_course_on_delete_do_nothing.py index de7def41ba..b4dc388729 100644 --- a/common/djangoapps/student/migrations/0016_coursenrollment_course_on_delete_do_nothing.py +++ b/common/djangoapps/student/migrations/0016_coursenrollment_course_on_delete_do_nothing.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-27 01:44 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0017_accountrecovery.py b/common/djangoapps/student/migrations/0017_accountrecovery.py index eed5cf9f83..8b505462cd 100644 --- a/common/djangoapps/student/migrations/0017_accountrecovery.py +++ b/common/djangoapps/student/migrations/0017_accountrecovery.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-10 12:15 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/student/migrations/0018_remove_password_history.py b/common/djangoapps/student/migrations/0018_remove_password_history.py index faac12cf84..9a232f6124 100644 --- a/common/djangoapps/student/migrations/0018_remove_password_history.py +++ b/common/djangoapps/student/migrations/0018_remove_password_history.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-19 14:30 -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/common/djangoapps/student/migrations/0019_auto_20181221_0540.py b/common/djangoapps/student/migrations/0019_auto_20181221_0540.py index e7e2b14d6c..efe99de60d 100644 --- a/common/djangoapps/student/migrations/0019_auto_20181221_0540.py +++ b/common/djangoapps/student/migrations/0019_auto_20181221_0540.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-21 10:40 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/student/migrations/0020_auto_20190227_2019.py b/common/djangoapps/student/migrations/0020_auto_20190227_2019.py index 7be3ae7fbc..c670436c63 100644 --- a/common/djangoapps/student/migrations/0020_auto_20190227_2019.py +++ b/common/djangoapps/student/migrations/0020_auto_20190227_2019.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-02-27 20:19 -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/common/djangoapps/student/migrations/0021_historicalcourseenrollment.py b/common/djangoapps/student/migrations/0021_historicalcourseenrollment.py index 8436060d82..6871558dc1 100644 --- a/common/djangoapps/student/migrations/0021_historicalcourseenrollment.py +++ b/common/djangoapps/student/migrations/0021_historicalcourseenrollment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-25 20:18 -from __future__ import absolute_import, unicode_literals + import uuid diff --git a/common/djangoapps/student/migrations/0022_indexing_in_courseenrollment.py b/common/djangoapps/student/migrations/0022_indexing_in_courseenrollment.py index c4a9065ef2..5a17f586fd 100644 --- a/common/djangoapps/student/migrations/0022_indexing_in_courseenrollment.py +++ b/common/djangoapps/student/migrations/0022_indexing_in_courseenrollment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-06-24 19:01 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/student/migrations/0023_bulkunenrollconfiguration.py b/common/djangoapps/student/migrations/0023_bulkunenrollconfiguration.py index 2e551f5978..476fa1b7aa 100644 --- a/common/djangoapps/student/migrations/0023_bulkunenrollconfiguration.py +++ b/common/djangoapps/student/migrations/0023_bulkunenrollconfiguration.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2019-09-19 19:51 -from __future__ import unicode_literals + from django.conf import settings import django.core.validators diff --git a/common/djangoapps/student/migrations/0024_fbeenrollmentexclusion.py b/common/djangoapps/student/migrations/0024_fbeenrollmentexclusion.py index 2ac84ced8a..8448dad173 100644 --- a/common/djangoapps/student/migrations/0024_fbeenrollmentexclusion.py +++ b/common/djangoapps/student/migrations/0024_fbeenrollmentexclusion.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-11-01 15:56 -from __future__ import unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/common/djangoapps/student/migrations/0025_auto_20191101_1846.py b/common/djangoapps/student/migrations/0025_auto_20191101_1846.py index 1bbfc0d683..5c82594324 100644 --- a/common/djangoapps/student/migrations/0025_auto_20191101_1846.py +++ b/common/djangoapps/student/migrations/0025_auto_20191101_1846.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-11-01 18:46 -from __future__ import unicode_literals + from django.db import migrations diff --git a/common/djangoapps/student/migrations/0026_allowedauthuser.py b/common/djangoapps/student/migrations/0026_allowedauthuser.py index e3238dafb4..4c88e0e424 100644 --- a/common/djangoapps/student/migrations/0026_allowedauthuser.py +++ b/common/djangoapps/student/migrations/0026_allowedauthuser.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-11-14 14:12 -from __future__ import unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py b/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py index 77caab9e59..51afefac8a 100644 --- a/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py +++ b/common/djangoapps/student/migrations/0027_courseenrollment_mode_callable_default.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-19 13:06 -from __future__ import unicode_literals + import course_modes.models from django.db import migrations, models diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 1795d1f127..6df0f65647 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -10,7 +10,7 @@ file and check it in at the same time as your model changes. To do that, 2. ./manage.py lms schemamigration student --auto description_of_your_change 3. Add the migration file created in edx-platform/common/djangoapps/student/migrations/ """ -from __future__ import absolute_import, print_function + import hashlib import json diff --git a/common/djangoapps/student/role_helpers.py b/common/djangoapps/student/role_helpers.py index 22b277ffee..b5c5ac1058 100644 --- a/common/djangoapps/student/role_helpers.py +++ b/common/djangoapps/student/role_helpers.py @@ -1,7 +1,7 @@ """ Helpers for student roles """ -from __future__ import absolute_import + from openedx.core.djangoapps.django_comment_common.models import ( FORUM_ROLE_ADMINISTRATOR, diff --git a/common/djangoapps/student/roles.py b/common/djangoapps/student/roles.py index 498d0a6ce0..eb347a92e1 100644 --- a/common/djangoapps/student/roles.py +++ b/common/djangoapps/student/roles.py @@ -3,7 +3,7 @@ Classes used to model the roles used in the courseware. Each role is responsible adding users, removing users, and listing members """ -from __future__ import absolute_import + import logging from abc import ABCMeta, abstractmethod diff --git a/common/djangoapps/student/signals/__init__.py b/common/djangoapps/student/signals/__init__.py index 0c2df31a2d..e46b9a3acc 100644 --- a/common/djangoapps/student/signals/__init__.py +++ b/common/djangoapps/student/signals/__init__.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from student.signals.signals import ( ENROLL_STATUS_CHANGE, diff --git a/common/djangoapps/student/signals/receivers.py b/common/djangoapps/student/signals/receivers.py index 6cc9f1a90f..4e943b5fbe 100644 --- a/common/djangoapps/student/signals/receivers.py +++ b/common/djangoapps/student/signals/receivers.py @@ -1,7 +1,7 @@ """ Signal receivers for the "student" application. """ -from __future__ import absolute_import + from django.conf import settings from django.utils import timezone diff --git a/common/djangoapps/student/signals/signals.py b/common/djangoapps/student/signals/signals.py index 9c8cfd1c9f..bd40a31244 100644 --- a/common/djangoapps/student/signals/signals.py +++ b/common/djangoapps/student/signals/signals.py @@ -1,7 +1,7 @@ """ Enrollment track related signals. """ -from __future__ import absolute_import + from django.dispatch import Signal diff --git a/common/djangoapps/student/tasks.py b/common/djangoapps/student/tasks.py index 419ad550d0..022cbf417c 100644 --- a/common/djangoapps/student/tasks.py +++ b/common/djangoapps/student/tasks.py @@ -1,7 +1,7 @@ """ This file contains celery tasks for sending email """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/student/tests/factories.py b/common/djangoapps/student/tests/factories.py index d948e9ec92..66817b13db 100644 --- a/common/djangoapps/student/tests/factories.py +++ b/common/djangoapps/student/tests/factories.py @@ -1,6 +1,6 @@ """Provides factories for student models.""" -from __future__ import absolute_import + from datetime import datetime from uuid import uuid4 diff --git a/common/djangoapps/student/tests/test_activate_account.py b/common/djangoapps/student/tests/test_activate_account.py index 53953b5cfb..82481051e3 100644 --- a/common/djangoapps/student/tests/test_activate_account.py +++ b/common/djangoapps/student/tests/test_activate_account.py @@ -1,5 +1,5 @@ """Tests for account activation""" -from __future__ import absolute_import + import unittest from uuid import uuid4 diff --git a/common/djangoapps/student/tests/test_admin_views.py b/common/djangoapps/student/tests/test_admin_views.py index 8158ae25a1..7a5f363b3e 100644 --- a/common/djangoapps/student/tests/test_admin_views.py +++ b/common/djangoapps/student/tests/test_admin_views.py @@ -2,7 +2,7 @@ """ Tests student admin.py """ -from __future__ import absolute_import + import datetime diff --git a/common/djangoapps/student/tests/test_authz.py b/common/djangoapps/student/tests/test_authz.py index a214b344c8..858536e0ff 100644 --- a/common/djangoapps/student/tests/test_authz.py +++ b/common/djangoapps/student/tests/test_authz.py @@ -1,7 +1,7 @@ """ Tests authz.py """ -from __future__ import absolute_import + import mock from ccx_keys.locator import CCXLocator diff --git a/common/djangoapps/student/tests/test_bulk_email_settings.py b/common/djangoapps/student/tests/test_bulk_email_settings.py index f6a008a423..add91927fb 100644 --- a/common/djangoapps/student/tests/test_bulk_email_settings.py +++ b/common/djangoapps/student/tests/test_bulk_email_settings.py @@ -4,7 +4,7 @@ that bulk email is always disabled for non-Mongo backed courses, regardless of email feature flag, and that the view is conditionally available when Course Auth is turned on. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/student/tests/test_certificates.py b/common/djangoapps/student/tests/test_certificates.py index 5a8dd39876..e643ffb2bf 100644 --- a/common/djangoapps/student/tests/test_certificates.py +++ b/common/djangoapps/student/tests/test_certificates.py @@ -1,6 +1,6 @@ """Tests for display of certificates on the student dashboard. """ -from __future__ import absolute_import + import datetime import unittest diff --git a/common/djangoapps/student/tests/test_configuration_overrides.py b/common/djangoapps/student/tests/test_configuration_overrides.py index 7ee394dabe..0e43043fd9 100644 --- a/common/djangoapps/student/tests/test_configuration_overrides.py +++ b/common/djangoapps/student/tests/test_configuration_overrides.py @@ -1,7 +1,7 @@ """ Test for user creation from sites with configuration overrides. """ -from __future__ import absolute_import + import json diff --git a/common/djangoapps/student/tests/test_course_listing.py b/common/djangoapps/student/tests/test_course_listing.py index be9b13a8fb..67c340b13c 100644 --- a/common/djangoapps/student/tests/test_course_listing.py +++ b/common/djangoapps/student/tests/test_course_listing.py @@ -2,7 +2,7 @@ Unit tests for getting the list of courses for a user through iterating all courses and by reversing group name formats. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/student/tests/test_credit.py b/common/djangoapps/student/tests/test_credit.py index b68af88e7a..6c81125b47 100644 --- a/common/djangoapps/student/tests/test_credit.py +++ b/common/djangoapps/student/tests/test_credit.py @@ -1,7 +1,7 @@ """ Tests for credit courses on the student dashboard. """ -from __future__ import absolute_import + import datetime import unittest diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py index 95f5af6881..35c995dbe2 100644 --- a/common/djangoapps/student/tests/test_email.py +++ b/common/djangoapps/student/tests/test_email.py @@ -1,5 +1,5 @@ # coding=utf-8 -from __future__ import absolute_import + import json import unittest diff --git a/common/djangoapps/student/tests/test_enrollment.py b/common/djangoapps/student/tests/test_enrollment.py index 46bf5664cf..da63d5a063 100644 --- a/common/djangoapps/student/tests/test_enrollment.py +++ b/common/djangoapps/student/tests/test_enrollment.py @@ -1,7 +1,7 @@ """ Tests for student enrollment. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/student/tests/test_events.py b/common/djangoapps/student/tests/test_events.py index 4145ffc487..9df66a40da 100644 --- a/common/djangoapps/student/tests/test_events.py +++ b/common/djangoapps/student/tests/test_events.py @@ -2,7 +2,7 @@ """ Test that various events are fired for models in the student app. """ -from __future__ import absolute_import + import mock from django.db.utils import IntegrityError diff --git a/common/djangoapps/student/tests/test_helpers.py b/common/djangoapps/student/tests/test_helpers.py index 83d6911f03..bcb8dcbf83 100644 --- a/common/djangoapps/student/tests/test_helpers.py +++ b/common/djangoapps/student/tests/test_helpers.py @@ -1,6 +1,6 @@ """ Test Student helpers """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/student/tests/test_linkedin.py b/common/djangoapps/student/tests/test_linkedin.py index a4a675ca5d..bd30ad4417 100644 --- a/common/djangoapps/student/tests/test_linkedin.py +++ b/common/djangoapps/student/tests/test_linkedin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for LinkedIn Add to Profile configuration. """ -from __future__ import absolute_import + import ddt from django.conf import settings diff --git a/common/djangoapps/student/tests/test_long_username_email.py b/common/djangoapps/student/tests/test_long_username_email.py index aba7ffc68b..fc44221618 100644 --- a/common/djangoapps/student/tests/test_long_username_email.py +++ b/common/djangoapps/student/tests/test_long_username_email.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import + import json diff --git a/common/djangoapps/student/tests/test_models.py b/common/djangoapps/student/tests/test_models.py index d57c5a2286..549893e7d5 100644 --- a/common/djangoapps/student/tests/test_models.py +++ b/common/djangoapps/student/tests/test_models.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import datetime import hashlib diff --git a/common/djangoapps/student/tests/test_parental_controls.py b/common/djangoapps/student/tests/test_parental_controls.py index 94531d6c0c..858608e1c5 100644 --- a/common/djangoapps/student/tests/test_parental_controls.py +++ b/common/djangoapps/student/tests/test_parental_controls.py @@ -1,6 +1,6 @@ """Unit tests for parental controls.""" -from __future__ import absolute_import + import datetime diff --git a/common/djangoapps/student/tests/test_password_policy.py b/common/djangoapps/student/tests/test_password_policy.py index 6432cd79a7..ecada06f1c 100644 --- a/common/djangoapps/student/tests/test_password_policy.py +++ b/common/djangoapps/student/tests/test_password_policy.py @@ -2,7 +2,7 @@ """ This test file will verify proper password policy enforcement, which is an option feature """ -from __future__ import absolute_import + import json diff --git a/common/djangoapps/student/tests/test_recent_enrollments.py b/common/djangoapps/student/tests/test_recent_enrollments.py index d1d4f2d825..e1fecb58ac 100644 --- a/common/djangoapps/student/tests/test_recent_enrollments.py +++ b/common/djangoapps/student/tests/test_recent_enrollments.py @@ -1,7 +1,7 @@ """ Tests for the recently enrolled messaging within the Dashboard. """ -from __future__ import absolute_import + import datetime import unittest diff --git a/common/djangoapps/student/tests/test_refunds.py b/common/djangoapps/student/tests/test_refunds.py index 67de106610..2cd3fbdafe 100644 --- a/common/djangoapps/student/tests/test_refunds.py +++ b/common/djangoapps/student/tests/test_refunds.py @@ -1,7 +1,7 @@ """ Tests for enrollment refund capabilities. """ -from __future__ import absolute_import + import logging import unittest diff --git a/common/djangoapps/student/tests/test_retirement.py b/common/djangoapps/student/tests/test_retirement.py index d09b624a9b..b24a226b35 100644 --- a/common/djangoapps/student/tests/test_retirement.py +++ b/common/djangoapps/student/tests/test_retirement.py @@ -1,7 +1,7 @@ """ Test user retirement methods """ -from __future__ import absolute_import + import json diff --git a/common/djangoapps/student/tests/test_roles.py b/common/djangoapps/student/tests/test_roles.py index db029afc82..46f1bc3f0e 100644 --- a/common/djangoapps/student/tests/test_roles.py +++ b/common/djangoapps/student/tests/test_roles.py @@ -1,7 +1,7 @@ """ Tests of student.roles """ -from __future__ import absolute_import + import ddt import six diff --git a/common/djangoapps/student/tests/test_tasks.py b/common/djangoapps/student/tests/test_tasks.py index bbebedc629..265a48f041 100644 --- a/common/djangoapps/student/tests/test_tasks.py +++ b/common/djangoapps/student/tests/test_tasks.py @@ -2,7 +2,7 @@ Tests for the Sending activation email celery tasks """ -from __future__ import absolute_import + import mock from django.conf import settings diff --git a/common/djangoapps/student/tests/test_user_profile_properties.py b/common/djangoapps/student/tests/test_user_profile_properties.py index 9b9a4214e3..1cd08b7426 100644 --- a/common/djangoapps/student/tests/test_user_profile_properties.py +++ b/common/djangoapps/student/tests/test_user_profile_properties.py @@ -1,6 +1,6 @@ """Unit tests for custom UserProfile properties.""" -from __future__ import absolute_import + import datetime diff --git a/common/djangoapps/student/tests/test_userstanding.py b/common/djangoapps/student/tests/test_userstanding.py index c428706b2c..0e1f5df5f4 100644 --- a/common/djangoapps/student/tests/test_userstanding.py +++ b/common/djangoapps/student/tests/test_userstanding.py @@ -2,7 +2,7 @@ These are tests for disabling and enabling student accounts, and for making sure that students with disabled accounts are unable to access the courseware. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/student/tests/test_verification_status.py b/common/djangoapps/student/tests/test_verification_status.py index 1fa20feb63..576a6455c4 100644 --- a/common/djangoapps/student/tests/test_verification_status.py +++ b/common/djangoapps/student/tests/test_verification_status.py @@ -1,5 +1,5 @@ """Tests for per-course verification status on the dashboard. """ -from __future__ import absolute_import + import unittest from datetime import datetime, timedelta diff --git a/common/djangoapps/student/tests/test_views.py b/common/djangoapps/student/tests/test_views.py index dec1487604..3ed70bb587 100644 --- a/common/djangoapps/student/tests/test_views.py +++ b/common/djangoapps/student/tests/test_views.py @@ -1,7 +1,7 @@ """ Test the student dashboard view. """ -from __future__ import absolute_import + import itertools import json diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index 1640e0f0a1..ff32ac2865 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -2,7 +2,7 @@ """ Miscellaneous tests for the student app. """ -from __future__ import absolute_import + import logging import unittest diff --git a/common/djangoapps/student/text_me_the_app.py b/common/djangoapps/student/text_me_the_app.py index 91be75bfc7..956fa4fde7 100644 --- a/common/djangoapps/student/text_me_the_app.py +++ b/common/djangoapps/student/text_me_the_app.py @@ -1,7 +1,7 @@ """ Fragment for rendering text me the app. """ -from __future__ import absolute_import + from django.template.loader import render_to_string from web_fragments.fragment import Fragment diff --git a/common/djangoapps/student/urls.py b/common/djangoapps/student/urls.py index f124535554..973ece9fbd 100644 --- a/common/djangoapps/student/urls.py +++ b/common/djangoapps/student/urls.py @@ -2,7 +2,7 @@ URLs for student app """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/student/views/__init__.py b/common/djangoapps/student/views/__init__.py index 1b3ed1fe6e..d5d5933ab4 100644 --- a/common/djangoapps/student/views/__init__.py +++ b/common/djangoapps/student/views/__init__.py @@ -2,7 +2,7 @@ Combines all of the broken out student views """ -from __future__ import absolute_import + from .dashboard import * # pylint: disable=wildcard-import from .management import * # pylint: disable=wildcard-import diff --git a/common/djangoapps/student/views/dashboard.py b/common/djangoapps/student/views/dashboard.py index 8b8ebcded8..7088b6d49a 100644 --- a/common/djangoapps/student/views/dashboard.py +++ b/common/djangoapps/student/views/dashboard.py @@ -2,7 +2,7 @@ Dashboard view and supporting methods """ -from __future__ import absolute_import + import datetime import logging diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index bd94854b20..c1f09b6f73 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -2,7 +2,7 @@ Student Views """ -from __future__ import absolute_import + import datetime import logging diff --git a/common/djangoapps/terrain/stubs/catalog.py b/common/djangoapps/terrain/stubs/catalog.py index 543db6ec7a..7ec477a6c0 100644 --- a/common/djangoapps/terrain/stubs/catalog.py +++ b/common/djangoapps/terrain/stubs/catalog.py @@ -2,7 +2,7 @@ Stub implementation of catalog service for acceptance tests """ # pylint: disable=invalid-name, missing-docstring -from __future__ import absolute_import + import re diff --git a/common/djangoapps/terrain/stubs/comments.py b/common/djangoapps/terrain/stubs/comments.py index 2f35500dfa..191c046ef0 100644 --- a/common/djangoapps/terrain/stubs/comments.py +++ b/common/djangoapps/terrain/stubs/comments.py @@ -2,7 +2,7 @@ Stub implementation of cs_comments_service for acceptance tests """ -from __future__ import absolute_import + import re from collections import OrderedDict diff --git a/common/djangoapps/terrain/stubs/ecommerce.py b/common/djangoapps/terrain/stubs/ecommerce.py index 35c86fee31..c0c2e44b69 100644 --- a/common/djangoapps/terrain/stubs/ecommerce.py +++ b/common/djangoapps/terrain/stubs/ecommerce.py @@ -2,7 +2,7 @@ Stub implementation of ecommerce service for acceptance tests """ -from __future__ import absolute_import + import re diff --git a/common/djangoapps/terrain/stubs/edxnotes.py b/common/djangoapps/terrain/stubs/edxnotes.py index 08c1d60d78..8820f3407b 100644 --- a/common/djangoapps/terrain/stubs/edxnotes.py +++ b/common/djangoapps/terrain/stubs/edxnotes.py @@ -2,7 +2,7 @@ Stub implementation of EdxNotes for acceptance tests """ -from __future__ import absolute_import + import json import re diff --git a/common/djangoapps/terrain/stubs/http.py b/common/djangoapps/terrain/stubs/http.py index b99c62bdc0..5ca4e820ed 100644 --- a/common/djangoapps/terrain/stubs/http.py +++ b/common/djangoapps/terrain/stubs/http.py @@ -2,7 +2,7 @@ Stub implementation of an HTTP service. """ -from __future__ import absolute_import + import json import threading diff --git a/common/djangoapps/terrain/stubs/lti.py b/common/djangoapps/terrain/stubs/lti.py index f562991124..27b1c51e5a 100644 --- a/common/djangoapps/terrain/stubs/lti.py +++ b/common/djangoapps/terrain/stubs/lti.py @@ -9,7 +9,7 @@ not possible to have this LTI multiple times on a single page in LMS. """ -from __future__ import absolute_import + import base64 import hashlib diff --git a/common/djangoapps/terrain/stubs/start.py b/common/djangoapps/terrain/stubs/start.py index 7827379240..6b05cdc665 100644 --- a/common/djangoapps/terrain/stubs/start.py +++ b/common/djangoapps/terrain/stubs/start.py @@ -1,7 +1,7 @@ """ Command-line utility to start a stub service. """ -from __future__ import absolute_import, print_function + import logging import sys diff --git a/common/djangoapps/terrain/stubs/tests/test_edxnotes.py b/common/djangoapps/terrain/stubs/tests/test_edxnotes.py index de9f744bd7..3e4c83a481 100644 --- a/common/djangoapps/terrain/stubs/tests/test_edxnotes.py +++ b/common/djangoapps/terrain/stubs/tests/test_edxnotes.py @@ -1,7 +1,7 @@ """ Unit tests for stub EdxNotes implementation. """ -from __future__ import absolute_import + import json import unittest diff --git a/common/djangoapps/terrain/stubs/tests/test_http.py b/common/djangoapps/terrain/stubs/tests/test_http.py index f9ab9be06f..4d6ba12023 100644 --- a/common/djangoapps/terrain/stubs/tests/test_http.py +++ b/common/djangoapps/terrain/stubs/tests/test_http.py @@ -2,7 +2,7 @@ Unit tests for stub HTTP server base class. """ -from __future__ import absolute_import + import json import unittest diff --git a/common/djangoapps/terrain/stubs/tests/test_lti_stub.py b/common/djangoapps/terrain/stubs/tests/test_lti_stub.py index 90c2fa2c55..fad5394ceb 100644 --- a/common/djangoapps/terrain/stubs/tests/test_lti_stub.py +++ b/common/djangoapps/terrain/stubs/tests/test_lti_stub.py @@ -1,7 +1,7 @@ """ Unit tests for stub LTI implementation. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/terrain/stubs/tests/test_video.py b/common/djangoapps/terrain/stubs/tests/test_video.py index 7729f59c74..8f2be6d600 100644 --- a/common/djangoapps/terrain/stubs/tests/test_video.py +++ b/common/djangoapps/terrain/stubs/tests/test_video.py @@ -1,7 +1,7 @@ """ Unit tests for Video stub server implementation. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py index 7ea72955f3..b792c04a83 100644 --- a/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py +++ b/common/djangoapps/terrain/stubs/tests/test_xqueue_stub.py @@ -2,7 +2,7 @@ Unit tests for stub XQueue implementation. """ -from __future__ import absolute_import + import ast import json diff --git a/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py b/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py index ce8da2cd69..bb7f9dd745 100644 --- a/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py +++ b/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py @@ -2,7 +2,7 @@ Unit test for stub YouTube implementation. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/terrain/stubs/video_source.py b/common/djangoapps/terrain/stubs/video_source.py index 144ce616e3..ef253da826 100644 --- a/common/djangoapps/terrain/stubs/video_source.py +++ b/common/djangoapps/terrain/stubs/video_source.py @@ -1,7 +1,7 @@ """ Serve HTML5 video sources for acceptance tests """ -from __future__ import absolute_import + import os from contextlib import contextmanager diff --git a/common/djangoapps/terrain/stubs/xqueue.py b/common/djangoapps/terrain/stubs/xqueue.py index ae535e1814..433e180798 100644 --- a/common/djangoapps/terrain/stubs/xqueue.py +++ b/common/djangoapps/terrain/stubs/xqueue.py @@ -9,7 +9,7 @@ Configuration values: If no grade response is configured, a default response will be returned. """ -from __future__ import absolute_import + import copy import json diff --git a/common/djangoapps/terrain/stubs/youtube.py b/common/djangoapps/terrain/stubs/youtube.py index 0cb447ce4c..ff7e474048 100644 --- a/common/djangoapps/terrain/stubs/youtube.py +++ b/common/djangoapps/terrain/stubs/youtube.py @@ -16,7 +16,7 @@ To start this stub server on its own from Vagrant: 3.) Locally, try accessing http://localhost:8031/ and see that you get "Unused url" message inside the browser. """ -from __future__ import absolute_import + import json import time diff --git a/common/djangoapps/third_party_auth/__init__.py b/common/djangoapps/third_party_auth/__init__.py index f44e3f91a8..56de1c60cd 100644 --- a/common/djangoapps/third_party_auth/__init__.py +++ b/common/djangoapps/third_party_auth/__init__.py @@ -1,6 +1,6 @@ """Third party authentication. """ -from __future__ import absolute_import + from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers diff --git a/common/djangoapps/third_party_auth/admin.py b/common/djangoapps/third_party_auth/admin.py index f3fd379244..6ec3ce73b0 100644 --- a/common/djangoapps/third_party_auth/admin.py +++ b/common/djangoapps/third_party_auth/admin.py @@ -2,7 +2,7 @@ """ Admin site configuration for third party authentication """ -from __future__ import absolute_import + from config_models.admin import KeyedConfigurationModelAdmin from django import forms diff --git a/common/djangoapps/third_party_auth/api/permissions.py b/common/djangoapps/third_party_auth/api/permissions.py index 757a04385d..d6aa96095d 100644 --- a/common/djangoapps/third_party_auth/api/permissions.py +++ b/common/djangoapps/third_party_auth/api/permissions.py @@ -1,7 +1,7 @@ """ Third party auth API related permissions """ -from __future__ import absolute_import + from rest_framework import permissions diff --git a/common/djangoapps/third_party_auth/api/serializers.py b/common/djangoapps/third_party_auth/api/serializers.py index 245381199c..bcbb737a81 100644 --- a/common/djangoapps/third_party_auth/api/serializers.py +++ b/common/djangoapps/third_party_auth/api/serializers.py @@ -1,6 +1,6 @@ """ Django REST Framework Serializers """ -from __future__ import absolute_import + from rest_framework import serializers diff --git a/common/djangoapps/third_party_auth/api/tests/test_permissions.py b/common/djangoapps/third_party_auth/api/tests/test_permissions.py index 0e3d0c4378..2eab86196b 100644 --- a/common/djangoapps/third_party_auth/api/tests/test_permissions.py +++ b/common/djangoapps/third_party_auth/api/tests/test_permissions.py @@ -1,7 +1,7 @@ """ Tests for the Third Party Auth permissions """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/api/tests/test_views.py b/common/djangoapps/third_party_auth/api/tests/test_views.py index 3ce1433544..06974c87c3 100644 --- a/common/djangoapps/third_party_auth/api/tests/test_views.py +++ b/common/djangoapps/third_party_auth/api/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the Third Party Auth REST API """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/api/urls.py b/common/djangoapps/third_party_auth/api/urls.py index c4da48933c..642a86a904 100644 --- a/common/djangoapps/third_party_auth/api/urls.py +++ b/common/djangoapps/third_party_auth/api/urls.py @@ -1,6 +1,6 @@ """ URL configuration for the third party auth API """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/third_party_auth/api/views.py b/common/djangoapps/third_party_auth/api/views.py index 5c2f8e9696..e5c21627f7 100644 --- a/common/djangoapps/third_party_auth/api/views.py +++ b/common/djangoapps/third_party_auth/api/views.py @@ -2,7 +2,7 @@ Third Party Auth REST API views """ -from __future__ import absolute_import + from collections import namedtuple diff --git a/common/djangoapps/third_party_auth/apps.py b/common/djangoapps/third_party_auth/apps.py index 054f7b60cb..d05a19217c 100644 --- a/common/djangoapps/third_party_auth/apps.py +++ b/common/djangoapps/third_party_auth/apps.py @@ -1,5 +1,5 @@ -from __future__ import absolute_import + from django.apps import AppConfig from django.conf import settings diff --git a/common/djangoapps/third_party_auth/decorators.py b/common/djangoapps/third_party_auth/decorators.py index d568afc030..59d909f3c9 100644 --- a/common/djangoapps/third_party_auth/decorators.py +++ b/common/djangoapps/third_party_auth/decorators.py @@ -1,7 +1,7 @@ """ Decorators that can be used to interact with third_party_auth. """ -from __future__ import absolute_import + from functools import wraps diff --git a/common/djangoapps/third_party_auth/dummy.py b/common/djangoapps/third_party_auth/dummy.py index 69c50b99c0..8103b20a5b 100644 --- a/common/djangoapps/third_party_auth/dummy.py +++ b/common/djangoapps/third_party_auth/dummy.py @@ -1,7 +1,7 @@ """ DummyBackend: A fake Third Party Auth provider for testing & development purposes. """ -from __future__ import absolute_import + from social_core.backends.oauth import BaseOAuth2 from social_core.exceptions import AuthFailed diff --git a/common/djangoapps/third_party_auth/exceptions.py b/common/djangoapps/third_party_auth/exceptions.py index 4c7b71846b..21b5d877d0 100644 --- a/common/djangoapps/third_party_auth/exceptions.py +++ b/common/djangoapps/third_party_auth/exceptions.py @@ -1,7 +1,7 @@ """ Exceptions for SAML Authentication. """ -from __future__ import absolute_import + from social_core.exceptions import AuthException diff --git a/common/djangoapps/third_party_auth/lti.py b/common/djangoapps/third_party_auth/lti.py index 3408880533..05c0d71a5e 100644 --- a/common/djangoapps/third_party_auth/lti.py +++ b/common/djangoapps/third_party_auth/lti.py @@ -1,7 +1,7 @@ """ Third-party-auth module for Learning Tools Interoperability """ -from __future__ import absolute_import + import calendar import logging diff --git a/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py b/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py index 145a56c2ff..1cee572d43 100644 --- a/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py +++ b/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py @@ -2,7 +2,7 @@ Management command to remove social auth users. Intended for use in masters integration sandboxes to allow partners reset users and enrollment data. """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/third_party_auth/management/commands/saml.py b/common/djangoapps/third_party_auth/management/commands/saml.py index f9ae148cea..108a993f32 100644 --- a/common/djangoapps/third_party_auth/management/commands/saml.py +++ b/common/djangoapps/third_party_auth/management/commands/saml.py @@ -2,7 +2,7 @@ """ Management commands for third_party_auth """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py b/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py index 0358a3edec..b1e43671fc 100644 --- a/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py +++ b/common/djangoapps/third_party_auth/management/commands/tests/test_remove_social_auth_users.py @@ -1,7 +1,7 @@ """ Tests for `remove_social_auth_users` management command """ -from __future__ import absolute_import + import sys import unittest diff --git a/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py b/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py index c471277f88..6b9502f973 100644 --- a/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py +++ b/common/djangoapps/third_party_auth/management/commands/tests/test_saml.py @@ -2,7 +2,7 @@ Tests for `saml` management command, this command fetches saml metadata from providers and updates existing data accordingly. """ -from __future__ import absolute_import + import os import unittest diff --git a/common/djangoapps/third_party_auth/middleware.py b/common/djangoapps/third_party_auth/middleware.py index 5484d87f5e..b680055c30 100644 --- a/common/djangoapps/third_party_auth/middleware.py +++ b/common/djangoapps/third_party_auth/middleware.py @@ -1,6 +1,6 @@ """Middleware classes for third_party_auth.""" -from __future__ import absolute_import + import six.moves.urllib.parse # pylint: disable=import-error from django.contrib import messages diff --git a/common/djangoapps/third_party_auth/migrations/0001_initial.py b/common/djangoapps/third_party_auth/migrations/0001_initial.py index 5ee28dddd1..a17702582d 100644 --- a/common/djangoapps/third_party_auth/migrations/0001_initial.py +++ b/common/djangoapps/third_party_auth/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import provider.utils diff --git a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py b/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py index 1132e13d43..ebba1d5f48 100644 --- a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py +++ b/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py b/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py index 883987e9a5..6bf63df1b7 100644 --- a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py +++ b/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py b/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py index 0372bb2d9f..f0e33046a8 100644 --- a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py +++ b/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py b/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py index 60b36b05b0..6769985545 100644 --- a/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py +++ b/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py b/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py index cec7ee64e5..4fc4162190 100644 --- a/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py +++ b/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py b/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py index f8e934db0f..7c40df3209 100644 --- a/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py +++ b/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py b/common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py index 37d615b969..c87311006e 100644 --- a/common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py +++ b/common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py b/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py index acc8776fa3..17199777e6 100644 --- a/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py +++ b/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py b/common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py index ed324e0182..a743b09864 100644 --- a/common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py +++ b/common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py b/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py index b2c809035a..06b6228bcb 100644 --- a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py +++ b/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py b/common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py index ac34eac9f5..54ffbf471d 100644 --- a/common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py +++ b/common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py b/common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py index a233d9a458..69114da8e7 100644 --- a/common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py +++ b/common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py b/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py index e5c144f25b..5012470c86 100644 --- a/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py +++ b/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py b/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py index 70f10344cf..04be00ff6e 100644 --- a/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py +++ b/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py b/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py index 6251a6f0b8..3dfd854729 100644 --- a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py +++ b/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py b/common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py index ab698f6be8..830fdcd257 100644 --- a/common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py +++ b/common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-01-30 17:38 -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py b/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py index 0406ea6a4a..c8577e36ae 100644 --- a/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py +++ b/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py b/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py index 65ccb41860..8db0edf7e0 100644 --- a/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py +++ b/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py @@ -2,7 +2,7 @@ """ Custom migration script to add slug field to all ProviderConfig models. """ -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from django.utils.text import slugify diff --git a/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py b/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py index 132f173b69..e11c41c2ca 100644 --- a/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py +++ b/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-10 13:57 -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py b/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py index f067ca8e8b..dc0d64215d 100644 --- a/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py +++ b/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-11 15:33 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py b/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py index 3b3b143ce9..03baff9843 100644 --- a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py +++ b/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-10-12 07:07 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py b/common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py index 0a54536a1d..3a3e66c0e6 100644 --- a/common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py +++ b/common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-18 20:33 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py b/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py index a25ab8047a..71d0fe50ac 100644 --- a/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py +++ b/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-20 20:13 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index 6f2608a85e..58d8725f65 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -3,7 +3,7 @@ Models used to implement SAML SSO support in third_party_auth (inlcuding Shibboleth support) """ -from __future__ import absolute_import + import json import logging diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index c3a17d642f..bcc35727b7 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -57,7 +57,7 @@ rather than spreading them across two functions in the pipeline. See https://python-social-auth.readthedocs.io/en/latest/pipeline.html for more docs. """ -from __future__ import absolute_import + import base64 import hashlib diff --git a/common/djangoapps/third_party_auth/provider.py b/common/djangoapps/third_party_auth/provider.py index ded07b0352..c2a95e3483 100644 --- a/common/djangoapps/third_party_auth/provider.py +++ b/common/djangoapps/third_party_auth/provider.py @@ -1,7 +1,7 @@ """ Third-party auth provider configuration API. """ -from __future__ import absolute_import + from django.contrib.sites.models import Site diff --git a/common/djangoapps/third_party_auth/saml.py b/common/djangoapps/third_party_auth/saml.py index ff03f27bf5..4835327015 100644 --- a/common/djangoapps/third_party_auth/saml.py +++ b/common/djangoapps/third_party_auth/saml.py @@ -1,7 +1,7 @@ """ Slightly customized python-social-auth backend for SAML 2.0 support """ -from __future__ import absolute_import + import logging from copy import deepcopy diff --git a/common/djangoapps/third_party_auth/settings.py b/common/djangoapps/third_party_auth/settings.py index aee8467278..f43c188952 100644 --- a/common/djangoapps/third_party_auth/settings.py +++ b/common/djangoapps/third_party_auth/settings.py @@ -10,7 +10,7 @@ If true, it: b) calls apply_settings(), passing in the Django settings """ -from __future__ import absolute_import + from django.conf import settings from openedx.features.enterprise_support.api import insert_enterprise_pipeline_elements diff --git a/common/djangoapps/third_party_auth/strategy.py b/common/djangoapps/third_party_auth/strategy.py index 1947d056a6..a7d72ad0e4 100644 --- a/common/djangoapps/third_party_auth/strategy.py +++ b/common/djangoapps/third_party_auth/strategy.py @@ -3,7 +3,7 @@ A custom Strategy for python-social-auth that allows us to fetch configuration f ConfigurationModels rather than django.settings """ -from __future__ import absolute_import + from social_core.backends.oauth import OAuthAuth from social_django.strategy import DjangoStrategy diff --git a/common/djangoapps/third_party_auth/tasks.py b/common/djangoapps/third_party_auth/tasks.py index 62d06661cd..a8b83e97dc 100644 --- a/common/djangoapps/third_party_auth/tasks.py +++ b/common/djangoapps/third_party_auth/tasks.py @@ -3,7 +3,7 @@ Code to manage fetching and storing the metadata of IdPs. """ -from __future__ import absolute_import + import datetime import logging diff --git a/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py b/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py index 7100dc9d3f..690535b4b5 100644 --- a/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py +++ b/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py @@ -1,6 +1,6 @@ """Mock data for SAMLIdentityProvider""" -from __future__ import absolute_import + from social_core.backends.saml import OID_MAIL, OID_GIVEN_NAME, OID_SURNAME, OID_COMMON_NAME, OID_USERID diff --git a/common/djangoapps/third_party_auth/tests/factories.py b/common/djangoapps/third_party_auth/tests/factories.py index f47cb48fc8..0c09e94cb9 100644 --- a/common/djangoapps/third_party_auth/tests/factories.py +++ b/common/djangoapps/third_party_auth/tests/factories.py @@ -1,7 +1,7 @@ """ Provides factories for third_party_auth models. """ -from __future__ import absolute_import + from factory import SubFactory from factory.django import DjangoModelFactory diff --git a/common/djangoapps/third_party_auth/tests/specs/base.py b/common/djangoapps/third_party_auth/tests/specs/base.py index 610eb185c7..4686e3ab13 100644 --- a/common/djangoapps/third_party_auth/tests/specs/base.py +++ b/common/djangoapps/third_party_auth/tests/specs/base.py @@ -1,7 +1,7 @@ """ Base integration test for provider implementations. """ -from __future__ import absolute_import + import json import unittest diff --git a/common/djangoapps/third_party_auth/tests/specs/test_azuread.py b/common/djangoapps/third_party_auth/tests/specs/test_azuread.py index b3d807a2ae..096621508b 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_azuread.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_azuread.py @@ -1,5 +1,5 @@ """Integration tests for Azure Active Directory / Microsoft Account provider.""" -from __future__ import absolute_import + from third_party_auth.tests.specs import base diff --git a/common/djangoapps/third_party_auth/tests/specs/test_generic.py b/common/djangoapps/third_party_auth/tests/specs/test_generic.py index b0c7cb3968..f8a89a0924 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_generic.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_generic.py @@ -1,7 +1,7 @@ """ Use the 'Dummy' auth provider for generic integration tests of third_party_auth. """ -from __future__ import absolute_import + import unittest from third_party_auth.tests import testutil diff --git a/common/djangoapps/third_party_auth/tests/specs/test_google.py b/common/djangoapps/third_party_auth/tests/specs/test_google.py index 89bab97df7..7b28056c4d 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_google.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_google.py @@ -1,5 +1,5 @@ """Integration tests for Google providers.""" -from __future__ import absolute_import + import base64 import hashlib diff --git a/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py b/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py index 091471657d..83b4552e8b 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py @@ -1,5 +1,5 @@ """Integration tests for LinkedIn providers.""" -from __future__ import absolute_import + from third_party_auth.tests.specs import base diff --git a/common/djangoapps/third_party_auth/tests/specs/test_lti.py b/common/djangoapps/third_party_auth/tests/specs/test_lti.py index 9063b8e6fe..19493cbdff 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_lti.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_lti.py @@ -1,7 +1,7 @@ """ Integration tests for third_party_auth LTI auth providers """ -from __future__ import absolute_import + import unittest from django.conf import settings diff --git a/common/djangoapps/third_party_auth/tests/specs/test_testshib.py b/common/djangoapps/third_party_auth/tests/specs/test_testshib.py index 8db09783c9..be47b9cfd3 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_testshib.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_testshib.py @@ -1,7 +1,7 @@ """ Third_party_auth integration tests using a mock version of the TestShib provider """ -from __future__ import absolute_import + import datetime import json diff --git a/common/djangoapps/third_party_auth/tests/specs/test_twitter.py b/common/djangoapps/third_party_auth/tests/specs/test_twitter.py index 3522fd8e90..55b6cf194c 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_twitter.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_twitter.py @@ -1,7 +1,7 @@ """ Separate integration test for Twitter which is an OAuth1 provider. """ -from __future__ import absolute_import + from mock import patch from third_party_auth.tests.specs import base diff --git a/common/djangoapps/third_party_auth/tests/test_admin.py b/common/djangoapps/third_party_auth/tests/test_admin.py index dd5985da44..a0f0d0eb34 100644 --- a/common/djangoapps/third_party_auth/tests/test_admin.py +++ b/common/djangoapps/third_party_auth/tests/test_admin.py @@ -1,7 +1,7 @@ """ Tests third_party_auth admin views """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_decorators.py b/common/djangoapps/third_party_auth/tests/test_decorators.py index c6a9962334..db573a7830 100644 --- a/common/djangoapps/third_party_auth/tests/test_decorators.py +++ b/common/djangoapps/third_party_auth/tests/test_decorators.py @@ -1,7 +1,7 @@ """ Tests for third_party_auth decorators. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_lti.py b/common/djangoapps/third_party_auth/tests/test_lti.py index 202a471018..0a3190057f 100644 --- a/common/djangoapps/third_party_auth/tests/test_lti.py +++ b/common/djangoapps/third_party_auth/tests/test_lti.py @@ -2,7 +2,7 @@ Unit tests for third_party_auth LTI auth providers """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_middleware.py b/common/djangoapps/third_party_auth/tests/test_middleware.py index 8a3558beb5..f9c1d8c0a6 100644 --- a/common/djangoapps/third_party_auth/tests/test_middleware.py +++ b/common/djangoapps/third_party_auth/tests/test_middleware.py @@ -1,7 +1,7 @@ """ Tests for third party auth middleware """ -from __future__ import absolute_import + import mock from django.contrib.messages.middleware import MessageMiddleware diff --git a/common/djangoapps/third_party_auth/tests/test_pipeline.py b/common/djangoapps/third_party_auth/tests/test_pipeline.py index a3250a0aa6..b5d6e1daed 100644 --- a/common/djangoapps/third_party_auth/tests/test_pipeline.py +++ b/common/djangoapps/third_party_auth/tests/test_pipeline.py @@ -1,6 +1,6 @@ """Unit tests for third_party_auth/pipeline.py.""" -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py b/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py index 55f570c85e..3982f5328e 100644 --- a/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py +++ b/common/djangoapps/third_party_auth/tests/test_pipeline_integration.py @@ -1,6 +1,6 @@ """Integration tests for pipeline.py.""" -from __future__ import absolute_import + import datetime import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_provider.py b/common/djangoapps/third_party_auth/tests/test_provider.py index c9749b937f..a7900e54fa 100644 --- a/common/djangoapps/third_party_auth/tests/test_provider.py +++ b/common/djangoapps/third_party_auth/tests/test_provider.py @@ -1,6 +1,6 @@ """Unit tests for provider.py.""" -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_saml.py b/common/djangoapps/third_party_auth/tests/test_saml.py index 69fc7ad587..cf0d89c872 100644 --- a/common/djangoapps/third_party_auth/tests/test_saml.py +++ b/common/djangoapps/third_party_auth/tests/test_saml.py @@ -2,7 +2,7 @@ Unit tests for third_party_auth SAML auth providers """ -from __future__ import absolute_import + import mock diff --git a/common/djangoapps/third_party_auth/tests/test_settings.py b/common/djangoapps/third_party_auth/tests/test_settings.py index e442280d39..e0484345ba 100644 --- a/common/djangoapps/third_party_auth/tests/test_settings.py +++ b/common/djangoapps/third_party_auth/tests/test_settings.py @@ -1,6 +1,6 @@ """Unit tests for settings.py.""" -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_utils.py b/common/djangoapps/third_party_auth/tests/test_utils.py index 7eef060940..c0e21f1b47 100644 --- a/common/djangoapps/third_party_auth/tests/test_utils.py +++ b/common/djangoapps/third_party_auth/tests/test_utils.py @@ -1,7 +1,7 @@ """ Tests for third_party_auth utility functions. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/test_views.py b/common/djangoapps/third_party_auth/tests/test_views.py index ada67255da..6051f97225 100644 --- a/common/djangoapps/third_party_auth/tests/test_views.py +++ b/common/djangoapps/third_party_auth/tests/test_views.py @@ -2,7 +2,7 @@ Test the views served by third_party_auth. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/third_party_auth/tests/testutil.py b/common/djangoapps/third_party_auth/tests/testutil.py index bff9d13282..dd66e550ed 100644 --- a/common/djangoapps/third_party_auth/tests/testutil.py +++ b/common/djangoapps/third_party_auth/tests/testutil.py @@ -4,7 +4,7 @@ Utilities for writing third_party_auth tests. Used by Django and non-Django tests; must not have Django deps. """ -from __future__ import absolute_import + import os.path from contextlib import contextmanager diff --git a/common/djangoapps/third_party_auth/tests/utils.py b/common/djangoapps/third_party_auth/tests/utils.py index 47b8bb5173..0fe7f77945 100644 --- a/common/djangoapps/third_party_auth/tests/utils.py +++ b/common/djangoapps/third_party_auth/tests/utils.py @@ -1,5 +1,5 @@ """Common utility for testing third party oauth2 features.""" -from __future__ import absolute_import + import json from base64 import b64encode diff --git a/common/djangoapps/third_party_auth/urls.py b/common/djangoapps/third_party_auth/urls.py index 9b0fec5a58..88ab33e85f 100644 --- a/common/djangoapps/third_party_auth/urls.py +++ b/common/djangoapps/third_party_auth/urls.py @@ -1,6 +1,6 @@ """Url configuration for the auth module.""" -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/common/djangoapps/third_party_auth/utils.py b/common/djangoapps/third_party_auth/utils.py index 6b4e2e23b7..614c46f565 100644 --- a/common/djangoapps/third_party_auth/utils.py +++ b/common/djangoapps/third_party_auth/utils.py @@ -2,7 +2,7 @@ Utility functions for third_party_auth """ -from __future__ import absolute_import + from django.contrib.auth.models import User diff --git a/common/djangoapps/third_party_auth/views.py b/common/djangoapps/third_party_auth/views.py index 438e8ec016..f1d0d306b9 100644 --- a/common/djangoapps/third_party_auth/views.py +++ b/common/djangoapps/third_party_auth/views.py @@ -1,7 +1,7 @@ """ Extra views required for SSO """ -from __future__ import absolute_import + from django.conf import settings from django.http import Http404, HttpResponse, HttpResponseNotAllowed, HttpResponseNotFound, HttpResponseServerError diff --git a/common/djangoapps/track/admin.py b/common/djangoapps/track/admin.py index a0a3b20c6a..8406dd8ec7 100644 --- a/common/djangoapps/track/admin.py +++ b/common/djangoapps/track/admin.py @@ -2,7 +2,7 @@ django admin pages for courseware model ''' -from __future__ import absolute_import + from django.contrib import admin diff --git a/common/djangoapps/track/backends/__init__.py b/common/djangoapps/track/backends/__init__.py index d7b04f646f..5adb2d00ee 100644 --- a/common/djangoapps/track/backends/__init__.py +++ b/common/djangoapps/track/backends/__init__.py @@ -6,7 +6,7 @@ backends. """ -from __future__ import absolute_import + import abc diff --git a/common/djangoapps/track/backends/django.py b/common/djangoapps/track/backends/django.py index 83acfdfb50..4dffd586de 100644 --- a/common/djangoapps/track/backends/django.py +++ b/common/djangoapps/track/backends/django.py @@ -7,7 +7,7 @@ Event tracker backend that saves events to a Django database. # brought here for legacy support. It should be updated when the # schema changes or eventually deprecated. -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/track/backends/logger.py b/common/djangoapps/track/backends/logger.py index 6d212138c4..eecb81743b 100644 --- a/common/djangoapps/track/backends/logger.py +++ b/common/djangoapps/track/backends/logger.py @@ -1,6 +1,6 @@ """Event tracker backend that saves events to a python logger.""" -from __future__ import absolute_import + import json import logging diff --git a/common/djangoapps/track/backends/mongodb.py b/common/djangoapps/track/backends/mongodb.py index 6ac938658d..2cec2557b2 100644 --- a/common/djangoapps/track/backends/mongodb.py +++ b/common/djangoapps/track/backends/mongodb.py @@ -1,6 +1,6 @@ """MongoDB event tracker backend.""" -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/track/backends/tests/test_django.py b/common/djangoapps/track/backends/tests/test_django.py index 2fdda41297..dac6368c5e 100644 --- a/common/djangoapps/track/backends/tests/test_django.py +++ b/common/djangoapps/track/backends/tests/test_django.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django.test import TestCase diff --git a/common/djangoapps/track/backends/tests/test_logger.py b/common/djangoapps/track/backends/tests/test_logger.py index aa7e908541..0e8564ea60 100644 --- a/common/djangoapps/track/backends/tests/test_logger.py +++ b/common/djangoapps/track/backends/tests/test_logger.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for Event tracker backend.""" -from __future__ import absolute_import + import datetime import json diff --git a/common/djangoapps/track/backends/tests/test_mongodb.py b/common/djangoapps/track/backends/tests/test_mongodb.py index c7e8297bb5..a73b06e013 100644 --- a/common/djangoapps/track/backends/tests/test_mongodb.py +++ b/common/djangoapps/track/backends/tests/test_mongodb.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django.test import TestCase from mock import patch diff --git a/common/djangoapps/track/contexts.py b/common/djangoapps/track/contexts.py index 2f110de3e2..8c0f1df663 100644 --- a/common/djangoapps/track/contexts.py +++ b/common/djangoapps/track/contexts.py @@ -1,5 +1,5 @@ """Generates common contexts""" -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/track/event_transaction_utils.py b/common/djangoapps/track/event_transaction_utils.py index 5a7d0938e9..3d5a0050e6 100644 --- a/common/djangoapps/track/event_transaction_utils.py +++ b/common/djangoapps/track/event_transaction_utils.py @@ -2,7 +2,7 @@ Helper functions to access and update the id and type used in event tracking. """ -from __future__ import absolute_import + from uuid import UUID, uuid4 diff --git a/common/djangoapps/track/management/commands/tracked_dummy_command.py b/common/djangoapps/track/management/commands/tracked_dummy_command.py index 092ad30d3b..a1d6d2ceb4 100644 --- a/common/djangoapps/track/management/commands/tracked_dummy_command.py +++ b/common/djangoapps/track/management/commands/tracked_dummy_command.py @@ -2,7 +2,7 @@ Command used for testing TrackedCommands """ -from __future__ import absolute_import + import json from textwrap import dedent diff --git a/common/djangoapps/track/management/tests/test_tracked_command.py b/common/djangoapps/track/management/tests/test_tracked_command.py index 11d722ac53..b4ad260866 100644 --- a/common/djangoapps/track/management/tests/test_tracked_command.py +++ b/common/djangoapps/track/management/tests/test_tracked_command.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import json from six import StringIO diff --git a/common/djangoapps/track/management/tracked_command.py b/common/djangoapps/track/management/tracked_command.py index 28b3a4302c..54f06f89a3 100644 --- a/common/djangoapps/track/management/tracked_command.py +++ b/common/djangoapps/track/management/tracked_command.py @@ -1,6 +1,6 @@ """Provides management command calling info to tracking context.""" -from __future__ import absolute_import + from django.core.management.base import BaseCommand from eventtracking import tracker diff --git a/common/djangoapps/track/middleware.py b/common/djangoapps/track/middleware.py index 77cfda2650..4c3135edbf 100644 --- a/common/djangoapps/track/middleware.py +++ b/common/djangoapps/track/middleware.py @@ -6,7 +6,7 @@ framework. """ -from __future__ import absolute_import + import hashlib import hmac diff --git a/common/djangoapps/track/migrations/0001_initial.py b/common/djangoapps/track/migrations/0001_initial.py index 82563b9336..69f38bb08a 100644 --- a/common/djangoapps/track/migrations/0001_initial.py +++ b/common/djangoapps/track/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/track/models.py b/common/djangoapps/track/models.py index c4fbb76c2a..0aad04eaac 100644 --- a/common/djangoapps/track/models.py +++ b/common/djangoapps/track/models.py @@ -1,4 +1,4 @@ # pylint: disable=unused-import, missing-docstring -from __future__ import absolute_import + from track.backends.django import TrackingLog diff --git a/common/djangoapps/track/segment.py b/common/djangoapps/track/segment.py index 3a010d99ca..9bcbf6ffae 100644 --- a/common/djangoapps/track/segment.py +++ b/common/djangoapps/track/segment.py @@ -8,7 +8,7 @@ required by server-side events. To use, call "from track import segment", then call segment.track() or segment.identify(). """ -from __future__ import absolute_import + import analytics from django.conf import settings diff --git a/common/djangoapps/track/shim.py b/common/djangoapps/track/shim.py index b4446bff43..a402163e3f 100644 --- a/common/djangoapps/track/shim.py +++ b/common/djangoapps/track/shim.py @@ -1,6 +1,6 @@ """Map new event context values to old top-level field values. Ensures events can be parsed by legacy parsers.""" -from __future__ import absolute_import + import json diff --git a/common/djangoapps/track/tests/__init__.py b/common/djangoapps/track/tests/__init__.py index 787c05d751..386f8dd8e6 100644 --- a/common/djangoapps/track/tests/__init__.py +++ b/common/djangoapps/track/tests/__init__.py @@ -1,6 +1,6 @@ """Helpers for tests related to emitting events to the tracking logs.""" -from __future__ import absolute_import + from datetime import datetime diff --git a/common/djangoapps/track/tests/test_contexts.py b/common/djangoapps/track/tests/test_contexts.py index 584a6fe82b..6b5bcf8fb2 100644 --- a/common/djangoapps/track/tests/test_contexts.py +++ b/common/djangoapps/track/tests/test_contexts.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from unittest import TestCase diff --git a/common/djangoapps/track/tests/test_logs.py b/common/djangoapps/track/tests/test_logs.py index 5711ee136c..87c8af2bb9 100644 --- a/common/djangoapps/track/tests/test_logs.py +++ b/common/djangoapps/track/tests/test_logs.py @@ -1,5 +1,5 @@ """Tests that tracking data are successfully logged""" -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/track/tests/test_middleware.py b/common/djangoapps/track/tests/test_middleware.py index 8fe672324b..3f3b823b04 100644 --- a/common/djangoapps/track/tests/test_middleware.py +++ b/common/djangoapps/track/tests/test_middleware.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for tracking middleware.""" -from __future__ import absolute_import + import ddt import six diff --git a/common/djangoapps/track/tests/test_segment.py b/common/djangoapps/track/tests/test_segment.py index 2c8ecd2dfe..87b309fbb6 100644 --- a/common/djangoapps/track/tests/test_segment.py +++ b/common/djangoapps/track/tests/test_segment.py @@ -1,6 +1,6 @@ """Ensure emitted events contain the fields legacy processors expect to find.""" -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/common/djangoapps/track/tests/test_shim.py b/common/djangoapps/track/tests/test_shim.py index 245b233810..fb7679a866 100644 --- a/common/djangoapps/track/tests/test_shim.py +++ b/common/djangoapps/track/tests/test_shim.py @@ -1,6 +1,6 @@ """Ensure emitted events contain the fields legacy processors expect to find.""" -from __future__ import absolute_import + from collections import namedtuple diff --git a/common/djangoapps/track/tests/test_tracker.py b/common/djangoapps/track/tests/test_tracker.py index e3c91d8e3c..77b3afc87c 100644 --- a/common/djangoapps/track/tests/test_tracker.py +++ b/common/djangoapps/track/tests/test_tracker.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django.conf import settings from django.test import TestCase diff --git a/common/djangoapps/track/tests/test_util.py b/common/djangoapps/track/tests/test_util.py index 93a84a81b3..a543acbadf 100644 --- a/common/djangoapps/track/tests/test_util.py +++ b/common/djangoapps/track/tests/test_util.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import json from datetime import datetime diff --git a/common/djangoapps/track/tracker.py b/common/djangoapps/track/tracker.py index 42ea290972..444c5556b0 100644 --- a/common/djangoapps/track/tracker.py +++ b/common/djangoapps/track/tracker.py @@ -18,7 +18,7 @@ below:: """ -from __future__ import absolute_import + import inspect from importlib import import_module diff --git a/common/djangoapps/track/transformers.py b/common/djangoapps/track/transformers.py index 634a93cca6..3c1d667cb9 100644 --- a/common/djangoapps/track/transformers.py +++ b/common/djangoapps/track/transformers.py @@ -5,7 +5,7 @@ by name (or name prefix) in the EventTransformerRegistry, which is used to apply them to the appropriate events. """ -from __future__ import absolute_import + import json import logging diff --git a/common/djangoapps/track/urls.py b/common/djangoapps/track/urls.py index e014c198aa..093f0df560 100644 --- a/common/djangoapps/track/urls.py +++ b/common/djangoapps/track/urls.py @@ -2,7 +2,7 @@ URLs for track app """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/common/djangoapps/track/utils.py b/common/djangoapps/track/utils.py index 8a6c42aea9..c49b132281 100644 --- a/common/djangoapps/track/utils.py +++ b/common/djangoapps/track/utils.py @@ -1,6 +1,6 @@ """Utility functions and classes for track backends""" -from __future__ import absolute_import + import json from datetime import date, datetime diff --git a/common/djangoapps/track/views/__init__.py b/common/djangoapps/track/views/__init__.py index d36a3d8eca..ddfced0723 100644 --- a/common/djangoapps/track/views/__init__.py +++ b/common/djangoapps/track/views/__init__.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import datetime import json diff --git a/common/djangoapps/track/views/segmentio.py b/common/djangoapps/track/views/segmentio.py index a4101a43e1..df1946f258 100644 --- a/common/djangoapps/track/views/segmentio.py +++ b/common/djangoapps/track/views/segmentio.py @@ -1,6 +1,6 @@ """Handle events that were forwarded from the Segment webhook integration""" -from __future__ import absolute_import + import json import logging diff --git a/common/djangoapps/track/views/tests/base.py b/common/djangoapps/track/views/tests/base.py index a385d99512..eda0fd6d37 100644 --- a/common/djangoapps/track/views/tests/base.py +++ b/common/djangoapps/track/views/tests/base.py @@ -2,7 +2,7 @@ Base class for tests related to emitted events to one of the tracking 'views' (e.g. SegmentIO). """ -from __future__ import absolute_import + import json diff --git a/common/djangoapps/track/views/tests/test_segmentio.py b/common/djangoapps/track/views/tests/test_segmentio.py index c67d9b1a95..6150fa3049 100644 --- a/common/djangoapps/track/views/tests/test_segmentio.py +++ b/common/djangoapps/track/views/tests/test_segmentio.py @@ -1,5 +1,5 @@ """Ensure we can parse events sent to us from the Segment webhook integration""" -from __future__ import absolute_import + import json diff --git a/common/djangoapps/track/views/tests/test_views.py b/common/djangoapps/track/views/tests/test_views.py index a715d6cc5b..99ce27fc0e 100644 --- a/common/djangoapps/track/views/tests/test_views.py +++ b/common/djangoapps/track/views/tests/test_views.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring,maybe-no-member -from __future__ import absolute_import + import ddt import six diff --git a/common/djangoapps/util/admin.py b/common/djangoapps/util/admin.py index 70352fcdef..634c0daaaf 100644 --- a/common/djangoapps/util/admin.py +++ b/common/djangoapps/util/admin.py @@ -1,6 +1,6 @@ """Admin interface for the util app. """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/common/djangoapps/util/cache.py b/common/djangoapps/util/cache.py index 9dee55828f..37bd03a439 100644 --- a/common/djangoapps/util/cache.py +++ b/common/djangoapps/util/cache.py @@ -5,7 +5,7 @@ invalidation. Import these instead of django.core.cache. Note that 'default' is being preserved for user session caching, which we're not migrating so as not to inconvenience users by logging them all out. """ -from __future__ import absolute_import + from functools import wraps diff --git a/common/djangoapps/util/config_parse.py b/common/djangoapps/util/config_parse.py index d89a16efc5..dd39539c77 100644 --- a/common/djangoapps/util/config_parse.py +++ b/common/djangoapps/util/config_parse.py @@ -1,7 +1,7 @@ """ Helper functions for configuration parsing """ -from __future__ import absolute_import + import collections diff --git a/common/djangoapps/util/course.py b/common/djangoapps/util/course.py index 1c738746fb..a7a491c675 100644 --- a/common/djangoapps/util/course.py +++ b/common/djangoapps/util/course.py @@ -1,7 +1,7 @@ """ Utility methods related to course """ -from __future__ import absolute_import + import logging diff --git a/common/djangoapps/util/date_utils.py b/common/djangoapps/util/date_utils.py index 96cbb66e08..1446b207fe 100644 --- a/common/djangoapps/util/date_utils.py +++ b/common/djangoapps/util/date_utils.py @@ -2,7 +2,7 @@ Convenience methods for working with datetime objects """ -from __future__ import absolute_import + import re from datetime import datetime, timedelta diff --git a/common/djangoapps/util/db.py b/common/djangoapps/util/db.py index 662efe5ae7..bc1e02d464 100644 --- a/common/djangoapps/util/db.py +++ b/common/djangoapps/util/db.py @@ -1,7 +1,7 @@ """ Utility functions related to databases. """ -from __future__ import absolute_import + import random # TransactionManagementError used below actually *does* derive from the standard "Exception" class. diff --git a/common/djangoapps/util/disable_rate_limit.py b/common/djangoapps/util/disable_rate_limit.py index 8937198fdd..cd1cc9ec39 100644 --- a/common/djangoapps/util/disable_rate_limit.py +++ b/common/djangoapps/util/disable_rate_limit.py @@ -13,7 +13,7 @@ To disable rate limiting: Note: You should NEVER disable rate limiting in production. """ -from __future__ import absolute_import + import logging from functools import wraps diff --git a/common/djangoapps/util/file.py b/common/djangoapps/util/file.py index 4646ee07a2..49c7162a49 100644 --- a/common/djangoapps/util/file.py +++ b/common/djangoapps/util/file.py @@ -2,7 +2,7 @@ Utility methods related to file handling. """ -from __future__ import absolute_import + import os from datetime import datetime diff --git a/common/djangoapps/util/json_request.py b/common/djangoapps/util/json_request.py index 2b001ed9e3..064a6a563c 100644 --- a/common/djangoapps/util/json_request.py +++ b/common/djangoapps/util/json_request.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import decimal import json diff --git a/common/djangoapps/util/keyword_substitution.py b/common/djangoapps/util/keyword_substitution.py index 80d998f14f..9554ce7c76 100644 --- a/common/djangoapps/util/keyword_substitution.py +++ b/common/djangoapps/util/keyword_substitution.py @@ -18,7 +18,7 @@ Usage: - CMS: Not called """ -from __future__ import absolute_import + from django.contrib.auth.models import User diff --git a/common/djangoapps/util/memcache.py b/common/djangoapps/util/memcache.py index a09d62f440..27c3a2b700 100644 --- a/common/djangoapps/util/memcache.py +++ b/common/djangoapps/util/memcache.py @@ -2,7 +2,7 @@ This module provides a KEY_FUNCTION suitable for use with a memcache backend so that we can cache any keys, not just ones that memcache would ordinarily accept """ -from __future__ import absolute_import + import hashlib diff --git a/common/djangoapps/util/migrations/0001_initial.py b/common/djangoapps/util/migrations/0001_initial.py index a90fb9c79a..e894753038 100644 --- a/common/djangoapps/util/migrations/0001_initial.py +++ b/common/djangoapps/util/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py b/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py index a7f1cf90be..6558104f13 100644 --- a/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py +++ b/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/util/milestones_helpers.py b/common/djangoapps/util/milestones_helpers.py index c7daaf277e..7e3f3a451e 100644 --- a/common/djangoapps/util/milestones_helpers.py +++ b/common/djangoapps/util/milestones_helpers.py @@ -2,7 +2,7 @@ """ Utility library for working with the edx-milestones app """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/common/djangoapps/util/model_utils.py b/common/djangoapps/util/model_utils.py index 9f6fb1b7b3..f6a33f4ef5 100644 --- a/common/djangoapps/util/model_utils.py +++ b/common/djangoapps/util/model_utils.py @@ -1,7 +1,7 @@ """ Utilities for django models. """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/common/djangoapps/util/models.py b/common/djangoapps/util/models.py index ba15db5871..40eff72c6b 100644 --- a/common/djangoapps/util/models.py +++ b/common/djangoapps/util/models.py @@ -1,5 +1,5 @@ """Models for the util app. """ -from __future__ import absolute_import + import gzip import logging diff --git a/common/djangoapps/util/organizations_helpers.py b/common/djangoapps/util/organizations_helpers.py index 4b9ebe234d..033b99d337 100644 --- a/common/djangoapps/util/organizations_helpers.py +++ b/common/djangoapps/util/organizations_helpers.py @@ -2,7 +2,7 @@ Utility library for working with the edx-organizations app """ -from __future__ import absolute_import + from django.conf import settings from django.db.utils import DatabaseError diff --git a/common/djangoapps/util/password_policy_validators.py b/common/djangoapps/util/password_policy_validators.py index 2fb15e55e9..73e18eb89b 100644 --- a/common/djangoapps/util/password_policy_validators.py +++ b/common/djangoapps/util/password_policy_validators.py @@ -2,7 +2,7 @@ This file exposes a number of password validators which can be optionally added to account creation """ -from __future__ import absolute_import, unicode_literals + import logging import unicodedata diff --git a/common/djangoapps/util/query.py b/common/djangoapps/util/query.py index 535c113eeb..55c80e9d40 100644 --- a/common/djangoapps/util/query.py +++ b/common/djangoapps/util/query.py @@ -1,5 +1,5 @@ """ Utility functions related to database queries """ -from __future__ import absolute_import + from django.conf import settings diff --git a/common/djangoapps/util/request_rate_limiter.py b/common/djangoapps/util/request_rate_limiter.py index 0d3c0405cb..cb292ea1b2 100644 --- a/common/djangoapps/util/request_rate_limiter.py +++ b/common/djangoapps/util/request_rate_limiter.py @@ -2,7 +2,7 @@ A utility class which wraps the RateLimitMixin 3rd party class to do bad request counting which can be used for rate limiting """ -from __future__ import absolute_import + from django.conf import settings from ratelimitbackend.backends import RateLimitMixin diff --git a/common/djangoapps/util/testing.py b/common/djangoapps/util/testing.py index e3bb4da5fa..4dd3d073ef 100644 --- a/common/djangoapps/util/testing.py +++ b/common/djangoapps/util/testing.py @@ -2,7 +2,7 @@ Utility Mixins for unit tests """ -from __future__ import absolute_import + import json import sys diff --git a/common/djangoapps/util/tests/mixins/discovery.py b/common/djangoapps/util/tests/mixins/discovery.py index fa4feb4784..d564f13ee5 100644 --- a/common/djangoapps/util/tests/mixins/discovery.py +++ b/common/djangoapps/util/tests/mixins/discovery.py @@ -1,7 +1,7 @@ """ Mixins for the CourseDiscoveryApiClient. """ -from __future__ import absolute_import + import json diff --git a/common/djangoapps/util/tests/test_course.py b/common/djangoapps/util/tests/test_course.py index 151fdd9f89..80b0c384f3 100644 --- a/common/djangoapps/util/tests/test_course.py +++ b/common/djangoapps/util/tests/test_course.py @@ -1,7 +1,7 @@ """ Tests for course utils. """ -from __future__ import absolute_import + import ddt import mock diff --git a/common/djangoapps/util/tests/test_date_utils.py b/common/djangoapps/util/tests/test_date_utils.py index cedf17901e..7f8016d290 100644 --- a/common/djangoapps/util/tests/test_date_utils.py +++ b/common/djangoapps/util/tests/test_date_utils.py @@ -3,7 +3,7 @@ Tests for util.date_utils """ -from __future__ import absolute_import + import unittest from datetime import datetime, timedelta, tzinfo diff --git a/common/djangoapps/util/tests/test_db.py b/common/djangoapps/util/tests/test_db.py index 5b080acf98..6115784614 100644 --- a/common/djangoapps/util/tests/test_db.py +++ b/common/djangoapps/util/tests/test_db.py @@ -1,6 +1,6 @@ """Tests for util.db module.""" -from __future__ import absolute_import + import threading import time diff --git a/common/djangoapps/util/tests/test_disable_rate_limit.py b/common/djangoapps/util/tests/test_disable_rate_limit.py index 000b00c1cf..90c537929d 100644 --- a/common/djangoapps/util/tests/test_disable_rate_limit.py +++ b/common/djangoapps/util/tests/test_disable_rate_limit.py @@ -1,5 +1,5 @@ """Tests for disabling rate limiting. """ -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/util/tests/test_django_utils.py b/common/djangoapps/util/tests/test_django_utils.py index 0a444197f2..bb31baec70 100644 --- a/common/djangoapps/util/tests/test_django_utils.py +++ b/common/djangoapps/util/tests/test_django_utils.py @@ -6,7 +6,7 @@ cache values can't leak between different TestCase classes and methods. The need for this will go away whenever Django merges the fix to reset the caches between tests (https://code.djangoproject.com/ticket/11505). """ -from __future__ import absolute_import + from django.core.cache import caches diff --git a/common/djangoapps/util/tests/test_file.py b/common/djangoapps/util/tests/test_file.py index 57f89703d2..109fba5087 100644 --- a/common/djangoapps/util/tests/test_file.py +++ b/common/djangoapps/util/tests/test_file.py @@ -2,7 +2,7 @@ """ Tests for file.py """ -from __future__ import absolute_import + import os from datetime import datetime diff --git a/common/djangoapps/util/tests/test_json_request.py b/common/djangoapps/util/tests/test_json_request.py index 47eb05906d..775f49acdf 100644 --- a/common/djangoapps/util/tests/test_json_request.py +++ b/common/djangoapps/util/tests/test_json_request.py @@ -2,7 +2,7 @@ Test for JsonResponse and JsonResponseBadRequest util classes. """ -from __future__ import absolute_import + import json import unittest diff --git a/common/djangoapps/util/tests/test_keyword_sub_utils.py b/common/djangoapps/util/tests/test_keyword_sub_utils.py index 9648f93415..38e767bf6d 100644 --- a/common/djangoapps/util/tests/test_keyword_sub_utils.py +++ b/common/djangoapps/util/tests/test_keyword_sub_utils.py @@ -2,7 +2,7 @@ Tests for keyword_substitution.py """ -from __future__ import absolute_import + import six from ddt import ddt, file_data diff --git a/common/djangoapps/util/tests/test_memcache.py b/common/djangoapps/util/tests/test_memcache.py index bfc47b0a5e..ec31c23d74 100644 --- a/common/djangoapps/util/tests/test_memcache.py +++ b/common/djangoapps/util/tests/test_memcache.py @@ -2,7 +2,7 @@ Tests for memcache in util app """ -from __future__ import absolute_import + from django.core.cache import caches from django.test import TestCase diff --git a/common/djangoapps/util/tests/test_milestones_helpers.py b/common/djangoapps/util/tests/test_milestones_helpers.py index eccf752389..17a0afe52b 100644 --- a/common/djangoapps/util/tests/test_milestones_helpers.py +++ b/common/djangoapps/util/tests/test_milestones_helpers.py @@ -2,7 +2,7 @@ Tests for the milestones helpers library, which is the integration point for the edx_milestones API """ -from __future__ import absolute_import + import ddt import pytest diff --git a/common/djangoapps/util/tests/test_organizations_helpers.py b/common/djangoapps/util/tests/test_organizations_helpers.py index 2e7d305ba4..24c949e6c4 100644 --- a/common/djangoapps/util/tests/test_organizations_helpers.py +++ b/common/djangoapps/util/tests/test_organizations_helpers.py @@ -1,7 +1,7 @@ """ Tests for the organizations helpers library, which is the integration point for the edx-organizations API """ -from __future__ import absolute_import + import six from mock import patch diff --git a/common/djangoapps/util/tests/test_password_policy_validators.py b/common/djangoapps/util/tests/test_password_policy_validators.py index fa17430c01..e96bf89694 100644 --- a/common/djangoapps/util/tests/test_password_policy_validators.py +++ b/common/djangoapps/util/tests/test_password_policy_validators.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for util.password_policy_validators module.""" -from __future__ import absolute_import + import unittest diff --git a/common/djangoapps/util/tests/test_sandboxing.py b/common/djangoapps/util/tests/test_sandboxing.py index a8624fcb35..64c3906191 100644 --- a/common/djangoapps/util/tests/test_sandboxing.py +++ b/common/djangoapps/util/tests/test_sandboxing.py @@ -2,7 +2,7 @@ Tests for sandboxing.py in util app """ -from __future__ import absolute_import + from django.test import TestCase from django.test.utils import override_settings diff --git a/common/djangoapps/util/tests/test_string_utils.py b/common/djangoapps/util/tests/test_string_utils.py index fd1354a5dc..8f52c49c15 100644 --- a/common/djangoapps/util/tests/test_string_utils.py +++ b/common/djangoapps/util/tests/test_string_utils.py @@ -2,7 +2,7 @@ Tests for string_utils.py """ -from __future__ import absolute_import + from django.test import TestCase diff --git a/common/djangoapps/util/url.py b/common/djangoapps/util/url.py index 9794fcae72..81ac2aae4d 100644 --- a/common/djangoapps/util/url.py +++ b/common/djangoapps/util/url.py @@ -2,7 +2,7 @@ Utility functions related to urls. """ -from __future__ import absolute_import + import sys import six diff --git a/common/djangoapps/util/views.py b/common/djangoapps/util/views.py index 68822649e2..335e44b1ae 100644 --- a/common/djangoapps/util/views.py +++ b/common/djangoapps/util/views.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import json import logging diff --git a/common/djangoapps/xblock_django/admin.py b/common/djangoapps/xblock_django/admin.py index 22cabe1bf4..ebf07d53b2 100644 --- a/common/djangoapps/xblock_django/admin.py +++ b/common/djangoapps/xblock_django/admin.py @@ -2,7 +2,7 @@ Django admin dashboard configuration. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin diff --git a/common/djangoapps/xblock_django/api.py b/common/djangoapps/xblock_django/api.py index 3a8d4c0814..7d982a88a7 100644 --- a/common/djangoapps/xblock_django/api.py +++ b/common/djangoapps/xblock_django/api.py @@ -2,7 +2,7 @@ API methods related to xblock state. """ -from __future__ import absolute_import + from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration diff --git a/common/djangoapps/xblock_django/management/commands/ensure_indexes.py b/common/djangoapps/xblock_django/management/commands/ensure_indexes.py index 270d559bf6..b114dbd3f5 100644 --- a/common/djangoapps/xblock_django/management/commands/ensure_indexes.py +++ b/common/djangoapps/xblock_django/management/commands/ensure_indexes.py @@ -1,7 +1,7 @@ """ Creates Indexes on contentstore and modulestore databases. """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand diff --git a/common/djangoapps/xblock_django/migrations/0001_initial.py b/common/djangoapps/xblock_django/migrations/0001_initial.py index 6381d7728c..5490aa16b2 100644 --- a/common/djangoapps/xblock_django/migrations/0001_initial.py +++ b/common/djangoapps/xblock_django/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/xblock_django/migrations/0002_auto_20160204_0809.py b/common/djangoapps/xblock_django/migrations/0002_auto_20160204_0809.py index dc7a4641dd..69a5f84ae2 100644 --- a/common/djangoapps/xblock_django/migrations/0002_auto_20160204_0809.py +++ b/common/djangoapps/xblock_django/migrations/0002_auto_20160204_0809.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/xblock_django/migrations/0003_add_new_config_models.py b/common/djangoapps/xblock_django/migrations/0003_add_new_config_models.py index 9ab69eb123..880f40943a 100644 --- a/common/djangoapps/xblock_django/migrations/0003_add_new_config_models.py +++ b/common/djangoapps/xblock_django/migrations/0003_add_new_config_models.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/common/djangoapps/xblock_django/migrations/0004_delete_xblock_disable_config.py b/common/djangoapps/xblock_django/migrations/0004_delete_xblock_disable_config.py index cac41dd5bc..c2e0084b2e 100644 --- a/common/djangoapps/xblock_django/migrations/0004_delete_xblock_disable_config.py +++ b/common/djangoapps/xblock_django/migrations/0004_delete_xblock_disable_config.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/common/djangoapps/xblock_django/models.py b/common/djangoapps/xblock_django/models.py index f30c656d97..bd451f657b 100644 --- a/common/djangoapps/xblock_django/models.py +++ b/common/djangoapps/xblock_django/models.py @@ -2,7 +2,7 @@ Models. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db import models diff --git a/common/djangoapps/xblock_django/tests/test_api.py b/common/djangoapps/xblock_django/tests/test_api.py index 5a0500782b..4b59c38af2 100644 --- a/common/djangoapps/xblock_django/tests/test_api.py +++ b/common/djangoapps/xblock_django/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests related to XBlock support API. """ -from __future__ import absolute_import + import six diff --git a/common/djangoapps/xblock_django/tests/test_user_service.py b/common/djangoapps/xblock_django/tests/test_user_service.py index 4fee662e59..e894fa5e28 100644 --- a/common/djangoapps/xblock_django/tests/test_user_service.py +++ b/common/djangoapps/xblock_django/tests/test_user_service.py @@ -1,7 +1,7 @@ """ Tests for the DjangoXBlockUserService. """ -from __future__ import absolute_import + from django.test import TestCase from opaque_keys.edx.keys import CourseKey diff --git a/common/djangoapps/xblock_django/user_service.py b/common/djangoapps/xblock_django/user_service.py index 0ac947d63d..2145463eb0 100644 --- a/common/djangoapps/xblock_django/user_service.py +++ b/common/djangoapps/xblock_django/user_service.py @@ -1,7 +1,7 @@ """ Support for converting a django user to an XBlock user """ -from __future__ import absolute_import + from django.contrib.auth.models import User from opaque_keys.edx.keys import CourseKey diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index ee327dde52..78f5421591 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -13,7 +13,7 @@ Main module which shows problems (of "capa" type). This is used by capa_module. """ -from __future__ import absolute_import + import logging import os.path diff --git a/common/lib/capa/capa/checker.py b/common/lib/capa/capa/checker.py index a856c1df06..b575c4aec2 100755 --- a/common/lib/capa/capa/checker.py +++ b/common/lib/capa/capa/checker.py @@ -2,7 +2,7 @@ """ Commandline tool for doing operations on Problems """ -from __future__ import absolute_import, print_function, unicode_literals + import argparse import logging diff --git a/common/lib/capa/capa/customrender.py b/common/lib/capa/capa/customrender.py index e0a3e05aa6..8a2bcb7644 100644 --- a/common/lib/capa/capa/customrender.py +++ b/common/lib/capa/capa/customrender.py @@ -6,7 +6,7 @@ These tags do not have state, so they just get passed the system (for access to and the xml element. """ -from __future__ import absolute_import + import logging import re diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 8c0b998ffa..a98baed3c5 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -38,7 +38,7 @@ graded status as'status' # makes sense, but a bunch of problems have markup that assumes block. Bigger TODO: figure out a # general css and layout strategy for capa, document it, then implement it. -from __future__ import absolute_import + import json import logging diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 86f99f2674..a9b29f7499 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -10,7 +10,7 @@ Used by capa_problem.py # pylint: disable=attribute-defined-outside-init # standard library imports -from __future__ import absolute_import + import abc # TODO: Refactor this code and fix this issue. diff --git a/common/lib/capa/capa/safe_exec/safe_exec.py b/common/lib/capa/capa/safe_exec/safe_exec.py index 0504310593..6532fe1d9d 100644 --- a/common/lib/capa/capa/safe_exec/safe_exec.py +++ b/common/lib/capa/capa/safe_exec/safe_exec.py @@ -1,6 +1,6 @@ """Capa's specialized use of codejail.safe_exec.""" -from __future__ import absolute_import + import hashlib diff --git a/common/lib/capa/capa/safe_exec/tests/test_lazymod.py b/common/lib/capa/capa/safe_exec/tests/test_lazymod.py index da6018b0b9..9bf218aef0 100644 --- a/common/lib/capa/capa/safe_exec/tests/test_lazymod.py +++ b/common/lib/capa/capa/safe_exec/tests/test_lazymod.py @@ -1,6 +1,6 @@ """Test lazymod.py""" -from __future__ import absolute_import + import sys import unittest diff --git a/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py b/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py index e845cd892b..53b193c957 100644 --- a/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py +++ b/common/lib/capa/capa/safe_exec/tests/test_safe_exec.py @@ -1,6 +1,6 @@ """Test safe_exec.py""" -from __future__ import absolute_import + import hashlib import os diff --git a/common/lib/capa/capa/tests/helpers.py b/common/lib/capa/capa/tests/helpers.py index a592d54dfc..0def896e6a 100644 --- a/common/lib/capa/capa/tests/helpers.py +++ b/common/lib/capa/capa/tests/helpers.py @@ -1,6 +1,6 @@ """Tools for helping with testing capa.""" -from __future__ import absolute_import + import gettext import io diff --git a/common/lib/capa/capa/tests/response_xml_factory.py b/common/lib/capa/capa/tests/response_xml_factory.py index af62ef715c..5fe87571e6 100644 --- a/common/lib/capa/capa/tests/response_xml_factory.py +++ b/common/lib/capa/capa/tests/response_xml_factory.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from abc import ABCMeta, abstractmethod diff --git a/common/lib/capa/capa/tests/test_answer_pool.py b/common/lib/capa/capa/tests/test_answer_pool.py index ecd5c7cb41..31e992067e 100644 --- a/common/lib/capa/capa/tests/test_answer_pool.py +++ b/common/lib/capa/capa/tests/test_answer_pool.py @@ -3,7 +3,7 @@ Tests the logic of the "answer-pool" attribute, e.g. """ -from __future__ import absolute_import + import textwrap import unittest diff --git a/common/lib/capa/capa/tests/test_capa_problem.py b/common/lib/capa/capa/tests/test_capa_problem.py index 547f2c7570..07276f494a 100644 --- a/common/lib/capa/capa/tests/test_capa_problem.py +++ b/common/lib/capa/capa/tests/test_capa_problem.py @@ -1,7 +1,7 @@ """ Test capa problem. """ -from __future__ import absolute_import + import textwrap import unittest diff --git a/common/lib/capa/capa/tests/test_correctmap.py b/common/lib/capa/capa/tests/test_correctmap.py index 6501e7ae9d..0ca17b7b5f 100644 --- a/common/lib/capa/capa/tests/test_correctmap.py +++ b/common/lib/capa/capa/tests/test_correctmap.py @@ -2,7 +2,7 @@ Tests to verify that CorrectMap behaves correctly """ -from __future__ import absolute_import + import datetime import unittest diff --git a/common/lib/capa/capa/tests/test_customrender.py b/common/lib/capa/capa/tests/test_customrender.py index 2f3439bb9e..52e669baf7 100644 --- a/common/lib/capa/capa/tests/test_customrender.py +++ b/common/lib/capa/capa/tests/test_customrender.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import unittest import xml.sax.saxutils as saxutils diff --git a/common/lib/capa/capa/tests/test_hint_functionality.py b/common/lib/capa/capa/tests/test_hint_functionality.py index b4834e026c..eae1efc0f5 100644 --- a/common/lib/capa/capa/tests/test_hint_functionality.py +++ b/common/lib/capa/capa/tests/test_hint_functionality.py @@ -3,7 +3,7 @@ Tests of extended hints """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/capa/capa/tests/test_html_render.py b/common/lib/capa/capa/tests/test_html_render.py index 125709020b..990cda6d98 100644 --- a/common/lib/capa/capa/tests/test_html_render.py +++ b/common/lib/capa/capa/tests/test_html_render.py @@ -1,7 +1,7 @@ """ CAPA HTML rendering tests. """ -from __future__ import absolute_import + import os import textwrap diff --git a/common/lib/capa/capa/tests/test_input_templates.py b/common/lib/capa/capa/tests/test_input_templates.py index 9e599db576..5b5b212cd4 100644 --- a/common/lib/capa/capa/tests/test_input_templates.py +++ b/common/lib/capa/capa/tests/test_input_templates.py @@ -2,7 +2,7 @@ Tests for the logic in input type mako templates. """ -from __future__ import absolute_import + import json import unittest diff --git a/common/lib/capa/capa/tests/test_inputtypes.py b/common/lib/capa/capa/tests/test_inputtypes.py index 9b153f7a0f..d6e75824fd 100644 --- a/common/lib/capa/capa/tests/test_inputtypes.py +++ b/common/lib/capa/capa/tests/test_inputtypes.py @@ -16,7 +16,7 @@ TODO: - test funny xml chars -- should never get xml parse error if things are escaped properly. """ -from __future__ import absolute_import + import json import textwrap diff --git a/common/lib/capa/capa/tests/test_responsetypes.py b/common/lib/capa/capa/tests/test_responsetypes.py index caeca6f07b..944573e6bb 100644 --- a/common/lib/capa/capa/tests/test_responsetypes.py +++ b/common/lib/capa/capa/tests/test_responsetypes.py @@ -3,7 +3,7 @@ Tests of responsetypes """ -from __future__ import absolute_import + import io import json diff --git a/common/lib/capa/capa/tests/test_shuffle.py b/common/lib/capa/capa/tests/test_shuffle.py index 11f8445b42..9b9ee63a34 100644 --- a/common/lib/capa/capa/tests/test_shuffle.py +++ b/common/lib/capa/capa/tests/test_shuffle.py @@ -1,5 +1,5 @@ """Tests the capa shuffle and name-masking.""" -from __future__ import absolute_import, print_function + import textwrap import unittest diff --git a/common/lib/capa/capa/tests/test_targeted_feedback.py b/common/lib/capa/capa/tests/test_targeted_feedback.py index d3268ee2b2..755d88c302 100644 --- a/common/lib/capa/capa/tests/test_targeted_feedback.py +++ b/common/lib/capa/capa/tests/test_targeted_feedback.py @@ -3,7 +3,7 @@ Tests the logic of the "targeted-feedback" attribute for MultipleChoice question i.e. those with the element """ -from __future__ import absolute_import + import textwrap import unittest diff --git a/common/lib/capa/capa/tests/test_util.py b/common/lib/capa/capa/tests/test_util.py index 3ebd40e80f..70fc2108fe 100644 --- a/common/lib/capa/capa/tests/test_util.py +++ b/common/lib/capa/capa/tests/test_util.py @@ -2,7 +2,7 @@ """ Tests capa util """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/capa/capa/util.py b/common/lib/capa/capa/util.py index 8f1063e90a..63411ed0dc 100644 --- a/common/lib/capa/capa/util.py +++ b/common/lib/capa/capa/util.py @@ -1,7 +1,7 @@ """ Utility functions for capa. """ -from __future__ import absolute_import + import re import logging diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index da7972c4f1..25b0bcf9b7 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -1,7 +1,7 @@ # # LMS Interface to external queueing system (xqueue) # -from __future__ import absolute_import + import hashlib import json diff --git a/common/lib/capa/setup.py b/common/lib/capa/setup.py index 136d466cfb..bf2badc36e 100644 --- a/common/lib/capa/setup.py +++ b/common/lib/capa/setup.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from setuptools import find_packages, setup diff --git a/common/lib/conftest.py b/common/lib/conftest.py index 4758af5667..0c19cc206a 100644 --- a/common/lib/conftest.py +++ b/common/lib/conftest.py @@ -1,7 +1,7 @@ """Code run by pylint before running any tests.""" # Patch the xml libs before anything else. -from __future__ import absolute_import + import pytest diff --git a/common/lib/safe_lxml/safe_lxml/__init__.py b/common/lib/safe_lxml/safe_lxml/__init__.py index 7623398ec1..476b451136 100644 --- a/common/lib/safe_lxml/safe_lxml/__init__.py +++ b/common/lib/safe_lxml/safe_lxml/__init__.py @@ -1,7 +1,7 @@ """ Defuse vulnerabilities in XML packages. """ -from __future__ import absolute_import + def defuse_xml_libs(): diff --git a/common/lib/safe_lxml/safe_lxml/etree.py b/common/lib/safe_lxml/safe_lxml/etree.py index 94bdb1e518..fa2acae2c6 100644 --- a/common/lib/safe_lxml/safe_lxml/etree.py +++ b/common/lib/safe_lxml/safe_lxml/etree.py @@ -11,7 +11,7 @@ For processing xml always prefer this over using lxml.etree directly. # lxml.etree. The names are not used here, so disable the pylint warning. # pylint: disable=unused-import, wildcard-import, unused-wildcard-import -from __future__ import absolute_import + from lxml.etree import XMLParser as _XMLParser from lxml.etree import * diff --git a/common/lib/safe_lxml/safe_lxml/tests.py b/common/lib/safe_lxml/safe_lxml/tests.py index 99b574aa87..64a03ee3a9 100644 --- a/common/lib/safe_lxml/safe_lxml/tests.py +++ b/common/lib/safe_lxml/safe_lxml/tests.py @@ -1,6 +1,6 @@ """Test that we have defused XML.""" -from __future__ import absolute_import + import defusedxml from lxml import etree diff --git a/common/lib/safe_lxml/setup.py b/common/lib/safe_lxml/setup.py index ac1b880190..9a4a54c8d4 100644 --- a/common/lib/safe_lxml/setup.py +++ b/common/lib/safe_lxml/setup.py @@ -1,7 +1,7 @@ """ Setup.py for safe_lxml. """ -from __future__ import absolute_import + from setuptools import setup diff --git a/common/lib/sandbox-packages/eia.py b/common/lib/sandbox-packages/eia.py index 766960156c..f8c2da59f1 100644 --- a/common/lib/sandbox-packages/eia.py +++ b/common/lib/sandbox-packages/eia.py @@ -7,7 +7,7 @@ values in parameterized problems. For details, see: http://en.wikipedia.org/wiki/Electronic_color_code """ -from __future__ import absolute_import, print_function + # pylint: disable=invalid-name # r is standard name for a resistor. We would like to use it as such. diff --git a/common/lib/sandbox-packages/loncapa/loncapa_check.py b/common/lib/sandbox-packages/loncapa/loncapa_check.py index 1fbc96301d..18e0eb7d16 100644 --- a/common/lib/sandbox-packages/loncapa/loncapa_check.py +++ b/common/lib/sandbox-packages/loncapa/loncapa_check.py @@ -5,7 +5,7 @@ # Python functions which duplicate the standard comparison functions available to LON-CAPA problems. # Used in translating LON-CAPA problems to i4x problem specification language. -from __future__ import absolute_import, division + import math import random diff --git a/common/lib/sandbox-packages/setup.py b/common/lib/sandbox-packages/setup.py index 66232d606c..68b1fdd6dd 100644 --- a/common/lib/sandbox-packages/setup.py +++ b/common/lib/sandbox-packages/setup.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from setuptools import setup diff --git a/common/lib/sandbox-packages/verifiers/draganddrop.py b/common/lib/sandbox-packages/verifiers/draganddrop.py index 9461078e87..9d41366c58 100644 --- a/common/lib/sandbox-packages/verifiers/draganddrop.py +++ b/common/lib/sandbox-packages/verifiers/draganddrop.py @@ -23,7 +23,7 @@ or: } values are (x, y) coordinates of centers of dragged images. """ -from __future__ import absolute_import + import json import six diff --git a/common/lib/sandbox-packages/verifiers/tests_draganddrop.py b/common/lib/sandbox-packages/verifiers/tests_draganddrop.py index d4107b5cad..151b98d329 100644 --- a/common/lib/sandbox-packages/verifiers/tests_draganddrop.py +++ b/common/lib/sandbox-packages/verifiers/tests_draganddrop.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import json import unittest diff --git a/common/lib/symmath/setup.py b/common/lib/symmath/setup.py index 1afacdfc5e..95e5400f97 100644 --- a/common/lib/symmath/setup.py +++ b/common/lib/symmath/setup.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from setuptools import setup setup( diff --git a/common/lib/symmath/symmath/formula.py b/common/lib/symmath/symmath/formula.py index 37405a2a5b..ff9d1a0774 100644 --- a/common/lib/symmath/symmath/formula.py +++ b/common/lib/symmath/symmath/formula.py @@ -11,7 +11,7 @@ Provides sympy representation. # Author: I. Chuang # -from __future__ import absolute_import + import logging import operator import os diff --git a/common/lib/symmath/symmath/symmath_check.py b/common/lib/symmath/symmath/symmath_check.py index d125f1eec5..cc43c32a2f 100644 --- a/common/lib/symmath/symmath/symmath_check.py +++ b/common/lib/symmath/symmath/symmath_check.py @@ -8,7 +8,7 @@ # # Takes in math expressions given as Presentation MathML (from ASCIIMathML), converts to Content MathML using SnuggleTeX -from __future__ import absolute_import + import logging import traceback diff --git a/common/lib/symmath/symmath/test_formula.py b/common/lib/symmath/symmath/test_formula.py index 1802e31896..3895157fd8 100644 --- a/common/lib/symmath/symmath/test_formula.py +++ b/common/lib/symmath/symmath/test_formula.py @@ -1,7 +1,7 @@ """ Tests of symbolic math """ -from __future__ import absolute_import + import re import unittest diff --git a/common/lib/symmath/symmath/test_symmath_check.py b/common/lib/symmath/symmath/test_symmath_check.py index 6d9e859153..b0fd3c3357 100644 --- a/common/lib/symmath/symmath/test_symmath_check.py +++ b/common/lib/symmath/symmath/test_symmath_check.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from unittest import TestCase from .symmath_check import symmath_check diff --git a/common/lib/xmodule/setup.py b/common/lib/xmodule/setup.py index 49f6db3344..d5e332b7e3 100644 --- a/common/lib/xmodule/setup.py +++ b/common/lib/xmodule/setup.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from setuptools import find_packages, setup diff --git a/common/lib/xmodule/xmodule/annotatable_module.py b/common/lib/xmodule/xmodule/annotatable_module.py index 004484ddee..d30c737864 100644 --- a/common/lib/xmodule/xmodule/annotatable_module.py +++ b/common/lib/xmodule/xmodule/annotatable_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import textwrap diff --git a/common/lib/xmodule/xmodule/annotator_mixin.py b/common/lib/xmodule/xmodule/annotator_mixin.py index f8bf3c19d0..23a0dc4520 100644 --- a/common/lib/xmodule/xmodule/annotator_mixin.py +++ b/common/lib/xmodule/xmodule/annotator_mixin.py @@ -2,7 +2,7 @@ Annotations Tool Mixin This file contains global variables and functions used in the various Annotation Tools. """ -from __future__ import absolute_import + from os.path import basename, splitext diff --git a/common/lib/xmodule/xmodule/assetstore/__init__.py b/common/lib/xmodule/xmodule/assetstore/__init__.py index c9c4f25d3a..614a1a27d7 100644 --- a/common/lib/xmodule/xmodule/assetstore/__init__.py +++ b/common/lib/xmodule/xmodule/assetstore/__init__.py @@ -2,7 +2,7 @@ Classes representing asset metadata. """ -from __future__ import absolute_import + import json from datetime import datetime diff --git a/common/lib/xmodule/xmodule/assetstore/assetmgr.py b/common/lib/xmodule/xmodule/assetstore/assetmgr.py index da9b32493a..7e5ed1716c 100644 --- a/common/lib/xmodule/xmodule/assetstore/assetmgr.py +++ b/common/lib/xmodule/xmodule/assetstore/assetmgr.py @@ -13,7 +13,7 @@ Note: Hotfix (PLAT-734) No asset calls find_asset_metadata, and directly accesse """ -from __future__ import absolute_import + from contracts import contract, new_contract from opaque_keys.edx.keys import AssetKey diff --git a/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py b/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py index 10ef7cfbf5..7a22b34cbd 100644 --- a/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py +++ b/common/lib/xmodule/xmodule/assetstore/tests/test_asset_xml.py @@ -2,7 +2,7 @@ Test for asset XML generation / parsing. """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/backcompat_module.py b/common/lib/xmodule/xmodule/backcompat_module.py index 680f8b4781..cb9314f90e 100644 --- a/common/lib/xmodule/xmodule/backcompat_module.py +++ b/common/lib/xmodule/xmodule/backcompat_module.py @@ -1,7 +1,7 @@ """ These modules exist to translate old format XML into newer, semantic forms """ -from __future__ import absolute_import + import logging import traceback diff --git a/common/lib/xmodule/xmodule/capa_base.py b/common/lib/xmodule/xmodule/capa_base.py index 8320a60520..45882b7abb 100644 --- a/common/lib/xmodule/xmodule/capa_base.py +++ b/common/lib/xmodule/xmodule/capa_base.py @@ -1,5 +1,5 @@ """Implements basics of Capa, including class CapaModule.""" -from __future__ import absolute_import + import copy import datetime diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index d0e719ed14..6a28595c61 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -1,5 +1,5 @@ """Implements basics of Capa, including class CapaModule.""" -from __future__ import absolute_import + import json import logging diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index 64762cc690..08473659a0 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -2,7 +2,7 @@ some xmodules by conditions. """ -from __future__ import absolute_import + import json import logging diff --git a/common/lib/xmodule/xmodule/contentstore/content.py b/common/lib/xmodule/xmodule/contentstore/content.py index 0842219b90..5810a4c0dd 100644 --- a/common/lib/xmodule/xmodule/contentstore/content.py +++ b/common/lib/xmodule/xmodule/contentstore/content.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import os diff --git a/common/lib/xmodule/xmodule/contentstore/django.py b/common/lib/xmodule/xmodule/contentstore/django.py index c17e72b984..dfbe512be5 100644 --- a/common/lib/xmodule/xmodule/contentstore/django.py +++ b/common/lib/xmodule/xmodule/contentstore/django.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from importlib import import_module diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index 85bc0a9d41..57a6790539 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -1,7 +1,7 @@ """ MongoDB/GridFS-level code for the contentstore. """ -from __future__ import absolute_import + import json import os diff --git a/common/lib/xmodule/xmodule/contentstore/utils.py b/common/lib/xmodule/xmodule/contentstore/utils.py index b7c1413661..5231524c11 100644 --- a/common/lib/xmodule/xmodule/contentstore/utils.py +++ b/common/lib/xmodule/xmodule/contentstore/utils.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + from xmodule.contentstore.content import StaticContent diff --git a/common/lib/xmodule/xmodule/course_metadata_utils.py b/common/lib/xmodule/xmodule/course_metadata_utils.py index 3ae03b3418..c90df652bc 100644 --- a/common/lib/xmodule/xmodule/course_metadata_utils.py +++ b/common/lib/xmodule/xmodule/course_metadata_utils.py @@ -5,7 +5,7 @@ This is a place to put simple functions that operate on course metadata. It allows us to share code between the CourseDescriptor and CourseOverview classes, which both need these type of functions. """ -from __future__ import absolute_import + from base64 import b32encode from datetime import datetime, timedelta diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index bf23e31bab..7347aef54c 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -1,7 +1,7 @@ """ Django module container for classes and operations related to the "Course Module" content type """ -from __future__ import absolute_import + import json import logging diff --git a/common/lib/xmodule/xmodule/editing_module.py b/common/lib/xmodule/xmodule/editing_module.py index 53aad78c61..75ecc8e0fe 100644 --- a/common/lib/xmodule/xmodule/editing_module.py +++ b/common/lib/xmodule/xmodule/editing_module.py @@ -1,6 +1,6 @@ """Descriptors for XBlocks/Xmodules, that provide editing of atrributes""" -from __future__ import absolute_import + import logging diff --git a/common/lib/xmodule/xmodule/edxnotes_utils.py b/common/lib/xmodule/xmodule/edxnotes_utils.py index 4bf0699283..8da0e83252 100644 --- a/common/lib/xmodule/xmodule/edxnotes_utils.py +++ b/common/lib/xmodule/xmodule/edxnotes_utils.py @@ -1,7 +1,7 @@ """ Utilities related to edXNotes. """ -from __future__ import absolute_import + import sys diff --git a/common/lib/xmodule/xmodule/error_module.py b/common/lib/xmodule/xmodule/error_module.py index f861d32419..74aa5a588c 100644 --- a/common/lib/xmodule/xmodule/error_module.py +++ b/common/lib/xmodule/xmodule/error_module.py @@ -3,7 +3,7 @@ Modules that get shown to the users when an error has occurred while loading or rendering other modules """ -from __future__ import absolute_import + import hashlib import json diff --git a/common/lib/xmodule/xmodule/errortracker.py b/common/lib/xmodule/xmodule/errortracker.py index d30d7a2a15..c3a4113967 100644 --- a/common/lib/xmodule/xmodule/errortracker.py +++ b/common/lib/xmodule/xmodule/errortracker.py @@ -30,7 +30,7 @@ Patterns for using the error handler: NOTE: To avoid duplication, do not call the tracker on errors that you're about to re-raise---let the caller track them. """ -from __future__ import absolute_import + import logging import sys diff --git a/common/lib/xmodule/xmodule/fields.py b/common/lib/xmodule/xmodule/fields.py index 85ca94931f..188182d81f 100644 --- a/common/lib/xmodule/xmodule/fields.py +++ b/common/lib/xmodule/xmodule/fields.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import datetime import logging diff --git a/common/lib/xmodule/xmodule/graders.py b/common/lib/xmodule/xmodule/graders.py index 4d91cad5e3..c043127e7d 100644 --- a/common/lib/xmodule/xmodule/graders.py +++ b/common/lib/xmodule/xmodule/graders.py @@ -2,7 +2,7 @@ Code used to calculate learner grades. """ -from __future__ import absolute_import, division + import abc import inspect diff --git a/common/lib/xmodule/xmodule/hidden_module.py b/common/lib/xmodule/xmodule/hidden_module.py index 80d37421f2..00d161b7f7 100644 --- a/common/lib/xmodule/xmodule/hidden_module.py +++ b/common/lib/xmodule/xmodule/hidden_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from xmodule.raw_module import RawDescriptor from xmodule.x_module import XModule diff --git a/common/lib/xmodule/xmodule/html_checker.py b/common/lib/xmodule/xmodule/html_checker.py index 771f47aeaf..e6aae980b9 100644 --- a/common/lib/xmodule/xmodule/html_checker.py +++ b/common/lib/xmodule/xmodule/html_checker.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from lxml import etree diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index 17010bcc79..70346486d1 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import copy import logging diff --git a/common/lib/xmodule/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py index beb1377fe9..963efcad75 100644 --- a/common/lib/xmodule/xmodule/library_content_module.py +++ b/common/lib/xmodule/xmodule/library_content_module.py @@ -2,7 +2,7 @@ """ LibraryContent: The XBlock used to include blocks from a library in a course. """ -from __future__ import absolute_import + import json import logging diff --git a/common/lib/xmodule/xmodule/library_root_xblock.py b/common/lib/xmodule/xmodule/library_root_xblock.py index 17b2c856df..ff25bce6c8 100644 --- a/common/lib/xmodule/xmodule/library_root_xblock.py +++ b/common/lib/xmodule/xmodule/library_root_xblock.py @@ -1,7 +1,7 @@ """ 'library' XBlock (LibraryRoot) """ -from __future__ import absolute_import + import logging import six diff --git a/common/lib/xmodule/xmodule/library_tools.py b/common/lib/xmodule/xmodule/library_tools.py index 1156f0f787..cda300be0f 100644 --- a/common/lib/xmodule/xmodule/library_tools.py +++ b/common/lib/xmodule/xmodule/library_tools.py @@ -1,7 +1,7 @@ """ XBlock runtime services for LibraryContentModule """ -from __future__ import absolute_import + import six from django.core.exceptions import PermissionDenied diff --git a/common/lib/xmodule/xmodule/lti_2_util.py b/common/lib/xmodule/xmodule/lti_2_util.py index d32f7a41f9..85747fc304 100644 --- a/common/lib/xmodule/xmodule/lti_2_util.py +++ b/common/lib/xmodule/xmodule/lti_2_util.py @@ -3,7 +3,7 @@ A mixin class for LTI 2.0 functionality. This is really just done to refactor the code to keep the LTIModule class from getting too big """ -from __future__ import absolute_import + import base64 import hashlib diff --git a/common/lib/xmodule/xmodule/lti_module.py b/common/lib/xmodule/xmodule/lti_module.py index 73f7199069..63d7df3b70 100644 --- a/common/lib/xmodule/xmodule/lti_module.py +++ b/common/lib/xmodule/xmodule/lti_module.py @@ -53,7 +53,7 @@ What is supported: GET / PUT / DELETE HTTP methods respectively """ -from __future__ import absolute_import + import base64 import datetime diff --git a/common/lib/xmodule/xmodule/mako_module.py b/common/lib/xmodule/xmodule/mako_module.py index 651d43343c..bc39da82c8 100644 --- a/common/lib/xmodule/xmodule/mako_module.py +++ b/common/lib/xmodule/xmodule/mako_module.py @@ -1,7 +1,7 @@ """ Code to handle mako templating for XModules and XBlocks. """ -from __future__ import absolute_import + from web_fragments.fragment import Fragment diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index 1d72ef9169..bee0f80e49 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -3,7 +3,7 @@ This module provides an abstraction for working with XModuleDescriptors that are stored in a database an accessible using their Location as an identifier """ -from __future__ import absolute_import + import datetime import logging diff --git a/common/lib/xmodule/xmodule/modulestore/django.py b/common/lib/xmodule/xmodule/modulestore/django.py index 053b01a6b9..4074da9e0e 100644 --- a/common/lib/xmodule/xmodule/modulestore/django.py +++ b/common/lib/xmodule/xmodule/modulestore/django.py @@ -4,7 +4,7 @@ Module that provides a connection to the ModuleStore specified in the django set Passes settings.MODULESTORE as kwargs to MongoModuleStore """ -from __future__ import absolute_import + from importlib import import_module import gettext diff --git a/common/lib/xmodule/xmodule/modulestore/draft.py b/common/lib/xmodule/xmodule/modulestore/draft.py index 7000505243..166c37c75f 100644 --- a/common/lib/xmodule/xmodule/modulestore/draft.py +++ b/common/lib/xmodule/xmodule/modulestore/draft.py @@ -5,6 +5,6 @@ This modulestore has been moved to xmodule.modulestore.mongo.draft """ # pylint: disable=unused-import -from __future__ import absolute_import + from xmodule.modulestore.mongo.draft import DraftModuleStore diff --git a/common/lib/xmodule/xmodule/modulestore/draft_and_published.py b/common/lib/xmodule/xmodule/modulestore/draft_and_published.py index 2f583cd7ca..ad824f1ced 100644 --- a/common/lib/xmodule/xmodule/modulestore/draft_and_published.py +++ b/common/lib/xmodule/xmodule/modulestore/draft_and_published.py @@ -2,7 +2,7 @@ This module provides an abstraction for Module Stores that support Draft and Published branches. """ -from __future__ import absolute_import + import logging import threading diff --git a/common/lib/xmodule/xmodule/modulestore/edit_info.py b/common/lib/xmodule/xmodule/modulestore/edit_info.py index 8719d40b2e..aeb5314a00 100644 --- a/common/lib/xmodule/xmodule/modulestore/edit_info.py +++ b/common/lib/xmodule/xmodule/modulestore/edit_info.py @@ -1,7 +1,7 @@ """ Access methods to get EditInfo for xblocks """ -from __future__ import absolute_import + from abc import ABCMeta, abstractmethod diff --git a/common/lib/xmodule/xmodule/modulestore/inheritance.py b/common/lib/xmodule/xmodule/modulestore/inheritance.py index 9050f19b16..97ba822307 100644 --- a/common/lib/xmodule/xmodule/modulestore/inheritance.py +++ b/common/lib/xmodule/xmodule/modulestore/inheritance.py @@ -1,7 +1,7 @@ """ Support for inheritance of fields down an XBlock hierarchy. """ -from __future__ import absolute_import + from django.utils import timezone diff --git a/common/lib/xmodule/xmodule/modulestore/mixed.py b/common/lib/xmodule/xmodule/modulestore/mixed.py index e9eabb5272..8051a858b6 100644 --- a/common/lib/xmodule/xmodule/modulestore/mixed.py +++ b/common/lib/xmodule/xmodule/modulestore/mixed.py @@ -5,7 +5,7 @@ In this way, courses can be served up via either SplitMongoModuleStore or MongoM """ -from __future__ import absolute_import + import functools import itertools diff --git a/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py b/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py index bb17d59406..a2056b8243 100644 --- a/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py +++ b/common/lib/xmodule/xmodule/modulestore/modulestore_settings.py @@ -2,7 +2,7 @@ This file contains helper functions for configuring module_store_setting settings and support for backward compatibility with older formats. """ -from __future__ import absolute_import + import copy import warnings diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py b/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py index 584ed10283..bf3fc5cef7 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/__init__.py @@ -2,7 +2,7 @@ Provide names as exported by older mongo.py module """ -from __future__ import absolute_import + from xmodule.modulestore.mongo.base import MongoKeyValueStore, MongoModuleStore # Backwards compatibility for prod systems that refererence diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index ede5b88e33..2d725f696a 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -11,7 +11,7 @@ structure: 'definition.children': } """ -from __future__ import absolute_import + import copy import logging diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/draft.py b/common/lib/xmodule/xmodule/modulestore/mongo/draft.py index 2f746f9932..95063aba5c 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/draft.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/draft.py @@ -6,7 +6,7 @@ returns the i4x://org/course/cat/name@draft object if that exists, and otherwise returns i4x://org/course/cat/name). """ -from __future__ import absolute_import + import logging diff --git a/common/lib/xmodule/xmodule/modulestore/mongoengine_fields.py b/common/lib/xmodule/xmodule/modulestore/mongoengine_fields.py index 3a04b5c598..6c56355646 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongoengine_fields.py +++ b/common/lib/xmodule/xmodule/modulestore/mongoengine_fields.py @@ -1,7 +1,7 @@ """ Custom field types for mongoengine """ -from __future__ import absolute_import + import mongoengine import six diff --git a/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py index f06c423290..6afcb998d4 100644 --- a/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py +++ b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py @@ -4,7 +4,7 @@ """ Generates fake XML for asset metadata. """ -from __future__ import absolute_import, print_function + import random from datetime import datetime, timedelta diff --git a/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_report.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_report.py index 77595ffa02..c5bf859019 100644 --- a/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_report.py +++ b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_report.py @@ -4,7 +4,7 @@ Reads the data generated by performance tests and generates a savable report which can be viewed over time to examine the performance effects of code changes on various parts of the system. """ -from __future__ import absolute_import, print_function + import sqlite3 diff --git a/common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py index a3fbf3cfe1..c664220172 100644 --- a/common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py +++ b/common/lib/xmodule/xmodule/modulestore/perf_tests/test_asset_import_export.py @@ -1,7 +1,7 @@ """ Performance test for asset metadata in the modulestore. """ -from __future__ import absolute_import + import datetime import itertools diff --git a/common/lib/xmodule/xmodule/modulestore/search.py b/common/lib/xmodule/xmodule/modulestore/search.py index 5c5bd97bea..bc0e0de893 100644 --- a/common/lib/xmodule/xmodule/modulestore/search.py +++ b/common/lib/xmodule/xmodule/modulestore/search.py @@ -1,5 +1,5 @@ ''' useful functions for finding content and its position ''' -from __future__ import absolute_import + from logging import getLogger diff --git a/common/lib/xmodule/xmodule/modulestore/split_migrator.py b/common/lib/xmodule/xmodule/modulestore/split_migrator.py index 7d21a3bc73..1fcc9f8645 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_migrator.py +++ b/common/lib/xmodule/xmodule/modulestore/split_migrator.py @@ -6,7 +6,7 @@ Exists at the top level of modulestore b/c it needs to know about and access eac In general, it's strategy is to treat the other modulestores as read-only and to never directly manipulate storage but use existing api's. ''' -from __future__ import absolute_import + import logging diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py index f8c8a1b485..f0ccef18ee 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/__init__.py @@ -2,7 +2,7 @@ General utilities """ -from __future__ import absolute_import + from collections import namedtuple diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py index f6a02302c2..5f43fef5eb 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import sys diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py index 6cddedfc97..97551e2e7b 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import copy diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py index cf337abc1d..be0628b8ff 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/id_manager.py @@ -3,7 +3,7 @@ An implementation of IdReader and IdGenerator that manages ids for the SplitMong mechanism. """ -from __future__ import absolute_import + from opaque_keys.edx.locator import DefinitionLocator, LocalId diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py index ec456b85c1..8ab776f53d 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py @@ -1,7 +1,7 @@ """ Segregation of pymongo functions from the data modeling mechanisms for split modulestore. """ -from __future__ import absolute_import + import datetime import logging diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py index aa7e15c699..def9409d02 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py @@ -53,7 +53,7 @@ Representation: *** 'original_version': definition_id of the root of the previous version relation on this definition. Acts as a pseudo-object identifier. """ -from __future__ import absolute_import + import copy import datetime diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py index 7ddc7c170f..43af6d9698 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py @@ -2,7 +2,7 @@ Module for the dual-branch fall-back Draft->Published Versioning ModuleStore """ -from __future__ import absolute_import + from contracts import contract from opaque_keys.edx.locator import CourseLocator, LibraryLocator, LibraryUsageLocator diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py index 5e3db544b3..93a11a6435 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import copy from collections import namedtuple diff --git a/common/lib/xmodule/xmodule/modulestore/store_utilities.py b/common/lib/xmodule/xmodule/modulestore/store_utilities.py index 6f9c89746f..60f7a018c0 100644 --- a/common/lib/xmodule/xmodule/modulestore/store_utilities.py +++ b/common/lib/xmodule/xmodule/modulestore/store_utilities.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import re diff --git a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py index 32952c9304..2cc310abe0 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py @@ -2,7 +2,7 @@ """ Modulestore configuration for test cases. """ -from __future__ import absolute_import + import copy import functools diff --git a/common/lib/xmodule/xmodule/modulestore/tests/factories.py b/common/lib/xmodule/xmodule/modulestore/tests/factories.py index 1c208014d1..34761b5e52 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/factories.py @@ -1,7 +1,7 @@ """ Factories for use in tests of XBlocks. """ -from __future__ import absolute_import, print_function + import datetime import functools diff --git a/common/lib/xmodule/xmodule/modulestore/tests/mongo_connection.py b/common/lib/xmodule/xmodule/modulestore/tests/mongo_connection.py index 082bc0b5a5..8da1fbd423 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/mongo_connection.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/mongo_connection.py @@ -4,7 +4,7 @@ The settings can be provided by environment variables in the shell running the t in a variety of environment variables but provides sensible defaults in case those env var overrides don't exist """ -from __future__ import absolute_import + import os diff --git a/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py b/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py index adc98fb25e..c2ac366b3d 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py @@ -2,7 +2,7 @@ """ The data type and use of it for declaratively creating test courses. """ -from __future__ import absolute_import + import datetime from collections import namedtuple diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_abstraction.py b/common/lib/xmodule/xmodule/modulestore/tests/test_abstraction.py index e334060eb8..85940cb969 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_abstraction.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_abstraction.py @@ -1,7 +1,7 @@ """ Simple test to ensure that modulestore base classes remain abstract """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_asides.py b/common/lib/xmodule/xmodule/modulestore/tests/test_asides.py index a1b474e9bd..afe2b7ab10 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_asides.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_asides.py @@ -1,7 +1,7 @@ """ Tests for Asides """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py index 09e745ea61..0df6ec1afd 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py @@ -2,7 +2,7 @@ Tests for assetstore using any of the modulestores for metadata. May extend to testing the storage options too. """ -from __future__ import absolute_import + import unittest from datetime import datetime, timedelta diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py index b9e19e521f..bf7ae8bb0e 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py @@ -1,7 +1,7 @@ """ Test contentstore.mongo functionality """ -from __future__ import absolute_import + import logging import mimetypes diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py b/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py index 3708c08bfa..2e12300605 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_cross_modulestore_import_export.py @@ -12,7 +12,7 @@ and then for each combination of modulestores, performing the sequence: """ -from __future__ import absolute_import + import itertools import os diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_inheritance.py b/common/lib/xmodule/xmodule/modulestore/tests/test_inheritance.py index 3a513615ce..a7f5bdbafd 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_inheritance.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_inheritance.py @@ -1,7 +1,7 @@ """ Unit tests for testing inheritance mixins """ -from __future__ import absolute_import + import ddt import unittest diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py b/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py index 700760a262..9eefa7796b 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_libraries.py @@ -5,7 +5,7 @@ Basic unit tests related to content libraries. Higher-level tests are in `cms/djangoapps/contentstore`. """ -from __future__ import absolute_import + import ddt import six diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py index 8eeb678262..3fed070144 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py @@ -1,7 +1,7 @@ """ Unit tests for the Mixed Modulestore, with DDT for the various stores (Split, Draft, XML) """ -from __future__ import absolute_import + import datetime import itertools diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py index 2484a6b5b3..6fb8a02838 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore_settings.py @@ -1,7 +1,7 @@ """ Tests for testing the modulestore settings migration code. """ -from __future__ import absolute_import + import copy from unittest import TestCase diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index 599a810024..c5ed5104b5 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -2,7 +2,7 @@ Unit tests for the Mongo modulestore """ -from __future__ import absolute_import + import logging import shutil diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py index a86f1df952..0d505a237a 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py @@ -3,7 +3,7 @@ Tests to verify correct number of MongoDB calls during course import/export and when using the Split modulestore. """ -from __future__ import absolute_import + from shutil import rmtree from tempfile import mkdtemp diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_publish.py b/common/lib/xmodule/xmodule/modulestore/tests/test_publish.py index 4d970144e9..eb7107295b 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_publish.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_publish.py @@ -1,7 +1,7 @@ """ Test the publish code (mostly testing that publishing doesn't result in orphans) """ -from __future__ import absolute_import + import itertools import os diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py b/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py index 6803df9512..29a3c3c2db 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py @@ -2,7 +2,7 @@ Tests of modulestore semantics: How do the interfaces methods of ModuleStore relate to each other? """ -from __future__ import absolute_import + import itertools from collections import namedtuple diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_copy_from_template.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_copy_from_template.py index be075965e6..099b17e564 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_copy_from_template.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_copy_from_template.py @@ -3,7 +3,7 @@ Tests for split's copy_from_template method. Currently it is only used for content libraries. However for these tests, we make sure it also works when copying from course to course. """ -from __future__ import absolute_import + import ddt from six.moves import range diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py index 265b296efe..32680a7e06 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py @@ -2,7 +2,7 @@ Tests for split_migrator """ -from __future__ import absolute_import + import random import uuid diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py index c12915a620..826ae671ee 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py @@ -1,7 +1,7 @@ """ Test split modulestore w/o using any django stuff. """ -from __future__ import absolute_import + import datetime import os diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py index 872033d390..f86eb61ea5 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore_bulk_operations.py @@ -2,7 +2,7 @@ Tests for bulk operations in Split Modulestore. """ # pylint: disable=protected-access -from __future__ import absolute_import + import copy import unittest diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py index e89cf15ad4..e6932a2724 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py @@ -1,5 +1,5 @@ """ Test the behavior of split_mongo/MongoConnection """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py index 5b0955a8d2..d557456de1 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import datetime import os diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_store_utilities.py b/common/lib/xmodule/xmodule/modulestore/tests/test_store_utilities.py index 3fb93d3cfc..98e9c8e54b 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_store_utilities.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_store_utilities.py @@ -1,7 +1,7 @@ """ Tests for store_utilities.py """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py index 5b2aa7da45..d2fcfb74ae 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py @@ -2,7 +2,7 @@ Tests around our XML modulestore, including importing well-formed and not-well-formed XML. """ -from __future__ import absolute_import + import os.path from glob import glob diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py index f40716cfa3..9d9f4a8d82 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py @@ -1,7 +1,7 @@ """ Tests for XML importer. """ -from __future__ import absolute_import + import importlib import os diff --git a/common/lib/xmodule/xmodule/modulestore/tests/utils.py b/common/lib/xmodule/xmodule/modulestore/tests/utils.py index 03dd6c83dd..6ae86a640d 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/utils.py @@ -1,7 +1,7 @@ """ Helper classes and methods for running modulestore tests without Django. """ -from __future__ import absolute_import + import io import os diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index 0a8d05597c..012fb780e2 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import codecs import glob diff --git a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py index d0d9dec9a6..d314a54b09 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py @@ -2,7 +2,7 @@ Methods for exporting course data to XML """ -from __future__ import absolute_import + import logging import os diff --git a/common/lib/xmodule/xmodule/modulestore/xml_importer.py b/common/lib/xmodule/xmodule/modulestore/xml_importer.py index c7605f24f7..74da12bf13 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_importer.py @@ -20,7 +20,7 @@ Modulestore virtual | XML physical (draft, published) (a, a) | (a, a) | (x, a) | (x, x) | (x, y) | (a, x) (a, b) | (a, b) | (x, b) | (x, x) | (x, y) | (a, x) """ -from __future__ import absolute_import, print_function + import json import io diff --git a/common/lib/xmodule/xmodule/mongo_utils.py b/common/lib/xmodule/xmodule/mongo_utils.py index b6d5d414f9..6b6bcb8b83 100644 --- a/common/lib/xmodule/xmodule/mongo_utils.py +++ b/common/lib/xmodule/xmodule/mongo_utils.py @@ -1,7 +1,7 @@ """ Common MongoDB connection functions. """ -from __future__ import absolute_import + import logging diff --git a/common/lib/xmodule/xmodule/partitions/partitions.py b/common/lib/xmodule/xmodule/partitions/partitions.py index a0b34f8b94..8bd9461cf2 100644 --- a/common/lib/xmodule/xmodule/partitions/partitions.py +++ b/common/lib/xmodule/xmodule/partitions/partitions.py @@ -1,6 +1,6 @@ """Defines ``Group`` and ``UserPartition`` models for partitioning""" -from __future__ import absolute_import + from collections import namedtuple diff --git a/common/lib/xmodule/xmodule/partitions/partitions_service.py b/common/lib/xmodule/xmodule/partitions/partitions_service.py index 0bcea9f7e2..79eee7f373 100644 --- a/common/lib/xmodule/xmodule/partitions/partitions_service.py +++ b/common/lib/xmodule/xmodule/partitions/partitions_service.py @@ -3,7 +3,7 @@ This is a service-like API that assigns tracks which groups users are in for var user partitions. It uses the user_service key/value store provided by the LMS runtime to persist the assignments. """ -from __future__ import absolute_import + import logging diff --git a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py index 5418c7dd4d..c9e8c37a61 100644 --- a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py +++ b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py @@ -3,7 +3,7 @@ Test the partitions and partitions service """ -from __future__ import absolute_import + from datetime import datetime diff --git a/common/lib/xmodule/xmodule/poll_module.py b/common/lib/xmodule/xmodule/poll_module.py index 31e7262418..ddbb912f87 100644 --- a/common/lib/xmodule/xmodule/poll_module.py +++ b/common/lib/xmodule/xmodule/poll_module.py @@ -6,7 +6,7 @@ If student does not yet anwered - Question with set of choices. If student have answered - Question with statistics for each answers. """ -from __future__ import absolute_import + import cgi import json diff --git a/common/lib/xmodule/xmodule/progress.py b/common/lib/xmodule/xmodule/progress.py index 9f01348aba..09b29a85b8 100644 --- a/common/lib/xmodule/xmodule/progress.py +++ b/common/lib/xmodule/xmodule/progress.py @@ -5,7 +5,7 @@ For most subclassing needs, you should only need to reimplement frac() and __str__(). ''' -from __future__ import absolute_import + import numbers diff --git a/common/lib/xmodule/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py index 41d716dc3a..f3a9b9f35d 100644 --- a/common/lib/xmodule/xmodule/randomize_module.py +++ b/common/lib/xmodule/xmodule/randomize_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import random diff --git a/common/lib/xmodule/xmodule/raw_module.py b/common/lib/xmodule/xmodule/raw_module.py index 5d9eb65db8..8d6b55f9e3 100644 --- a/common/lib/xmodule/xmodule/raw_module.py +++ b/common/lib/xmodule/xmodule/raw_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import re diff --git a/common/lib/xmodule/xmodule/seq_module.py b/common/lib/xmodule/xmodule/seq_module.py index 64271a32e9..f69eb705a0 100644 --- a/common/lib/xmodule/xmodule/seq_module.py +++ b/common/lib/xmodule/xmodule/seq_module.py @@ -3,7 +3,7 @@ xModule implementation of a learning sequence """ # pylint: disable=abstract-method -from __future__ import absolute_import + import collections import json diff --git a/common/lib/xmodule/xmodule/services.py b/common/lib/xmodule/xmodule/services.py index baeea84f46..c8b194a951 100644 --- a/common/lib/xmodule/xmodule/services.py +++ b/common/lib/xmodule/xmodule/services.py @@ -1,7 +1,7 @@ """ Module contains various XModule/XBlock services """ -from __future__ import absolute_import + import inspect diff --git a/common/lib/xmodule/xmodule/split_test_module.py b/common/lib/xmodule/xmodule/split_test_module.py index e9a965bc38..90dc2cb359 100644 --- a/common/lib/xmodule/xmodule/split_test_module.py +++ b/common/lib/xmodule/xmodule/split_test_module.py @@ -2,7 +2,7 @@ Module for running content split tests """ -from __future__ import absolute_import + import json import logging diff --git a/common/lib/xmodule/xmodule/static_content.py b/common/lib/xmodule/xmodule/static_content.py index 37adc9a46d..dc92a78f8d 100755 --- a/common/lib/xmodule/xmodule/static_content.py +++ b/common/lib/xmodule/xmodule/static_content.py @@ -4,7 +4,7 @@ This module has utility functions for gathering up the static content that is defined by XModules and XModuleDescriptors (javascript and css) """ -from __future__ import absolute_import + import errno import hashlib diff --git a/common/lib/xmodule/xmodule/stringify.py b/common/lib/xmodule/xmodule/stringify.py index fc8180c3d1..bc2ccb67dc 100644 --- a/common/lib/xmodule/xmodule/stringify.py +++ b/common/lib/xmodule/xmodule/stringify.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import + from lxml import etree diff --git a/common/lib/xmodule/xmodule/studio_editable.py b/common/lib/xmodule/xmodule/studio_editable.py index aa7c93154b..241953935c 100644 --- a/common/lib/xmodule/xmodule/studio_editable.py +++ b/common/lib/xmodule/xmodule/studio_editable.py @@ -1,7 +1,7 @@ """ Mixin to support editing in Studio. """ -from __future__ import absolute_import + import six from xmodule.x_module import AUTHOR_VIEW, STUDENT_VIEW, module_attr diff --git a/common/lib/xmodule/xmodule/tabs.py b/common/lib/xmodule/xmodule/tabs.py index 18f9166dd0..fa1b110987 100644 --- a/common/lib/xmodule/xmodule/tabs.py +++ b/common/lib/xmodule/xmodule/tabs.py @@ -1,7 +1,7 @@ """ Implement CourseTab """ -from __future__ import absolute_import + import logging from abc import ABCMeta diff --git a/common/lib/xmodule/xmodule/template_module.py b/common/lib/xmodule/xmodule/template_module.py index 0e53562f4a..3474186ca5 100644 --- a/common/lib/xmodule/xmodule/template_module.py +++ b/common/lib/xmodule/xmodule/template_module.py @@ -1,7 +1,7 @@ """ Template module """ -from __future__ import absolute_import + from string import Template from lxml import etree diff --git a/common/lib/xmodule/xmodule/templates.py b/common/lib/xmodule/xmodule/templates.py index ac1cbf2917..f019d5ee40 100644 --- a/common/lib/xmodule/xmodule/templates.py +++ b/common/lib/xmodule/xmodule/templates.py @@ -9,7 +9,7 @@ samples. """ # should this move to cms since it's really only for module crud? -from __future__ import absolute_import + import logging from collections import defaultdict diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index 739a0d883d..ba8f1f81cd 100644 --- a/common/lib/xmodule/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -7,7 +7,7 @@ Run like this: """ -from __future__ import absolute_import + import inspect import json diff --git a/common/lib/xmodule/xmodule/tests/helpers.py b/common/lib/xmodule/xmodule/tests/helpers.py index c46e8c6285..9154c071e0 100644 --- a/common/lib/xmodule/xmodule/tests/helpers.py +++ b/common/lib/xmodule/xmodule/tests/helpers.py @@ -2,7 +2,7 @@ Utility methods for unit tests. """ -from __future__ import absolute_import + import filecmp diff --git a/common/lib/xmodule/xmodule/tests/rendering/__init__.py b/common/lib/xmodule/xmodule/tests/rendering/__init__.py index c81c3d0b5c..d4ac267034 100644 --- a/common/lib/xmodule/xmodule/tests/rendering/__init__.py +++ b/common/lib/xmodule/xmodule/tests/rendering/__init__.py @@ -1,6 +1,6 @@ """ Package declaration for content assertions test helper module """ -from __future__ import absolute_import + from . import core diff --git a/common/lib/xmodule/xmodule/tests/rendering/core.py b/common/lib/xmodule/xmodule/tests/rendering/core.py index 2fed79a6e7..ce40bbe942 100644 --- a/common/lib/xmodule/xmodule/tests/rendering/core.py +++ b/common/lib/xmodule/xmodule/tests/rendering/core.py @@ -35,7 +35,7 @@ The functions are of the form: A further extension would be to provide a companion set of functions that resources that are provided to the Fragment """ -from __future__ import absolute_import + import lxml.etree import lxml.html diff --git a/common/lib/xmodule/xmodule/tests/test_annotatable_module.py b/common/lib/xmodule/xmodule/tests/test_annotatable_module.py index dcbf27c5ff..5f54657214 100644 --- a/common/lib/xmodule/xmodule/tests/test_annotatable_module.py +++ b/common/lib/xmodule/xmodule/tests/test_annotatable_module.py @@ -1,6 +1,6 @@ """Module annotatable tests""" -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py b/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py index 4e7dda4bd7..43c3ad9fda 100644 --- a/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py +++ b/common/lib/xmodule/xmodule/tests/test_annotator_mixin.py @@ -2,7 +2,7 @@ This test will run for annotator_mixin.py """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index b257b58ca6..26256ada10 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -5,7 +5,7 @@ Tests of the Capa XModule # pylint: disable=missing-docstring # pylint: disable=invalid-name -from __future__ import absolute_import + import datetime import json diff --git a/common/lib/xmodule/xmodule/tests/test_conditional.py b/common/lib/xmodule/xmodule/tests/test_conditional.py index 84c4864487..e2b8c5c92b 100644 --- a/common/lib/xmodule/xmodule/tests/test_conditional.py +++ b/common/lib/xmodule/xmodule/tests/test_conditional.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + import json import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_conditional_logic.py b/common/lib/xmodule/xmodule/tests/test_conditional_logic.py index b421cc19b2..5c483ed784 100644 --- a/common/lib/xmodule/xmodule/tests/test_conditional_logic.py +++ b/common/lib/xmodule/xmodule/tests/test_conditional_logic.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test for Conditional Xmodule functional logic.""" -from __future__ import absolute_import + from xmodule.conditional_module import ConditionalDescriptor diff --git a/common/lib/xmodule/xmodule/tests/test_content.py b/common/lib/xmodule/xmodule/tests/test_content.py index 99cc78d28e..61dee870ad 100644 --- a/common/lib/xmodule/xmodule/tests/test_content.py +++ b/common/lib/xmodule/xmodule/tests/test_content.py @@ -1,6 +1,6 @@ """Tests for contents""" -from __future__ import absolute_import + import os import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py b/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py index 1409272ced..5e5e56fdf3 100644 --- a/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py +++ b/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py @@ -1,7 +1,7 @@ """ Tests for course_metadata_utils. """ -from __future__ import absolute_import + from collections import namedtuple from datetime import datetime, timedelta diff --git a/common/lib/xmodule/xmodule/tests/test_course_module.py b/common/lib/xmodule/xmodule/tests/test_course_module.py index 76d63be5ea..c9d05c0013 100644 --- a/common/lib/xmodule/xmodule/tests/test_course_module.py +++ b/common/lib/xmodule/xmodule/tests/test_course_module.py @@ -1,5 +1,5 @@ """Tests the course modules and their functions""" -from __future__ import absolute_import, print_function + import itertools import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py b/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py index 83dc482e3d..3e52f81525 100644 --- a/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py +++ b/common/lib/xmodule/xmodule/tests/test_delay_between_attempts.py @@ -7,7 +7,7 @@ of the submit_problem method of a capa module when the "delay between quiz submissions" setting is set to different values """ -from __future__ import absolute_import + import datetime import textwrap diff --git a/common/lib/xmodule/xmodule/tests/test_editing_module.py b/common/lib/xmodule/xmodule/tests/test_editing_module.py index 0ea3e5bd47..acb73955dc 100644 --- a/common/lib/xmodule/xmodule/tests/test_editing_module.py +++ b/common/lib/xmodule/xmodule/tests/test_editing_module.py @@ -1,5 +1,5 @@ """ Tests for editing descriptors""" -from __future__ import absolute_import + import logging import os diff --git a/common/lib/xmodule/xmodule/tests/test_error_module.py b/common/lib/xmodule/xmodule/tests/test_error_module.py index 60ccc606ea..4a9f751ad1 100644 --- a/common/lib/xmodule/xmodule/tests/test_error_module.py +++ b/common/lib/xmodule/xmodule/tests/test_error_module.py @@ -1,7 +1,7 @@ """ Tests for ErrorModule and NonStaffErrorModule """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_export.py b/common/lib/xmodule/xmodule/tests/test_export.py index 15c9ad4c5a..7af153e62b 100644 --- a/common/lib/xmodule/xmodule/tests/test_export.py +++ b/common/lib/xmodule/xmodule/tests/test_export.py @@ -2,7 +2,7 @@ """ Tests of XML export """ -from __future__ import absolute_import, print_function + import shutil import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_fields.py b/common/lib/xmodule/xmodule/tests/test_fields.py index fef52e268d..3b73474c5a 100644 --- a/common/lib/xmodule/xmodule/tests/test_fields.py +++ b/common/lib/xmodule/xmodule/tests/test_fields.py @@ -1,6 +1,6 @@ """Tests for classes defined in fields.py.""" -from __future__ import absolute_import + import datetime import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_graders.py b/common/lib/xmodule/xmodule/tests/test_graders.py index f69b8b90bb..efe6e19640 100644 --- a/common/lib/xmodule/xmodule/tests/test_graders.py +++ b/common/lib/xmodule/xmodule/tests/test_graders.py @@ -2,7 +2,7 @@ Grading tests """ -from __future__ import absolute_import + import unittest from datetime import datetime, timedelta diff --git a/common/lib/xmodule/xmodule/tests/test_html_module.py b/common/lib/xmodule/xmodule/tests/test_html_module.py index 7299b24f36..a023a9072e 100644 --- a/common/lib/xmodule/xmodule/tests/test_html_module.py +++ b/common/lib/xmodule/xmodule/tests/test_html_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_import.py b/common/lib/xmodule/xmodule/tests/test_import.py index 5c91d5ad29..e15c00b6bd 100644 --- a/common/lib/xmodule/xmodule/tests/test_import.py +++ b/common/lib/xmodule/xmodule/tests/test_import.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, print_function + import datetime from tempfile import mkdtemp diff --git a/common/lib/xmodule/xmodule/tests/test_import_static.py b/common/lib/xmodule/xmodule/tests/test_import_static.py index 728c1ca545..df6830f453 100644 --- a/common/lib/xmodule/xmodule/tests/test_import_static.py +++ b/common/lib/xmodule/xmodule/tests/test_import_static.py @@ -1,7 +1,7 @@ """ Tests that check that we ignore the appropriate files when importing courses. """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_library_content.py b/common/lib/xmodule/xmodule/tests/test_library_content.py index a1d441d8ac..cfe4ce2b5d 100644 --- a/common/lib/xmodule/xmodule/tests/test_library_content.py +++ b/common/lib/xmodule/xmodule/tests/test_library_content.py @@ -4,7 +4,7 @@ Basic unit tests for LibraryContentModule Higher-level tests are in `cms/djangoapps/contentstore/tests/test_libraries.py`. """ -from __future__ import absolute_import + import six from bson.objectid import ObjectId diff --git a/common/lib/xmodule/xmodule/tests/test_library_root.py b/common/lib/xmodule/xmodule/tests/test_library_root.py index 896713fd15..c6ebfadee7 100644 --- a/common/lib/xmodule/xmodule/tests/test_library_root.py +++ b/common/lib/xmodule/xmodule/tests/test_library_root.py @@ -2,7 +2,7 @@ """ Basic unit tests for LibraryRoot """ -from __future__ import absolute_import + from mock import patch from six.moves import range diff --git a/common/lib/xmodule/xmodule/tests/test_library_tools.py b/common/lib/xmodule/xmodule/tests/test_library_tools.py index 6587ba532f..e9f3c925b0 100644 --- a/common/lib/xmodule/xmodule/tests/test_library_tools.py +++ b/common/lib/xmodule/xmodule/tests/test_library_tools.py @@ -1,7 +1,7 @@ """ Tests for library tools service. """ -from __future__ import absolute_import + from mock import patch diff --git a/common/lib/xmodule/xmodule/tests/test_lti20_unit.py b/common/lib/xmodule/xmodule/tests/test_lti20_unit.py index 98c99e531f..623f56d2ae 100644 --- a/common/lib/xmodule/xmodule/tests/test_lti20_unit.py +++ b/common/lib/xmodule/xmodule/tests/test_lti20_unit.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for LTI Xmodule LTIv2.0 functional logic.""" -from __future__ import absolute_import + import datetime import textwrap diff --git a/common/lib/xmodule/xmodule/tests/test_lti_unit.py b/common/lib/xmodule/xmodule/tests/test_lti_unit.py index a82dd61f33..6ebd26f688 100644 --- a/common/lib/xmodule/xmodule/tests/test_lti_unit.py +++ b/common/lib/xmodule/xmodule/tests/test_lti_unit.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test for LTI Xmodule functional logic.""" -from __future__ import absolute_import + import datetime import textwrap diff --git a/common/lib/xmodule/xmodule/tests/test_mako_module.py b/common/lib/xmodule/xmodule/tests/test_mako_module.py index fe68ae776a..ef93e7aa6a 100644 --- a/common/lib/xmodule/xmodule/tests/test_mako_module.py +++ b/common/lib/xmodule/xmodule/tests/test_mako_module.py @@ -1,6 +1,6 @@ """ Test mako_module.py """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/common/lib/xmodule/xmodule/tests/test_mongo_utils.py b/common/lib/xmodule/xmodule/tests/test_mongo_utils.py index 56cb898624..b48933c768 100644 --- a/common/lib/xmodule/xmodule/tests/test_mongo_utils.py +++ b/common/lib/xmodule/xmodule/tests/test_mongo_utils.py @@ -1,7 +1,7 @@ """ Tests for methods defined in mongo_utils.py """ -from __future__ import absolute_import + import os from unittest import TestCase diff --git a/common/lib/xmodule/xmodule/tests/test_poll.py b/common/lib/xmodule/xmodule/tests/test_poll.py index f6c38cf2aa..8a0b193f32 100644 --- a/common/lib/xmodule/xmodule/tests/test_poll.py +++ b/common/lib/xmodule/xmodule/tests/test_poll.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Test for Poll Xmodule functional logic.""" -from __future__ import absolute_import + from mock import Mock diff --git a/common/lib/xmodule/xmodule/tests/test_progress.py b/common/lib/xmodule/xmodule/tests/test_progress.py index 036cdb72d8..64ba9bcbf1 100644 --- a/common/lib/xmodule/xmodule/tests/test_progress.py +++ b/common/lib/xmodule/xmodule/tests/test_progress.py @@ -1,6 +1,6 @@ """Module progress tests""" -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_randomize_module.py b/common/lib/xmodule/xmodule/tests/test_randomize_module.py index ae19ed16e4..6f3b7576f8 100644 --- a/common/lib/xmodule/xmodule/tests/test_randomize_module.py +++ b/common/lib/xmodule/xmodule/tests/test_randomize_module.py @@ -1,7 +1,7 @@ """ Test cases covering workflows and behaviors for the Randomize XModule """ -from __future__ import absolute_import + import unittest from datetime import datetime, timedelta diff --git a/common/lib/xmodule/xmodule/tests/test_resource_templates.py b/common/lib/xmodule/xmodule/tests/test_resource_templates.py index 881fabf51f..a0210e8276 100644 --- a/common/lib/xmodule/xmodule/tests/test_resource_templates.py +++ b/common/lib/xmodule/xmodule/tests/test_resource_templates.py @@ -1,7 +1,7 @@ """ Tests for xmodule.x_module.ResourceTemplates """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_sequence.py b/common/lib/xmodule/xmodule/tests/test_sequence.py index 3dc8eda361..4144e05efc 100644 --- a/common/lib/xmodule/xmodule/tests/test_sequence.py +++ b/common/lib/xmodule/xmodule/tests/test_sequence.py @@ -2,7 +2,7 @@ Tests for sequence module. """ # pylint: disable=no-member -from __future__ import absolute_import + import ast import json diff --git a/common/lib/xmodule/xmodule/tests/test_services.py b/common/lib/xmodule/xmodule/tests/test_services.py index 10dcabafbf..728d053beb 100644 --- a/common/lib/xmodule/xmodule/tests/test_services.py +++ b/common/lib/xmodule/xmodule/tests/test_services.py @@ -2,7 +2,7 @@ Tests for SettingsService """ -from __future__ import absolute_import + import unittest from django.test import TestCase diff --git a/common/lib/xmodule/xmodule/tests/test_split_test_module.py b/common/lib/xmodule/xmodule/tests/test_split_test_module.py index f0b71aff96..2392dc06ab 100644 --- a/common/lib/xmodule/xmodule/tests/test_split_test_module.py +++ b/common/lib/xmodule/xmodule/tests/test_split_test_module.py @@ -1,7 +1,7 @@ """ Tests for the Split Testing Module """ -from __future__ import absolute_import + import ddt import lxml diff --git a/common/lib/xmodule/xmodule/tests/test_stringify.py b/common/lib/xmodule/xmodule/tests/test_stringify.py index 5efb379007..54a39a5fd4 100644 --- a/common/lib/xmodule/xmodule/tests/test_stringify.py +++ b/common/lib/xmodule/xmodule/tests/test_stringify.py @@ -1,7 +1,7 @@ """ Tests stringify functions used in xmodule html """ -from __future__ import absolute_import, print_function + from lxml import etree diff --git a/common/lib/xmodule/xmodule/tests/test_studio_editable.py b/common/lib/xmodule/xmodule/tests/test_studio_editable.py index ff7bbc19e3..b2a7d301e5 100644 --- a/common/lib/xmodule/xmodule/tests/test_studio_editable.py +++ b/common/lib/xmodule/xmodule/tests/test_studio_editable.py @@ -2,7 +2,7 @@ Tests for StudioEditableModule. """ -from __future__ import absolute_import + from xmodule.tests.test_vertical import BaseVerticalBlockTest from xmodule.x_module import AUTHOR_VIEW diff --git a/common/lib/xmodule/xmodule/tests/test_unit_block.py b/common/lib/xmodule/xmodule/tests/test_unit_block.py index e2b5803ee8..af6690f0e1 100644 --- a/common/lib/xmodule/xmodule/tests/test_unit_block.py +++ b/common/lib/xmodule/xmodule/tests/test_unit_block.py @@ -1,7 +1,7 @@ """ Tests for the Unit XBlock """ -from __future__ import absolute_import, division, print_function, unicode_literals + import re import unittest from xml.dom import minidom diff --git a/common/lib/xmodule/xmodule/tests/test_util_duedate.py b/common/lib/xmodule/xmodule/tests/test_util_duedate.py index 2502f9102e..ab4e1db22b 100644 --- a/common/lib/xmodule/xmodule/tests/test_util_duedate.py +++ b/common/lib/xmodule/xmodule/tests/test_util_duedate.py @@ -1,7 +1,7 @@ """ Tests for extended due date utilities. """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_utils_django.py b/common/lib/xmodule/xmodule/tests/test_utils_django.py index 67afcddf7e..cd902653b1 100644 --- a/common/lib/xmodule/xmodule/tests/test_utils_django.py +++ b/common/lib/xmodule/xmodule/tests/test_utils_django.py @@ -1,5 +1,5 @@ """Tests for methods defined in util/django.py""" -from __future__ import absolute_import + from unittest import TestCase diff --git a/common/lib/xmodule/xmodule/tests/test_utils_escape_html_characters.py b/common/lib/xmodule/xmodule/tests/test_utils_escape_html_characters.py index f6e997aba3..8ec8ee5ca7 100644 --- a/common/lib/xmodule/xmodule/tests/test_utils_escape_html_characters.py +++ b/common/lib/xmodule/xmodule/tests/test_utils_escape_html_characters.py @@ -1,5 +1,5 @@ """Tests for methods defined in util/misc.py""" -from __future__ import absolute_import + from unittest import TestCase diff --git a/common/lib/xmodule/xmodule/tests/test_validation.py b/common/lib/xmodule/xmodule/tests/test_validation.py index 394e84999f..eb0f716f64 100644 --- a/common/lib/xmodule/xmodule/tests/test_validation.py +++ b/common/lib/xmodule/xmodule/tests/test_validation.py @@ -2,7 +2,7 @@ Test xblock/validation.py """ -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/test_vertical.py b/common/lib/xmodule/xmodule/tests/test_vertical.py index 7ceb28eeef..dd0e187d1f 100644 --- a/common/lib/xmodule/xmodule/tests/test_vertical.py +++ b/common/lib/xmodule/xmodule/tests/test_vertical.py @@ -3,7 +3,7 @@ Tests for vertical module. """ # pylint: disable=protected-access -from __future__ import absolute_import, division, print_function, unicode_literals + from collections import namedtuple import json diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index 2246cb6106..feed01cb75 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -12,7 +12,7 @@ You can then use the CourseFactory and XModuleItemFactory as defined in common/lib/xmodule/xmodule/modulestore/tests/factories.py to create the course, section, subsection, unit, etc. """ -from __future__ import absolute_import + import datetime import json diff --git a/common/lib/xmodule/xmodule/tests/test_word_cloud.py b/common/lib/xmodule/xmodule/tests/test_word_cloud.py index 36656492a6..ee25dd0d4c 100644 --- a/common/lib/xmodule/xmodule/tests/test_word_cloud.py +++ b/common/lib/xmodule/xmodule/tests/test_word_cloud.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Test for Word cloud Xmodule functional logic.""" -from __future__ import absolute_import + from webob.multidict import MultiDict diff --git a/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py b/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py index 4ca8655b8a..6039848e08 100644 --- a/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py +++ b/common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py @@ -6,7 +6,7 @@ functionality # For tests, ignore access to protected members # pylint: disable=protected-access -from __future__ import absolute_import + from unittest.case import SkipTest, TestCase diff --git a/common/lib/xmodule/xmodule/tests/test_xml_module.py b/common/lib/xmodule/xmodule/tests/test_xml_module.py index 5fce353419..1f9ba9cd7d 100644 --- a/common/lib/xmodule/xmodule/tests/test_xml_module.py +++ b/common/lib/xmodule/xmodule/tests/test_xml_module.py @@ -1,7 +1,7 @@ # disable missing docstring # pylint: disable=missing-docstring -from __future__ import absolute_import + import unittest diff --git a/common/lib/xmodule/xmodule/tests/xml/__init__.py b/common/lib/xmodule/xmodule/tests/xml/__init__.py index 276932137c..4a579199cc 100644 --- a/common/lib/xmodule/xmodule/tests/xml/__init__.py +++ b/common/lib/xmodule/xmodule/tests/xml/__init__.py @@ -1,7 +1,7 @@ """ Xml parsing tests for XModules """ -from __future__ import absolute_import + import pprint diff --git a/common/lib/xmodule/xmodule/tests/xml/factories.py b/common/lib/xmodule/xmodule/tests/xml/factories.py index 0aa282f628..67b71d7905 100644 --- a/common/lib/xmodule/xmodule/tests/xml/factories.py +++ b/common/lib/xmodule/xmodule/tests/xml/factories.py @@ -2,7 +2,7 @@ Factories for generating edXML for testing XModule import """ -from __future__ import absolute_import + import inspect from tempfile import mkdtemp diff --git a/common/lib/xmodule/xmodule/tests/xml/test_inheritance.py b/common/lib/xmodule/xmodule/tests/xml/test_inheritance.py index f0dbe97fb6..7d70b5f1d2 100644 --- a/common/lib/xmodule/xmodule/tests/xml/test_inheritance.py +++ b/common/lib/xmodule/xmodule/tests/xml/test_inheritance.py @@ -1,7 +1,7 @@ """ Test that inherited fields work correctly when parsing XML """ -from __future__ import absolute_import + from xmodule.tests.xml import XModuleXmlImportTest from xmodule.tests.xml.factories import CourseFactory, ProblemFactory, SequenceFactory, XmlImportFactory diff --git a/common/lib/xmodule/xmodule/tests/xml/test_policy.py b/common/lib/xmodule/xmodule/tests/xml/test_policy.py index 000d292e5f..eef42f3243 100644 --- a/common/lib/xmodule/xmodule/tests/xml/test_policy.py +++ b/common/lib/xmodule/xmodule/tests/xml/test_policy.py @@ -2,7 +2,7 @@ Tests that policy json files import correctly when loading XML """ -from __future__ import absolute_import + import pytest diff --git a/common/lib/xmodule/xmodule/timeinfo.py b/common/lib/xmodule/xmodule/timeinfo.py index d9f4a6abc7..4063713aae 100644 --- a/common/lib/xmodule/xmodule/timeinfo.py +++ b/common/lib/xmodule/xmodule/timeinfo.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging diff --git a/common/lib/xmodule/xmodule/unit_block.py b/common/lib/xmodule/xmodule/unit_block.py index 2516c7fe38..91dd1f3cde 100644 --- a/common/lib/xmodule/xmodule/unit_block.py +++ b/common/lib/xmodule/xmodule/unit_block.py @@ -4,7 +4,7 @@ An XBlock which groups related XBlocks together. This is like the "vertical" block, but without that block's UI code, JavaScript, and other legacy features. """ -from __future__ import absolute_import, division, print_function, unicode_literals + from web_fragments.fragment import Fragment from xblock.completable import XBlockCompletionMode diff --git a/common/lib/xmodule/xmodule/util/duedate.py b/common/lib/xmodule/xmodule/util/duedate.py index fa42c9b64f..b0543a3446 100644 --- a/common/lib/xmodule/xmodule/util/duedate.py +++ b/common/lib/xmodule/xmodule/util/duedate.py @@ -1,7 +1,7 @@ """ Miscellaneous utility functions. """ -from __future__ import absolute_import + from functools import partial diff --git a/common/lib/xmodule/xmodule/util/misc.py b/common/lib/xmodule/xmodule/util/misc.py index daa6074f1e..b121dc52a3 100644 --- a/common/lib/xmodule/xmodule/util/misc.py +++ b/common/lib/xmodule/xmodule/util/misc.py @@ -1,7 +1,7 @@ """ Miscellaneous utility functions. """ -from __future__ import absolute_import + import re diff --git a/common/lib/xmodule/xmodule/util/sandboxing.py b/common/lib/xmodule/xmodule/util/sandboxing.py index e2def9c918..0d80810a78 100644 --- a/common/lib/xmodule/xmodule/util/sandboxing.py +++ b/common/lib/xmodule/xmodule/util/sandboxing.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import re diff --git a/common/lib/xmodule/xmodule/util/xmodule_django.py b/common/lib/xmodule/xmodule/util/xmodule_django.py index 0fc114b0ab..d7b3763dfb 100644 --- a/common/lib/xmodule/xmodule/util/xmodule_django.py +++ b/common/lib/xmodule/xmodule/util/xmodule_django.py @@ -4,7 +4,7 @@ NOTE: This file should only be imported into 'django-safe' code, i.e. known that runtime environment with the djangoapps in common configured to load """ -from __future__ import absolute_import + import webpack_loader # NOTE: we are importing this method so that any module that imports us has access to get_current_request diff --git a/common/lib/xmodule/xmodule/validation.py b/common/lib/xmodule/xmodule/validation.py index abbfea93f7..62cc9e42eb 100644 --- a/common/lib/xmodule/xmodule/validation.py +++ b/common/lib/xmodule/xmodule/validation.py @@ -1,7 +1,7 @@ """ Extension of XBlock Validation class to include information for presentation in Studio. """ -from __future__ import absolute_import + import six from xblock.validation import Validation, ValidationMessage diff --git a/common/lib/xmodule/xmodule/vertical_block.py b/common/lib/xmodule/xmodule/vertical_block.py index b812f0b844..b26cddd73a 100644 --- a/common/lib/xmodule/xmodule/vertical_block.py +++ b/common/lib/xmodule/xmodule/vertical_block.py @@ -2,7 +2,7 @@ VerticalBlock - an XBlock which renders its children in a column. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging from copy import copy diff --git a/common/lib/xmodule/xmodule/video_module/bumper_utils.py b/common/lib/xmodule/xmodule/video_module/bumper_utils.py index 4ade5b3116..0e6f3a9fc1 100644 --- a/common/lib/xmodule/xmodule/video_module/bumper_utils.py +++ b/common/lib/xmodule/xmodule/video_module/bumper_utils.py @@ -1,7 +1,7 @@ """ Utils for video bumper """ -from __future__ import absolute_import + import copy import json diff --git a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py index 34e60299d4..5bd40988fa 100644 --- a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py +++ b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py @@ -2,7 +2,7 @@ Utility functions for transcripts. ++++++++++++++++++++++++++++++++++ """ -from __future__ import absolute_import + import copy import simplejson as json diff --git a/common/lib/xmodule/xmodule/video_module/video_handlers.py b/common/lib/xmodule/xmodule/video_module/video_handlers.py index d31dba8a98..61497eb598 100644 --- a/common/lib/xmodule/xmodule/video_module/video_handlers.py +++ b/common/lib/xmodule/xmodule/video_module/video_handlers.py @@ -5,7 +5,7 @@ StudentViewHandlers are handlers for video module instance. StudioViewHandlers are handlers for video descriptor instance. """ -from __future__ import absolute_import + import json import logging diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py index 91572c52c0..1ad75f14b8 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -12,7 +12,7 @@ Examples of html5 videos for manual testing: https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.webm https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.ogv """ -from __future__ import absolute_import + import copy import json diff --git a/common/lib/xmodule/xmodule/video_module/video_utils.py b/common/lib/xmodule/xmodule/video_module/video_utils.py index 718ea52b01..9e8e47da7f 100644 --- a/common/lib/xmodule/xmodule/video_module/video_utils.py +++ b/common/lib/xmodule/xmodule/video_module/video_utils.py @@ -3,7 +3,7 @@ Module contains utils specific for video_module but not for transcripts. """ -from __future__ import absolute_import + import logging from collections import OrderedDict diff --git a/common/lib/xmodule/xmodule/video_module/video_xfields.py b/common/lib/xmodule/xmodule/video_module/video_xfields.py index 6eeee4ad6b..c18c554649 100644 --- a/common/lib/xmodule/xmodule/video_module/video_xfields.py +++ b/common/lib/xmodule/xmodule/video_module/video_xfields.py @@ -1,7 +1,7 @@ """ XFields for video module. """ -from __future__ import absolute_import + import datetime diff --git a/common/lib/xmodule/xmodule/word_cloud_module.py b/common/lib/xmodule/xmodule/word_cloud_module.py index e6ca4f53a4..ec194371b7 100644 --- a/common/lib/xmodule/xmodule/word_cloud_module.py +++ b/common/lib/xmodule/xmodule/word_cloud_module.py @@ -6,7 +6,7 @@ If student does not yet answered - `num_inputs` numbers of text inputs. If student have answered - words he entered and cloud. """ -from __future__ import absolute_import + import json import logging diff --git a/common/lib/xmodule/xmodule/wrapper_module.py b/common/lib/xmodule/xmodule/wrapper_module.py index 8b5b7cf875..d235c7bc9d 100644 --- a/common/lib/xmodule/xmodule/wrapper_module.py +++ b/common/lib/xmodule/xmodule/wrapper_module.py @@ -1,7 +1,7 @@ # Same as vertical, # But w/o css delimiters between children -from __future__ import absolute_import + from xmodule.vertical_block import VerticalBlock diff --git a/common/lib/xmodule/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py index 051e9cd6e6..bb921ee286 100644 --- a/common/lib/xmodule/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging import os diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index cdfdaa953d..1e0ecc1e99 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import copy import json diff --git a/common/test/acceptance/fixtures/__init__.py b/common/test/acceptance/fixtures/__init__.py index ef6e33a159..12551034ab 100644 --- a/common/test/acceptance/fixtures/__init__.py +++ b/common/test/acceptance/fixtures/__init__.py @@ -1,7 +1,7 @@ """ Envirement Setup for fixtures. """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/fixtures/base.py b/common/test/acceptance/fixtures/base.py index 652ae43573..6979a6440b 100644 --- a/common/test/acceptance/fixtures/base.py +++ b/common/test/acceptance/fixtures/base.py @@ -1,7 +1,7 @@ """ Common code shared by course and library fixtures. """ -from __future__ import absolute_import + import json diff --git a/common/test/acceptance/fixtures/catalog.py b/common/test/acceptance/fixtures/catalog.py index c09309eb39..1b6ea42634 100644 --- a/common/test/acceptance/fixtures/catalog.py +++ b/common/test/acceptance/fixtures/catalog.py @@ -1,7 +1,7 @@ """ Tools to create catalog-related data for use in bok choy tests. """ -from __future__ import absolute_import + import json diff --git a/common/test/acceptance/fixtures/certificates.py b/common/test/acceptance/fixtures/certificates.py index 876e8aa1ff..174581c303 100644 --- a/common/test/acceptance/fixtures/certificates.py +++ b/common/test/acceptance/fixtures/certificates.py @@ -2,7 +2,7 @@ Tools for creating certificates config fixture data. """ -from __future__ import absolute_import + import json diff --git a/common/test/acceptance/fixtures/config.py b/common/test/acceptance/fixtures/config.py index 52a9649d09..0e359bdbc1 100644 --- a/common/test/acceptance/fixtures/config.py +++ b/common/test/acceptance/fixtures/config.py @@ -1,7 +1,7 @@ """ Fixture to manipulate configuration models. """ -from __future__ import absolute_import + import json import re diff --git a/common/test/acceptance/fixtures/course.py b/common/test/acceptance/fixtures/course.py index 8bbb67ea78..822ec2b742 100644 --- a/common/test/acceptance/fixtures/course.py +++ b/common/test/acceptance/fixtures/course.py @@ -2,7 +2,7 @@ Fixture to create a course and course components (XBlocks). """ -from __future__ import absolute_import + import datetime import json diff --git a/common/test/acceptance/fixtures/discussion.py b/common/test/acceptance/fixtures/discussion.py index c13cb794d9..ad03133b2a 100644 --- a/common/test/acceptance/fixtures/discussion.py +++ b/common/test/acceptance/fixtures/discussion.py @@ -2,7 +2,7 @@ Tools for creating discussion content fixture data. """ -from __future__ import absolute_import + import json from datetime import datetime diff --git a/common/test/acceptance/fixtures/edxnotes.py b/common/test/acceptance/fixtures/edxnotes.py index 4d49ff47e1..c5d81bf9ad 100644 --- a/common/test/acceptance/fixtures/edxnotes.py +++ b/common/test/acceptance/fixtures/edxnotes.py @@ -2,7 +2,7 @@ Tools for creating edxnotes content fixture data. """ -from __future__ import absolute_import + import json diff --git a/common/test/acceptance/fixtures/library.py b/common/test/acceptance/fixtures/library.py index 70eda71c51..850bb88719 100644 --- a/common/test/acceptance/fixtures/library.py +++ b/common/test/acceptance/fixtures/library.py @@ -2,7 +2,7 @@ Fixture to create a Content Library """ -from __future__ import absolute_import + import six from opaque_keys.edx.keys import CourseKey diff --git a/common/test/acceptance/fixtures/programs.py b/common/test/acceptance/fixtures/programs.py index 636987e2c5..609991a3de 100644 --- a/common/test/acceptance/fixtures/programs.py +++ b/common/test/acceptance/fixtures/programs.py @@ -1,7 +1,7 @@ """ Tools to create programs-related data for use in bok choy tests. """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.config import ConfigModelFixture diff --git a/common/test/acceptance/fixtures/xqueue.py b/common/test/acceptance/fixtures/xqueue.py index 326580af5e..a46e42ba2c 100644 --- a/common/test/acceptance/fixtures/xqueue.py +++ b/common/test/acceptance/fixtures/xqueue.py @@ -2,7 +2,7 @@ Fixture to configure XQueue response. """ -from __future__ import absolute_import + import json diff --git a/common/test/acceptance/pages/common/__init__.py b/common/test/acceptance/pages/common/__init__.py index 2215bf8189..f6c2a2364b 100644 --- a/common/test/acceptance/pages/common/__init__.py +++ b/common/test/acceptance/pages/common/__init__.py @@ -1,7 +1,7 @@ """ Package of common page objects for acceptance tests """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/pages/common/auto_auth.py b/common/test/acceptance/pages/common/auto_auth.py index b0b4040275..0e11d7d039 100644 --- a/common/test/acceptance/pages/common/auto_auth.py +++ b/common/test/acceptance/pages/common/auto_auth.py @@ -1,7 +1,7 @@ """ Auto-auth page (used to automatically log in during testing). """ -from __future__ import absolute_import + import json import os diff --git a/common/test/acceptance/pages/common/logout.py b/common/test/acceptance/pages/common/logout.py index 71d09c08cc..f8b5eaf50f 100644 --- a/common/test/acceptance/pages/common/logout.py +++ b/common/test/acceptance/pages/common/logout.py @@ -1,7 +1,7 @@ """ Logout Page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/common/paging.py b/common/test/acceptance/pages/common/paging.py index d516df621b..ec8bfc2cb4 100644 --- a/common/test/acceptance/pages/common/paging.py +++ b/common/test/acceptance/pages/common/paging.py @@ -3,7 +3,7 @@ Common mixin for paginated UIs. """ -from __future__ import absolute_import + import six from selenium.webdriver.common.keys import Keys diff --git a/common/test/acceptance/pages/common/utils.py b/common/test/acceptance/pages/common/utils.py index ba81859767..aa93e75110 100644 --- a/common/test/acceptance/pages/common/utils.py +++ b/common/test/acceptance/pages/common/utils.py @@ -1,7 +1,7 @@ """ Utility methods common to Studio and the LMS. """ -from __future__ import absolute_import + import six from bok_choy.promise import BrokenPromise diff --git a/common/test/acceptance/pages/lms/__init__.py b/common/test/acceptance/pages/lms/__init__.py index 93720833c1..fbd187cea8 100644 --- a/common/test/acceptance/pages/lms/__init__.py +++ b/common/test/acceptance/pages/lms/__init__.py @@ -1,7 +1,7 @@ """ Package of lms page objects for acceptance tests """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/pages/lms/account_settings.py b/common/test/acceptance/pages/lms/account_settings.py index 486d704839..d3db20e1f9 100644 --- a/common/test/acceptance/pages/lms/account_settings.py +++ b/common/test/acceptance/pages/lms/account_settings.py @@ -1,7 +1,7 @@ """ Base class for account settings page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/lms/admin.py b/common/test/acceptance/pages/lms/admin.py index 7029fddced..33f7f6d0e4 100644 --- a/common/test/acceptance/pages/lms/admin.py +++ b/common/test/acceptance/pages/lms/admin.py @@ -1,7 +1,7 @@ """ Pages object for the Django's /admin/ views. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/annotation_component.py b/common/test/acceptance/pages/lms/annotation_component.py index be3f50d366..3506c933ae 100644 --- a/common/test/acceptance/pages/lms/annotation_component.py +++ b/common/test/acceptance/pages/lms/annotation_component.py @@ -1,7 +1,7 @@ """ Annotation Component Page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from selenium.webdriver import ActionChains diff --git a/common/test/acceptance/pages/lms/bookmarks.py b/common/test/acceptance/pages/lms/bookmarks.py index 5e87cfcedb..bfa2ae04a3 100644 --- a/common/test/acceptance/pages/lms/bookmarks.py +++ b/common/test/acceptance/pages/lms/bookmarks.py @@ -2,7 +2,7 @@ Courseware Boomarks """ -from __future__ import absolute_import + from common.test.acceptance.pages.common.paging import PaginatedUIMixin from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/catalog.py b/common/test/acceptance/pages/lms/catalog.py index 7f275d09b4..ad077f416b 100644 --- a/common/test/acceptance/pages/lms/catalog.py +++ b/common/test/acceptance/pages/lms/catalog.py @@ -1,7 +1,7 @@ """ Course catalog page """ -from __future__ import absolute_import + import re diff --git a/common/test/acceptance/pages/lms/ccx_dashboard_page.py b/common/test/acceptance/pages/lms/ccx_dashboard_page.py index 251d07d468..be4d77955d 100644 --- a/common/test/acceptance/pages/lms/ccx_dashboard_page.py +++ b/common/test/acceptance/pages/lms/ccx_dashboard_page.py @@ -2,7 +2,7 @@ """ CCX coach dashboard page """ -from __future__ import absolute_import + from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/lms/certificate_page.py b/common/test/acceptance/pages/lms/certificate_page.py index 41688657c7..2a6f89420d 100644 --- a/common/test/acceptance/pages/lms/certificate_page.py +++ b/common/test/acceptance/pages/lms/certificate_page.py @@ -3,7 +3,7 @@ Module for Certificates pages. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/conditional.py b/common/test/acceptance/pages/lms/conditional.py index 37938d4d98..109682be6f 100644 --- a/common/test/acceptance/pages/lms/conditional.py +++ b/common/test/acceptance/pages/lms/conditional.py @@ -1,7 +1,7 @@ """ Conditional Pages """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import BrokenPromise, EmptyPromise diff --git a/common/test/acceptance/pages/lms/course_about.py b/common/test/acceptance/pages/lms/course_about.py index 6434a49aed..b4c5e6f2f2 100644 --- a/common/test/acceptance/pages/lms/course_about.py +++ b/common/test/acceptance/pages/lms/course_about.py @@ -2,7 +2,7 @@ Course about page (with registration button) """ -from __future__ import absolute_import + from common.test.acceptance.pages.lms.course_page import CoursePage from common.test.acceptance.pages.lms.login_and_register import RegisterPage diff --git a/common/test/acceptance/pages/lms/course_home.py b/common/test/acceptance/pages/lms/course_home.py index 40b83da0fc..b77ae2ff68 100644 --- a/common/test/acceptance/pages/lms/course_home.py +++ b/common/test/acceptance/pages/lms/course_home.py @@ -2,7 +2,7 @@ LMS Course Home page object """ -from __future__ import absolute_import + from collections import OrderedDict diff --git a/common/test/acceptance/pages/lms/course_info.py b/common/test/acceptance/pages/lms/course_info.py index 175d2a16fa..e1caeafefa 100644 --- a/common/test/acceptance/pages/lms/course_info.py +++ b/common/test/acceptance/pages/lms/course_info.py @@ -2,7 +2,7 @@ Course info page. """ -from __future__ import absolute_import + from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/course_page.py b/common/test/acceptance/pages/lms/course_page.py index 00f5e03b2c..10b6298aab 100644 --- a/common/test/acceptance/pages/lms/course_page.py +++ b/common/test/acceptance/pages/lms/course_page.py @@ -2,7 +2,7 @@ Base class for pages in courseware. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/course_wiki.py b/common/test/acceptance/pages/lms/course_wiki.py index a2dacb66bc..3bbf5d4de5 100644 --- a/common/test/acceptance/pages/lms/course_wiki.py +++ b/common/test/acceptance/pages/lms/course_wiki.py @@ -2,7 +2,7 @@ Wiki tab on courses """ -from __future__ import absolute_import + from common.test.acceptance.pages.lms.course_page import CoursePage from common.test.acceptance.pages.studio.utils import get_codemirror_value, type_in_codemirror diff --git a/common/test/acceptance/pages/lms/courseware.py b/common/test/acceptance/pages/lms/courseware.py index 1b9f50abcb..4898605e17 100644 --- a/common/test/acceptance/pages/lms/courseware.py +++ b/common/test/acceptance/pages/lms/courseware.py @@ -2,7 +2,7 @@ Courseware page. """ -from __future__ import absolute_import + import re diff --git a/common/test/acceptance/pages/lms/courseware_search.py b/common/test/acceptance/pages/lms/courseware_search.py index dbd55fb8e4..d18d60d8d1 100644 --- a/common/test/acceptance/pages/lms/courseware_search.py +++ b/common/test/acceptance/pages/lms/courseware_search.py @@ -2,7 +2,7 @@ Courseware search """ -from __future__ import absolute_import + from common.test.acceptance.pages.lms.course_page import CoursePage diff --git a/common/test/acceptance/pages/lms/create_mode.py b/common/test/acceptance/pages/lms/create_mode.py index 61cdb65b98..1b7426a774 100644 --- a/common/test/acceptance/pages/lms/create_mode.py +++ b/common/test/acceptance/pages/lms/create_mode.py @@ -1,6 +1,6 @@ """Mode creation page (used to add modes to courses during testing).""" -from __future__ import absolute_import + import re diff --git a/common/test/acceptance/pages/lms/dashboard.py b/common/test/acceptance/pages/lms/dashboard.py index 5dfc5faa4d..ecb3c1e733 100644 --- a/common/test/acceptance/pages/lms/dashboard.py +++ b/common/test/acceptance/pages/lms/dashboard.py @@ -2,7 +2,7 @@ """ Student dashboard page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from opaque_keys.edx.keys import CourseKey diff --git a/common/test/acceptance/pages/lms/dashboard_search.py b/common/test/acceptance/pages/lms/dashboard_search.py index 3e53c1490b..37b80143b4 100644 --- a/common/test/acceptance/pages/lms/dashboard_search.py +++ b/common/test/acceptance/pages/lms/dashboard_search.py @@ -2,7 +2,7 @@ Dashboard search """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/discovery.py b/common/test/acceptance/pages/lms/discovery.py index ccd3cb0e19..39f69d4d07 100644 --- a/common/test/acceptance/pages/lms/discovery.py +++ b/common/test/acceptance/pages/lms/discovery.py @@ -2,7 +2,7 @@ Course discovery page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/discussion.py b/common/test/acceptance/pages/lms/discussion.py index b94e358bd3..1acc19735c 100644 --- a/common/test/acceptance/pages/lms/discussion.py +++ b/common/test/acceptance/pages/lms/discussion.py @@ -1,7 +1,7 @@ """ LMS discussion page """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/common/test/acceptance/pages/lms/edxnotes.py b/common/test/acceptance/pages/lms/edxnotes.py index 339f86ce2a..30b0a88082 100644 --- a/common/test/acceptance/pages/lms/edxnotes.py +++ b/common/test/acceptance/pages/lms/edxnotes.py @@ -1,7 +1,7 @@ """ LMS edxnotes page """ -from __future__ import absolute_import + from bok_choy.page_object import PageLoadError, PageObject, unguarded from bok_choy.promise import BrokenPromise, EmptyPromise diff --git a/common/test/acceptance/pages/lms/fields.py b/common/test/acceptance/pages/lms/fields.py index 766e6a928c..1237251d6d 100644 --- a/common/test/acceptance/pages/lms/fields.py +++ b/common/test/acceptance/pages/lms/fields.py @@ -2,7 +2,7 @@ """ Mixins for fields. """ -from __future__ import absolute_import + import six from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/lms/find_courses.py b/common/test/acceptance/pages/lms/find_courses.py index b830ceb293..db41b11360 100644 --- a/common/test/acceptance/pages/lms/find_courses.py +++ b/common/test/acceptance/pages/lms/find_courses.py @@ -2,7 +2,7 @@ Find courses page (main page of the LMS). """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/index.py b/common/test/acceptance/pages/lms/index.py index 7a3fd779e8..ce4bfa6961 100644 --- a/common/test/acceptance/pages/lms/index.py +++ b/common/test/acceptance/pages/lms/index.py @@ -2,7 +2,7 @@ """ LMS index (home) page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py index aefac0887a..f226e92c80 100644 --- a/common/test/acceptance/pages/lms/instructor_dashboard.py +++ b/common/test/acceptance/pages/lms/instructor_dashboard.py @@ -3,7 +3,7 @@ Instructor (2) dashboard page. """ -from __future__ import absolute_import + import os import os.path diff --git a/common/test/acceptance/pages/lms/learner_profile.py b/common/test/acceptance/pages/lms/learner_profile.py index edd5c5326e..1de4b84ca6 100644 --- a/common/test/acceptance/pages/lms/learner_profile.py +++ b/common/test/acceptance/pages/lms/learner_profile.py @@ -1,7 +1,7 @@ """ Bok-Choy PageObject class for learner profile page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/lms/library.py b/common/test/acceptance/pages/lms/library.py index a8b5e646fa..be0f297184 100644 --- a/common/test/acceptance/pages/lms/library.py +++ b/common/test/acceptance/pages/lms/library.py @@ -1,7 +1,7 @@ """ Library Content XBlock Wrapper """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/login.py b/common/test/acceptance/pages/lms/login.py index f59702c39e..bba6e3d957 100644 --- a/common/test/acceptance/pages/lms/login.py +++ b/common/test/acceptance/pages/lms/login.py @@ -2,7 +2,7 @@ Login page for the LMS. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/lms/login_and_register.py b/common/test/acceptance/pages/lms/login_and_register.py index 8cb855994f..4b630af718 100644 --- a/common/test/acceptance/pages/lms/login_and_register.py +++ b/common/test/acceptance/pages/lms/login_and_register.py @@ -1,6 +1,6 @@ """Login and Registration pages """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject, unguarded from bok_choy.promise import EmptyPromise, Promise diff --git a/common/test/acceptance/pages/lms/matlab_problem.py b/common/test/acceptance/pages/lms/matlab_problem.py index 96d44afe2b..54e0f8ce95 100644 --- a/common/test/acceptance/pages/lms/matlab_problem.py +++ b/common/test/acceptance/pages/lms/matlab_problem.py @@ -1,7 +1,7 @@ """ Matlab Problem Page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/oauth2_confirmation.py b/common/test/acceptance/pages/lms/oauth2_confirmation.py index 44f0481d90..be839c2086 100644 --- a/common/test/acceptance/pages/lms/oauth2_confirmation.py +++ b/common/test/acceptance/pages/lms/oauth2_confirmation.py @@ -1,5 +1,5 @@ """Pages relevant for OAuth2 confirmation.""" -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/pay_and_verify.py b/common/test/acceptance/pages/lms/pay_and_verify.py index 8038dcc0b1..a5be598688 100644 --- a/common/test/acceptance/pages/lms/pay_and_verify.py +++ b/common/test/acceptance/pages/lms/pay_and_verify.py @@ -1,6 +1,6 @@ """Payment and verification pages""" -from __future__ import absolute_import + import re diff --git a/common/test/acceptance/pages/lms/peer_calibrate.py b/common/test/acceptance/pages/lms/peer_calibrate.py index 49be75691c..80a983a184 100644 --- a/common/test/acceptance/pages/lms/peer_calibrate.py +++ b/common/test/acceptance/pages/lms/peer_calibrate.py @@ -3,7 +3,7 @@ Page that allows the student to grade calibration essays (requirement for being allowed to grade peers). """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import Promise diff --git a/common/test/acceptance/pages/lms/peer_confirm.py b/common/test/acceptance/pages/lms/peer_confirm.py index d97e3eef7f..7a0a1e4ec7 100644 --- a/common/test/acceptance/pages/lms/peer_confirm.py +++ b/common/test/acceptance/pages/lms/peer_confirm.py @@ -2,7 +2,7 @@ Confirmation screen for peer calibration and grading. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import Promise diff --git a/common/test/acceptance/pages/lms/peer_grade.py b/common/test/acceptance/pages/lms/peer_grade.py index 46357a592d..e39ee1e97b 100644 --- a/common/test/acceptance/pages/lms/peer_grade.py +++ b/common/test/acceptance/pages/lms/peer_grade.py @@ -2,7 +2,7 @@ Students grade peer submissions. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import Promise diff --git a/common/test/acceptance/pages/lms/problem.py b/common/test/acceptance/pages/lms/problem.py index c51f2d9e84..6cab7bba62 100644 --- a/common/test/acceptance/pages/lms/problem.py +++ b/common/test/acceptance/pages/lms/problem.py @@ -1,7 +1,7 @@ """ Problem Page. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from selenium.webdriver import ActionChains diff --git a/common/test/acceptance/pages/lms/programs.py b/common/test/acceptance/pages/lms/programs.py index 2f7e84c445..4e91e19f80 100644 --- a/common/test/acceptance/pages/lms/programs.py +++ b/common/test/acceptance/pages/lms/programs.py @@ -1,5 +1,5 @@ """LMS-hosted Programs pages""" -from __future__ import absolute_import + from uuid import uuid4 diff --git a/common/test/acceptance/pages/lms/progress.py b/common/test/acceptance/pages/lms/progress.py index cec7914595..2fe3c0c019 100644 --- a/common/test/acceptance/pages/lms/progress.py +++ b/common/test/acceptance/pages/lms/progress.py @@ -1,7 +1,7 @@ """ Student progress page """ -from __future__ import absolute_import + from six.moves import map diff --git a/common/test/acceptance/pages/lms/staff_view.py b/common/test/acceptance/pages/lms/staff_view.py index f3554129f2..de5f312723 100644 --- a/common/test/acceptance/pages/lms/staff_view.py +++ b/common/test/acceptance/pages/lms/staff_view.py @@ -1,7 +1,7 @@ """ Staff views of various tabs (e.g. courseware, course home) """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/tab_nav.py b/common/test/acceptance/pages/lms/tab_nav.py index 29883dea66..d3aa1becd4 100644 --- a/common/test/acceptance/pages/lms/tab_nav.py +++ b/common/test/acceptance/pages/lms/tab_nav.py @@ -2,7 +2,7 @@ High-level tab navigation. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, Promise diff --git a/common/test/acceptance/pages/lms/teams.py b/common/test/acceptance/pages/lms/teams.py index 6e495d2e2f..cb7816eba0 100644 --- a/common/test/acceptance/pages/lms/teams.py +++ b/common/test/acceptance/pages/lms/teams.py @@ -3,7 +3,7 @@ Teams pages. """ -from __future__ import absolute_import + from common.test.acceptance.pages.common.paging import PaginatedUIMixin from common.test.acceptance.pages.common.utils import click_css, confirm_prompt diff --git a/common/test/acceptance/pages/lms/textbook_view.py b/common/test/acceptance/pages/lms/textbook_view.py index 0871cf1299..b7c31398a7 100644 --- a/common/test/acceptance/pages/lms/textbook_view.py +++ b/common/test/acceptance/pages/lms/textbook_view.py @@ -2,7 +2,7 @@ Course Textbooks page. """ -from __future__ import absolute_import + from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/lms/track_selection.py b/common/test/acceptance/pages/lms/track_selection.py index 11d12d34be..bd5e6773f5 100644 --- a/common/test/acceptance/pages/lms/track_selection.py +++ b/common/test/acceptance/pages/lms/track_selection.py @@ -1,5 +1,5 @@ """Track selection page""" -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/lms/video/video.py b/common/test/acceptance/pages/lms/video/video.py index d5f3de09db..bb9b6cc16b 100644 --- a/common/test/acceptance/pages/lms/video/video.py +++ b/common/test/acceptance/pages/lms/video/video.py @@ -2,7 +2,7 @@ Video player in the courseware. """ -from __future__ import absolute_import + import json import logging diff --git a/common/test/acceptance/pages/studio/__init__.py b/common/test/acceptance/pages/studio/__init__.py index 30e89ba99c..211196bfe2 100644 --- a/common/test/acceptance/pages/studio/__init__.py +++ b/common/test/acceptance/pages/studio/__init__.py @@ -1,7 +1,7 @@ """ Envirement setuo for studio video tests. """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/pages/studio/asset_index.py b/common/test/acceptance/pages/studio/asset_index.py index e47ef94056..d33f7bb3cc 100644 --- a/common/test/acceptance/pages/studio/asset_index.py +++ b/common/test/acceptance/pages/studio/asset_index.py @@ -2,7 +2,7 @@ The Files and Uploads page for a course in Studio """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/pages/studio/checklists.py b/common/test/acceptance/pages/studio/checklists.py index 3a9d566c9c..7292384b80 100644 --- a/common/test/acceptance/pages/studio/checklists.py +++ b/common/test/acceptance/pages/studio/checklists.py @@ -2,7 +2,7 @@ Course Checklists page. """ -from __future__ import absolute_import + from common.test.acceptance.pages.studio.course_page import CoursePage diff --git a/common/test/acceptance/pages/studio/container.py b/common/test/acceptance/pages/studio/container.py index 3f89986e15..0eb81f63cf 100644 --- a/common/test/acceptance/pages/studio/container.py +++ b/common/test/acceptance/pages/studio/container.py @@ -2,7 +2,7 @@ Container page in Studio """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, Promise diff --git a/common/test/acceptance/pages/studio/course_info.py b/common/test/acceptance/pages/studio/course_info.py index 01e5f576b5..5b8cf2801b 100644 --- a/common/test/acceptance/pages/studio/course_info.py +++ b/common/test/acceptance/pages/studio/course_info.py @@ -1,7 +1,7 @@ """ Course Updates page. """ -from __future__ import absolute_import + from common.test.acceptance.pages.common.utils import click_css, confirm_prompt from common.test.acceptance.pages.studio.course_page import CoursePage diff --git a/common/test/acceptance/pages/studio/course_page.py b/common/test/acceptance/pages/studio/course_page.py index b4f565e4a6..370d78eb7b 100644 --- a/common/test/acceptance/pages/studio/course_page.py +++ b/common/test/acceptance/pages/studio/course_page.py @@ -1,7 +1,7 @@ """ Base class for pages specific to a course in Studio. """ -from __future__ import absolute_import + import os from abc import abstractmethod diff --git a/common/test/acceptance/pages/studio/course_rerun.py b/common/test/acceptance/pages/studio/course_rerun.py index 117b4ab124..70d82fcea6 100644 --- a/common/test/acceptance/pages/studio/course_rerun.py +++ b/common/test/acceptance/pages/studio/course_rerun.py @@ -2,7 +2,7 @@ Course rerun page in Studio """ -from __future__ import absolute_import + from common.test.acceptance.pages.studio.course_page import CoursePage from common.test.acceptance.pages.studio.utils import set_input_value diff --git a/common/test/acceptance/pages/studio/discussion_component_editor.py b/common/test/acceptance/pages/studio/discussion_component_editor.py index c4c2573657..e775cff61c 100644 --- a/common/test/acceptance/pages/studio/discussion_component_editor.py +++ b/common/test/acceptance/pages/studio/discussion_component_editor.py @@ -1,7 +1,7 @@ """ Discussion component editor in studio """ -from __future__ import absolute_import + from common.test.acceptance.pages.common.utils import click_css from common.test.acceptance.pages.studio.xblock_editor import XBlockEditorView diff --git a/common/test/acceptance/pages/studio/edit_subsection.py b/common/test/acceptance/pages/studio/edit_subsection.py index d3fb716d86..507a3e17a2 100644 --- a/common/test/acceptance/pages/studio/edit_subsection.py +++ b/common/test/acceptance/pages/studio/edit_subsection.py @@ -2,7 +2,7 @@ Edit Subsection page in Studio """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/studio/edit_tabs.py b/common/test/acceptance/pages/studio/edit_tabs.py index e351aac744..c00ae2e4ae 100644 --- a/common/test/acceptance/pages/studio/edit_tabs.py +++ b/common/test/acceptance/pages/studio/edit_tabs.py @@ -1,7 +1,7 @@ """ Pages page for a course. """ -from __future__ import absolute_import + from bok_choy.promise import EmptyPromise from selenium.webdriver import ActionChains diff --git a/common/test/acceptance/pages/studio/html_component_editor.py b/common/test/acceptance/pages/studio/html_component_editor.py index d77bc38b64..c0e7ca4db2 100644 --- a/common/test/acceptance/pages/studio/html_component_editor.py +++ b/common/test/acceptance/pages/studio/html_component_editor.py @@ -1,7 +1,7 @@ """ HTML component editor in studio """ -from __future__ import absolute_import + from six.moves import zip diff --git a/common/test/acceptance/pages/studio/import_export.py b/common/test/acceptance/pages/studio/import_export.py index 80b75c988a..a152b33161 100644 --- a/common/test/acceptance/pages/studio/import_export.py +++ b/common/test/acceptance/pages/studio/import_export.py @@ -1,7 +1,7 @@ """ Import/Export pages. """ -from __future__ import absolute_import + import os import re diff --git a/common/test/acceptance/pages/studio/index.py b/common/test/acceptance/pages/studio/index.py index 26b2ed1ae2..f34f2525ed 100644 --- a/common/test/acceptance/pages/studio/index.py +++ b/common/test/acceptance/pages/studio/index.py @@ -1,7 +1,7 @@ """ Studio Index, home and dashboard pages. These are the starting pages for users. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from selenium.webdriver import ActionChains diff --git a/common/test/acceptance/pages/studio/library.py b/common/test/acceptance/pages/studio/library.py index 9cbdb47b0c..26d451c1bf 100644 --- a/common/test/acceptance/pages/studio/library.py +++ b/common/test/acceptance/pages/studio/library.py @@ -1,7 +1,7 @@ """ Library edit page in Studio """ -from __future__ import absolute_import + import six from bok_choy.javascript import js_defined, wait_for_js diff --git a/common/test/acceptance/pages/studio/login.py b/common/test/acceptance/pages/studio/login.py index 7a74ac297f..4d81510562 100644 --- a/common/test/acceptance/pages/studio/login.py +++ b/common/test/acceptance/pages/studio/login.py @@ -1,7 +1,7 @@ """ Login page for Studio. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/studio/move_xblock.py b/common/test/acceptance/pages/studio/move_xblock.py index baa0083a58..bca22f47ec 100644 --- a/common/test/acceptance/pages/studio/move_xblock.py +++ b/common/test/acceptance/pages/studio/move_xblock.py @@ -1,7 +1,7 @@ """ Move XBlock Modal Page Object """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/studio/overview.py b/common/test/acceptance/pages/studio/overview.py index 90e663ff1c..6a3d66c3c5 100644 --- a/common/test/acceptance/pages/studio/overview.py +++ b/common/test/acceptance/pages/studio/overview.py @@ -1,7 +1,7 @@ """ Course Outline page in Studio. """ -from __future__ import absolute_import + import datetime diff --git a/common/test/acceptance/pages/studio/pagination.py b/common/test/acceptance/pages/studio/pagination.py index 6310f04539..8440d1d116 100644 --- a/common/test/acceptance/pages/studio/pagination.py +++ b/common/test/acceptance/pages/studio/pagination.py @@ -1,7 +1,7 @@ """ Mixin to include for Paginated container pages """ -from __future__ import absolute_import + from selenium.webdriver.common.keys import Keys diff --git a/common/test/acceptance/pages/studio/problem_editor.py b/common/test/acceptance/pages/studio/problem_editor.py index 81d7338e3d..2baa55750e 100644 --- a/common/test/acceptance/pages/studio/problem_editor.py +++ b/common/test/acceptance/pages/studio/problem_editor.py @@ -1,7 +1,7 @@ """ Studio Problem Editor """ -from __future__ import absolute_import + from selenium.webdriver.support.ui import Select from six.moves import range diff --git a/common/test/acceptance/pages/studio/settings.py b/common/test/acceptance/pages/studio/settings.py index b41e7cdafc..77615ed3fb 100644 --- a/common/test/acceptance/pages/studio/settings.py +++ b/common/test/acceptance/pages/studio/settings.py @@ -2,7 +2,7 @@ """ Course Schedule and Details Settings page. """ -from __future__ import absolute_import, unicode_literals + import os import os.path diff --git a/common/test/acceptance/pages/studio/settings_advanced.py b/common/test/acceptance/pages/studio/settings_advanced.py index 63eb0130bc..33cb27c9d3 100644 --- a/common/test/acceptance/pages/studio/settings_advanced.py +++ b/common/test/acceptance/pages/studio/settings_advanced.py @@ -2,7 +2,7 @@ Course Advanced Settings page """ -from __future__ import absolute_import + import six from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/studio/settings_certificates.py b/common/test/acceptance/pages/studio/settings_certificates.py index 48009a5295..33487f3353 100644 --- a/common/test/acceptance/pages/studio/settings_certificates.py +++ b/common/test/acceptance/pages/studio/settings_certificates.py @@ -8,7 +8,7 @@ The methods in these classes are organized into several conceptual buckets: * Workflows: Complex orchestrations involving any/all of the above """ -from __future__ import absolute_import + import os import os.path diff --git a/common/test/acceptance/pages/studio/settings_graders.py b/common/test/acceptance/pages/studio/settings_graders.py index 6918cecd1d..3d16926a57 100644 --- a/common/test/acceptance/pages/studio/settings_graders.py +++ b/common/test/acceptance/pages/studio/settings_graders.py @@ -1,7 +1,7 @@ """ Course Grading Settings page. """ -from __future__ import absolute_import + from bok_choy.javascript import requirejs from bok_choy.promise import BrokenPromise diff --git a/common/test/acceptance/pages/studio/settings_group_configurations.py b/common/test/acceptance/pages/studio/settings_group_configurations.py index 1e27e0d385..29c916261e 100644 --- a/common/test/acceptance/pages/studio/settings_group_configurations.py +++ b/common/test/acceptance/pages/studio/settings_group_configurations.py @@ -1,7 +1,7 @@ """ Course Group Configurations page. """ -from __future__ import absolute_import + from six.moves import range diff --git a/common/test/acceptance/pages/studio/signup.py b/common/test/acceptance/pages/studio/signup.py index 040460081a..3e9f2d944e 100644 --- a/common/test/acceptance/pages/studio/signup.py +++ b/common/test/acceptance/pages/studio/signup.py @@ -1,7 +1,7 @@ """ Signup page for studio """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/studio/textbook_upload.py b/common/test/acceptance/pages/studio/textbook_upload.py index da5959cff7..99525c6218 100644 --- a/common/test/acceptance/pages/studio/textbook_upload.py +++ b/common/test/acceptance/pages/studio/textbook_upload.py @@ -2,7 +2,7 @@ Course Textbooks page. """ -from __future__ import absolute_import + import requests from path import Path as path diff --git a/common/test/acceptance/pages/studio/users.py b/common/test/acceptance/pages/studio/users.py index 761b4d66f5..d68156944b 100644 --- a/common/test/acceptance/pages/studio/users.py +++ b/common/test/acceptance/pages/studio/users.py @@ -1,7 +1,7 @@ """ Page classes to test either the Course Team page or the Library Team page. """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/pages/studio/utils.py b/common/test/acceptance/pages/studio/utils.py index 82f7b5b155..c82dd0189a 100644 --- a/common/test/acceptance/pages/studio/utils.py +++ b/common/test/acceptance/pages/studio/utils.py @@ -1,7 +1,7 @@ """ Utility methods useful for Studio page tests. """ -from __future__ import absolute_import + from bok_choy.javascript import js_defined from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/pages/studio/video/video.py b/common/test/acceptance/pages/studio/video/video.py index ce20e2ce35..8f63464281 100644 --- a/common/test/acceptance/pages/studio/video/video.py +++ b/common/test/acceptance/pages/studio/video/video.py @@ -1,7 +1,7 @@ """ CMS Video """ -from __future__ import absolute_import + import os import os.path diff --git a/common/test/acceptance/pages/studio/xblock_editor.py b/common/test/acceptance/pages/studio/xblock_editor.py index bb427d51b9..2abad0aac2 100644 --- a/common/test/acceptance/pages/studio/xblock_editor.py +++ b/common/test/acceptance/pages/studio/xblock_editor.py @@ -1,7 +1,7 @@ """ Acceptance test xblock-editor. """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from selenium.webdriver.common.keys import Keys diff --git a/common/test/acceptance/pages/xblock/acid.py b/common/test/acceptance/pages/xblock/acid.py index b1fc01970e..a8efc6c241 100644 --- a/common/test/acceptance/pages/xblock/acid.py +++ b/common/test/acceptance/pages/xblock/acid.py @@ -2,7 +2,7 @@ PageObjects related to the AcidBlock """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject from bok_choy.promise import BrokenPromise, EmptyPromise diff --git a/common/test/acceptance/pages/xblock/crowdsourcehinter_problem.py b/common/test/acceptance/pages/xblock/crowdsourcehinter_problem.py index 5b11938076..e8bdca9976 100644 --- a/common/test/acceptance/pages/xblock/crowdsourcehinter_problem.py +++ b/common/test/acceptance/pages/xblock/crowdsourcehinter_problem.py @@ -1,7 +1,7 @@ """ PageObject for Crowdsourcehinter """ -from __future__ import absolute_import + from bok_choy.page_object import PageObject diff --git a/common/test/acceptance/pages/xblock/utils.py b/common/test/acceptance/pages/xblock/utils.py index c83557a473..02f59eb914 100644 --- a/common/test/acceptance/pages/xblock/utils.py +++ b/common/test/acceptance/pages/xblock/utils.py @@ -1,7 +1,7 @@ """ Utility methods useful for XBlock page tests. """ -from __future__ import absolute_import + from bok_choy.promise import Promise diff --git a/common/test/acceptance/setup.py b/common/test/acceptance/setup.py index 7e3dc5a1f9..f59be95882 100644 --- a/common/test/acceptance/setup.py +++ b/common/test/acceptance/setup.py @@ -4,7 +4,7 @@ Install bok-choy page objects for acceptance and end-to-end tests. """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/tests/__init__.py b/common/test/acceptance/tests/__init__.py index b71f52f7f7..a04d1659e1 100644 --- a/common/test/acceptance/tests/__init__.py +++ b/common/test/acceptance/tests/__init__.py @@ -1,7 +1,7 @@ """ Contains the Acceptance tests. """ -from __future__ import absolute_import + import logging diff --git a/common/test/acceptance/tests/discussion/helpers.py b/common/test/acceptance/tests/discussion/helpers.py index 74097d49c3..1319ec4af4 100644 --- a/common/test/acceptance/tests/discussion/helpers.py +++ b/common/test/acceptance/tests/discussion/helpers.py @@ -2,7 +2,7 @@ Helper functions and classes for discussion tests. """ -from __future__ import absolute_import + import json from uuid import uuid4 diff --git a/common/test/acceptance/tests/discussion/test_cohort_management.py b/common/test/acceptance/tests/discussion/test_cohort_management.py index 6150d7779a..1e71fe1c9d 100644 --- a/common/test/acceptance/tests/discussion/test_cohort_management.py +++ b/common/test/acceptance/tests/discussion/test_cohort_management.py @@ -3,7 +3,7 @@ End-to-end tests related to the cohort management on the LMS Instructor Dashboard """ -from __future__ import absolute_import + import os import os.path diff --git a/common/test/acceptance/tests/discussion/test_cohorts.py b/common/test/acceptance/tests/discussion/test_cohorts.py index e6f278a9ca..88511d9134 100644 --- a/common/test/acceptance/tests/discussion/test_cohorts.py +++ b/common/test/acceptance/tests/discussion/test_cohorts.py @@ -1,7 +1,7 @@ """ Tests related to the cohorting feature. """ -from __future__ import absolute_import + from uuid import uuid4 diff --git a/common/test/acceptance/tests/discussion/test_discussion.py b/common/test/acceptance/tests/discussion/test_discussion.py index 7698fefcf2..f1239b2353 100644 --- a/common/test/acceptance/tests/discussion/test_discussion.py +++ b/common/test/acceptance/tests/discussion/test_discussion.py @@ -2,7 +2,7 @@ Tests for discussion pages """ -from __future__ import absolute_import + import datetime import time diff --git a/common/test/acceptance/tests/discussion/test_discussion_management.py b/common/test/acceptance/tests/discussion/test_discussion_management.py index d8a3ebe850..de4991bb30 100644 --- a/common/test/acceptance/tests/discussion/test_discussion_management.py +++ b/common/test/acceptance/tests/discussion/test_discussion_management.py @@ -3,7 +3,7 @@ End-to-end tests related to the divided discussion management on the LMS Instructor Dashboard """ -from __future__ import absolute_import + import uuid diff --git a/common/test/acceptance/tests/helpers.py b/common/test/acceptance/tests/helpers.py index 6cf6c6ab21..522c032098 100644 --- a/common/test/acceptance/tests/helpers.py +++ b/common/test/acceptance/tests/helpers.py @@ -2,7 +2,7 @@ Test helper functions and base classes. """ -from __future__ import absolute_import + import functools import inspect diff --git a/common/test/acceptance/tests/lms/test_account_settings.py b/common/test/acceptance/tests/lms/test_account_settings.py index ac56e21b35..82ec49eccc 100644 --- a/common/test/acceptance/tests/lms/test_account_settings.py +++ b/common/test/acceptance/tests/lms/test_account_settings.py @@ -2,7 +2,7 @@ """ End-to-end tests for the Account Settings page. """ -from __future__ import absolute_import + from datetime import datetime from unittest import skip diff --git a/common/test/acceptance/tests/lms/test_bookmarks.py b/common/test/acceptance/tests/lms/test_bookmarks.py index 97110f12d9..b0b2bd5a54 100644 --- a/common/test/acceptance/tests/lms/test_bookmarks.py +++ b/common/test/acceptance/tests/lms/test_bookmarks.py @@ -2,7 +2,7 @@ """ End-to-end tests for the courseware unit bookmarks. """ -from __future__ import absolute_import + import json from unittest import skip diff --git a/common/test/acceptance/tests/lms/test_ccx.py b/common/test/acceptance/tests/lms/test_ccx.py index a96778198c..585811f14c 100644 --- a/common/test/acceptance/tests/lms/test_ccx.py +++ b/common/test/acceptance/tests/lms/test_ccx.py @@ -2,7 +2,7 @@ """ End-to-end tests for the CCX dashboard. """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.course import CourseFixture from common.test.acceptance.pages.common.auto_auth import AutoAuthPage diff --git a/common/test/acceptance/tests/lms/test_certificate_web_view.py b/common/test/acceptance/tests/lms/test_certificate_web_view.py index afd493756c..5438710408 100644 --- a/common/test/acceptance/tests/lms/test_certificate_web_view.py +++ b/common/test/acceptance/tests/lms/test_certificate_web_view.py @@ -1,7 +1,7 @@ """ Acceptance tests for the certificate web view feature. """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.certificates import CertificateConfigFixture from common.test.acceptance.fixtures.course import CourseFixture diff --git a/common/test/acceptance/tests/lms/test_conditional.py b/common/test/acceptance/tests/lms/test_conditional.py index 7e6e4d4eb7..6bd11c71d7 100644 --- a/common/test/acceptance/tests/lms/test_conditional.py +++ b/common/test/acceptance/tests/lms/test_conditional.py @@ -2,7 +2,7 @@ Bok choy acceptance tests for conditionals in the LMS """ -from __future__ import absolute_import + from capa.tests.response_xml_factory import StringResponseXMLFactory from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc diff --git a/common/test/acceptance/tests/lms/test_learner_profile.py b/common/test/acceptance/tests/lms/test_learner_profile.py index f48b0e1319..0e95f14a9f 100644 --- a/common/test/acceptance/tests/lms/test_learner_profile.py +++ b/common/test/acceptance/tests/lms/test_learner_profile.py @@ -2,7 +2,7 @@ """ End-to-end tests for Student's Profile Page. """ -from __future__ import absolute_import + from contextlib import contextmanager from datetime import datetime diff --git a/common/test/acceptance/tests/lms/test_library.py b/common/test/acceptance/tests/lms/test_library.py index 8fb1fa7cba..3257b84ff9 100644 --- a/common/test/acceptance/tests/lms/test_library.py +++ b/common/test/acceptance/tests/lms/test_library.py @@ -2,7 +2,7 @@ """ End-to-end tests for LibraryContent block in LMS """ -from __future__ import absolute_import + import textwrap diff --git a/common/test/acceptance/tests/lms/test_lms.py b/common/test/acceptance/tests/lms/test_lms.py index a627ab6f81..1cd1c94bdf 100644 --- a/common/test/acceptance/tests/lms/test_lms.py +++ b/common/test/acceptance/tests/lms/test_lms.py @@ -2,7 +2,7 @@ """ End-to-end tests for the LMS. """ -from __future__ import absolute_import + import json from datetime import datetime, timedelta diff --git a/common/test/acceptance/tests/lms/test_lms_acid_xblock.py b/common/test/acceptance/tests/lms/test_lms_acid_xblock.py index 12b7d4bb99..157d4f048e 100644 --- a/common/test/acceptance/tests/lms/test_lms_acid_xblock.py +++ b/common/test/acceptance/tests/lms/test_lms_acid_xblock.py @@ -3,7 +3,7 @@ End-to-end tests for the LMS. """ -from __future__ import absolute_import + import pytest diff --git a/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py b/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py index 733e107a5c..6338787ddc 100644 --- a/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py +++ b/common/test/acceptance/tests/lms/test_lms_cohorted_courseware_search.py @@ -2,7 +2,7 @@ Test courseware search """ -from __future__ import absolute_import + import json import uuid diff --git a/common/test/acceptance/tests/lms/test_lms_course_discovery.py b/common/test/acceptance/tests/lms/test_lms_course_discovery.py index a1f52df4aa..dc827e8dc8 100644 --- a/common/test/acceptance/tests/lms/test_lms_course_discovery.py +++ b/common/test/acceptance/tests/lms/test_lms_course_discovery.py @@ -1,7 +1,7 @@ """ Test course discovery. """ -from __future__ import absolute_import + import datetime import json diff --git a/common/test/acceptance/tests/lms/test_lms_course_home.py b/common/test/acceptance/tests/lms/test_lms_course_home.py index 1a95db759d..e6f719d2f2 100644 --- a/common/test/acceptance/tests/lms/test_lms_course_home.py +++ b/common/test/acceptance/tests/lms/test_lms_course_home.py @@ -3,7 +3,7 @@ End-to-end tests for the LMS that utilize the course home page and course outline. """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/common/test/acceptance/tests/lms/test_lms_courseware.py b/common/test/acceptance/tests/lms/test_lms_courseware.py index 2b1d648efd..8c46a3baef 100644 --- a/common/test/acceptance/tests/lms/test_lms_courseware.py +++ b/common/test/acceptance/tests/lms/test_lms_courseware.py @@ -3,7 +3,7 @@ End-to-end tests for the LMS. """ -from __future__ import absolute_import + import json from datetime import datetime, timedelta diff --git a/common/test/acceptance/tests/lms/test_lms_courseware_search.py b/common/test/acceptance/tests/lms/test_lms_courseware_search.py index a0f9c2abed..7610e26c9a 100644 --- a/common/test/acceptance/tests/lms/test_lms_courseware_search.py +++ b/common/test/acceptance/tests/lms/test_lms_courseware_search.py @@ -1,7 +1,7 @@ """ Test courseware search """ -from __future__ import absolute_import + import json diff --git a/common/test/acceptance/tests/lms/test_lms_dashboard.py b/common/test/acceptance/tests/lms/test_lms_dashboard.py index fec1e84913..8b0790dc4e 100644 --- a/common/test/acceptance/tests/lms/test_lms_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_dashboard.py @@ -2,7 +2,7 @@ """ End-to-end tests for the main LMS Dashboard (aka, Student Dashboard). """ -from __future__ import absolute_import + import datetime import re diff --git a/common/test/acceptance/tests/lms/test_lms_dashboard_search.py b/common/test/acceptance/tests/lms/test_lms_dashboard_search.py index db7d53f9dd..67362535e0 100644 --- a/common/test/acceptance/tests/lms/test_lms_dashboard_search.py +++ b/common/test/acceptance/tests/lms/test_lms_dashboard_search.py @@ -1,7 +1,7 @@ """ Test dashboard search """ -from __future__ import absolute_import + import json import os diff --git a/common/test/acceptance/tests/lms/test_lms_edxnotes.py b/common/test/acceptance/tests/lms/test_lms_edxnotes.py index 0d0ad06404..c2d7001fa5 100644 --- a/common/test/acceptance/tests/lms/test_lms_edxnotes.py +++ b/common/test/acceptance/tests/lms/test_lms_edxnotes.py @@ -1,7 +1,7 @@ """ Test LMS Notes """ -from __future__ import absolute_import + import random from datetime import datetime diff --git a/common/test/acceptance/tests/lms/test_lms_entrance_exams.py b/common/test/acceptance/tests/lms/test_lms_entrance_exams.py index 3462d89b91..f23e01661b 100644 --- a/common/test/acceptance/tests/lms/test_lms_entrance_exams.py +++ b/common/test/acceptance/tests/lms/test_lms_entrance_exams.py @@ -2,7 +2,7 @@ """ Bok choy acceptance tests for Entrance exams in the LMS """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/common/test/acceptance/tests/lms/test_lms_gating.py b/common/test/acceptance/tests/lms/test_lms_gating.py index 0673c1baa2..512ba2f675 100644 --- a/common/test/acceptance/tests/lms/test_lms_gating.py +++ b/common/test/acceptance/tests/lms/test_lms_gating.py @@ -2,7 +2,7 @@ """ End-to-end tests for the gating feature. """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/common/test/acceptance/tests/lms/test_lms_help.py b/common/test/acceptance/tests/lms/test_lms_help.py index c7872a6e18..eba97b236c 100644 --- a/common/test/acceptance/tests/lms/test_lms_help.py +++ b/common/test/acceptance/tests/lms/test_lms_help.py @@ -2,7 +2,7 @@ Test Help links in LMS """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.course import CourseFixture from common.test.acceptance.pages.lms.instructor_dashboard import InstructorDashboardPage diff --git a/common/test/acceptance/tests/lms/test_lms_index.py b/common/test/acceptance/tests/lms/test_lms_index.py index c24c6f359a..dc15d9eb45 100644 --- a/common/test/acceptance/tests/lms/test_lms_index.py +++ b/common/test/acceptance/tests/lms/test_lms_index.py @@ -3,7 +3,7 @@ End-to-end tests for the LMS Index page (aka, Home page). Note that this is different than what students see @ edx.org because we redirect requests to a separate web application. """ -from __future__ import absolute_import + import datetime diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py index a5b6e838a8..a02a26e830 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -3,7 +3,7 @@ End-to-end tests for the LMS Instructor Dashboard. """ -from __future__ import absolute_import + import ddt from bok_choy.promise import EmptyPromise diff --git a/common/test/acceptance/tests/lms/test_lms_lti.py b/common/test/acceptance/tests/lms/test_lms_lti.py index 886b12e1d0..622650504e 100644 --- a/common/test/acceptance/tests/lms/test_lms_lti.py +++ b/common/test/acceptance/tests/lms/test_lms_lti.py @@ -2,7 +2,7 @@ """ Bok choy acceptance tests for LTI xblock """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/tests/lms/test_lms_problems.py b/common/test/acceptance/tests/lms/test_lms_problems.py index f3b1dd7a4b..7825c00049 100644 --- a/common/test/acceptance/tests/lms/test_lms_problems.py +++ b/common/test/acceptance/tests/lms/test_lms_problems.py @@ -2,7 +2,7 @@ """ Bok choy acceptance tests for problems in the LMS """ -from __future__ import absolute_import + import time from datetime import datetime, timedelta diff --git a/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py b/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py index adbfdcee19..014f7cea9d 100644 --- a/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py +++ b/common/test/acceptance/tests/lms/test_lms_split_test_courseware_search.py @@ -2,7 +2,7 @@ Test courseware search """ -from __future__ import absolute_import + import json diff --git a/common/test/acceptance/tests/lms/test_lms_user_preview.py b/common/test/acceptance/tests/lms/test_lms_user_preview.py index e4b476fbea..95b020db46 100644 --- a/common/test/acceptance/tests/lms/test_lms_user_preview.py +++ b/common/test/acceptance/tests/lms/test_lms_user_preview.py @@ -3,7 +3,7 @@ Tests the "preview" selector in the LMS that allows changing between Staff, Learner, and Content Groups. """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/common/test/acceptance/tests/lms/test_oauth2.py b/common/test/acceptance/tests/lms/test_oauth2.py index 7edc5a63a6..9d19a3b89f 100644 --- a/common/test/acceptance/tests/lms/test_oauth2.py +++ b/common/test/acceptance/tests/lms/test_oauth2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for OAuth2 permission delegation.""" -from __future__ import absolute_import + from six.moves.urllib.parse import parse_qsl, urlparse # pylint: disable=import-error diff --git a/common/test/acceptance/tests/lms/test_problem_types.py b/common/test/acceptance/tests/lms/test_problem_types.py index 54d3cb379e..16a737875c 100644 --- a/common/test/acceptance/tests/lms/test_problem_types.py +++ b/common/test/acceptance/tests/lms/test_problem_types.py @@ -1,7 +1,7 @@ """ Bok choy acceptance and a11y tests for problem types in the LMS """ -from __future__ import absolute_import + import random import textwrap diff --git a/common/test/acceptance/tests/lms/test_programs.py b/common/test/acceptance/tests/lms/test_programs.py index 32446a4af8..ecd0c55b72 100644 --- a/common/test/acceptance/tests/lms/test_programs.py +++ b/common/test/acceptance/tests/lms/test_programs.py @@ -1,5 +1,5 @@ """Acceptance tests for LMS-hosted Programs pages""" -from __future__ import absolute_import + from common.test.acceptance.fixtures.catalog import CatalogFixture, CatalogIntegrationMixin from common.test.acceptance.fixtures.course import CourseFixture diff --git a/common/test/acceptance/tests/lms/test_progress_page.py b/common/test/acceptance/tests/lms/test_progress_page.py index 9099a1e2ae..eef12c4fd8 100644 --- a/common/test/acceptance/tests/lms/test_progress_page.py +++ b/common/test/acceptance/tests/lms/test_progress_page.py @@ -3,7 +3,7 @@ End-to-end tests for the LMS that utilize the progress page. """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/common/test/acceptance/tests/lms/test_teams.py b/common/test/acceptance/tests/lms/test_teams.py index f9ab1cdff9..2dd6867f2e 100644 --- a/common/test/acceptance/tests/lms/test_teams.py +++ b/common/test/acceptance/tests/lms/test_teams.py @@ -1,7 +1,7 @@ """ Acceptance tests for the teams feature. """ -from __future__ import absolute_import + import json import random diff --git a/common/test/acceptance/tests/lms/test_unicode_username_admin.py b/common/test/acceptance/tests/lms/test_unicode_username_admin.py index f872c34ede..cbe9a52cdb 100644 --- a/common/test/acceptance/tests/lms/test_unicode_username_admin.py +++ b/common/test/acceptance/tests/lms/test_unicode_username_admin.py @@ -3,7 +3,7 @@ End-to-end tests for admin change view. """ -from __future__ import absolute_import + from common.test.acceptance.pages.common.auto_auth import AutoAuthPage from common.test.acceptance.pages.lms.admin import ChangeUserAdminPage diff --git a/common/test/acceptance/tests/studio/base_studio_test.py b/common/test/acceptance/tests/studio/base_studio_test.py index 1d01dfadd9..36e3bae002 100644 --- a/common/test/acceptance/tests/studio/base_studio_test.py +++ b/common/test/acceptance/tests/studio/base_studio_test.py @@ -1,7 +1,7 @@ """ Base classes used by studio tests. """ -from __future__ import absolute_import + from bok_choy.page_object import XSS_INJECTION diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 21710c3dcd..12a0e699a5 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -1,7 +1,7 @@ """ Acceptance tests for the Import and Export pages """ -from __future__ import absolute_import + from abc import abstractmethod from datetime import datetime diff --git a/common/test/acceptance/tests/studio/test_studio_accessibility_form.py b/common/test/acceptance/tests/studio/test_studio_accessibility_form.py index 0e8f2a44bf..271913cd7b 100644 --- a/common/test/acceptance/tests/studio/test_studio_accessibility_form.py +++ b/common/test/acceptance/tests/studio/test_studio_accessibility_form.py @@ -1,7 +1,7 @@ """ Bok-choy tests for the Studio Accessibility Feedback page. """ -from __future__ import absolute_import + import ddt diff --git a/common/test/acceptance/tests/studio/test_studio_acid_xblock.py b/common/test/acceptance/tests/studio/test_studio_acid_xblock.py index edc270b75c..4f80858418 100644 --- a/common/test/acceptance/tests/studio/test_studio_acid_xblock.py +++ b/common/test/acceptance/tests/studio/test_studio_acid_xblock.py @@ -1,7 +1,7 @@ """ Acceptance tests for Studio related to the acid xblock. """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from common.test.acceptance.pages.common.auto_auth import AutoAuthPage diff --git a/common/test/acceptance/tests/studio/test_studio_asset.py b/common/test/acceptance/tests/studio/test_studio_asset.py index 591f346f1d..1f7282e808 100644 --- a/common/test/acceptance/tests/studio/test_studio_asset.py +++ b/common/test/acceptance/tests/studio/test_studio_asset.py @@ -1,7 +1,7 @@ """ Acceptance tests for Studio related to the asset index page. """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/tests/studio/test_studio_bad_data.py b/common/test/acceptance/tests/studio/test_studio_bad_data.py index f64f0785a9..396b105d71 100644 --- a/common/test/acceptance/tests/studio/test_studio_bad_data.py +++ b/common/test/acceptance/tests/studio/test_studio_bad_data.py @@ -1,7 +1,7 @@ """ Acceptance tests that ensure components with bad content do not break page. """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.course import XBlockFixtureDesc from common.test.acceptance.pages.studio.utils import verify_ordering diff --git a/common/test/acceptance/tests/studio/test_studio_components.py b/common/test/acceptance/tests/studio/test_studio_components.py index 7ef8266bf6..581406e35d 100644 --- a/common/test/acceptance/tests/studio/test_studio_components.py +++ b/common/test/acceptance/tests/studio/test_studio_components.py @@ -1,7 +1,7 @@ """ Acceptance tests for adding components in Studio. """ -from __future__ import absolute_import + import ddt diff --git a/common/test/acceptance/tests/studio/test_studio_container.py b/common/test/acceptance/tests/studio/test_studio_container.py index 5963475d76..fffe35adef 100644 --- a/common/test/acceptance/tests/studio/test_studio_container.py +++ b/common/test/acceptance/tests/studio/test_studio_container.py @@ -3,7 +3,7 @@ Acceptance tests for Studio related to the container page. The container page is used both for displaying units, and for displaying containers within units. """ -from __future__ import absolute_import + import datetime diff --git a/common/test/acceptance/tests/studio/test_studio_course_create.py b/common/test/acceptance/tests/studio/test_studio_course_create.py index 75b9577486..e0036ebe28 100644 --- a/common/test/acceptance/tests/studio/test_studio_course_create.py +++ b/common/test/acceptance/tests/studio/test_studio_course_create.py @@ -1,7 +1,7 @@ """ Acceptance tests for course creation. """ -from __future__ import absolute_import + import random import string diff --git a/common/test/acceptance/tests/studio/test_studio_course_info.py b/common/test/acceptance/tests/studio/test_studio_course_info.py index a630e24945..0aad59ff96 100644 --- a/common/test/acceptance/tests/studio/test_studio_course_info.py +++ b/common/test/acceptance/tests/studio/test_studio_course_info.py @@ -1,7 +1,7 @@ """ Acceptance Tests for Course Information """ -from __future__ import absolute_import + from common.test.acceptance.pages.studio.course_info import CourseUpdatesPage from common.test.acceptance.tests.studio.base_studio_test import StudioCourseTest diff --git a/common/test/acceptance/tests/studio/test_studio_course_team.py b/common/test/acceptance/tests/studio/test_studio_course_team.py index 935e98b3b1..acfcb49b57 100644 --- a/common/test/acceptance/tests/studio/test_studio_course_team.py +++ b/common/test/acceptance/tests/studio/test_studio_course_team.py @@ -1,7 +1,7 @@ """ Acceptance tests for course in studio """ -from __future__ import absolute_import + from common.test.acceptance.pages.common.auto_auth import AutoAuthPage from common.test.acceptance.pages.studio.index import DashboardPage diff --git a/common/test/acceptance/tests/studio/test_studio_discussion_component.py b/common/test/acceptance/tests/studio/test_studio_discussion_component.py index 43bf7376e8..08328e4af0 100644 --- a/common/test/acceptance/tests/studio/test_studio_discussion_component.py +++ b/common/test/acceptance/tests/studio/test_studio_discussion_component.py @@ -1,7 +1,7 @@ """ Acceptance tests for discussion component in studio """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.course import XBlockFixtureDesc from common.test.acceptance.pages.studio.container import ContainerPage diff --git a/common/test/acceptance/tests/studio/test_studio_general.py b/common/test/acceptance/tests/studio/test_studio_general.py index ac36517c75..e7e4676ca6 100644 --- a/common/test/acceptance/tests/studio/test_studio_general.py +++ b/common/test/acceptance/tests/studio/test_studio_general.py @@ -1,7 +1,7 @@ """ Acceptance tests for Studio. """ -from __future__ import absolute_import + import uuid diff --git a/common/test/acceptance/tests/studio/test_studio_grading.py b/common/test/acceptance/tests/studio/test_studio_grading.py index 2598d47c30..394e4abe0e 100644 --- a/common/test/acceptance/tests/studio/test_studio_grading.py +++ b/common/test/acceptance/tests/studio/test_studio_grading.py @@ -1,7 +1,7 @@ """ Acceptance tests for grade settings in Studio. """ -from __future__ import absolute_import + from bok_choy.promise import EmptyPromise from six.moves import range diff --git a/common/test/acceptance/tests/studio/test_studio_help.py b/common/test/acceptance/tests/studio/test_studio_help.py index bd2b7d8394..7f66f7753e 100644 --- a/common/test/acceptance/tests/studio/test_studio_help.py +++ b/common/test/acceptance/tests/studio/test_studio_help.py @@ -3,7 +3,7 @@ Test the Studio help links. """ -from __future__ import absolute_import + from unittest import skip diff --git a/common/test/acceptance/tests/studio/test_studio_home.py b/common/test/acceptance/tests/studio/test_studio_home.py index 64cee0e951..2468f08d59 100644 --- a/common/test/acceptance/tests/studio/test_studio_home.py +++ b/common/test/acceptance/tests/studio/test_studio_home.py @@ -1,7 +1,7 @@ """ Acceptance tests for Home Page (My Courses / My Libraries). """ -from __future__ import absolute_import + import datetime diff --git a/common/test/acceptance/tests/studio/test_studio_html_editor.py b/common/test/acceptance/tests/studio/test_studio_html_editor.py index bef9262964..4f59903635 100644 --- a/common/test/acceptance/tests/studio/test_studio_html_editor.py +++ b/common/test/acceptance/tests/studio/test_studio_html_editor.py @@ -1,7 +1,7 @@ """ Acceptance tests for HTML component in studio """ -from __future__ import absolute_import + import os diff --git a/common/test/acceptance/tests/studio/test_studio_library.py b/common/test/acceptance/tests/studio/test_studio_library.py index 2b73851ce7..4e97361adf 100644 --- a/common/test/acceptance/tests/studio/test_studio_library.py +++ b/common/test/acceptance/tests/studio/test_studio_library.py @@ -1,7 +1,7 @@ """ Acceptance tests for Content Libraries in Studio """ -from __future__ import absolute_import + from ddt import data, ddt from six.moves import range diff --git a/common/test/acceptance/tests/studio/test_studio_library_container.py b/common/test/acceptance/tests/studio/test_studio_library_container.py index 5c545cf919..7993a6ebce 100644 --- a/common/test/acceptance/tests/studio/test_studio_library_container.py +++ b/common/test/acceptance/tests/studio/test_studio_library_container.py @@ -1,7 +1,7 @@ """ Acceptance tests for Library Content in LMS """ -from __future__ import absolute_import + import textwrap diff --git a/common/test/acceptance/tests/studio/test_studio_outline.py b/common/test/acceptance/tests/studio/test_studio_outline.py index 533df9d32c..95f74d478e 100644 --- a/common/test/acceptance/tests/studio/test_studio_outline.py +++ b/common/test/acceptance/tests/studio/test_studio_outline.py @@ -2,7 +2,7 @@ """ Acceptance tests for studio related to the outline page. """ -from __future__ import absolute_import + import itertools import json diff --git a/common/test/acceptance/tests/studio/test_studio_problem_editor.py b/common/test/acceptance/tests/studio/test_studio_problem_editor.py index b1ecf90996..69906a7da2 100644 --- a/common/test/acceptance/tests/studio/test_studio_problem_editor.py +++ b/common/test/acceptance/tests/studio/test_studio_problem_editor.py @@ -1,7 +1,7 @@ """ Acceptance tests for Problem component in studio """ -from __future__ import absolute_import + from common.test.acceptance.fixtures.course import XBlockFixtureDesc from common.test.acceptance.pages.studio.container import ContainerPage diff --git a/common/test/acceptance/tests/studio/test_studio_rerun.py b/common/test/acceptance/tests/studio/test_studio_rerun.py index 26dc2f1331..5f7b9bc357 100644 --- a/common/test/acceptance/tests/studio/test_studio_rerun.py +++ b/common/test/acceptance/tests/studio/test_studio_rerun.py @@ -2,7 +2,7 @@ Acceptance tests for Studio related to course reruns. """ -from __future__ import absolute_import + import random diff --git a/common/test/acceptance/tests/studio/test_studio_settings.py b/common/test/acceptance/tests/studio/test_studio_settings.py index 49f632f4c8..1f38b81b0a 100644 --- a/common/test/acceptance/tests/studio/test_studio_settings.py +++ b/common/test/acceptance/tests/studio/test_studio_settings.py @@ -2,7 +2,7 @@ """ Acceptance tests for Studio's Setting pages """ -from __future__ import absolute_import, unicode_literals + import json import os diff --git a/common/test/acceptance/tests/studio/test_studio_settings_certificates.py b/common/test/acceptance/tests/studio/test_studio_settings_certificates.py index 21c1e06cd2..2e8e7a82a5 100644 --- a/common/test/acceptance/tests/studio/test_studio_settings_certificates.py +++ b/common/test/acceptance/tests/studio/test_studio_settings_certificates.py @@ -1,7 +1,7 @@ """ Acceptance tests for Studio's Setting pages """ -from __future__ import absolute_import + import re diff --git a/common/test/acceptance/tests/studio/test_studio_settings_details.py b/common/test/acceptance/tests/studio/test_studio_settings_details.py index b2b387f63b..e67ee481da 100644 --- a/common/test/acceptance/tests/studio/test_studio_settings_details.py +++ b/common/test/acceptance/tests/studio/test_studio_settings_details.py @@ -1,7 +1,7 @@ """ Acceptance tests for Studio's Settings Details pages """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/common/test/acceptance/tests/studio/test_studio_split_test.py b/common/test/acceptance/tests/studio/test_studio_split_test.py index 0b21b50ff9..ddfa070bb8 100644 --- a/common/test/acceptance/tests/studio/test_studio_split_test.py +++ b/common/test/acceptance/tests/studio/test_studio_split_test.py @@ -2,7 +2,7 @@ Acceptance tests for Studio related to the split_test module. """ -from __future__ import absolute_import + import math diff --git a/common/test/acceptance/tests/studio/test_studio_tabs.py b/common/test/acceptance/tests/studio/test_studio_tabs.py index 10b70a930a..f701ececc9 100644 --- a/common/test/acceptance/tests/studio/test_studio_tabs.py +++ b/common/test/acceptance/tests/studio/test_studio_tabs.py @@ -1,7 +1,7 @@ """ Acceptance tests for Studio related to the Pages. """ -from __future__ import absolute_import + from common.test.acceptance.pages.studio.edit_tabs import PagesPage from common.test.acceptance.tests.studio.base_studio_test import StudioCourseTest diff --git a/common/test/acceptance/tests/studio/test_studio_textbooks.py b/common/test/acceptance/tests/studio/test_studio_textbooks.py index 2d1516857b..992c6f3303 100644 --- a/common/test/acceptance/tests/studio/test_studio_textbooks.py +++ b/common/test/acceptance/tests/studio/test_studio_textbooks.py @@ -1,7 +1,7 @@ """ Acceptance tests for Studio related to the textbooks. """ -from __future__ import absolute_import + from common.test.acceptance.pages.lms.textbook_view import TextbookViewPage from common.test.acceptance.pages.studio.textbook_upload import TextbookUploadPage diff --git a/common/test/acceptance/tests/test_annotatable.py b/common/test/acceptance/tests/test_annotatable.py index b6122633b9..2acc916dcb 100644 --- a/common/test/acceptance/tests/test_annotatable.py +++ b/common/test/acceptance/tests/test_annotatable.py @@ -3,7 +3,7 @@ E2E tests for the LMS. """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/common/test/acceptance/tests/test_cohorted_courseware.py b/common/test/acceptance/tests/test_cohorted_courseware.py index 41297aa8af..43590f5cb5 100644 --- a/common/test/acceptance/tests/test_cohorted_courseware.py +++ b/common/test/acceptance/tests/test_cohorted_courseware.py @@ -2,7 +2,7 @@ End-to-end test for cohorted courseware. This uses both Studio and LMS. """ -from __future__ import absolute_import + from bok_choy.page_object import XSS_INJECTION diff --git a/common/test/acceptance/tests/video/test_studio_video_editor.py b/common/test/acceptance/tests/video/test_studio_video_editor.py index 6012852554..951021a871 100644 --- a/common/test/acceptance/tests/video/test_studio_video_editor.py +++ b/common/test/acceptance/tests/video/test_studio_video_editor.py @@ -3,7 +3,7 @@ """ Acceptance tests for CMS Video Editor. """ -from __future__ import absolute_import + import ddt diff --git a/common/test/acceptance/tests/video/test_studio_video_module.py b/common/test/acceptance/tests/video/test_studio_video_module.py index 18388a86fa..e2e2abcd0a 100644 --- a/common/test/acceptance/tests/video/test_studio_video_module.py +++ b/common/test/acceptance/tests/video/test_studio_video_module.py @@ -3,7 +3,7 @@ """ Acceptance tests for CMS Video Module. """ -from __future__ import absolute_import + import os from unittest import skipIf diff --git a/common/test/acceptance/tests/video/test_studio_video_transcript.py b/common/test/acceptance/tests/video/test_studio_video_transcript.py index 7485ec49e0..e75b35e02e 100644 --- a/common/test/acceptance/tests/video/test_studio_video_transcript.py +++ b/common/test/acceptance/tests/video/test_studio_video_transcript.py @@ -18,7 +18,7 @@ front-end validation will not pass. one stored on YouTube t_not_exist - this file does not exist on YouTube; it exists locally """ -from __future__ import absolute_import + from common.test.acceptance.tests.video.test_studio_video_module import CMSVideoBaseTest diff --git a/common/test/acceptance/tests/video/test_video_events.py b/common/test/acceptance/tests/video/test_video_events.py index bfeafb08c1..76d25c9ee5 100644 --- a/common/test/acceptance/tests/video/test_video_events.py +++ b/common/test/acceptance/tests/video/test_video_events.py @@ -1,6 +1,6 @@ """Ensure videos emit proper events""" -from __future__ import absolute_import + import datetime import json diff --git a/common/test/acceptance/tests/video/test_video_handout.py b/common/test/acceptance/tests/video/test_video_handout.py index 0aa3f06c73..5eb514383c 100644 --- a/common/test/acceptance/tests/video/test_video_handout.py +++ b/common/test/acceptance/tests/video/test_video_handout.py @@ -3,7 +3,7 @@ """ Acceptance tests for CMS Video Handout. """ -from __future__ import absolute_import + from common.test.acceptance.tests.video.test_studio_video_module import CMSVideoBaseTest diff --git a/common/test/acceptance/tests/video/test_video_license.py b/common/test/acceptance/tests/video/test_video_license.py index 343625c8fd..81be34bbbb 100644 --- a/common/test/acceptance/tests/video/test_video_license.py +++ b/common/test/acceptance/tests/video/test_video_license.py @@ -2,7 +2,7 @@ """ Acceptance tests for licensing of the Video module """ -from __future__ import absolute_import, unicode_literals + from common.test.acceptance.fixtures.course import XBlockFixtureDesc from common.test.acceptance.pages.lms.courseware import CoursewarePage diff --git a/common/test/acceptance/tests/video/test_video_module.py b/common/test/acceptance/tests/video/test_video_module.py index a29c824333..c0ac07e43c 100644 --- a/common/test/acceptance/tests/video/test_video_module.py +++ b/common/test/acceptance/tests/video/test_video_module.py @@ -3,7 +3,7 @@ """ Acceptance tests for Video. """ -from __future__ import absolute_import + import os from unittest import skipIf diff --git a/common/test/acceptance/tests/video/test_video_times.py b/common/test/acceptance/tests/video/test_video_times.py index 0486b4233c..b641fe317d 100644 --- a/common/test/acceptance/tests/video/test_video_times.py +++ b/common/test/acceptance/tests/video/test_video_times.py @@ -1,7 +1,7 @@ """ Acceptance tests for Video Times(Start, End and Finish) functionality. """ -from __future__ import absolute_import + from common.test.acceptance.tests.video.test_video_module import VideoBaseTest diff --git a/common/test/acceptance/tests/xblock/test_crowdsourcehinter_problem.py b/common/test/acceptance/tests/xblock/test_crowdsourcehinter_problem.py index 8f45f31a62..6ad8325e27 100644 --- a/common/test/acceptance/tests/xblock/test_crowdsourcehinter_problem.py +++ b/common/test/acceptance/tests/xblock/test_crowdsourcehinter_problem.py @@ -1,7 +1,7 @@ """ Javascript tests for the crowdsourcehinter xblock """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/common/test/conftest.py b/common/test/conftest.py index e521cac159..a23d052351 100644 --- a/common/test/conftest.py +++ b/common/test/conftest.py @@ -1,7 +1,7 @@ """Code run by pylint before running any tests.""" # Patch the xml libs before anything else. -from __future__ import absolute_import + from safe_lxml import defuse_xml_libs diff --git a/common/test/utils.py b/common/test/utils.py index 65bd4002a9..e4fa013fc0 100644 --- a/common/test/utils.py +++ b/common/test/utils.py @@ -1,7 +1,7 @@ """ General testing utilities. """ -from __future__ import absolute_import + import functools import sys diff --git a/conftest.py b/conftest.py index 41728ac5b9..8d5b764909 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,7 @@ """ Default unit test configuration and fixtures. """ -from __future__ import absolute_import, unicode_literals + from unittest import TestCase import pytest diff --git a/docs/api/conf.py b/docs/api/conf.py index d5dd111296..1a63141884 100644 --- a/docs/api/conf.py +++ b/docs/api/conf.py @@ -6,7 +6,7 @@ # full list see the documentation: # http://www.sphinx-doc.org/en/master/config -from __future__ import absolute_import, unicode_literals + import os diff --git a/docs/docs_settings.py b/docs/docs_settings.py index db6834cd1d..e7ed5495b3 100644 --- a/docs/docs_settings.py +++ b/docs/docs_settings.py @@ -4,7 +4,7 @@ Basically the LMS devstack settings plus a few items needed to successfully import all the Studio code. """ -from __future__ import absolute_import, unicode_literals + import os diff --git a/docs/guides/conf.py b/docs/guides/conf.py index ee85764e97..fd77643339 100644 --- a/docs/guides/conf.py +++ b/docs/guides/conf.py @@ -6,7 +6,7 @@ # full list see the documentation: # http://www.sphinx-doc.org/en/master/config -from __future__ import absolute_import, unicode_literals + import datetime import os diff --git a/docs/sw2sphinxopenapi.py b/docs/sw2sphinxopenapi.py index ae3e43bafc..57b0e406e5 100644 --- a/docs/sw2sphinxopenapi.py +++ b/docs/sw2sphinxopenapi.py @@ -8,7 +8,7 @@ detailed segment page. """ -from __future__ import print_function + import functools import itertools diff --git a/lms/__init__.py b/lms/__init__.py index 294b4436ce..e4f4b580af 100644 --- a/lms/__init__.py +++ b/lms/__init__.py @@ -2,7 +2,7 @@ Celery needs to be loaded when the cms modules are so that task registration and discovery can work correctly. """ -from __future__ import absolute_import + # We monkey patch Kombu's entrypoints listing because scanning through this # accounts for the majority of LMS/Studio startup time for tests, and we don't diff --git a/lms/celery.py b/lms/celery.py index 4b3c1fed44..edbe3b665d 100644 --- a/lms/celery.py +++ b/lms/celery.py @@ -4,7 +4,7 @@ and auto discover tasks in all installed django apps. Taken from: https://celery.readthedocs.org/en/latest/django/first-steps-with-django.html """ -from __future__ import absolute_import + import os diff --git a/lms/djangoapps/badges/admin.py b/lms/djangoapps/badges/admin.py index dfa791bba7..3edcccfa68 100644 --- a/lms/djangoapps/badges/admin.py +++ b/lms/djangoapps/badges/admin.py @@ -1,7 +1,7 @@ """ Admin registration for Badge Models """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/badges/api/serializers.py b/lms/djangoapps/badges/api/serializers.py index a5f4f1949c..8189c7459d 100644 --- a/lms/djangoapps/badges/api/serializers.py +++ b/lms/djangoapps/badges/api/serializers.py @@ -1,7 +1,7 @@ """ Serializers for Badges """ -from __future__ import absolute_import + from rest_framework import serializers diff --git a/lms/djangoapps/badges/api/tests.py b/lms/djangoapps/badges/api/tests.py index 2a9531dd88..223ae950b9 100644 --- a/lms/djangoapps/badges/api/tests.py +++ b/lms/djangoapps/badges/api/tests.py @@ -1,7 +1,7 @@ """ Tests for the badges API views. """ -from __future__ import absolute_import + import six from ddt import data, ddt, unpack diff --git a/lms/djangoapps/badges/api/urls.py b/lms/djangoapps/badges/api/urls.py index e53b6e2c3d..778c8557d1 100644 --- a/lms/djangoapps/badges/api/urls.py +++ b/lms/djangoapps/badges/api/urls.py @@ -1,7 +1,7 @@ """ URLs for badges API """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/badges/api/views.py b/lms/djangoapps/badges/api/views.py index 449f7dbce0..174a240e68 100644 --- a/lms/djangoapps/badges/api/views.py +++ b/lms/djangoapps/badges/api/views.py @@ -1,7 +1,7 @@ """ API views for badges """ -from __future__ import absolute_import + from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser from opaque_keys import InvalidKeyError diff --git a/lms/djangoapps/badges/apps.py b/lms/djangoapps/badges/apps.py index 0c26dabd30..7a0fd845bc 100644 --- a/lms/djangoapps/badges/apps.py +++ b/lms/djangoapps/badges/apps.py @@ -4,7 +4,7 @@ Badges Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/badges/backends/badgr.py b/lms/djangoapps/badges/backends/badgr.py index 4c82958825..49a873cf7c 100644 --- a/lms/djangoapps/badges/backends/badgr.py +++ b/lms/djangoapps/badges/backends/badgr.py @@ -1,7 +1,7 @@ """ Badge Awarding backend for Badgr-Server. """ -from __future__ import absolute_import + import hashlib import logging diff --git a/lms/djangoapps/badges/backends/base.py b/lms/djangoapps/badges/backends/base.py index c79c4d64cb..7aae363a99 100644 --- a/lms/djangoapps/badges/backends/base.py +++ b/lms/djangoapps/badges/backends/base.py @@ -1,7 +1,7 @@ """ Base class for badge backends. """ -from __future__ import absolute_import + from abc import ABCMeta, abstractmethod diff --git a/lms/djangoapps/badges/backends/tests/dummy_backend.py b/lms/djangoapps/badges/backends/tests/dummy_backend.py index ff413416a3..042ffe9b24 100644 --- a/lms/djangoapps/badges/backends/tests/dummy_backend.py +++ b/lms/djangoapps/badges/backends/tests/dummy_backend.py @@ -1,7 +1,7 @@ """ Dummy backend, for use in testing. """ -from __future__ import absolute_import + from lms.djangoapps.badges.backends.base import BadgeBackend from lms.djangoapps.badges.tests.factories import BadgeAssertionFactory diff --git a/lms/djangoapps/badges/backends/tests/test_badgr_backend.py b/lms/djangoapps/badges/backends/tests/test_badgr_backend.py index ede8c2354a..31b4cbfe46 100644 --- a/lms/djangoapps/badges/backends/tests/test_badgr_backend.py +++ b/lms/djangoapps/badges/backends/tests/test_badgr_backend.py @@ -1,7 +1,7 @@ """ Tests for BadgrBackend """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/badges/events/course_complete.py b/lms/djangoapps/badges/events/course_complete.py index 605236ea13..dd420b8d25 100644 --- a/lms/djangoapps/badges/events/course_complete.py +++ b/lms/djangoapps/badges/events/course_complete.py @@ -1,7 +1,7 @@ """ Helper functions for the course complete event that was originally included with the Badging MVP. """ -from __future__ import absolute_import + import hashlib import logging diff --git a/lms/djangoapps/badges/events/course_meta.py b/lms/djangoapps/badges/events/course_meta.py index fcf6f32f1f..72f7323612 100644 --- a/lms/djangoapps/badges/events/course_meta.py +++ b/lms/djangoapps/badges/events/course_meta.py @@ -3,7 +3,7 @@ Events which have to do with a user doing something with more than one course, s as enrolling in a certain number, completing a certain number, or completing a specific set of courses. """ -from __future__ import absolute_import + from badges.models import BadgeClass, CourseEventBadgesConfiguration from badges.utils import requires_badges_enabled diff --git a/lms/djangoapps/badges/events/tests/test_course_complete.py b/lms/djangoapps/badges/events/tests/test_course_complete.py index 000af23f2e..2755aa2940 100644 --- a/lms/djangoapps/badges/events/tests/test_course_complete.py +++ b/lms/djangoapps/badges/events/tests/test_course_complete.py @@ -1,7 +1,7 @@ """ Tests for the course completion helper functions. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/badges/events/tests/test_course_meta.py b/lms/djangoapps/badges/events/tests/test_course_meta.py index 95a274c94f..46259fa3d5 100644 --- a/lms/djangoapps/badges/events/tests/test_course_meta.py +++ b/lms/djangoapps/badges/events/tests/test_course_meta.py @@ -1,7 +1,7 @@ """ Tests the course meta badging events """ -from __future__ import absolute_import + import six from six.moves import range, zip diff --git a/lms/djangoapps/badges/handlers.py b/lms/djangoapps/badges/handlers.py index 4a1fb9e9bc..f871f61d1a 100644 --- a/lms/djangoapps/badges/handlers.py +++ b/lms/djangoapps/badges/handlers.py @@ -1,7 +1,7 @@ """ Badges related signal handlers. """ -from __future__ import absolute_import + from django.dispatch import receiver diff --git a/lms/djangoapps/badges/migrations/0001_initial.py b/lms/djangoapps/badges/migrations/0001_initial.py index b508b1f74e..510f89fac9 100644 --- a/lms/djangoapps/badges/migrations/0001_initial.py +++ b/lms/djangoapps/badges/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import jsonfield.fields diff --git a/lms/djangoapps/badges/migrations/0002_data__migrate_assertions.py b/lms/djangoapps/badges/migrations/0002_data__migrate_assertions.py index be38216bb9..cba6cc8505 100644 --- a/lms/djangoapps/badges/migrations/0002_data__migrate_assertions.py +++ b/lms/djangoapps/badges/migrations/0002_data__migrate_assertions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import json import os diff --git a/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py b/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py index 6f8d045f39..002a318839 100644 --- a/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py +++ b/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/badges/models.py b/lms/djangoapps/badges/models.py index 9d076846e5..85093e7f29 100644 --- a/lms/djangoapps/badges/models.py +++ b/lms/djangoapps/badges/models.py @@ -1,7 +1,7 @@ """ Database models for the badges app """ -from __future__ import absolute_import + from importlib import import_module diff --git a/lms/djangoapps/badges/service.py b/lms/djangoapps/badges/service.py index 400aea2865..931a7f93d1 100644 --- a/lms/djangoapps/badges/service.py +++ b/lms/djangoapps/badges/service.py @@ -1,7 +1,7 @@ """ Badging service for XBlocks """ -from __future__ import absolute_import + from badges.models import BadgeClass diff --git a/lms/djangoapps/badges/tests/factories.py b/lms/djangoapps/badges/tests/factories.py index 2042876d9b..957f2a4d8e 100644 --- a/lms/djangoapps/badges/tests/factories.py +++ b/lms/djangoapps/badges/tests/factories.py @@ -1,7 +1,7 @@ """ Factories for Badge tests """ -from __future__ import absolute_import + from random import random diff --git a/lms/djangoapps/badges/tests/test_models.py b/lms/djangoapps/badges/tests/test_models.py index 375823532d..56d1e53813 100644 --- a/lms/djangoapps/badges/tests/test_models.py +++ b/lms/djangoapps/badges/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the Badges app models. """ -from __future__ import absolute_import + from django.core.exceptions import ValidationError from django.core.files.images import ImageFile diff --git a/lms/djangoapps/badges/utils.py b/lms/djangoapps/badges/utils.py index 172b8f2203..e6ade5f536 100644 --- a/lms/djangoapps/badges/utils.py +++ b/lms/djangoapps/badges/utils.py @@ -1,7 +1,7 @@ """ Utility functions used by the badging app. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/lms/djangoapps/branding/__init__.py b/lms/djangoapps/branding/__init__.py index 21725f3322..22f0e3697d 100644 --- a/lms/djangoapps/branding/__init__.py +++ b/lms/djangoapps/branding/__init__.py @@ -7,7 +7,7 @@ This module provides functions to retrieve basic branded parts such as the site visible courses, university name and logo. """ -from __future__ import absolute_import + from django.conf import settings from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/branding/admin.py b/lms/djangoapps/branding/admin.py index 8bd6e28dba..ab7bf59512 100644 --- a/lms/djangoapps/branding/admin.py +++ b/lms/djangoapps/branding/admin.py @@ -1,5 +1,5 @@ """Django admin pages for branding configuration. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/branding/api.py b/lms/djangoapps/branding/api.py index 0133bde83b..e2c5b96e49 100644 --- a/lms/djangoapps/branding/api.py +++ b/lms/djangoapps/branding/api.py @@ -12,7 +12,7 @@ are consistent across the LMS and other sites (such as the marketing site and blog). """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/branding/api_urls.py b/lms/djangoapps/branding/api_urls.py index e2f492c23e..39ee4c2213 100644 --- a/lms/djangoapps/branding/api_urls.py +++ b/lms/djangoapps/branding/api_urls.py @@ -2,7 +2,7 @@ Branding API endpoint urls. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/branding/migrations/0001_initial.py b/lms/djangoapps/branding/migrations/0001_initial.py index 0b5f90f7d4..0c18ca9a21 100644 --- a/lms/djangoapps/branding/migrations/0001_initial.py +++ b/lms/djangoapps/branding/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/branding/models.py b/lms/djangoapps/branding/models.py index c2b187132b..5557a2aa1f 100644 --- a/lms/djangoapps/branding/models.py +++ b/lms/djangoapps/branding/models.py @@ -5,7 +5,7 @@ Includes: BrandingInfoConfig: A ConfigurationModel for managing how Video Module will use Branding. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/branding/tests/test_api.py b/lms/djangoapps/branding/tests/test_api.py index ad3c3b3198..37926e41bb 100644 --- a/lms/djangoapps/branding/tests/test_api.py +++ b/lms/djangoapps/branding/tests/test_api.py @@ -1,6 +1,6 @@ # encoding: utf-8 """Tests of Branding API """ -from __future__ import absolute_import, unicode_literals + import mock from django.conf import settings diff --git a/lms/djangoapps/branding/tests/test_models.py b/lms/djangoapps/branding/tests/test_models.py index b0b1c30ef5..976a272718 100644 --- a/lms/djangoapps/branding/tests/test_models.py +++ b/lms/djangoapps/branding/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the Video Branding configuration. """ -from __future__ import absolute_import + from django.core.exceptions import ValidationError from django.test import TestCase diff --git a/lms/djangoapps/branding/tests/test_page.py b/lms/djangoapps/branding/tests/test_page.py index 8904934812..e6d6093d0e 100644 --- a/lms/djangoapps/branding/tests/test_page.py +++ b/lms/djangoapps/branding/tests/test_page.py @@ -1,7 +1,7 @@ """ Tests for branding page """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/branding/tests/test_views.py b/lms/djangoapps/branding/tests/test_views.py index 2d9ec48200..8b2ffc95d2 100644 --- a/lms/djangoapps/branding/tests/test_views.py +++ b/lms/djangoapps/branding/tests/test_views.py @@ -1,6 +1,6 @@ # encoding: utf-8 """Tests of Branding API views. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index 585a0d74c8..9327bca7e7 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -1,5 +1,5 @@ """Views for the branding app. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/bulk_email/admin.py b/lms/djangoapps/bulk_email/admin.py index 9ac288b4c8..1dc33cf636 100644 --- a/lms/djangoapps/bulk_email/admin.py +++ b/lms/djangoapps/bulk_email/admin.py @@ -1,7 +1,7 @@ """ Django admin page for bulk email models """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/bulk_email/api.py b/lms/djangoapps/bulk_email/api.py index 641595e613..f6b876b865 100644 --- a/lms/djangoapps/bulk_email/api.py +++ b/lms/djangoapps/bulk_email/api.py @@ -4,7 +4,7 @@ Python APIs exposed by the bulk_email app to other in-process apps. """ # Public Bulk Email Functions -from __future__ import absolute_import + from bulk_email.models_api import ( is_bulk_email_enabled_for_course, diff --git a/lms/djangoapps/bulk_email/forms.py b/lms/djangoapps/bulk_email/forms.py index 6ed9e3ad7b..e7788a96a3 100644 --- a/lms/djangoapps/bulk_email/forms.py +++ b/lms/djangoapps/bulk_email/forms.py @@ -1,7 +1,7 @@ """ Defines a form for providing validation of CourseEmail templates. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/bulk_email/migrations/0001_initial.py b/lms/djangoapps/bulk_email/migrations/0001_initial.py index 7b478852ce..4d5e70b14b 100644 --- a/lms/djangoapps/bulk_email/migrations/0001_initial.py +++ b/lms/djangoapps/bulk_email/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py b/lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py index e41e62332f..6433bcb47e 100644 --- a/lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py +++ b/lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.core.management import call_command from django.db import migrations, models diff --git a/lms/djangoapps/bulk_email/migrations/0003_config_model_feature_flag.py b/lms/djangoapps/bulk_email/migrations/0003_config_model_feature_flag.py index 4bd12d11f0..8ed77141a6 100644 --- a/lms/djangoapps/bulk_email/migrations/0003_config_model_feature_flag.py +++ b/lms/djangoapps/bulk_email/migrations/0003_config_model_feature_flag.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/bulk_email/migrations/0004_add_email_targets.py b/lms/djangoapps/bulk_email/migrations/0004_add_email_targets.py index fb730aab6f..2b4c287258 100644 --- a/lms/djangoapps/bulk_email/migrations/0004_add_email_targets.py +++ b/lms/djangoapps/bulk_email/migrations/0004_add_email_targets.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/bulk_email/migrations/0005_move_target_data.py b/lms/djangoapps/bulk_email/migrations/0005_move_target_data.py index cb2b492a86..0fde85cd8f 100644 --- a/lms/djangoapps/bulk_email/migrations/0005_move_target_data.py +++ b/lms/djangoapps/bulk_email/migrations/0005_move_target_data.py @@ -1,5 +1,5 @@ # -*- coding: utf- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from django.db.utils import DatabaseError diff --git a/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py b/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py index 71b4609888..1c7c91375b 100644 --- a/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py +++ b/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/bulk_email/models.py b/lms/djangoapps/bulk_email/models.py index 04bd7eb86f..1e2340b7ae 100644 --- a/lms/djangoapps/bulk_email/models.py +++ b/lms/djangoapps/bulk_email/models.py @@ -1,7 +1,7 @@ """ Models for bulk email """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/bulk_email/models_api.py b/lms/djangoapps/bulk_email/models_api.py index 34fcafec52..a9a499e5cf 100644 --- a/lms/djangoapps/bulk_email/models_api.py +++ b/lms/djangoapps/bulk_email/models_api.py @@ -1,7 +1,7 @@ """ Provides Python APIs exposed from Bulk Email models. """ -from __future__ import absolute_import + from bulk_email.models import BulkEmailFlag, CourseAuthorization, Optout diff --git a/lms/djangoapps/bulk_email/policies.py b/lms/djangoapps/bulk_email/policies.py index f8589ae918..e0c72476e7 100644 --- a/lms/djangoapps/bulk_email/policies.py +++ b/lms/djangoapps/bulk_email/policies.py @@ -1,5 +1,5 @@ """Course Email optOut Policy""" -from __future__ import absolute_import + from edx_ace.channel import ChannelType from edx_ace.policy import Policy, PolicyResult diff --git a/lms/djangoapps/bulk_email/signals.py b/lms/djangoapps/bulk_email/signals.py index aa9cee7ba1..f017be5fc3 100644 --- a/lms/djangoapps/bulk_email/signals.py +++ b/lms/djangoapps/bulk_email/signals.py @@ -2,7 +2,7 @@ Signal handlers for the bulk_email app """ -from __future__ import absolute_import + from django.dispatch import receiver diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index 06aba0099e..e68b086d2f 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -3,7 +3,7 @@ This module contains celery task functions for handling the sending of bulk email to a course. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/bulk_email/tests/test_course_optout.py b/lms/djangoapps/bulk_email/tests/test_course_optout.py index ae705a7c3c..6dd3a4dd86 100644 --- a/lms/djangoapps/bulk_email/tests/test_course_optout.py +++ b/lms/djangoapps/bulk_email/tests/test_course_optout.py @@ -2,7 +2,7 @@ """ Unit tests for student optouts from course email """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index 55c13b88fa..ae7b6a85c6 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -2,7 +2,7 @@ """ Unit tests for sending course email """ -from __future__ import absolute_import + import json import os diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index 6720a0b84d..be4371ada1 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -2,7 +2,7 @@ """ Unit tests for handling email sending errors """ -from __future__ import absolute_import + import json from itertools import cycle diff --git a/lms/djangoapps/bulk_email/tests/test_forms.py b/lms/djangoapps/bulk_email/tests/test_forms.py index 82356e79ba..6aa8d89504 100644 --- a/lms/djangoapps/bulk_email/tests/test_forms.py +++ b/lms/djangoapps/bulk_email/tests/test_forms.py @@ -3,7 +3,7 @@ Unit tests for bulk-email-related forms. """ -from __future__ import absolute_import + from opaque_keys.edx.locator import CourseLocator from six import text_type diff --git a/lms/djangoapps/bulk_email/tests/test_models.py b/lms/djangoapps/bulk_email/tests/test_models.py index 03b3f6115c..02589819e3 100644 --- a/lms/djangoapps/bulk_email/tests/test_models.py +++ b/lms/djangoapps/bulk_email/tests/test_models.py @@ -1,7 +1,7 @@ """ Unit tests for bulk-email-related models. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/bulk_email/tests/test_signals.py b/lms/djangoapps/bulk_email/tests/test_signals.py index 2af4bff861..9d35ac0430 100644 --- a/lms/djangoapps/bulk_email/tests/test_signals.py +++ b/lms/djangoapps/bulk_email/tests/test_signals.py @@ -1,7 +1,7 @@ """ Unit tests for student optouts from course email """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/bulk_email/tests/test_tasks.py b/lms/djangoapps/bulk_email/tests/test_tasks.py index d2fe1842bb..81bc0e82df 100644 --- a/lms/djangoapps/bulk_email/tests/test_tasks.py +++ b/lms/djangoapps/bulk_email/tests/test_tasks.py @@ -6,7 +6,7 @@ Runs tasks on answers to course problems to validate that code paths actually work. """ -from __future__ import absolute_import, print_function + import json from itertools import chain, cycle, repeat diff --git a/lms/djangoapps/bulk_email/views.py b/lms/djangoapps/bulk_email/views.py index 5e59d63c7a..75a2efb57a 100644 --- a/lms/djangoapps/bulk_email/views.py +++ b/lms/djangoapps/bulk_email/views.py @@ -2,7 +2,7 @@ Views to support bulk email functionalities like opt-out. """ -from __future__ import division + import logging diff --git a/lms/djangoapps/bulk_enroll/serializers.py b/lms/djangoapps/bulk_enroll/serializers.py index f025c2d6d3..b8f65712bf 100644 --- a/lms/djangoapps/bulk_enroll/serializers.py +++ b/lms/djangoapps/bulk_enroll/serializers.py @@ -1,7 +1,7 @@ """ Serializers for Bulk Enrollment. """ -from __future__ import absolute_import + from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/bulk_enroll/tests/test_views.py b/lms/djangoapps/bulk_enroll/tests/test_views.py index 7fb5b446b2..6758987d8f 100644 --- a/lms/djangoapps/bulk_enroll/tests/test_views.py +++ b/lms/djangoapps/bulk_enroll/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the Bulk Enrollment views. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/bulk_enroll/urls.py b/lms/djangoapps/bulk_enroll/urls.py index 89ee6f1b00..fe334c2be6 100644 --- a/lms/djangoapps/bulk_enroll/urls.py +++ b/lms/djangoapps/bulk_enroll/urls.py @@ -1,7 +1,7 @@ """ URLs for the Bulk Enrollment API """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/bulk_enroll/views.py b/lms/djangoapps/bulk_enroll/views.py index e5c492f69f..ee4ea64f00 100644 --- a/lms/djangoapps/bulk_enroll/views.py +++ b/lms/djangoapps/bulk_enroll/views.py @@ -1,7 +1,7 @@ """ API views for Bulk Enrollment """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/ccx/api/urls.py b/lms/djangoapps/ccx/api/urls.py index 5898ae4d9c..365edab2e4 100644 --- a/lms/djangoapps/ccx/api/urls.py +++ b/lms/djangoapps/ccx/api/urls.py @@ -1,7 +1,7 @@ """ CCX API URLs. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/ccx/api/v0/paginators.py b/lms/djangoapps/ccx/api/v0/paginators.py index 054d93d7a6..a386a83cf9 100644 --- a/lms/djangoapps/ccx/api/v0/paginators.py +++ b/lms/djangoapps/ccx/api/v0/paginators.py @@ -1,6 +1,6 @@ """ CCX API v0 Paginators. """ -from __future__ import absolute_import + from edx_rest_framework_extensions.paginators import DefaultPagination diff --git a/lms/djangoapps/ccx/api/v0/serializers.py b/lms/djangoapps/ccx/api/v0/serializers.py index ec888960c7..5df80fee79 100644 --- a/lms/djangoapps/ccx/api/v0/serializers.py +++ b/lms/djangoapps/ccx/api/v0/serializers.py @@ -1,6 +1,6 @@ """ CCX API v0 Serializers. """ -from __future__ import absolute_import + import six from ccx_keys.locator import CCXLocator diff --git a/lms/djangoapps/ccx/api/v0/tests/test_views.py b/lms/djangoapps/ccx/api/v0/tests/test_views.py index 411b3c4185..c79000e14d 100644 --- a/lms/djangoapps/ccx/api/v0/tests/test_views.py +++ b/lms/djangoapps/ccx/api/v0/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the CCX REST APIs. """ -from __future__ import absolute_import + import json import math diff --git a/lms/djangoapps/ccx/api/v0/urls.py b/lms/djangoapps/ccx/api/v0/urls.py index 48b6e84746..5d9374a501 100644 --- a/lms/djangoapps/ccx/api/v0/urls.py +++ b/lms/djangoapps/ccx/api/v0/urls.py @@ -1,7 +1,7 @@ """ CCX API v0 URLs. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/lms/djangoapps/ccx/api/v0/views.py b/lms/djangoapps/ccx/api/v0/views.py index f46e100312..660b2f6a0a 100644 --- a/lms/djangoapps/ccx/api/v0/views.py +++ b/lms/djangoapps/ccx/api/v0/views.py @@ -1,6 +1,6 @@ """ API v0 views. """ -from __future__ import absolute_import + import datetime import json diff --git a/lms/djangoapps/ccx/migrations/0001_initial.py b/lms/djangoapps/ccx/migrations/0001_initial.py index 5ddccc25a8..7c281f208c 100644 --- a/lms/djangoapps/ccx/migrations/0001_initial.py +++ b/lms/djangoapps/ccx/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/ccx/migrations/0002_customcourseforedx_structure_json.py b/lms/djangoapps/ccx/migrations/0002_customcourseforedx_structure_json.py index d0a6bfff60..3e18742f40 100644 --- a/lms/djangoapps/ccx/migrations/0002_customcourseforedx_structure_json.py +++ b/lms/djangoapps/ccx/migrations/0002_customcourseforedx_structure_json.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/ccx/migrations/0003_add_master_course_staff_in_ccx.py b/lms/djangoapps/ccx/migrations/0003_add_master_course_staff_in_ccx.py index a68b316190..4adec76f15 100644 --- a/lms/djangoapps/ccx/migrations/0003_add_master_course_staff_in_ccx.py +++ b/lms/djangoapps/ccx/migrations/0003_add_master_course_staff_in_ccx.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/ccx/migrations/0004_seed_forum_roles_in_ccx_courses.py b/lms/djangoapps/ccx/migrations/0004_seed_forum_roles_in_ccx_courses.py index 726b23da54..7ed5ead9e7 100644 --- a/lms/djangoapps/ccx/migrations/0004_seed_forum_roles_in_ccx_courses.py +++ b/lms/djangoapps/ccx/migrations/0004_seed_forum_roles_in_ccx_courses.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/ccx/migrations/0005_change_ccx_coach_to_staff.py b/lms/djangoapps/ccx/migrations/0005_change_ccx_coach_to_staff.py index f81e52d044..a15e698c5b 100644 --- a/lms/djangoapps/ccx/migrations/0005_change_ccx_coach_to_staff.py +++ b/lms/djangoapps/ccx/migrations/0005_change_ccx_coach_to_staff.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py b/lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py index 28265dd498..19e0573405 100644 --- a/lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py +++ b/lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-31 18:13 -from __future__ import absolute_import, unicode_literals + import json import logging diff --git a/lms/djangoapps/ccx/models.py b/lms/djangoapps/ccx/models.py index b14c95d79c..16d85ed26f 100644 --- a/lms/djangoapps/ccx/models.py +++ b/lms/djangoapps/ccx/models.py @@ -1,7 +1,7 @@ """ Models for the custom course feature """ -from __future__ import absolute_import, unicode_literals + import json import logging diff --git a/lms/djangoapps/ccx/modulestore.py b/lms/djangoapps/ccx/modulestore.py index 3d8878f6b9..3fbfbbd754 100644 --- a/lms/djangoapps/ccx/modulestore.py +++ b/lms/djangoapps/ccx/modulestore.py @@ -9,7 +9,7 @@ CourseLocator or BlockUsageLocator will actually be used. And all objects returned from the modulestore will have their keys updated to be the CCX version that was passed in. """ -from __future__ import absolute_import + from contextlib import contextmanager from functools import partial diff --git a/lms/djangoapps/ccx/overrides.py b/lms/djangoapps/ccx/overrides.py index eef5a22c98..a2e4b94c3f 100644 --- a/lms/djangoapps/ccx/overrides.py +++ b/lms/djangoapps/ccx/overrides.py @@ -2,7 +2,7 @@ API related to providing field overrides for individual students. This is used by the individual custom courses feature. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/ccx/plugins.py b/lms/djangoapps/ccx/plugins.py index a0b5d67b94..a45fb31010 100644 --- a/lms/djangoapps/ccx/plugins.py +++ b/lms/djangoapps/ccx/plugins.py @@ -2,7 +2,7 @@ Registers the CCX feature for the edX platform. """ -from __future__ import absolute_import + from django.conf import settings from django.utils.translation import ugettext_noop diff --git a/lms/djangoapps/ccx/tasks.py b/lms/djangoapps/ccx/tasks.py index 37155df3c0..f71cb78bd9 100644 --- a/lms/djangoapps/ccx/tasks.py +++ b/lms/djangoapps/ccx/tasks.py @@ -2,7 +2,7 @@ Asynchronous tasks for the CCX app. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/ccx/tests/factories.py b/lms/djangoapps/ccx/tests/factories.py index d9b7d046c8..97f39616e2 100644 --- a/lms/djangoapps/ccx/tests/factories.py +++ b/lms/djangoapps/ccx/tests/factories.py @@ -1,7 +1,7 @@ """ Dummy factories for tests """ -from __future__ import absolute_import + from factory import Sequence, SubFactory from factory.django import DjangoModelFactory diff --git a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py index b552c4d0e0..0ea38a0ffa 100644 --- a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py +++ b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py @@ -1,7 +1,7 @@ """ Test the CCXModulestoreWrapper """ -from __future__ import absolute_import + import datetime from collections import deque diff --git a/lms/djangoapps/ccx/tests/test_field_override_performance.py b/lms/djangoapps/ccx/tests/test_field_override_performance.py index f2fada59fe..0b60ddc345 100644 --- a/lms/djangoapps/ccx/tests/test_field_override_performance.py +++ b/lms/djangoapps/ccx/tests/test_field_override_performance.py @@ -2,7 +2,7 @@ """ Performance tests for field overrides. """ -from __future__ import absolute_import + import itertools from datetime import datetime diff --git a/lms/djangoapps/ccx/tests/test_models.py b/lms/djangoapps/ccx/tests/test_models.py index 7490fdb40f..af778b0a2e 100644 --- a/lms/djangoapps/ccx/tests/test_models.py +++ b/lms/djangoapps/ccx/tests/test_models.py @@ -1,7 +1,7 @@ """ tests for the models """ -from __future__ import absolute_import + import json from datetime import datetime, timedelta diff --git a/lms/djangoapps/ccx/tests/test_overrides.py b/lms/djangoapps/ccx/tests/test_overrides.py index bb76abc23f..9649ae854a 100644 --- a/lms/djangoapps/ccx/tests/test_overrides.py +++ b/lms/djangoapps/ccx/tests/test_overrides.py @@ -2,7 +2,7 @@ """ tests for overrides """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/ccx/tests/test_tasks.py b/lms/djangoapps/ccx/tests/test_tasks.py index 9330195484..b5b4824017 100644 --- a/lms/djangoapps/ccx/tests/test_tasks.py +++ b/lms/djangoapps/ccx/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Tests for celery tasks defined in tasks module """ -from __future__ import absolute_import + import contextlib diff --git a/lms/djangoapps/ccx/tests/test_utils.py b/lms/djangoapps/ccx/tests/test_utils.py index c5b94d8832..d69784d089 100644 --- a/lms/djangoapps/ccx/tests/test_utils.py +++ b/lms/djangoapps/ccx/tests/test_utils.py @@ -1,7 +1,7 @@ """ test utils """ -from __future__ import absolute_import + import uuid from smtplib import SMTPException diff --git a/lms/djangoapps/ccx/tests/test_views.py b/lms/djangoapps/ccx/tests/test_views.py index e5aab89752..ef1ed8efb1 100644 --- a/lms/djangoapps/ccx/tests/test_views.py +++ b/lms/djangoapps/ccx/tests/test_views.py @@ -1,7 +1,7 @@ """ test views """ -from __future__ import absolute_import + import datetime import json diff --git a/lms/djangoapps/ccx/tests/utils.py b/lms/djangoapps/ccx/tests/utils.py index 7739a0d2b7..2f8f928c1a 100644 --- a/lms/djangoapps/ccx/tests/utils.py +++ b/lms/djangoapps/ccx/tests/utils.py @@ -1,7 +1,7 @@ """ Test utils for CCX """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/ccx/urls.py b/lms/djangoapps/ccx/urls.py index adadb53fc7..c59df27487 100644 --- a/lms/djangoapps/ccx/urls.py +++ b/lms/djangoapps/ccx/urls.py @@ -1,7 +1,7 @@ """ URLs for the CCX Feature. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/ccx/utils.py b/lms/djangoapps/ccx/utils.py index 2984dd98af..67a7744c2a 100644 --- a/lms/djangoapps/ccx/utils.py +++ b/lms/djangoapps/ccx/utils.py @@ -3,7 +3,7 @@ CCX Enrollment operations for use by Coach APIs. Does not include any access control, be sure to check access before calling. """ -from __future__ import absolute_import + import datetime import logging diff --git a/lms/djangoapps/ccx/views.py b/lms/djangoapps/ccx/views.py index df81662e1d..85f22f869f 100644 --- a/lms/djangoapps/ccx/views.py +++ b/lms/djangoapps/ccx/views.py @@ -1,7 +1,7 @@ """ Views related to the Custom Courses feature. """ -from __future__ import absolute_import + import csv import datetime diff --git a/lms/djangoapps/certificates/admin.py b/lms/djangoapps/certificates/admin.py index 554f947c33..5dbcb8a537 100644 --- a/lms/djangoapps/certificates/admin.py +++ b/lms/djangoapps/certificates/admin.py @@ -1,7 +1,7 @@ """ django admin pages for certificates models """ -from __future__ import absolute_import + from operator import itemgetter diff --git a/lms/djangoapps/certificates/api.py b/lms/djangoapps/certificates/api.py index 3e97daef61..36e8e21661 100644 --- a/lms/djangoapps/certificates/api.py +++ b/lms/djangoapps/certificates/api.py @@ -4,7 +4,7 @@ This is a Python API for generating certificates asynchronously. Other Django apps should use the API functions defined in this module rather than importing Django models directly. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/certificates/apis/urls.py b/lms/djangoapps/certificates/apis/urls.py index 8855821d54..41f418e614 100644 --- a/lms/djangoapps/certificates/apis/urls.py +++ b/lms/djangoapps/certificates/apis/urls.py @@ -1,7 +1,7 @@ """ Certificates API URLs. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/certificates/apis/v0/tests/test_views.py b/lms/djangoapps/certificates/apis/v0/tests/test_views.py index 09ea8b076d..50a73bae8b 100644 --- a/lms/djangoapps/certificates/apis/v0/tests/test_views.py +++ b/lms/djangoapps/certificates/apis/v0/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the Certificate REST APIs. """ -from __future__ import absolute_import + from itertools import product diff --git a/lms/djangoapps/certificates/apis/v0/urls.py b/lms/djangoapps/certificates/apis/v0/urls.py index ceaeb24176..5ddb35abff 100644 --- a/lms/djangoapps/certificates/apis/v0/urls.py +++ b/lms/djangoapps/certificates/apis/v0/urls.py @@ -1,7 +1,7 @@ """ Certificates API v0 URLs. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/lms/djangoapps/certificates/apis/v0/views.py b/lms/djangoapps/certificates/apis/v0/views.py index 827b31f4d7..26c3825344 100644 --- a/lms/djangoapps/certificates/apis/v0/views.py +++ b/lms/djangoapps/certificates/apis/v0/views.py @@ -1,5 +1,5 @@ """ API v0 views. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/certificates/apps.py b/lms/djangoapps/certificates/apps.py index a941f1121e..f2d5f65a06 100644 --- a/lms/djangoapps/certificates/apps.py +++ b/lms/djangoapps/certificates/apps.py @@ -4,7 +4,7 @@ Certificates Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig from django.conf import settings diff --git a/lms/djangoapps/certificates/management/commands/cert_whitelist.py b/lms/djangoapps/certificates/management/commands/cert_whitelist.py index 34ba38513b..a256d45e47 100644 --- a/lms/djangoapps/certificates/management/commands/cert_whitelist.py +++ b/lms/djangoapps/certificates/management/commands/cert_whitelist.py @@ -2,7 +2,7 @@ Management command which sets or gets the certificate whitelist for a given user/course """ -from __future__ import absolute_import, print_function + from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError diff --git a/lms/djangoapps/certificates/management/commands/create_fake_cert.py b/lms/djangoapps/certificates/management/commands/create_fake_cert.py index fb6c66c6f7..8a7a91c616 100644 --- a/lms/djangoapps/certificates/management/commands/create_fake_cert.py +++ b/lms/djangoapps/certificates/management/commands/create_fake_cert.py @@ -9,7 +9,7 @@ Example usage: $ ./manage.py lms create_fake_cert test_user edX/DemoX/Demo_Course --mode honor --grade 0.89 """ -from __future__ import absolute_import + import logging from textwrap import dedent diff --git a/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py b/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py index c1e49f2814..664b47069d 100644 --- a/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py +++ b/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py @@ -1,7 +1,7 @@ """ Management command which fixes ungraded certificates for students """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/certificates/management/commands/gen_cert_report.py b/lms/djangoapps/certificates/management/commands/gen_cert_report.py index cf8fd1cc68..80550b8397 100644 --- a/lms/djangoapps/certificates/management/commands/gen_cert_report.py +++ b/lms/djangoapps/certificates/management/commands/gen_cert_report.py @@ -1,7 +1,7 @@ """ Generate a report of certificate statuses """ -from __future__ import absolute_import, print_function + from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError diff --git a/lms/djangoapps/certificates/management/commands/regenerate_user.py b/lms/djangoapps/certificates/management/commands/regenerate_user.py index bd86618f0b..e4cc7e36fb 100644 --- a/lms/djangoapps/certificates/management/commands/regenerate_user.py +++ b/lms/djangoapps/certificates/management/commands/regenerate_user.py @@ -1,5 +1,5 @@ """Django management command to force certificate regeneration for one user""" -from __future__ import absolute_import + import copy import logging diff --git a/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py b/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py index f11a6422cb..609db7f0f8 100644 --- a/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py +++ b/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py @@ -16,7 +16,7 @@ Example usage: $ ./manage.py lms resubmit_error_certificates -c edX/DemoX/Fall_2015 -c edX/DemoX/Spring_2016 """ -from __future__ import absolute_import + import logging from textwrap import dedent diff --git a/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py b/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py index fb3f0c50d8..db5f80690e 100644 --- a/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py +++ b/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py @@ -1,7 +1,7 @@ """ Extremely basic tests for the cert_whitelist command """ -from __future__ import absolute_import + import pytest from django.core.management import call_command diff --git a/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py b/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py index b915306e5b..6805ab6bb1 100644 --- a/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py +++ b/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py @@ -1,7 +1,7 @@ """ Extremely basic tests for the fix_ungraded_certs command """ -from __future__ import absolute_import + import pytest from django.core.management import call_command diff --git a/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py b/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py index 0f7cfccea8..cb414bb969 100644 --- a/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py +++ b/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py @@ -1,7 +1,7 @@ """ Extremely basic tests for the gen_cert_report command """ -from __future__ import absolute_import + import pytest from django.core.management import call_command diff --git a/lms/djangoapps/certificates/management/commands/ungenerated_certs.py b/lms/djangoapps/certificates/management/commands/ungenerated_certs.py index 798783b157..9775321587 100644 --- a/lms/djangoapps/certificates/management/commands/ungenerated_certs.py +++ b/lms/djangoapps/certificates/management/commands/ungenerated_certs.py @@ -2,7 +2,7 @@ Management command to find all students that need certificates for courses that have finished, and put their cert requests on the queue. """ -from __future__ import absolute_import, print_function + import datetime import logging diff --git a/lms/djangoapps/certificates/migrations/0001_initial.py b/lms/djangoapps/certificates/migrations/0001_initial.py index a78e07b50e..492722c176 100644 --- a/lms/djangoapps/certificates/migrations/0001_initial.py +++ b/lms/djangoapps/certificates/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py b/lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py index fa1df3d3ed..73b0a39897 100644 --- a/lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py +++ b/lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import json diff --git a/lms/djangoapps/certificates/migrations/0003_data__default_modes.py b/lms/djangoapps/certificates/migrations/0003_data__default_modes.py index 5cadd3c806..65de56270c 100644 --- a/lms/djangoapps/certificates/migrations/0003_data__default_modes.py +++ b/lms/djangoapps/certificates/migrations/0003_data__default_modes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.core.files import File diff --git a/lms/djangoapps/certificates/migrations/0004_certificategenerationhistory.py b/lms/djangoapps/certificates/migrations/0004_certificategenerationhistory.py index bd6fa0fa79..0965c4706c 100644 --- a/lms/djangoapps/certificates/migrations/0004_certificategenerationhistory.py +++ b/lms/djangoapps/certificates/migrations/0004_certificategenerationhistory.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/lms/djangoapps/certificates/migrations/0005_auto_20151208_0801.py b/lms/djangoapps/certificates/migrations/0005_auto_20151208_0801.py index ddd4b0e3e6..4bd67558d6 100644 --- a/lms/djangoapps/certificates/migrations/0005_auto_20151208_0801.py +++ b/lms/djangoapps/certificates/migrations/0005_auto_20151208_0801.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/certificates/migrations/0006_certificatetemplateasset_asset_slug.py b/lms/djangoapps/certificates/migrations/0006_certificatetemplateasset_asset_slug.py index a7f31bbc2d..6f4a04a164 100644 --- a/lms/djangoapps/certificates/migrations/0006_certificatetemplateasset_asset_slug.py +++ b/lms/djangoapps/certificates/migrations/0006_certificatetemplateasset_asset_slug.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/certificates/migrations/0007_certificateinvalidation.py b/lms/djangoapps/certificates/migrations/0007_certificateinvalidation.py index fcd4e69809..d251b54f82 100644 --- a/lms/djangoapps/certificates/migrations/0007_certificateinvalidation.py +++ b/lms/djangoapps/certificates/migrations/0007_certificateinvalidation.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/lms/djangoapps/certificates/migrations/0008_schema__remove_badges.py b/lms/djangoapps/certificates/migrations/0008_schema__remove_badges.py index 1c3a614b9e..5da3e6257b 100644 --- a/lms/djangoapps/certificates/migrations/0008_schema__remove_badges.py +++ b/lms/djangoapps/certificates/migrations/0008_schema__remove_badges.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/certificates/migrations/0009_certificategenerationcoursesetting_language_self_generation.py b/lms/djangoapps/certificates/migrations/0009_certificategenerationcoursesetting_language_self_generation.py index dd37988153..323ac09538 100644 --- a/lms/djangoapps/certificates/migrations/0009_certificategenerationcoursesetting_language_self_generation.py +++ b/lms/djangoapps/certificates/migrations/0009_certificategenerationcoursesetting_language_self_generation.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.apps import apps from django.db import migrations, models diff --git a/lms/djangoapps/certificates/migrations/0010_certificatetemplate_language.py b/lms/djangoapps/certificates/migrations/0010_certificatetemplate_language.py index bbe46730ac..c7e5ec250b 100644 --- a/lms/djangoapps/certificates/migrations/0010_certificatetemplate_language.py +++ b/lms/djangoapps/certificates/migrations/0010_certificatetemplate_language.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/certificates/migrations/0011_certificatetemplate_alter_unique.py b/lms/djangoapps/certificates/migrations/0011_certificatetemplate_alter_unique.py index d5f43b1e75..11e9302f00 100644 --- a/lms/djangoapps/certificates/migrations/0011_certificatetemplate_alter_unique.py +++ b/lms/djangoapps/certificates/migrations/0011_certificatetemplate_alter_unique.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/certificates/migrations/0012_certificategenerationcoursesetting_include_hours_of_effort.py b/lms/djangoapps/certificates/migrations/0012_certificategenerationcoursesetting_include_hours_of_effort.py index 2dc0c4f280..4628122235 100644 --- a/lms/djangoapps/certificates/migrations/0012_certificategenerationcoursesetting_include_hours_of_effort.py +++ b/lms/djangoapps/certificates/migrations/0012_certificategenerationcoursesetting_include_hours_of_effort.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/certificates/migrations/0013_remove_certificategenerationcoursesetting_enabled.py b/lms/djangoapps/certificates/migrations/0013_remove_certificategenerationcoursesetting_enabled.py index 46be10e64c..f22a9be170 100644 --- a/lms/djangoapps/certificates/migrations/0013_remove_certificategenerationcoursesetting_enabled.py +++ b/lms/djangoapps/certificates/migrations/0013_remove_certificategenerationcoursesetting_enabled.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/lms/djangoapps/certificates/migrations/0014_change_eligible_certs_manager.py b/lms/djangoapps/certificates/migrations/0014_change_eligible_certs_manager.py index cb9078bc9f..f877174363 100644 --- a/lms/djangoapps/certificates/migrations/0014_change_eligible_certs_manager.py +++ b/lms/djangoapps/certificates/migrations/0014_change_eligible_certs_manager.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-01-30 17:38 -from __future__ import absolute_import, unicode_literals + import django.db.models.manager from django.db import migrations diff --git a/lms/djangoapps/certificates/migrations/0015_add_masters_choice.py b/lms/djangoapps/certificates/migrations/0015_add_masters_choice.py index 014e782cbb..791b3360bd 100644 --- a/lms/djangoapps/certificates/migrations/0015_add_masters_choice.py +++ b/lms/djangoapps/certificates/migrations/0015_add_masters_choice.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-04 15:14 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/certificates/migrations/0016_historicalgeneratedcertificate.py b/lms/djangoapps/certificates/migrations/0016_historicalgeneratedcertificate.py index 80261cb07a..310d8e9d38 100644 --- a/lms/djangoapps/certificates/migrations/0016_historicalgeneratedcertificate.py +++ b/lms/djangoapps/certificates/migrations/0016_historicalgeneratedcertificate.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-12-10 18:05 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/certificates/models.py b/lms/djangoapps/certificates/models.py index d337e6e863..9a762336bf 100644 --- a/lms/djangoapps/certificates/models.py +++ b/lms/djangoapps/certificates/models.py @@ -45,7 +45,7 @@ Eligibility: then the student will be issued a certificate regardless of his grade, unless he has allow_certificate set to False. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index f12485f0bd..14c79d32e6 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -1,5 +1,5 @@ """Interface for adding certificate generation tasks to the XQueue. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/certificates/services.py b/lms/djangoapps/certificates/services.py index a2212dcc25..ae4cd51ba3 100644 --- a/lms/djangoapps/certificates/services.py +++ b/lms/djangoapps/certificates/services.py @@ -1,7 +1,7 @@ """ Certificate service """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/certificates/signals.py b/lms/djangoapps/certificates/signals.py index ef7eb03d7c..be2ae3f639 100644 --- a/lms/djangoapps/certificates/signals.py +++ b/lms/djangoapps/certificates/signals.py @@ -1,7 +1,7 @@ """ Signal handler for enabling/disabling self-generated certificates based on the course-pacing. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/certificates/tasks.py b/lms/djangoapps/certificates/tasks.py index 7880779f3a..5038e40b75 100644 --- a/lms/djangoapps/certificates/tasks.py +++ b/lms/djangoapps/certificates/tasks.py @@ -1,7 +1,7 @@ """ Module for generating certificate for a user """ -from __future__ import absolute_import + from celery import task from logging import getLogger diff --git a/lms/djangoapps/certificates/tests/factories.py b/lms/djangoapps/certificates/tests/factories.py index fe9667fa65..0fd4c148ca 100644 --- a/lms/djangoapps/certificates/tests/factories.py +++ b/lms/djangoapps/certificates/tests/factories.py @@ -1,6 +1,6 @@ # Factories are self documenting # pylint: disable=missing-docstring -from __future__ import absolute_import + from uuid import uuid4 diff --git a/lms/djangoapps/certificates/tests/test_api.py b/lms/djangoapps/certificates/tests/test_api.py index f27c767a26..ac447fb9fa 100644 --- a/lms/djangoapps/certificates/tests/test_api.py +++ b/lms/djangoapps/certificates/tests/test_api.py @@ -1,5 +1,5 @@ """Tests for the certificates Python API. """ -from __future__ import absolute_import + import uuid from contextlib import contextmanager diff --git a/lms/djangoapps/certificates/tests/test_cert_management.py b/lms/djangoapps/certificates/tests/test_cert_management.py index 61f22ffe92..349202f335 100644 --- a/lms/djangoapps/certificates/tests/test_cert_management.py +++ b/lms/djangoapps/certificates/tests/test_cert_management.py @@ -1,5 +1,5 @@ """Tests for the resubmit_error_certificates management command. """ -from __future__ import absolute_import + import ddt from django.core.management import call_command diff --git a/lms/djangoapps/certificates/tests/test_create_fake_cert.py b/lms/djangoapps/certificates/tests/test_create_fake_cert.py index f854be9099..f3f33537e9 100644 --- a/lms/djangoapps/certificates/tests/test_create_fake_cert.py +++ b/lms/djangoapps/certificates/tests/test_create_fake_cert.py @@ -1,6 +1,6 @@ """Tests for the create_fake_certs management command. """ -from __future__ import absolute_import + import six diff --git a/lms/djangoapps/certificates/tests/test_models.py b/lms/djangoapps/certificates/tests/test_models.py index 58ef5b4871..efa1f41726 100644 --- a/lms/djangoapps/certificates/tests/test_models.py +++ b/lms/djangoapps/certificates/tests/test_models.py @@ -1,5 +1,5 @@ """Tests for certificate Django models. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/certificates/tests/test_queue.py b/lms/djangoapps/certificates/tests/test_queue.py index afcf3733bc..52f10ef083 100644 --- a/lms/djangoapps/certificates/tests/test_queue.py +++ b/lms/djangoapps/certificates/tests/test_queue.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for the XQueue certificates interface. """ -from __future__ import absolute_import + import json from contextlib import contextmanager diff --git a/lms/djangoapps/certificates/tests/test_services.py b/lms/djangoapps/certificates/tests/test_services.py index 50d4a3b155..0b608f083f 100644 --- a/lms/djangoapps/certificates/tests/test_services.py +++ b/lms/djangoapps/certificates/tests/test_services.py @@ -1,7 +1,7 @@ """ Unit Tests for the Certificate service """ -from __future__ import absolute_import + from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from lms.djangoapps.certificates.services import CertificateService diff --git a/lms/djangoapps/certificates/tests/test_signals.py b/lms/djangoapps/certificates/tests/test_signals.py index 596a4caf6f..87fcc6eb82 100644 --- a/lms/djangoapps/certificates/tests/test_signals.py +++ b/lms/djangoapps/certificates/tests/test_signals.py @@ -2,7 +2,7 @@ Unit tests for enabling self-generated certificates for self-paced courses and disabling for instructor-paced courses. """ -from __future__ import absolute_import + import ddt import mock diff --git a/lms/djangoapps/certificates/tests/test_support_views.py b/lms/djangoapps/certificates/tests/test_support_views.py index d728e9c2df..d9f7b131a3 100644 --- a/lms/djangoapps/certificates/tests/test_support_views.py +++ b/lms/djangoapps/certificates/tests/test_support_views.py @@ -2,7 +2,7 @@ Tests for certificate app views used by the support team. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/certificates/tests/test_tasks.py b/lms/djangoapps/certificates/tests/test_tasks.py index 438485f9fa..160546621c 100644 --- a/lms/djangoapps/certificates/tests/test_tasks.py +++ b/lms/djangoapps/certificates/tests/test_tasks.py @@ -2,7 +2,7 @@ Test module for user certificate generation. """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/lms/djangoapps/certificates/tests/test_views.py b/lms/djangoapps/certificates/tests/test_views.py index 5d6af61f83..e81751a070 100644 --- a/lms/djangoapps/certificates/tests/test_views.py +++ b/lms/djangoapps/certificates/tests/test_views.py @@ -1,6 +1,6 @@ """Tests for certificates views. """ -from __future__ import absolute_import + import datetime import json diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index c00fc7ce40..d3507463c7 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for certificates views. """ -from __future__ import absolute_import + import datetime import json diff --git a/lms/djangoapps/certificates/tests/tests.py b/lms/djangoapps/certificates/tests/tests.py index a415b20aa1..f3f0878b13 100644 --- a/lms/djangoapps/certificates/tests/tests.py +++ b/lms/djangoapps/certificates/tests/tests.py @@ -1,7 +1,7 @@ """ Tests for the certificates models. """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/lms/djangoapps/certificates/urls.py b/lms/djangoapps/certificates/urls.py index 2571121b09..f615e16dcf 100644 --- a/lms/djangoapps/certificates/urls.py +++ b/lms/djangoapps/certificates/urls.py @@ -1,7 +1,7 @@ """ URLs for the certificates app. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/certificates/views/support.py b/lms/djangoapps/certificates/views/support.py index de880232d0..52624b9247 100644 --- a/lms/djangoapps/certificates/views/support.py +++ b/lms/djangoapps/certificates/views/support.py @@ -4,7 +4,7 @@ Certificate end-points used by the student support UI. See lms/djangoapps/support for more details. """ -from __future__ import absolute_import + import logging from functools import wraps diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py index fd6f23eec7..aea44123d3 100644 --- a/lms/djangoapps/certificates/views/webview.py +++ b/lms/djangoapps/certificates/views/webview.py @@ -2,7 +2,7 @@ """ Certificate HTML webview. """ -from __future__ import absolute_import + import logging from datetime import datetime diff --git a/lms/djangoapps/certificates/views/xqueue.py b/lms/djangoapps/certificates/views/xqueue.py index 9f58bf5ac4..e2d5d3e2e6 100644 --- a/lms/djangoapps/certificates/views/xqueue.py +++ b/lms/djangoapps/certificates/views/xqueue.py @@ -1,7 +1,7 @@ """ Views used by XQueue certificate generation. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/class_dashboard/dashboard_data.py b/lms/djangoapps/class_dashboard/dashboard_data.py index 038625b266..25a693fb00 100644 --- a/lms/djangoapps/class_dashboard/dashboard_data.py +++ b/lms/djangoapps/class_dashboard/dashboard_data.py @@ -1,7 +1,7 @@ """ Computes the data to display on the Instructor Dashboard """ -from __future__ import absolute_import + import decimal import json diff --git a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py index 9becffc0f4..b4231aaf4f 100644 --- a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py +++ b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py @@ -2,7 +2,7 @@ Tests for class dashboard (Metrics tab in instructor dashboard) """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/class_dashboard/tests/test_views.py b/lms/djangoapps/class_dashboard/tests/test_views.py index e9b851de20..b9c8ab84c0 100644 --- a/lms/djangoapps/class_dashboard/tests/test_views.py +++ b/lms/djangoapps/class_dashboard/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for class dashboard (Metrics tab in instructor dashboard) """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/class_dashboard/urls.py b/lms/djangoapps/class_dashboard/urls.py index e7a660bb38..dbc2670a16 100644 --- a/lms/djangoapps/class_dashboard/urls.py +++ b/lms/djangoapps/class_dashboard/urls.py @@ -1,7 +1,7 @@ """ Class Dashboard API endpoint urls. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/class_dashboard/views.py b/lms/djangoapps/class_dashboard/views.py index 3c21bedb21..f0c6f58617 100644 --- a/lms/djangoapps/class_dashboard/views.py +++ b/lms/djangoapps/class_dashboard/views.py @@ -2,7 +2,7 @@ Handles requests for data, returning a json """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/commerce/admin.py b/lms/djangoapps/commerce/admin.py index 75a6c45367..b196f42213 100644 --- a/lms/djangoapps/commerce/admin.py +++ b/lms/djangoapps/commerce/admin.py @@ -1,6 +1,6 @@ """ Admin site bindings for commerce app. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/commerce/api/urls.py b/lms/djangoapps/commerce/api/urls.py index b07fca6774..1bf492b40f 100644 --- a/lms/djangoapps/commerce/api/urls.py +++ b/lms/djangoapps/commerce/api/urls.py @@ -1,7 +1,7 @@ """ API URLs. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/commerce/api/v0/tests/test_views.py b/lms/djangoapps/commerce/api/v0/tests/test_views.py index c9eeda8ba8..3fa30d5e5c 100644 --- a/lms/djangoapps/commerce/api/v0/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v0/tests/test_views.py @@ -1,5 +1,5 @@ """ Commerce API v0 view tests. """ -from __future__ import absolute_import + import itertools import json diff --git a/lms/djangoapps/commerce/api/v0/urls.py b/lms/djangoapps/commerce/api/v0/urls.py index 4426587b85..1bedf576ed 100644 --- a/lms/djangoapps/commerce/api/v0/urls.py +++ b/lms/djangoapps/commerce/api/v0/urls.py @@ -1,7 +1,7 @@ """ API v0 URLs. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/commerce/api/v0/views.py b/lms/djangoapps/commerce/api/v0/views.py index 31ce66630a..f73a028594 100644 --- a/lms/djangoapps/commerce/api/v0/views.py +++ b/lms/djangoapps/commerce/api/v0/views.py @@ -1,5 +1,5 @@ """ API v0 views. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/commerce/api/v1/models.py b/lms/djangoapps/commerce/api/v1/models.py index e956cfa370..9c910c17cf 100644 --- a/lms/djangoapps/commerce/api/v1/models.py +++ b/lms/djangoapps/commerce/api/v1/models.py @@ -1,5 +1,5 @@ """ API v1 models. """ -from __future__ import absolute_import + import logging from itertools import groupby diff --git a/lms/djangoapps/commerce/api/v1/permissions.py b/lms/djangoapps/commerce/api/v1/permissions.py index 019e111a02..9404318454 100644 --- a/lms/djangoapps/commerce/api/v1/permissions.py +++ b/lms/djangoapps/commerce/api/v1/permissions.py @@ -1,6 +1,6 @@ """ Custom API permissions. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from rest_framework.permissions import BasePermission, DjangoModelPermissions diff --git a/lms/djangoapps/commerce/api/v1/serializers.py b/lms/djangoapps/commerce/api/v1/serializers.py index 2eefe85428..82091e8b22 100644 --- a/lms/djangoapps/commerce/api/v1/serializers.py +++ b/lms/djangoapps/commerce/api/v1/serializers.py @@ -1,5 +1,5 @@ """ API v1 serializers. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/commerce/api/v1/tests/test_models.py b/lms/djangoapps/commerce/api/v1/tests/test_models.py index 8773b4800f..29e8b18efd 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_models.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_models.py @@ -1,5 +1,5 @@ """ Tests for models. """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/lms/djangoapps/commerce/api/v1/tests/test_serializers.py b/lms/djangoapps/commerce/api/v1/tests/test_serializers.py index a02f6ae168..064fdd4507 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_serializers.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_serializers.py @@ -1,5 +1,5 @@ """ Commerce API v1 serializer tests. """ -from __future__ import absolute_import + from django.test import TestCase diff --git a/lms/djangoapps/commerce/api/v1/tests/test_views.py b/lms/djangoapps/commerce/api/v1/tests/test_views.py index 8b943d0b08..2981d987d5 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_views.py @@ -1,5 +1,5 @@ """ Commerce API v1 view tests. """ -from __future__ import absolute_import + import itertools import json diff --git a/lms/djangoapps/commerce/api/v1/urls.py b/lms/djangoapps/commerce/api/v1/urls.py index 98c24e1689..b07d59f70e 100644 --- a/lms/djangoapps/commerce/api/v1/urls.py +++ b/lms/djangoapps/commerce/api/v1/urls.py @@ -1,7 +1,7 @@ """ Commerce URLs """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/lms/djangoapps/commerce/api/v1/views.py b/lms/djangoapps/commerce/api/v1/views.py index 8b9bb7fae9..39a5c6e06b 100644 --- a/lms/djangoapps/commerce/api/v1/views.py +++ b/lms/djangoapps/commerce/api/v1/views.py @@ -1,7 +1,7 @@ """ Commerce views """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/commerce/apps.py b/lms/djangoapps/commerce/apps.py index 8bf246180a..9c0c217ccc 100644 --- a/lms/djangoapps/commerce/apps.py +++ b/lms/djangoapps/commerce/apps.py @@ -1,7 +1,7 @@ """ Commerce Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/commerce/http.py b/lms/djangoapps/commerce/http.py index 5931c8d759..c0d38292b1 100644 --- a/lms/djangoapps/commerce/http.py +++ b/lms/djangoapps/commerce/http.py @@ -1,6 +1,6 @@ """ HTTP-related entities. """ -from __future__ import absolute_import + from rest_framework.status import HTTP_200_OK, HTTP_500_INTERNAL_SERVER_ERROR diff --git a/lms/djangoapps/commerce/management/commands/configure_commerce.py b/lms/djangoapps/commerce/management/commands/configure_commerce.py index 52f342348b..a058a66a19 100644 --- a/lms/djangoapps/commerce/management/commands/configure_commerce.py +++ b/lms/djangoapps/commerce/management/commands/configure_commerce.py @@ -3,7 +3,7 @@ Command for managing commerce configuration for lms. We can use this command to enable/disable commerce configuration or disable checkout to E-Commerce service. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py b/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py index 71fd84bb84..4d632cb86a 100644 --- a/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py +++ b/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py @@ -1,7 +1,7 @@ """ Tests for management command for enabling commerce configuration. """ -from __future__ import absolute_import + from django.core.management import call_command from django.test import TestCase diff --git a/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py b/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py index 10cca5a0bf..468c3d9843 100644 --- a/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py +++ b/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import + from django.conf import settings from django.contrib.auth.models import User diff --git a/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py b/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py index e1f12fea28..e84e2440b1 100644 --- a/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py +++ b/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/commerce/migrations/0003_auto_20160329_0709.py b/lms/djangoapps/commerce/migrations/0003_auto_20160329_0709.py index ab96a350a7..87ed65ed24 100644 --- a/lms/djangoapps/commerce/migrations/0003_auto_20160329_0709.py +++ b/lms/djangoapps/commerce/migrations/0003_auto_20160329_0709.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py b/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py index 6667ccf316..51e0a16402 100644 --- a/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py +++ b/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/commerce/migrations/0005_commerceconfiguration_enable_automatic_refund_approval.py b/lms/djangoapps/commerce/migrations/0005_commerceconfiguration_enable_automatic_refund_approval.py index b614d9e1cf..fae1e04afd 100644 --- a/lms/djangoapps/commerce/migrations/0005_commerceconfiguration_enable_automatic_refund_approval.py +++ b/lms/djangoapps/commerce/migrations/0005_commerceconfiguration_enable_automatic_refund_approval.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py b/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py index c40b4ce65d..b99e000ad6 100644 --- a/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py +++ b/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py b/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py index 4c405eeeea..5e866a8f55 100644 --- a/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py +++ b/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/commerce/migrations/0008_auto_20191024_2048.py b/lms/djangoapps/commerce/migrations/0008_auto_20191024_2048.py index e681647a5f..633fd2a45c 100644 --- a/lms/djangoapps/commerce/migrations/0008_auto_20191024_2048.py +++ b/lms/djangoapps/commerce/migrations/0008_auto_20191024_2048.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-10-24 20:48 -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations diff --git a/lms/djangoapps/commerce/models.py b/lms/djangoapps/commerce/models.py index f48c478400..acca0b6c7c 100644 --- a/lms/djangoapps/commerce/models.py +++ b/lms/djangoapps/commerce/models.py @@ -1,7 +1,7 @@ """ Commerce-related models. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db import models diff --git a/lms/djangoapps/commerce/signals.py b/lms/djangoapps/commerce/signals.py index 2a7351ce18..d847758cd7 100644 --- a/lms/djangoapps/commerce/signals.py +++ b/lms/djangoapps/commerce/signals.py @@ -1,7 +1,7 @@ """ Signal handling functions for use with external commerce service. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/commerce/tests/__init__.py b/lms/djangoapps/commerce/tests/__init__.py index f842cdf53c..0c8c3e63f7 100644 --- a/lms/djangoapps/commerce/tests/__init__.py +++ b/lms/djangoapps/commerce/tests/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ Commerce app tests package. """ -from __future__ import absolute_import + import httpretty import mock diff --git a/lms/djangoapps/commerce/tests/factories.py b/lms/djangoapps/commerce/tests/factories.py index 48eec2d2a1..eec08932a7 100644 --- a/lms/djangoapps/commerce/tests/factories.py +++ b/lms/djangoapps/commerce/tests/factories.py @@ -1,5 +1,5 @@ """ Factories for generating fake commerce-related data. """ -from __future__ import absolute_import + import factory from factory.fuzzy import FuzzyText diff --git a/lms/djangoapps/commerce/tests/mocks.py b/lms/djangoapps/commerce/tests/mocks.py index f092d5c0a8..7b41f09bc2 100644 --- a/lms/djangoapps/commerce/tests/mocks.py +++ b/lms/djangoapps/commerce/tests/mocks.py @@ -1,6 +1,6 @@ """ Commerce app tests package. """ # pylint: disable=invalid-name -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/commerce/tests/test_signals.py b/lms/djangoapps/commerce/tests/test_signals.py index a2a5f7e240..473bcd6eb1 100644 --- a/lms/djangoapps/commerce/tests/test_signals.py +++ b/lms/djangoapps/commerce/tests/test_signals.py @@ -2,7 +2,7 @@ """ Tests for signal handling in commerce djangoapp. """ -from __future__ import absolute_import, unicode_literals + import base64 import json diff --git a/lms/djangoapps/commerce/tests/test_utils.py b/lms/djangoapps/commerce/tests/test_utils.py index 1d6147a826..6e3b688c65 100644 --- a/lms/djangoapps/commerce/tests/test_utils.py +++ b/lms/djangoapps/commerce/tests/test_utils.py @@ -1,5 +1,5 @@ """Tests of commerce utilities.""" -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/commerce/tests/test_views.py b/lms/djangoapps/commerce/tests/test_views.py index 53afd0eca5..7ac0aa7d34 100644 --- a/lms/djangoapps/commerce/tests/test_views.py +++ b/lms/djangoapps/commerce/tests/test_views.py @@ -1,6 +1,6 @@ """ Tests for commerce views. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/commerce/urls.py b/lms/djangoapps/commerce/urls.py index a23c552b51..b7b31fb6c8 100644 --- a/lms/djangoapps/commerce/urls.py +++ b/lms/djangoapps/commerce/urls.py @@ -1,7 +1,7 @@ """ Defines the URL routes for this app. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/commerce/utils.py b/lms/djangoapps/commerce/utils.py index d8e3c7fc05..1c6ea8be4a 100644 --- a/lms/djangoapps/commerce/utils.py +++ b/lms/djangoapps/commerce/utils.py @@ -1,5 +1,5 @@ """Utilities to assist with commerce tasks.""" -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/commerce/views.py b/lms/djangoapps/commerce/views.py index 82e1bab9f8..1a10ceae6e 100644 --- a/lms/djangoapps/commerce/views.py +++ b/lms/djangoapps/commerce/views.py @@ -1,5 +1,5 @@ """ Commerce views. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/course_api/__init__.py b/lms/djangoapps/course_api/__init__.py index 39cd8e65a1..b04fb07c8d 100644 --- a/lms/djangoapps/course_api/__init__.py +++ b/lms/djangoapps/course_api/__init__.py @@ -1,5 +1,5 @@ """ Course API """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitch, WaffleSwitchNamespace diff --git a/lms/djangoapps/course_api/api.py b/lms/djangoapps/course_api/api.py index 4abcb5f30f..f1390e6449 100644 --- a/lms/djangoapps/course_api/api.py +++ b/lms/djangoapps/course_api/api.py @@ -2,7 +2,7 @@ Course API """ -from __future__ import absolute_import + from edx_when.api import get_dates_for_course from django.conf import settings diff --git a/lms/djangoapps/course_api/blocks/api.py b/lms/djangoapps/course_api/blocks/api.py index 6d2c31fc51..2d38b51726 100644 --- a/lms/djangoapps/course_api/blocks/api.py +++ b/lms/djangoapps/course_api/blocks/api.py @@ -2,7 +2,7 @@ API function for retrieving course blocks data """ -from __future__ import absolute_import + import lms.djangoapps.course_blocks.api as course_blocks_api from lms.djangoapps.course_blocks.transformers.access_denied_filter import AccessDeniedMessageFilterTransformer diff --git a/lms/djangoapps/course_api/blocks/forms.py b/lms/djangoapps/course_api/blocks/forms.py index ff2dd8f827..17dee84919 100644 --- a/lms/djangoapps/course_api/blocks/forms.py +++ b/lms/djangoapps/course_api/blocks/forms.py @@ -1,7 +1,7 @@ """ Course API Forms """ -from __future__ import absolute_import + import six from django.contrib.auth.models import User diff --git a/lms/djangoapps/course_api/blocks/permissions.py b/lms/djangoapps/course_api/blocks/permissions.py index 2951fc3679..b455ebeb22 100644 --- a/lms/djangoapps/course_api/blocks/permissions.py +++ b/lms/djangoapps/course_api/blocks/permissions.py @@ -2,7 +2,7 @@ Encapsulates permissions checks for Course Blocks API """ -from __future__ import absolute_import + from lms.djangoapps.courseware.access import has_access from student.models import CourseEnrollment diff --git a/lms/djangoapps/course_api/blocks/serializers.py b/lms/djangoapps/course_api/blocks/serializers.py index dd39d57832..f45f17381e 100644 --- a/lms/djangoapps/course_api/blocks/serializers.py +++ b/lms/djangoapps/course_api/blocks/serializers.py @@ -1,7 +1,7 @@ """ Serializers for Course Blocks related return objects. """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/lms/djangoapps/course_api/blocks/tests/helpers.py b/lms/djangoapps/course_api/blocks/tests/helpers.py index 189f544c42..12293c5262 100644 --- a/lms/djangoapps/course_api/blocks/tests/helpers.py +++ b/lms/djangoapps/course_api/blocks/tests/helpers.py @@ -2,7 +2,7 @@ Helper functions for unit tests """ -from __future__ import absolute_import + from opaque_keys.edx.keys import UsageKey diff --git a/lms/djangoapps/course_api/blocks/tests/test_api.py b/lms/djangoapps/course_api/blocks/tests/test_api.py index 4abbbd3942..f87d999ab5 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_api.py +++ b/lms/djangoapps/course_api/blocks/tests/test_api.py @@ -2,7 +2,7 @@ Tests for Blocks api.py """ -from __future__ import absolute_import + from itertools import product diff --git a/lms/djangoapps/course_api/blocks/tests/test_forms.py b/lms/djangoapps/course_api/blocks/tests/test_forms.py index 6de465341c..826f8c3259 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_forms.py +++ b/lms/djangoapps/course_api/blocks/tests/test_forms.py @@ -1,7 +1,7 @@ """ Tests for Course Blocks forms """ -from __future__ import absolute_import + import ddt import six diff --git a/lms/djangoapps/course_api/blocks/tests/test_serializers.py b/lms/djangoapps/course_api/blocks/tests/test_serializers.py index db2f220a0e..0ac09393d4 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_serializers.py +++ b/lms/djangoapps/course_api/blocks/tests/test_serializers.py @@ -1,7 +1,7 @@ """ Tests for Course Blocks serializers """ -from __future__ import absolute_import + import six from mock import MagicMock diff --git a/lms/djangoapps/course_api/blocks/tests/test_views.py b/lms/djangoapps/course_api/blocks/tests/test_views.py index 783e8e998f..1ca3fdf40d 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_views.py +++ b/lms/djangoapps/course_api/blocks/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for Blocks Views """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/course_api/blocks/toggles.py b/lms/djangoapps/course_api/blocks/toggles.py index 489bd7dcdd..157dc5cfc3 100644 --- a/lms/djangoapps/course_api/blocks/toggles.py +++ b/lms/djangoapps/course_api/blocks/toggles.py @@ -2,7 +2,7 @@ Toggles for Course API. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlag, WaffleFlagNamespace diff --git a/lms/djangoapps/course_api/blocks/transformers/__init__.py b/lms/djangoapps/course_api/blocks/transformers/__init__.py index b9c2de6529..487e9c5cba 100644 --- a/lms/djangoapps/course_api/blocks/transformers/__init__.py +++ b/lms/djangoapps/course_api/blocks/transformers/__init__.py @@ -2,7 +2,7 @@ Course API Block Transformers """ -from __future__ import absolute_import + from lms.djangoapps.course_blocks.transformers.visibility import VisibilityTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/block_completion.py b/lms/djangoapps/course_api/blocks/transformers/block_completion.py index a2b0be3d2a..8ab57b26bd 100644 --- a/lms/djangoapps/course_api/blocks/transformers/block_completion.py +++ b/lms/djangoapps/course_api/blocks/transformers/block_completion.py @@ -2,7 +2,7 @@ Block Completion Transformer """ -from __future__ import absolute_import + from completion.models import BlockCompletion from xblock.completable import XBlockCompletionMode as CompletionMode diff --git a/lms/djangoapps/course_api/blocks/transformers/block_counts.py b/lms/djangoapps/course_api/blocks/transformers/block_counts.py index e5f85cad74..87254719e8 100644 --- a/lms/djangoapps/course_api/blocks/transformers/block_counts.py +++ b/lms/djangoapps/course_api/blocks/transformers/block_counts.py @@ -1,7 +1,7 @@ """ Block Counts Transformer """ -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/block_depth.py b/lms/djangoapps/course_api/blocks/transformers/block_depth.py index 9b8efecf4d..2072139617 100644 --- a/lms/djangoapps/course_api/blocks/transformers/block_depth.py +++ b/lms/djangoapps/course_api/blocks/transformers/block_depth.py @@ -1,7 +1,7 @@ """ Block Depth Transformer """ -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/blocks_api.py b/lms/djangoapps/course_api/blocks/transformers/blocks_api.py index e90682fd76..602be5de21 100644 --- a/lms/djangoapps/course_api/blocks/transformers/blocks_api.py +++ b/lms/djangoapps/course_api/blocks/transformers/blocks_api.py @@ -1,7 +1,7 @@ """ Blocks API Transformer """ -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/milestones.py b/lms/djangoapps/course_api/blocks/transformers/milestones.py index b4cbd8491c..5d5f827dcf 100644 --- a/lms/djangoapps/course_api/blocks/transformers/milestones.py +++ b/lms/djangoapps/course_api/blocks/transformers/milestones.py @@ -2,7 +2,7 @@ Milestones Transformer """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/course_api/blocks/transformers/navigation.py b/lms/djangoapps/course_api/blocks/transformers/navigation.py index aabd38509c..edf0331390 100644 --- a/lms/djangoapps/course_api/blocks/transformers/navigation.py +++ b/lms/djangoapps/course_api/blocks/transformers/navigation.py @@ -1,7 +1,7 @@ """ TODO """ -from __future__ import absolute_import + import six diff --git a/lms/djangoapps/course_api/blocks/transformers/student_view.py b/lms/djangoapps/course_api/blocks/transformers/student_view.py index 5d559b8f1b..997b69dafc 100644 --- a/lms/djangoapps/course_api/blocks/transformers/student_view.py +++ b/lms/djangoapps/course_api/blocks/transformers/student_view.py @@ -1,7 +1,7 @@ """ Student View Transformer """ -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py index ad5fd82d8e..0d67aedade 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py @@ -1,7 +1,7 @@ """ Tests for BlockCompletionTransformer. """ -from __future__ import absolute_import + from completion.models import BlockCompletion from completion.test_utils import CompletionWaffleTestMixin diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py index 5e73d97e29..6b77dd2c92 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py @@ -3,7 +3,7 @@ Tests for BlockCountsTransformer. """ # pylint: disable=protected-access -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.factory import BlockStructureFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py index 5f15580ca5..af95967ca1 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py @@ -4,7 +4,7 @@ Tests for BlockDepthTransformer. # pylint: disable=protected-access -from __future__ import absolute_import + from unittest import TestCase diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py index 483beaa5cf..8a6bc24dc8 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py @@ -1,7 +1,7 @@ """ Tests for ProctoredExamTransformer. """ -from __future__ import absolute_import + import ddt import six diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py index a8a234c66f..26704ea8b2 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py @@ -2,7 +2,7 @@ """ Tests for BlockNavigationTransformer. """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py index 2fd7b5b97f..3a88fda5d6 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py @@ -1,7 +1,7 @@ """ Tests for StudentViewTransformer. """ -from __future__ import absolute_import + import ddt diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py index a38ce926ac..70536f161e 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_video_urls.py @@ -1,7 +1,7 @@ """ Tests for VideoBlockURLTransformer. """ -from __future__ import absolute_import + import mock import six diff --git a/lms/djangoapps/course_api/blocks/transformers/video_urls.py b/lms/djangoapps/course_api/blocks/transformers/video_urls.py index d8f94f4f85..0f2b611362 100644 --- a/lms/djangoapps/course_api/blocks/transformers/video_urls.py +++ b/lms/djangoapps/course_api/blocks/transformers/video_urls.py @@ -1,7 +1,7 @@ """ Video block URL Transformer """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/lms/djangoapps/course_api/blocks/urls.py b/lms/djangoapps/course_api/blocks/urls.py index d4ed83d56e..60a96ea47c 100644 --- a/lms/djangoapps/course_api/blocks/urls.py +++ b/lms/djangoapps/course_api/blocks/urls.py @@ -1,7 +1,7 @@ """ Course Block API URLs """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/course_api/blocks/views.py b/lms/djangoapps/course_api/blocks/views.py index 4174f02f02..7d7ed629fb 100644 --- a/lms/djangoapps/course_api/blocks/views.py +++ b/lms/djangoapps/course_api/blocks/views.py @@ -1,7 +1,7 @@ """ CourseBlocks API views """ -from __future__ import absolute_import + import six from django.core.exceptions import ValidationError diff --git a/lms/djangoapps/course_api/forms.py b/lms/djangoapps/course_api/forms.py index 3bf8e3b014..696f8b37a2 100644 --- a/lms/djangoapps/course_api/forms.py +++ b/lms/djangoapps/course_api/forms.py @@ -2,7 +2,7 @@ Course API forms """ -from __future__ import absolute_import + from collections import namedtuple diff --git a/lms/djangoapps/course_api/permissions.py b/lms/djangoapps/course_api/permissions.py index dea001895c..a33cd54df3 100644 --- a/lms/djangoapps/course_api/permissions.py +++ b/lms/djangoapps/course_api/permissions.py @@ -2,7 +2,7 @@ Course API Authorization functions """ -from __future__ import absolute_import + from student.roles import GlobalStaff diff --git a/lms/djangoapps/course_api/serializers.py b/lms/djangoapps/course_api/serializers.py index ddd128f8ee..a4df5cc7ad 100644 --- a/lms/djangoapps/course_api/serializers.py +++ b/lms/djangoapps/course_api/serializers.py @@ -2,7 +2,7 @@ Course API Serializers. Representing course catalog data """ -from __future__ import absolute_import + import six.moves.urllib.error # pylint: disable=import-error import six.moves.urllib.parse # pylint: disable=import-error diff --git a/lms/djangoapps/course_api/tests/mixins.py b/lms/djangoapps/course_api/tests/mixins.py index c4523336d0..7e76596aac 100644 --- a/lms/djangoapps/course_api/tests/mixins.py +++ b/lms/djangoapps/course_api/tests/mixins.py @@ -2,7 +2,7 @@ Common mixins for Course API Tests """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/course_api/tests/test_api.py b/lms/djangoapps/course_api/tests/test_api.py index b359c6f104..1e98de920f 100644 --- a/lms/djangoapps/course_api/tests/test_api.py +++ b/lms/djangoapps/course_api/tests/test_api.py @@ -1,7 +1,7 @@ """ Test for course API """ -from __future__ import absolute_import + from hashlib import md5 diff --git a/lms/djangoapps/course_api/tests/test_forms.py b/lms/djangoapps/course_api/tests/test_forms.py index 860c9d8dde..57ae6e658c 100644 --- a/lms/djangoapps/course_api/tests/test_forms.py +++ b/lms/djangoapps/course_api/tests/test_forms.py @@ -2,7 +2,7 @@ Tests for Course API forms. """ -from __future__ import absolute_import + from itertools import product diff --git a/lms/djangoapps/course_api/tests/test_permissions.py b/lms/djangoapps/course_api/tests/test_permissions.py index a61ea009a5..54e48b74bb 100644 --- a/lms/djangoapps/course_api/tests/test_permissions.py +++ b/lms/djangoapps/course_api/tests/test_permissions.py @@ -2,7 +2,7 @@ Test authorization functions """ -from __future__ import absolute_import + from django.contrib.auth.models import AnonymousUser from django.test import TestCase diff --git a/lms/djangoapps/course_api/tests/test_serializers.py b/lms/djangoapps/course_api/tests/test_serializers.py index 42c44c7448..78cd81a65f 100644 --- a/lms/djangoapps/course_api/tests/test_serializers.py +++ b/lms/djangoapps/course_api/tests/test_serializers.py @@ -2,7 +2,7 @@ Test data created by CourseSerializer and CourseDetailSerializer """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime diff --git a/lms/djangoapps/course_api/tests/test_views.py b/lms/djangoapps/course_api/tests/test_views.py index ec31beb7d6..775d0eddd9 100644 --- a/lms/djangoapps/course_api/tests/test_views.py +++ b/lms/djangoapps/course_api/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for Course API views. """ -from __future__ import absolute_import + from datetime import datetime from hashlib import md5 diff --git a/lms/djangoapps/course_api/urls.py b/lms/djangoapps/course_api/urls.py index 351fb165e2..3c2894886a 100644 --- a/lms/djangoapps/course_api/urls.py +++ b/lms/djangoapps/course_api/urls.py @@ -1,7 +1,7 @@ """ Course API URLs """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/lms/djangoapps/course_api/views.py b/lms/djangoapps/course_api/views.py index 9f30d6517c..b4326746a6 100644 --- a/lms/djangoapps/course_api/views.py +++ b/lms/djangoapps/course_api/views.py @@ -2,7 +2,7 @@ Course API Views """ -from __future__ import absolute_import + from django.core.exceptions import ValidationError from edx_rest_framework_extensions.paginators import NamespacedPageNumberPagination diff --git a/lms/djangoapps/course_blocks/api.py b/lms/djangoapps/course_blocks/api.py index 685cdc9e0e..f1b65d0d9e 100644 --- a/lms/djangoapps/course_blocks/api.py +++ b/lms/djangoapps/course_blocks/api.py @@ -2,7 +2,7 @@ API entry point to the course_blocks app with top-level get_course_blocks function. """ -from __future__ import absolute_import + from django.conf import settings from edx_when import field_data diff --git a/lms/djangoapps/course_blocks/transformers/access_denied_filter.py b/lms/djangoapps/course_blocks/transformers/access_denied_filter.py index f2bcf4644e..b4115dd755 100644 --- a/lms/djangoapps/course_blocks/transformers/access_denied_filter.py +++ b/lms/djangoapps/course_blocks/transformers/access_denied_filter.py @@ -2,7 +2,7 @@ Access Denied Message Filter Transformer implementation. """ # TODO: Remove this file after REVE-52 lands and old-mobile-app traffic falls to < 5% of mobile traffic -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer diff --git a/lms/djangoapps/course_blocks/transformers/hidden_content.py b/lms/djangoapps/course_blocks/transformers/hidden_content.py index 4c14b25ab9..e877832e59 100644 --- a/lms/djangoapps/course_blocks/transformers/hidden_content.py +++ b/lms/djangoapps/course_blocks/transformers/hidden_content.py @@ -1,7 +1,7 @@ """ Visibility Transformer implementation. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/course_blocks/transformers/hide_empty.py b/lms/djangoapps/course_blocks/transformers/hide_empty.py index 3718ac428b..22a8b0f976 100644 --- a/lms/djangoapps/course_blocks/transformers/hide_empty.py +++ b/lms/djangoapps/course_blocks/transformers/hide_empty.py @@ -2,7 +2,7 @@ Hide Empty Transformer implementation. """ # TODO: Remove this file after REVE-52 lands and old-mobile-app traffic falls to < 5% of mobile traffic -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer diff --git a/lms/djangoapps/course_blocks/transformers/library_content.py b/lms/djangoapps/course_blocks/transformers/library_content.py index 6cbaa9ad39..004177d602 100644 --- a/lms/djangoapps/course_blocks/transformers/library_content.py +++ b/lms/djangoapps/course_blocks/transformers/library_content.py @@ -1,7 +1,7 @@ """ Content Library Transformer. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/course_blocks/transformers/load_override_data.py b/lms/djangoapps/course_blocks/transformers/load_override_data.py index 468f7d2b04..672922ea51 100644 --- a/lms/djangoapps/course_blocks/transformers/load_override_data.py +++ b/lms/djangoapps/course_blocks/transformers/load_override_data.py @@ -1,7 +1,7 @@ """ Load Override Data Transformer """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/course_blocks/transformers/split_test.py b/lms/djangoapps/course_blocks/transformers/split_test.py index 04a9982995..6e3640e693 100644 --- a/lms/djangoapps/course_blocks/transformers/split_test.py +++ b/lms/djangoapps/course_blocks/transformers/split_test.py @@ -1,7 +1,7 @@ """ Split Test Block Transformer """ -from __future__ import absolute_import + import six diff --git a/lms/djangoapps/course_blocks/transformers/start_date.py b/lms/djangoapps/course_blocks/transformers/start_date.py index 494b3959f0..06932819e2 100644 --- a/lms/djangoapps/course_blocks/transformers/start_date.py +++ b/lms/djangoapps/course_blocks/transformers/start_date.py @@ -1,7 +1,7 @@ """ Start Date Transformer implementation. """ -from __future__ import absolute_import + from lms.djangoapps.courseware.access_utils import check_start_date from openedx.core.djangoapps.content.block_structure.transformer import ( diff --git a/lms/djangoapps/course_blocks/transformers/tests/helpers.py b/lms/djangoapps/course_blocks/transformers/tests/helpers.py index 73a4cdcf48..25b5e93b92 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/helpers.py +++ b/lms/djangoapps/course_blocks/transformers/tests/helpers.py @@ -1,7 +1,7 @@ """ Test helpers for testing course block transformers. """ -from __future__ import absolute_import + import six from six.moves import range diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py b/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py index 546d694568..b1d3f1d5f3 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py @@ -1,7 +1,7 @@ """ Tests for HiddenContentTransformer. """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py index 4d9985f2dc..ab7f95cc84 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py @@ -2,7 +2,7 @@ Tests for ContentLibraryTransformer. """ -from __future__ import absolute_import + from six.moves import range diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py index f46e2b979e..ab1b869842 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py @@ -1,7 +1,7 @@ """ Tests for OverrideDataTransformer. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py index b59dd662a4..91537f6726 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py @@ -1,7 +1,7 @@ """ Tests for SplitTestTransformer. """ -from __future__ import absolute_import + import ddt diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py b/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py index 9454f8a3d8..17f6219648 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py @@ -1,7 +1,7 @@ """ Tests for StartDateTransformer. """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py index 2ceb3aef08..c8155f0af0 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py @@ -2,7 +2,7 @@ """ Tests for UserPartitionTransformer. """ -from __future__ import absolute_import + import string from collections import namedtuple diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py b/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py index 17b16b1bf7..8ceb821a64 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py @@ -1,7 +1,7 @@ """ Tests for VisibilityTransformer. """ -from __future__ import absolute_import + import ddt diff --git a/lms/djangoapps/course_blocks/transformers/user_partitions.py b/lms/djangoapps/course_blocks/transformers/user_partitions.py index e1b928cb62..529e76b154 100644 --- a/lms/djangoapps/course_blocks/transformers/user_partitions.py +++ b/lms/djangoapps/course_blocks/transformers/user_partitions.py @@ -1,7 +1,7 @@ """ User Partitions Transformer """ -from __future__ import absolute_import + import six diff --git a/lms/djangoapps/course_blocks/transformers/visibility.py b/lms/djangoapps/course_blocks/transformers/visibility.py index af3c68a9e3..19b0d2252d 100644 --- a/lms/djangoapps/course_blocks/transformers/visibility.py +++ b/lms/djangoapps/course_blocks/transformers/visibility.py @@ -1,7 +1,7 @@ """ Visibility Transformer implementation. """ -from __future__ import absolute_import + from openedx.core.djangoapps.content.block_structure.transformer import ( BlockStructureTransformer, diff --git a/lms/djangoapps/course_blocks/usage_info.py b/lms/djangoapps/course_blocks/usage_info.py index 834bdbb7a9..0d347120e5 100644 --- a/lms/djangoapps/course_blocks/usage_info.py +++ b/lms/djangoapps/course_blocks/usage_info.py @@ -2,7 +2,7 @@ Declares CourseUsageInfo class to be used by the transform method in Transformers. """ -from __future__ import absolute_import + from lms.djangoapps.courseware.access import _has_access_to_course diff --git a/lms/djangoapps/course_blocks/utils.py b/lms/djangoapps/course_blocks/utils.py index 354b79beb2..b82bc5556b 100644 --- a/lms/djangoapps/course_blocks/utils.py +++ b/lms/djangoapps/course_blocks/utils.py @@ -1,7 +1,7 @@ """ Common utilities for use along with the course blocks. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/course_goals/api.py b/lms/djangoapps/course_goals/api.py index 6fcfd73c72..6c8fe3c9f8 100644 --- a/lms/djangoapps/course_goals/api.py +++ b/lms/djangoapps/course_goals/api.py @@ -1,7 +1,7 @@ """ Course Goals Python API """ -from __future__ import absolute_import + from django.conf import settings from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/course_goals/apps.py b/lms/djangoapps/course_goals/apps.py index 8296753131..e46960e97a 100644 --- a/lms/djangoapps/course_goals/apps.py +++ b/lms/djangoapps/course_goals/apps.py @@ -4,7 +4,7 @@ Course Goals Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/course_goals/handlers.py b/lms/djangoapps/course_goals/handlers.py index 2992ba9a28..3baff2e556 100644 --- a/lms/djangoapps/course_goals/handlers.py +++ b/lms/djangoapps/course_goals/handlers.py @@ -1,7 +1,7 @@ """ Signal handlers for course goals. """ -from __future__ import absolute_import + import six from django.db import models diff --git a/lms/djangoapps/course_goals/migrations/0001_initial.py b/lms/djangoapps/course_goals/migrations/0001_initial.py index fe52ffa589..60606da839 100644 --- a/lms/djangoapps/course_goals/migrations/0001_initial.py +++ b/lms/djangoapps/course_goals/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models from django.conf import settings from opaque_keys.edx.django.models import CourseKeyField diff --git a/lms/djangoapps/course_goals/migrations/0002_auto_20171010_1129.py b/lms/djangoapps/course_goals/migrations/0002_auto_20171010_1129.py index 96c931709c..37ad1dbca7 100644 --- a/lms/djangoapps/course_goals/migrations/0002_auto_20171010_1129.py +++ b/lms/djangoapps/course_goals/migrations/0002_auto_20171010_1129.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models diff --git a/lms/djangoapps/course_goals/models.py b/lms/djangoapps/course_goals/models.py index 8ec8f93e1c..32f7f6cab3 100644 --- a/lms/djangoapps/course_goals/models.py +++ b/lms/djangoapps/course_goals/models.py @@ -1,7 +1,7 @@ """ Course Goals Models """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.db import models diff --git a/lms/djangoapps/course_goals/tests/test_api.py b/lms/djangoapps/course_goals/tests/test_api.py index 0fee1a9959..8240f60a31 100644 --- a/lms/djangoapps/course_goals/tests/test_api.py +++ b/lms/djangoapps/course_goals/tests/test_api.py @@ -1,7 +1,7 @@ """ Unit tests for course_goals.api methods. """ -from __future__ import absolute_import + import mock from django.contrib.auth.models import User diff --git a/lms/djangoapps/course_goals/urls.py b/lms/djangoapps/course_goals/urls.py index db0bcb6eec..79b558cd20 100644 --- a/lms/djangoapps/course_goals/urls.py +++ b/lms/djangoapps/course_goals/urls.py @@ -1,7 +1,7 @@ """ Course Goals URLs """ -from __future__ import absolute_import + from django.conf.urls import include, url from rest_framework import routers diff --git a/lms/djangoapps/course_goals/views.py b/lms/djangoapps/course_goals/views.py index 541394d1f5..70c4c70bef 100644 --- a/lms/djangoapps/course_goals/views.py +++ b/lms/djangoapps/course_goals/views.py @@ -1,7 +1,7 @@ """ Course Goals Views - includes REST API """ -from __future__ import absolute_import + from django.conf import settings from django.contrib.auth import get_user_model diff --git a/lms/djangoapps/course_wiki/editors.py b/lms/djangoapps/course_wiki/editors.py index cdee74847e..323c19198c 100644 --- a/lms/djangoapps/course_wiki/editors.py +++ b/lms/djangoapps/course_wiki/editors.py @@ -2,7 +2,7 @@ Support for using the CodeMirror code editor as a wiki content editor. """ -from __future__ import absolute_import + from django import forms from django.forms.utils import flatatt diff --git a/lms/djangoapps/course_wiki/middleware.py b/lms/djangoapps/course_wiki/middleware.py index 7903b25f20..293049a935 100644 --- a/lms/djangoapps/course_wiki/middleware.py +++ b/lms/djangoapps/course_wiki/middleware.py @@ -1,5 +1,5 @@ """Middleware for course_wiki""" -from __future__ import absolute_import + from django.conf import settings from django.core.exceptions import PermissionDenied diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py b/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py index 7c407011fc..3cc6b4dffa 100644 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py @@ -1,4 +1,4 @@ # Make sure wiki_plugin.py gets run. -from __future__ import absolute_import + from course_wiki.plugins.markdownedx.wiki_plugin import ExtendMarkdownPlugin diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py index 289ef03cc9..57596a12b8 100644 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py @@ -1,6 +1,6 @@ # Source: https://github.com/mayoff/python-markdown-mathjax -from __future__ import absolute_import + import markdown diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py index adc35c516d..ef004d0d4f 100755 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_video.py @@ -128,7 +128,7 @@ Test Gametrailers u'

' """ -from __future__ import absolute_import + import markdown diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py b/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py index e78dcf4514..21bd4ce816 100644 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import + from wiki.core.plugins import registry as plugin_registry from wiki.core.plugins.base import BasePlugin diff --git a/lms/djangoapps/course_wiki/settings.py b/lms/djangoapps/course_wiki/settings.py index 90a9fc85eb..1edd9a941f 100644 --- a/lms/djangoapps/course_wiki/settings.py +++ b/lms/djangoapps/course_wiki/settings.py @@ -3,7 +3,7 @@ These callables are used by django-wiki to check various permissions a user has on an article. """ -from __future__ import absolute_import + from course_wiki.utils import user_is_article_course_staff diff --git a/lms/djangoapps/course_wiki/tab.py b/lms/djangoapps/course_wiki/tab.py index f39c9ed3ea..e8529a3662 100644 --- a/lms/djangoapps/course_wiki/tab.py +++ b/lms/djangoapps/course_wiki/tab.py @@ -3,7 +3,7 @@ These callables are used by django-wiki to check various permissions a user has on an article. """ -from __future__ import absolute_import + from django.conf import settings from django.utils.translation import ugettext_noop diff --git a/lms/djangoapps/course_wiki/tests/test_access.py b/lms/djangoapps/course_wiki/tests/test_access.py index ff7ec85037..ef4bfd80ab 100644 --- a/lms/djangoapps/course_wiki/tests/test_access.py +++ b/lms/djangoapps/course_wiki/tests/test_access.py @@ -2,7 +2,7 @@ Tests for wiki permissions """ -from __future__ import absolute_import + from django.contrib.auth.models import Group diff --git a/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py b/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py index 5519cb9593..e2d2b56d32 100644 --- a/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py +++ b/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py @@ -1,7 +1,7 @@ """ Tests for wiki middleware. """ -from __future__ import absolute_import + from unittest import skip diff --git a/lms/djangoapps/course_wiki/tests/test_middleware.py b/lms/djangoapps/course_wiki/tests/test_middleware.py index 3aaa256061..491f0e5e1a 100644 --- a/lms/djangoapps/course_wiki/tests/test_middleware.py +++ b/lms/djangoapps/course_wiki/tests/test_middleware.py @@ -2,7 +2,7 @@ Tests for wiki middleware. """ -from __future__ import absolute_import + from django.test.client import Client diff --git a/lms/djangoapps/course_wiki/tests/test_tab.py b/lms/djangoapps/course_wiki/tests/test_tab.py index 4a31d505c0..a4afd7bd7b 100644 --- a/lms/djangoapps/course_wiki/tests/test_tab.py +++ b/lms/djangoapps/course_wiki/tests/test_tab.py @@ -2,7 +2,7 @@ Tests for wiki views. """ -from __future__ import absolute_import + from django.conf import settings from django.test.client import RequestFactory diff --git a/lms/djangoapps/course_wiki/tests/tests.py b/lms/djangoapps/course_wiki/tests/tests.py index ba57e91cf2..7ddf7981af 100644 --- a/lms/djangoapps/course_wiki/tests/tests.py +++ b/lms/djangoapps/course_wiki/tests/tests.py @@ -2,7 +2,7 @@ Tests for course wiki """ -from __future__ import absolute_import + import six from django.urls import reverse diff --git a/lms/djangoapps/course_wiki/utils.py b/lms/djangoapps/course_wiki/utils.py index 1457456c55..0068e5b807 100644 --- a/lms/djangoapps/course_wiki/utils.py +++ b/lms/djangoapps/course_wiki/utils.py @@ -2,7 +2,7 @@ Utility functions for course_wiki. """ -from __future__ import absolute_import + from django.core.exceptions import ObjectDoesNotExist diff --git a/lms/djangoapps/course_wiki/views.py b/lms/djangoapps/course_wiki/views.py index 8c07c41b25..4c0d005afe 100644 --- a/lms/djangoapps/course_wiki/views.py +++ b/lms/djangoapps/course_wiki/views.py @@ -1,7 +1,7 @@ """ This file contains view functions for wrapping the django-wiki. """ -from __future__ import absolute_import + import logging import re diff --git a/lms/djangoapps/courseware/__init__.py b/lms/djangoapps/courseware/__init__.py index 215a4c11eb..548417e4a1 100644 --- a/lms/djangoapps/courseware/__init__.py +++ b/lms/djangoapps/courseware/__init__.py @@ -1,5 +1,5 @@ #pylint: disable=missing-docstring -from __future__ import absolute_import + import warnings diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index d19cc9f647..abd4285f8b 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -10,7 +10,7 @@ Note: The access control logic in this file does NOT check for enrollment in If enrollment is to be checked, use get_course_with_access in courseware.courses. It is a wrapper around has_access that additionally checks for enrollment. """ -from __future__ import absolute_import + import logging from datetime import datetime diff --git a/lms/djangoapps/courseware/access_response.py b/lms/djangoapps/courseware/access_response.py index 1b27eef4a8..b657645ca3 100644 --- a/lms/djangoapps/courseware/access_response.py +++ b/lms/djangoapps/courseware/access_response.py @@ -2,7 +2,7 @@ This file contains all the classes used by has_access for error handling """ -from __future__ import absolute_import + from django.utils.translation import ugettext as _ diff --git a/lms/djangoapps/courseware/access_utils.py b/lms/djangoapps/courseware/access_utils.py index d6ad23932d..faca983f17 100644 --- a/lms/djangoapps/courseware/access_utils.py +++ b/lms/djangoapps/courseware/access_utils.py @@ -3,7 +3,7 @@ Simple utility functions for computing access. It allows us to share code between access.py and block transformers. """ -from __future__ import absolute_import + from datetime import datetime, timedelta from logging import getLogger diff --git a/lms/djangoapps/courseware/admin.py b/lms/djangoapps/courseware/admin.py index c32fa80dd7..a7bfb2a512 100644 --- a/lms/djangoapps/courseware/admin.py +++ b/lms/djangoapps/courseware/admin.py @@ -1,7 +1,7 @@ """ Admin view for courseware. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/courseware/context_processor.py b/lms/djangoapps/courseware/context_processor.py index cf1a11bd8f..e309a21b49 100644 --- a/lms/djangoapps/courseware/context_processor.py +++ b/lms/djangoapps/courseware/context_processor.py @@ -5,7 +5,7 @@ This is meant to simplify the process of sending user preferences (espec. time_z to the templates without having to append every view file. """ -from __future__ import absolute_import + import six diff --git a/lms/djangoapps/courseware/course_tools.py b/lms/djangoapps/courseware/course_tools.py index 5c4b85dfb7..39300392c3 100644 --- a/lms/djangoapps/courseware/course_tools.py +++ b/lms/djangoapps/courseware/course_tools.py @@ -2,7 +2,7 @@ Platform plugins to support a verified upgrade tool. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index cb6e786eb0..44c2ec417f 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -2,7 +2,7 @@ Functions for accessing and displaying courses within the courseware. """ -from __future__ import absolute_import + import logging from collections import defaultdict diff --git a/lms/djangoapps/courseware/courseware_access_exception.py b/lms/djangoapps/courseware/courseware_access_exception.py index 0afba9024a..124852fe0f 100644 --- a/lms/djangoapps/courseware/courseware_access_exception.py +++ b/lms/djangoapps/courseware/courseware_access_exception.py @@ -1,7 +1,7 @@ """ This file contains the exception used in courseware access """ -from __future__ import absolute_import + from django.http import Http404 diff --git a/lms/djangoapps/courseware/date_summary.py b/lms/djangoapps/courseware/date_summary.py index 3c4077b946..ffcb774209 100644 --- a/lms/djangoapps/courseware/date_summary.py +++ b/lms/djangoapps/courseware/date_summary.py @@ -3,7 +3,7 @@ This module provides date summary blocks for the Course Info page. Each block gives information about a particular course-run-specific date which will be displayed to the user. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/courseware/entrance_exams.py b/lms/djangoapps/courseware/entrance_exams.py index 8c51c53d68..d90c084718 100644 --- a/lms/djangoapps/courseware/entrance_exams.py +++ b/lms/djangoapps/courseware/entrance_exams.py @@ -2,7 +2,7 @@ This file contains all entrance exam related utils/logic. """ -from __future__ import absolute_import + from opaque_keys.edx.keys import UsageKey diff --git a/lms/djangoapps/courseware/field_overrides.py b/lms/djangoapps/courseware/field_overrides.py index 48ad693474..6de340d084 100644 --- a/lms/djangoapps/courseware/field_overrides.py +++ b/lms/djangoapps/courseware/field_overrides.py @@ -14,7 +14,7 @@ package and is used to wrap the `authored_data` when constructing an `LmsFieldData`. This means overrides will be in effect for all scopes covered by `authored_data`, e.g. course content and settings stored in Mongo. """ -from __future__ import absolute_import + import threading from abc import ABCMeta, abstractmethod diff --git a/lms/djangoapps/courseware/fields.py b/lms/djangoapps/courseware/fields.py index b38a6e632c..edd7564415 100644 --- a/lms/djangoapps/courseware/fields.py +++ b/lms/djangoapps/courseware/fields.py @@ -2,7 +2,7 @@ Custom fields """ -from __future__ import absolute_import + from django.db.models.fields import AutoField diff --git a/lms/djangoapps/courseware/management/commands/clean_xml.py b/lms/djangoapps/courseware/management/commands/clean_xml.py index ee221534bf..635bc6f9d1 100644 --- a/lms/djangoapps/courseware/management/commands/clean_xml.py +++ b/lms/djangoapps/courseware/management/commands/clean_xml.py @@ -2,7 +2,7 @@ Contains functions that handle XML course data """ -from __future__ import absolute_import, print_function + import os import sys diff --git a/lms/djangoapps/courseware/management/commands/dump_course_ids.py b/lms/djangoapps/courseware/management/commands/dump_course_ids.py index 6d413eb922..d6a4e90345 100644 --- a/lms/djangoapps/courseware/management/commands/dump_course_ids.py +++ b/lms/djangoapps/courseware/management/commands/dump_course_ids.py @@ -3,7 +3,7 @@ Dump the course_ids available to the lms. Output is UTF-8 encoded by default. """ -from __future__ import absolute_import, unicode_literals + from textwrap import dedent diff --git a/lms/djangoapps/courseware/management/commands/dump_course_structure.py b/lms/djangoapps/courseware/management/commands/dump_course_structure.py index 7b2a62b3e7..10f07eb54f 100644 --- a/lms/djangoapps/courseware/management/commands/dump_course_structure.py +++ b/lms/djangoapps/courseware/management/commands/dump_course_structure.py @@ -16,7 +16,7 @@ The resulting JSON object has one entry for each module in the course: """ -from __future__ import absolute_import + import json from textwrap import dedent diff --git a/lms/djangoapps/courseware/management/commands/import.py b/lms/djangoapps/courseware/management/commands/import.py index 62de3d68c7..e52bc90dea 100644 --- a/lms/djangoapps/courseware/management/commands/import.py +++ b/lms/djangoapps/courseware/management/commands/import.py @@ -1,7 +1,7 @@ """ Script for importing courseware from XML format """ -from __future__ import absolute_import + from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py b/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py index ebf1c24329..8ca050867c 100644 --- a/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py +++ b/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py @@ -4,7 +4,7 @@ Tests for Django management commands """ -from __future__ import absolute_import + import json from six import StringIO diff --git a/lms/djangoapps/courseware/masquerade.py b/lms/djangoapps/courseware/masquerade.py index 4e3cf34ef6..886978c400 100644 --- a/lms/djangoapps/courseware/masquerade.py +++ b/lms/djangoapps/courseware/masquerade.py @@ -4,7 +4,7 @@ Allow course staff to see a student or staff view of courseware. Which kind of view has been selected is stored in the session state. ''' -from __future__ import absolute_import + import logging from datetime import datetime diff --git a/lms/djangoapps/courseware/middleware.py b/lms/djangoapps/courseware/middleware.py index 4742d311bb..af5c39280b 100644 --- a/lms/djangoapps/courseware/middleware.py +++ b/lms/djangoapps/courseware/middleware.py @@ -2,7 +2,7 @@ Middleware for the courseware app """ -from __future__ import absolute_import + from django.shortcuts import redirect diff --git a/lms/djangoapps/courseware/migrations/0001_initial.py b/lms/djangoapps/courseware/migrations/0001_initial.py index 4e3c29feef..7820e27894 100644 --- a/lms/djangoapps/courseware/migrations/0001_initial.py +++ b/lms/djangoapps/courseware/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/lms/djangoapps/courseware/migrations/0002_coursedynamicupgradedeadlineconfiguration_dynamicupgradedeadlineconfiguration.py b/lms/djangoapps/courseware/migrations/0002_coursedynamicupgradedeadlineconfiguration_dynamicupgradedeadlineconfiguration.py index d17c667dff..ad7264d731 100644 --- a/lms/djangoapps/courseware/migrations/0002_coursedynamicupgradedeadlineconfiguration_dynamicupgradedeadlineconfiguration.py +++ b/lms/djangoapps/courseware/migrations/0002_coursedynamicupgradedeadlineconfiguration_dynamicupgradedeadlineconfiguration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/courseware/migrations/0003_auto_20170825_0935.py b/lms/djangoapps/courseware/migrations/0003_auto_20170825_0935.py index 640e4cfc43..47ee7c0b9c 100644 --- a/lms/djangoapps/courseware/migrations/0003_auto_20170825_0935.py +++ b/lms/djangoapps/courseware/migrations/0003_auto_20170825_0935.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/courseware/migrations/0004_auto_20171010_1639.py b/lms/djangoapps/courseware/migrations/0004_auto_20171010_1639.py index 89798c24e2..6a561c557d 100644 --- a/lms/djangoapps/courseware/migrations/0004_auto_20171010_1639.py +++ b/lms/djangoapps/courseware/migrations/0004_auto_20171010_1639.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/courseware/migrations/0005_orgdynamicupgradedeadlineconfiguration.py b/lms/djangoapps/courseware/migrations/0005_orgdynamicupgradedeadlineconfiguration.py index 48872de823..c8d7ee4552 100644 --- a/lms/djangoapps/courseware/migrations/0005_orgdynamicupgradedeadlineconfiguration.py +++ b/lms/djangoapps/courseware/migrations/0005_orgdynamicupgradedeadlineconfiguration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/courseware/migrations/0006_remove_module_id_index.py b/lms/djangoapps/courseware/migrations/0006_remove_module_id_index.py index d78869e9f8..2877bc6491 100644 --- a/lms/djangoapps/courseware/migrations/0006_remove_module_id_index.py +++ b/lms/djangoapps/courseware/migrations/0006_remove_module_id_index.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-05-27 16:27 -from __future__ import absolute_import, unicode_literals + import opaque_keys.edx.django.models from django.db import migrations diff --git a/lms/djangoapps/courseware/migrations/0007_remove_done_index.py b/lms/djangoapps/courseware/migrations/0007_remove_done_index.py index 879e2d96b9..26f6e3182d 100644 --- a/lms/djangoapps/courseware/migrations/0007_remove_done_index.py +++ b/lms/djangoapps/courseware/migrations/0007_remove_done_index.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-05-29 15:18 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/courseware/migrations/0008_move_idde_to_edx_when.py b/lms/djangoapps/courseware/migrations/0008_move_idde_to_edx_when.py index 5e1201cf55..77d9cbf0e4 100644 --- a/lms/djangoapps/courseware/migrations/0008_move_idde_to_edx_when.py +++ b/lms/djangoapps/courseware/migrations/0008_move_idde_to_edx_when.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-21 15:25 -from __future__ import absolute_import, unicode_literals + import json import logging diff --git a/lms/djangoapps/courseware/migrations/0009_auto_20190703_1955.py b/lms/djangoapps/courseware/migrations/0009_auto_20190703_1955.py index 3f0c31be33..3521009b1c 100644 --- a/lms/djangoapps/courseware/migrations/0009_auto_20190703_1955.py +++ b/lms/djangoapps/courseware/migrations/0009_auto_20190703_1955.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-03 19:55 -from __future__ import unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/lms/djangoapps/courseware/migrations/0010_auto_20190709_1559.py b/lms/djangoapps/courseware/migrations/0010_auto_20190709_1559.py index 9a87bd145a..935f787b8d 100644 --- a/lms/djangoapps/courseware/migrations/0010_auto_20190709_1559.py +++ b/lms/djangoapps/courseware/migrations/0010_auto_20190709_1559.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-09 15:59 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py b/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py index 6a7d6572f4..03d7b7b6ea 100644 --- a/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py +++ b/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-08-28 15:50 -from __future__ import unicode_literals + import lms.djangoapps.courseware.fields diff --git a/lms/djangoapps/courseware/migrations/0012_adjust_fields.py b/lms/djangoapps/courseware/migrations/0012_adjust_fields.py index 186cc83021..51abea36a7 100644 --- a/lms/djangoapps/courseware/migrations/0012_adjust_fields.py +++ b/lms/djangoapps/courseware/migrations/0012_adjust_fields.py @@ -4,7 +4,7 @@ # This migration does not produce any actual database changes; it only affects # the python code. You can confirm this with: # ./manage.py lms sqlmigrate courseware 0012_adjust_fields -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/courseware/migrations/0013_auto_20191001_1858.py b/lms/djangoapps/courseware/migrations/0013_auto_20191001_1858.py index 9aad34ea6e..a9062b020c 100644 --- a/lms/djangoapps/courseware/migrations/0013_auto_20191001_1858.py +++ b/lms/djangoapps/courseware/migrations/0013_auto_20191001_1858.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-10-01 18:58 -from __future__ import unicode_literals + from django.db import migrations diff --git a/lms/djangoapps/courseware/model_data.py b/lms/djangoapps/courseware/model_data.py index 1fcf5468e5..1408841092 100644 --- a/lms/djangoapps/courseware/model_data.py +++ b/lms/djangoapps/courseware/model_data.py @@ -21,7 +21,7 @@ UserInfoCache: A cache for Scope.user_info DjangoOrmFieldCache: A base-class for single-row-per-field caches. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/courseware/models.py b/lms/djangoapps/courseware/models.py index 134923b0ba..d6dae57db4 100644 --- a/lms/djangoapps/courseware/models.py +++ b/lms/djangoapps/courseware/models.py @@ -12,7 +12,7 @@ file and check it in at the same time as your model changes. To do that, ASSUMPTIONS: modules have unique IDs, even across different module_types """ -from __future__ import absolute_import + import itertools import logging diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index dbc4f1538b..a355c09323 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -2,7 +2,7 @@ Module rendering """ -from __future__ import absolute_import + import hashlib import json diff --git a/lms/djangoapps/courseware/rules.py b/lms/djangoapps/courseware/rules.py index 7c01087c16..72a4ea903f 100644 --- a/lms/djangoapps/courseware/rules.py +++ b/lms/djangoapps/courseware/rules.py @@ -1,7 +1,7 @@ """ django-rules and Bridgekeeper rules for courseware related features """ -from __future__ import absolute_import + import logging import traceback diff --git a/lms/djangoapps/courseware/services.py b/lms/djangoapps/courseware/services.py index 300960a385..32f21a7995 100644 --- a/lms/djangoapps/courseware/services.py +++ b/lms/djangoapps/courseware/services.py @@ -1,7 +1,7 @@ """ Courseware services. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/courseware/student_field_overrides.py b/lms/djangoapps/courseware/student_field_overrides.py index 7b20e772c6..31b0b8b774 100644 --- a/lms/djangoapps/courseware/student_field_overrides.py +++ b/lms/djangoapps/courseware/student_field_overrides.py @@ -2,7 +2,7 @@ API related to providing field overrides for individual students. This is used by the individual due dates feature. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index bf7869011d..4d8704642a 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -2,7 +2,7 @@ This module is essentially a broker to xmodule/tabs.py -- it was originally introduced to perform some LMS-specific tab display gymnastics for the Entrance Exams feature """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/lms/djangoapps/courseware/tests/factories.py b/lms/djangoapps/courseware/tests/factories.py index 76e7d8e785..cbf28521ec 100644 --- a/lms/djangoapps/courseware/tests/factories.py +++ b/lms/djangoapps/courseware/tests/factories.py @@ -1,6 +1,6 @@ # Factories are self documenting # pylint: disable=missing-docstring -from __future__ import absolute_import + import json from functools import partial diff --git a/lms/djangoapps/courseware/tests/helpers.py b/lms/djangoapps/courseware/tests/helpers.py index 76978a6cd2..3918d30576 100644 --- a/lms/djangoapps/courseware/tests/helpers.py +++ b/lms/djangoapps/courseware/tests/helpers.py @@ -1,7 +1,7 @@ """ Helpers for courseware tests. """ -from __future__ import absolute_import + import ast import json diff --git a/lms/djangoapps/courseware/tests/test_about.py b/lms/djangoapps/courseware/tests/test_about.py index d7a6b03d42..735a5da47e 100644 --- a/lms/djangoapps/courseware/tests/test_about.py +++ b/lms/djangoapps/courseware/tests/test_about.py @@ -1,7 +1,7 @@ """ Test the about xblock """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index 99047b8a4c..1f337890d2 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -2,7 +2,7 @@ """ Test the access control framework """ -from __future__ import absolute_import + import datetime import itertools diff --git a/lms/djangoapps/courseware/tests/test_comprehensive_theming.py b/lms/djangoapps/courseware/tests/test_comprehensive_theming.py index fe862ac181..2d95b66487 100644 --- a/lms/djangoapps/courseware/tests/test_comprehensive_theming.py +++ b/lms/djangoapps/courseware/tests/test_comprehensive_theming.py @@ -1,6 +1,6 @@ """Tests of comprehensive theming.""" -from __future__ import absolute_import + from django.conf import settings from django.contrib import staticfiles diff --git a/lms/djangoapps/courseware/tests/test_context_processor.py b/lms/djangoapps/courseware/tests/test_context_processor.py index 539d7938f6..57ac32419c 100644 --- a/lms/djangoapps/courseware/tests/test_context_processor.py +++ b/lms/djangoapps/courseware/tests/test_context_processor.py @@ -1,7 +1,7 @@ """ Unit tests for courseware context_processor """ -from __future__ import absolute_import + from django.contrib.auth.models import AnonymousUser from mock import Mock diff --git a/lms/djangoapps/courseware/tests/test_course_info.py b/lms/djangoapps/courseware/tests/test_course_info.py index d92afca16a..578cd8b7dc 100644 --- a/lms/djangoapps/courseware/tests/test_course_info.py +++ b/lms/djangoapps/courseware/tests/test_course_info.py @@ -2,7 +2,7 @@ """ Test the course_info xblock """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/courseware/tests/test_course_survey.py b/lms/djangoapps/courseware/tests/test_course_survey.py index 2e419d53e9..fea6960003 100644 --- a/lms/djangoapps/courseware/tests/test_course_survey.py +++ b/lms/djangoapps/courseware/tests/test_course_survey.py @@ -2,7 +2,7 @@ Python tests for the Survey workflows """ -from __future__ import absolute_import + from collections import OrderedDict from copy import deepcopy diff --git a/lms/djangoapps/courseware/tests/test_course_tools.py b/lms/djangoapps/courseware/tests/test_course_tools.py index 9a2f17e4e2..45eac0bd41 100644 --- a/lms/djangoapps/courseware/tests/test_course_tools.py +++ b/lms/djangoapps/courseware/tests/test_course_tools.py @@ -2,7 +2,7 @@ Unit tests for course tools. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/courseware/tests/test_courses.py b/lms/djangoapps/courseware/tests/test_courses.py index 00b79cfcfe..c5884c4853 100644 --- a/lms/djangoapps/courseware/tests/test_courses.py +++ b/lms/djangoapps/courseware/tests/test_courses.py @@ -2,7 +2,7 @@ """ Tests for course access """ -from __future__ import absolute_import + import datetime import itertools diff --git a/lms/djangoapps/courseware/tests/test_credit_requirements.py b/lms/djangoapps/courseware/tests/test_credit_requirements.py index 11802f456d..e2fc8c8e6e 100644 --- a/lms/djangoapps/courseware/tests/test_credit_requirements.py +++ b/lms/djangoapps/courseware/tests/test_credit_requirements.py @@ -2,7 +2,7 @@ Tests for credit requirement display on the progress page. """ -from __future__ import absolute_import + import ddt import six diff --git a/lms/djangoapps/courseware/tests/test_date_summary.py b/lms/djangoapps/courseware/tests/test_date_summary.py index 6063ebd335..580164e485 100644 --- a/lms/djangoapps/courseware/tests/test_date_summary.py +++ b/lms/djangoapps/courseware/tests/test_date_summary.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for course home page date summary blocks.""" -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/lms/djangoapps/courseware/tests/test_discussion_xblock.py b/lms/djangoapps/courseware/tests/test_discussion_xblock.py index c570edf09d..9cd1f91e35 100644 --- a/lms/djangoapps/courseware/tests/test_discussion_xblock.py +++ b/lms/djangoapps/courseware/tests/test_discussion_xblock.py @@ -6,7 +6,7 @@ tests for functionalities that require django API, and lms specific functionalities. """ -from __future__ import absolute_import + import json import uuid diff --git a/lms/djangoapps/courseware/tests/test_draft_modulestore.py b/lms/djangoapps/courseware/tests/test_draft_modulestore.py index 951911a665..058bcc4350 100644 --- a/lms/djangoapps/courseware/tests/test_draft_modulestore.py +++ b/lms/djangoapps/courseware/tests/test_draft_modulestore.py @@ -2,7 +2,7 @@ Test the draft modulestore """ -from __future__ import absolute_import + from django.test import TestCase from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/courseware/tests/test_entrance_exam.py b/lms/djangoapps/courseware/tests/test_entrance_exam.py index 736ce547b1..77f14037bb 100644 --- a/lms/djangoapps/courseware/tests/test_entrance_exam.py +++ b/lms/djangoapps/courseware/tests/test_entrance_exam.py @@ -1,7 +1,7 @@ """ Tests use cases related to LMS Entrance Exam behavior, such as gated content access (TOC) """ -from __future__ import absolute_import + import six from crum import set_current_request diff --git a/lms/djangoapps/courseware/tests/test_favicon.py b/lms/djangoapps/courseware/tests/test_favicon.py index 23ee191bf1..92149defc2 100644 --- a/lms/djangoapps/courseware/tests/test_favicon.py +++ b/lms/djangoapps/courseware/tests/test_favicon.py @@ -2,7 +2,7 @@ Tests of the courseware favicon """ -from __future__ import absolute_import + from django.test import TestCase from django.test.utils import override_settings diff --git a/lms/djangoapps/courseware/tests/test_field_overrides.py b/lms/djangoapps/courseware/tests/test_field_overrides.py index c8df052a3b..05375e8a71 100644 --- a/lms/djangoapps/courseware/tests/test_field_overrides.py +++ b/lms/djangoapps/courseware/tests/test_field_overrides.py @@ -2,7 +2,7 @@ Tests for `field_overrides` module. """ # pylint: disable=missing-docstring -from __future__ import absolute_import + import unittest diff --git a/lms/djangoapps/courseware/tests/test_footer.py b/lms/djangoapps/courseware/tests/test_footer.py index 4cd0312bf5..4583336e0b 100644 --- a/lms/djangoapps/courseware/tests/test_footer.py +++ b/lms/djangoapps/courseware/tests/test_footer.py @@ -3,7 +3,7 @@ Tests related to the basic footer-switching based off SITE_NAME to ensure edx.org uses an edx footer but other instances use an Open edX footer. """ -from __future__ import absolute_import + import unittest diff --git a/lms/djangoapps/courseware/tests/test_group_access.py b/lms/djangoapps/courseware/tests/test_group_access.py index 11c10b72dd..68e532d7ec 100644 --- a/lms/djangoapps/courseware/tests/test_group_access.py +++ b/lms/djangoapps/courseware/tests/test_group_access.py @@ -3,7 +3,7 @@ This module defines tests for courseware.access that are specific to group access control rules. """ -from __future__ import absolute_import + import ddt from stevedore.extension import Extension, ExtensionManager diff --git a/lms/djangoapps/courseware/tests/test_i18n.py b/lms/djangoapps/courseware/tests/test_i18n.py index 8133af78c5..c09bbdb80f 100644 --- a/lms/djangoapps/courseware/tests/test_i18n.py +++ b/lms/djangoapps/courseware/tests/test_i18n.py @@ -2,7 +2,7 @@ Tests i18n in courseware """ -from __future__ import absolute_import + import json import re diff --git a/lms/djangoapps/courseware/tests/test_lti_integration.py b/lms/djangoapps/courseware/tests/test_lti_integration.py index 94bed42e03..b3b2eb9a7a 100644 --- a/lms/djangoapps/courseware/tests/test_lti_integration.py +++ b/lms/djangoapps/courseware/tests/test_lti_integration.py @@ -1,6 +1,6 @@ """LTI integration tests""" -from __future__ import absolute_import + import json from collections import OrderedDict diff --git a/lms/djangoapps/courseware/tests/test_masquerade.py b/lms/djangoapps/courseware/tests/test_masquerade.py index ccc8dd6e9e..17327a02fe 100644 --- a/lms/djangoapps/courseware/tests/test_masquerade.py +++ b/lms/djangoapps/courseware/tests/test_masquerade.py @@ -2,7 +2,7 @@ """ Unit tests for masquerade. """ -from __future__ import absolute_import + import json import pickle diff --git a/lms/djangoapps/courseware/tests/test_middleware.py b/lms/djangoapps/courseware/tests/test_middleware.py index 35e4e6e40a..14f0d7587a 100644 --- a/lms/djangoapps/courseware/tests/test_middleware.py +++ b/lms/djangoapps/courseware/tests/test_middleware.py @@ -2,7 +2,7 @@ Tests for courseware middleware """ -from __future__ import absolute_import + from django.http import Http404 from django.test.client import RequestFactory diff --git a/lms/djangoapps/courseware/tests/test_model_data.py b/lms/djangoapps/courseware/tests/test_model_data.py index bb66ca772e..76755a2f57 100644 --- a/lms/djangoapps/courseware/tests/test_model_data.py +++ b/lms/djangoapps/courseware/tests/test_model_data.py @@ -1,7 +1,7 @@ """ Test for lms courseware app, module data (runtime data storage for XBlocks) """ -from __future__ import absolute_import + import json from functools import partial diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index 1a6ce2760b..2bbfa7369d 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -2,7 +2,7 @@ """ Test for lms courseware app, module render unit """ -from __future__ import absolute_import + import itertools import json diff --git a/lms/djangoapps/courseware/tests/test_navigation.py b/lms/djangoapps/courseware/tests/test_navigation.py index 1f558c3f7d..1dcd931b84 100644 --- a/lms/djangoapps/courseware/tests/test_navigation.py +++ b/lms/djangoapps/courseware/tests/test_navigation.py @@ -1,7 +1,7 @@ """ This test file will run through some LMS test scenarios regarding access and navigation of the LMS """ -from __future__ import absolute_import + import time diff --git a/lms/djangoapps/courseware/tests/test_rules.py b/lms/djangoapps/courseware/tests/test_rules.py index 020786f60d..808761303b 100644 --- a/lms/djangoapps/courseware/tests/test_rules.py +++ b/lms/djangoapps/courseware/tests/test_rules.py @@ -1,7 +1,7 @@ """ Tests for permissions defined in courseware.rules """ -from __future__ import absolute_import + import ddt import six diff --git a/lms/djangoapps/courseware/tests/test_self_paced_overrides.py b/lms/djangoapps/courseware/tests/test_self_paced_overrides.py index dcd4d52984..c230dcb1d6 100644 --- a/lms/djangoapps/courseware/tests/test_self_paced_overrides.py +++ b/lms/djangoapps/courseware/tests/test_self_paced_overrides.py @@ -1,6 +1,6 @@ """Tests for self-paced course due date overrides.""" # pylint: disable=missing-docstring -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/courseware/tests/test_services.py b/lms/djangoapps/courseware/tests/test_services.py index 0922745297..50281ad89a 100644 --- a/lms/djangoapps/courseware/tests/test_services.py +++ b/lms/djangoapps/courseware/tests/test_services.py @@ -1,7 +1,7 @@ """ Tests for courseware services. """ -from __future__ import absolute_import + import itertools import json diff --git a/lms/djangoapps/courseware/tests/test_split_module.py b/lms/djangoapps/courseware/tests/test_split_module.py index 06c22aa0f8..30666980de 100644 --- a/lms/djangoapps/courseware/tests/test_split_module.py +++ b/lms/djangoapps/courseware/tests/test_split_module.py @@ -1,7 +1,7 @@ """ Test for split test XModule """ -from __future__ import absolute_import + import six from django.urls import reverse diff --git a/lms/djangoapps/courseware/tests/test_submitting_problems.py b/lms/djangoapps/courseware/tests/test_submitting_problems.py index d36a6442f3..8032a1a281 100644 --- a/lms/djangoapps/courseware/tests/test_submitting_problems.py +++ b/lms/djangoapps/courseware/tests/test_submitting_problems.py @@ -5,7 +5,7 @@ Integration tests for submitting problem responses and getting grades. # pylint: disable=attribute-defined-outside-init -from __future__ import absolute_import + import json import os diff --git a/lms/djangoapps/courseware/tests/test_tabs.py b/lms/djangoapps/courseware/tests/test_tabs.py index c8b87f0e9e..5d2056f385 100644 --- a/lms/djangoapps/courseware/tests/test_tabs.py +++ b/lms/djangoapps/courseware/tests/test_tabs.py @@ -1,7 +1,7 @@ """ Test cases for tabs. """ -from __future__ import absolute_import + import six from crum import set_current_request diff --git a/lms/djangoapps/courseware/tests/test_user_state_client.py b/lms/djangoapps/courseware/tests/test_user_state_client.py index a220dbd77d..151511eea3 100644 --- a/lms/djangoapps/courseware/tests/test_user_state_client.py +++ b/lms/djangoapps/courseware/tests/test_user_state_client.py @@ -3,7 +3,7 @@ Black-box tests of the DjangoUserStateClient against the semantics defined in edx_user_state_client. """ -from __future__ import absolute_import + from collections import defaultdict diff --git a/lms/djangoapps/courseware/tests/test_video_handlers.py b/lms/djangoapps/courseware/tests/test_video_handlers.py index 1de0e387d1..1a6587ec15 100644 --- a/lms/djangoapps/courseware/tests/test_video_handlers.py +++ b/lms/djangoapps/courseware/tests/test_video_handlers.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Video xmodule tests in mongo.""" -from __future__ import absolute_import + import json import os diff --git a/lms/djangoapps/courseware/tests/test_video_mongo.py b/lms/djangoapps/courseware/tests/test_video_mongo.py index 6ef233b889..dfc00d6d22 100644 --- a/lms/djangoapps/courseware/tests/test_video_mongo.py +++ b/lms/djangoapps/courseware/tests/test_video_mongo.py @@ -3,7 +3,7 @@ Video xmodule tests in mongo. """ -from __future__ import absolute_import + import io import json diff --git a/lms/djangoapps/courseware/tests/test_video_xml.py b/lms/djangoapps/courseware/tests/test_video_xml.py index bed49f0524..d887f72d15 100644 --- a/lms/djangoapps/courseware/tests/test_video_xml.py +++ b/lms/djangoapps/courseware/tests/test_video_xml.py @@ -14,7 +14,7 @@ You can then use the CourseFactory and XModuleItemFactory as defined in common/lib/xmodule/xmodule/modulestore/tests/factories.py to create the course, section, subsection, unit, etc. """ -from __future__ import absolute_import + from django.test import TestCase from xmodule.video_module import VideoBlock diff --git a/lms/djangoapps/courseware/tests/test_view_authentication.py b/lms/djangoapps/courseware/tests/test_view_authentication.py index 73635ac938..6015a58230 100644 --- a/lms/djangoapps/courseware/tests/test_view_authentication.py +++ b/lms/djangoapps/courseware/tests/test_view_authentication.py @@ -2,7 +2,7 @@ Check that view authentication works properly. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index cad03e38c8..6f05a576f1 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -2,7 +2,7 @@ """ Tests courseware views.py """ -from __future__ import absolute_import + import itertools import json diff --git a/lms/djangoapps/courseware/tests/test_word_cloud.py b/lms/djangoapps/courseware/tests/test_word_cloud.py index 709895568a..0fdc5d0dfd 100644 --- a/lms/djangoapps/courseware/tests/test_word_cloud.py +++ b/lms/djangoapps/courseware/tests/test_word_cloud.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Word cloud integration tests using mongo modulestore.""" -from __future__ import absolute_import + import json from operator import itemgetter diff --git a/lms/djangoapps/courseware/tests/tests.py b/lms/djangoapps/courseware/tests/tests.py index 0645c4e7f5..818990458c 100644 --- a/lms/djangoapps/courseware/tests/tests.py +++ b/lms/djangoapps/courseware/tests/tests.py @@ -1,7 +1,7 @@ """ Test for LMS courseware app. """ -from __future__ import absolute_import + from textwrap import dedent from unittest import TestCase diff --git a/lms/djangoapps/courseware/testutils.py b/lms/djangoapps/courseware/testutils.py index c528b56162..4c85cc8f88 100644 --- a/lms/djangoapps/courseware/testutils.py +++ b/lms/djangoapps/courseware/testutils.py @@ -2,7 +2,7 @@ Common test utilities for courseware functionality """ -from __future__ import absolute_import + from abc import ABCMeta, abstractmethod from datetime import datetime, timedelta diff --git a/lms/djangoapps/courseware/url_helpers.py b/lms/djangoapps/courseware/url_helpers.py index 2f753407b6..525af9721c 100644 --- a/lms/djangoapps/courseware/url_helpers.py +++ b/lms/djangoapps/courseware/url_helpers.py @@ -1,7 +1,7 @@ """ Module to define url helpers functions """ -from __future__ import absolute_import + import six from django.urls import reverse diff --git a/lms/djangoapps/courseware/user_state_client.py b/lms/djangoapps/courseware/user_state_client.py index 422dfe0e76..10c5724943 100644 --- a/lms/djangoapps/courseware/user_state_client.py +++ b/lms/djangoapps/courseware/user_state_client.py @@ -3,7 +3,7 @@ An implementation of :class:`XBlockUserStateClient`, which stores XBlock Scope.u data in a Django ORM model. """ -from __future__ import absolute_import + import itertools import logging diff --git a/lms/djangoapps/courseware/views/index.py b/lms/djangoapps/courseware/views/index.py index d1e7cbaf3e..524b967ce3 100644 --- a/lms/djangoapps/courseware/views/index.py +++ b/lms/djangoapps/courseware/views/index.py @@ -4,7 +4,7 @@ View for Courseware Index # pylint: disable=attribute-defined-outside-init -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index e933980f03..42fac2a369 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -1,8 +1,8 @@ """ Courseware views functions """ -from __future__ import absolute_import -from __future__ import division + + import json import logging diff --git a/lms/djangoapps/coursewarehistoryextended/migrations/0001_initial.py b/lms/djangoapps/coursewarehistoryextended/migrations/0001_initial.py index c01336ccd2..440bdfa8c6 100644 --- a/lms/djangoapps/coursewarehistoryextended/migrations/0001_initial.py +++ b/lms/djangoapps/coursewarehistoryextended/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import django.db.models.deletion from lms.djangoapps.courseware.fields import UnsignedBigIntAutoField diff --git a/lms/djangoapps/coursewarehistoryextended/migrations/0002_force_studentmodule_index.py b/lms/djangoapps/coursewarehistoryextended/migrations/0002_force_studentmodule_index.py index c3948c3dbe..6580482016 100644 --- a/lms/djangoapps/coursewarehistoryextended/migrations/0002_force_studentmodule_index.py +++ b/lms/djangoapps/coursewarehistoryextended/migrations/0002_force_studentmodule_index.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models diff --git a/lms/djangoapps/coursewarehistoryextended/models.py b/lms/djangoapps/coursewarehistoryextended/models.py index d5ee483d76..e9ca7e25f2 100644 --- a/lms/djangoapps/coursewarehistoryextended/models.py +++ b/lms/djangoapps/coursewarehistoryextended/models.py @@ -12,7 +12,7 @@ file and check it in at the same time as your model changes. To do that, ASSUMPTIONS: modules have unique IDs, even across different module_types """ -from __future__ import absolute_import + import six from django.db import models diff --git a/lms/djangoapps/coursewarehistoryextended/tests.py b/lms/djangoapps/coursewarehistoryextended/tests.py index 868afae141..5c688997dd 100644 --- a/lms/djangoapps/coursewarehistoryextended/tests.py +++ b/lms/djangoapps/coursewarehistoryextended/tests.py @@ -5,7 +5,7 @@ but these are specific to the new storage model with multiple backend tables. """ -from __future__ import absolute_import + import json from unittest import skipUnless diff --git a/lms/djangoapps/dashboard/git_import.py b/lms/djangoapps/dashboard/git_import.py index 1d4cf7ba25..cff8720ee8 100644 --- a/lms/djangoapps/dashboard/git_import.py +++ b/lms/djangoapps/dashboard/git_import.py @@ -3,7 +3,7 @@ Provides a function for importing a git repository into the lms instance when using a mongo modulestore """ -from __future__ import absolute_import + import logging import os diff --git a/lms/djangoapps/dashboard/management/commands/git_add_course.py b/lms/djangoapps/dashboard/management/commands/git_add_course.py index df4891a0e5..8f24056f48 100644 --- a/lms/djangoapps/dashboard/management/commands/git_add_course.py +++ b/lms/djangoapps/dashboard/management/commands/git_add_course.py @@ -2,7 +2,7 @@ Script for importing courseware from git/xml into a mongo modulestore """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py b/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py index 24b95bcf17..6e86cf06bd 100644 --- a/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py +++ b/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py @@ -1,7 +1,7 @@ """ Provide tests for git_add_course management command. """ -from __future__ import absolute_import + import logging import os diff --git a/lms/djangoapps/dashboard/models.py b/lms/djangoapps/dashboard/models.py index c651ed9e91..77b6167ee8 100644 --- a/lms/djangoapps/dashboard/models.py +++ b/lms/djangoapps/dashboard/models.py @@ -1,6 +1,6 @@ """Models for dashboard application""" -from __future__ import absolute_import + import mongoengine diff --git a/lms/djangoapps/dashboard/sysadmin.py b/lms/djangoapps/dashboard/sysadmin.py index 45b1d5a8ca..f7871082b3 100644 --- a/lms/djangoapps/dashboard/sysadmin.py +++ b/lms/djangoapps/dashboard/sysadmin.py @@ -2,7 +2,7 @@ This module creates a sysadmin dashboard for managing and viewing courses. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/dashboard/sysadmin_urls.py b/lms/djangoapps/dashboard/sysadmin_urls.py index c4a8a275e9..fa0e34dbf1 100644 --- a/lms/djangoapps/dashboard/sysadmin_urls.py +++ b/lms/djangoapps/dashboard/sysadmin_urls.py @@ -2,7 +2,7 @@ Urls for sysadmin dashboard feature """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/dashboard/tests/test_sysadmin.py b/lms/djangoapps/dashboard/tests/test_sysadmin.py index 9b17e763c1..28929dff53 100644 --- a/lms/djangoapps/dashboard/tests/test_sysadmin.py +++ b/lms/djangoapps/dashboard/tests/test_sysadmin.py @@ -1,7 +1,7 @@ """ Provide tests for sysadmin dashboard feature in sysadmin.py """ -from __future__ import absolute_import + import glob import os diff --git a/lms/djangoapps/debug/management/commands/dump_xml_courses.py b/lms/djangoapps/debug/management/commands/dump_xml_courses.py index 78d44642f3..b1929486d1 100644 --- a/lms/djangoapps/debug/management/commands/dump_xml_courses.py +++ b/lms/djangoapps/debug/management/commands/dump_xml_courses.py @@ -7,7 +7,7 @@ each as a separate output file containing the json representation of each of its fields (including those fields that are set as default values). """ -from __future__ import absolute_import, print_function + import json diff --git a/lms/djangoapps/debug/views.py b/lms/djangoapps/debug/views.py index 4cc4c37579..be176d12fe 100644 --- a/lms/djangoapps/debug/views.py +++ b/lms/djangoapps/debug/views.py @@ -1,6 +1,6 @@ """Views for debugging and diagnostics""" -from __future__ import absolute_import + import pprint import traceback diff --git a/lms/djangoapps/discussion/apps.py b/lms/djangoapps/discussion/apps.py index 7aa94c6bda..344b3d3e26 100644 --- a/lms/djangoapps/discussion/apps.py +++ b/lms/djangoapps/discussion/apps.py @@ -4,7 +4,7 @@ Discussion Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/discussion/config/__init__.py b/lms/djangoapps/discussion/config/__init__.py index 7f46f757f3..a6be6b717d 100644 --- a/lms/djangoapps/discussion/config/__init__.py +++ b/lms/djangoapps/discussion/config/__init__.py @@ -2,7 +2,7 @@ Discussion settings and flags. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace diff --git a/lms/djangoapps/discussion/django_comment_client/base/__init__.py b/lms/djangoapps/discussion/django_comment_client/base/__init__.py index d7ed6d3e7e..6fb9c4756b 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/__init__.py +++ b/lms/djangoapps/discussion/django_comment_client/base/__init__.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring # This import registers the ForumThreadViewedEventTransformer -from __future__ import absolute_import + from . import event_transformers diff --git a/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py b/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py index 4bb9348406..ab2f621e53 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py +++ b/lms/djangoapps/discussion/django_comment_client/base/event_transformers.py @@ -2,7 +2,7 @@ """ Transformers for Discussion-related events. """ -from __future__ import absolute_import + import six from django.contrib.auth.models import User diff --git a/lms/djangoapps/discussion/django_comment_client/base/tests.py b/lms/djangoapps/discussion/django_comment_client/base/tests.py index 3c9f502a4a..1d695e5232 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/tests.py +++ b/lms/djangoapps/discussion/django_comment_client/base/tests.py @@ -1,7 +1,7 @@ # pylint: skip-file # -*- coding: utf-8 -*- """Tests for django comment client views.""" -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/discussion/django_comment_client/base/urls.py b/lms/djangoapps/discussion/django_comment_client/base/urls.py index 27db5e925d..0ce29732b5 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/urls.py +++ b/lms/djangoapps/discussion/django_comment_client/base/urls.py @@ -1,7 +1,7 @@ """ Base urls for the django_comment_client. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/discussion/django_comment_client/base/views.py b/lms/djangoapps/discussion/django_comment_client/base/views.py index 06a4770c90..1eb4f2032c 100644 --- a/lms/djangoapps/discussion/django_comment_client/base/views.py +++ b/lms/djangoapps/discussion/django_comment_client/base/views.py @@ -1,7 +1,7 @@ # pylint: disable=missing-docstring,unused-argument """Views for discussion forums.""" -from __future__ import absolute_import, print_function + import functools import json diff --git a/lms/djangoapps/discussion/django_comment_client/middleware.py b/lms/djangoapps/discussion/django_comment_client/middleware.py index 64f1c40617..5d98540668 100644 --- a/lms/djangoapps/discussion/django_comment_client/middleware.py +++ b/lms/djangoapps/discussion/django_comment_client/middleware.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/discussion/django_comment_client/permissions.py b/lms/djangoapps/discussion/django_comment_client/permissions.py index 54b28f2e6f..8c4faee028 100644 --- a/lms/djangoapps/discussion/django_comment_client/permissions.py +++ b/lms/djangoapps/discussion/django_comment_client/permissions.py @@ -3,7 +3,7 @@ Module for checking permissions with the comment_client backend """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/discussion/django_comment_client/settings.py b/lms/djangoapps/discussion/django_comment_client/settings.py index 6d0ff850d1..d28d60efa6 100644 --- a/lms/djangoapps/discussion/django_comment_client/settings.py +++ b/lms/djangoapps/discussion/django_comment_client/settings.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from django.conf import settings diff --git a/lms/djangoapps/discussion/django_comment_client/tests/factories.py b/lms/djangoapps/discussion/django_comment_client/tests/factories.py index d8a632d1af..43090c099f 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/factories.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/factories.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from factory.django import DjangoModelFactory diff --git a/lms/djangoapps/discussion/django_comment_client/tests/group_id.py b/lms/djangoapps/discussion/django_comment_client/tests/group_id.py index 9c705a1c1c..8f4e4b9a39 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/group_id.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/group_id.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import json import re diff --git a/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/mock_cs_server.py b/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/mock_cs_server.py index c5a0f8317d..9cbfd85474 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/mock_cs_server.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/mock_cs_server.py @@ -1,5 +1,5 @@ # pylint: skip-file -from __future__ import absolute_import + import json from logging import getLogger diff --git a/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/test_mock_cs_server.py b/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/test_mock_cs_server.py index 2ba77d66fb..15277906e3 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/test_mock_cs_server.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/mock_cs_server/test_mock_cs_server.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import json import threading diff --git a/lms/djangoapps/discussion/django_comment_client/tests/test_middleware.py b/lms/djangoapps/discussion/django_comment_client/tests/test_middleware.py index 6e23ef2881..778b71e767 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/test_middleware.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/test_middleware.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/discussion/django_comment_client/tests/test_models.py b/lms/djangoapps/discussion/django_comment_client/tests/test_models.py index c4613a370a..88b311ac6e 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/test_models.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the django comment client integration models """ -from __future__ import absolute_import + from django.test.testcases import TestCase from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py b/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py index dc095c5dab..960f7997ff 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/test_utils.py @@ -1,6 +1,6 @@ # pylint: skip-file # -*- coding: utf-8 -*- -from __future__ import absolute_import + import datetime import json diff --git a/lms/djangoapps/discussion/django_comment_client/tests/utils.py b/lms/djangoapps/discussion/django_comment_client/tests/utils.py index 1abde68566..03fb9c94ca 100644 --- a/lms/djangoapps/discussion/django_comment_client/tests/utils.py +++ b/lms/djangoapps/discussion/django_comment_client/tests/utils.py @@ -1,7 +1,7 @@ """ Utilities for tests within the django_comment_client module. """ -from __future__ import absolute_import + from mock import patch diff --git a/lms/djangoapps/discussion/django_comment_client/urls.py b/lms/djangoapps/discussion/django_comment_client/urls.py index 7aa2178417..d8cf4d4db2 100644 --- a/lms/djangoapps/discussion/django_comment_client/urls.py +++ b/lms/djangoapps/discussion/django_comment_client/urls.py @@ -1,7 +1,7 @@ """ Urls for the django_comment_client. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/discussion/django_comment_client/utils.py b/lms/djangoapps/discussion/django_comment_client/utils.py index d09195116a..7708474dc2 100644 --- a/lms/djangoapps/discussion/django_comment_client/utils.py +++ b/lms/djangoapps/discussion/django_comment_client/utils.py @@ -1,5 +1,5 @@ # pylint: skip-file -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/discussion/management/commands/assign_role.py b/lms/djangoapps/discussion/management/commands/assign_role.py index ac8858604b..f306f1da90 100644 --- a/lms/djangoapps/discussion/management/commands/assign_role.py +++ b/lms/djangoapps/discussion/management/commands/assign_role.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import, print_function + from django.contrib.auth.models import User from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py b/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py index 1da283f4c5..5c589431f0 100644 --- a/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py +++ b/lms/djangoapps/discussion/management/commands/assign_roles_for_course.py @@ -5,7 +5,7 @@ This must be run only after seed_permissions_roles.py! Creates default roles for all users in the provided course. Just runs through Enrollments. """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py b/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py index 307f3f0966..154147cdfe 100644 --- a/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py +++ b/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py @@ -4,7 +4,7 @@ This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/discussion/management/commands/get_discussion_link.py b/lms/djangoapps/discussion/management/commands/get_discussion_link.py index 99b6b690e0..b5b756bfb6 100644 --- a/lms/djangoapps/discussion/management/commands/get_discussion_link.py +++ b/lms/djangoapps/discussion/management/commands/get_discussion_link.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from django.core.management.base import BaseCommand, CommandError from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/discussion/management/commands/reload_forum_users.py b/lms/djangoapps/discussion/management/commands/reload_forum_users.py index 2d5868193c..7b25b9ec8c 100644 --- a/lms/djangoapps/discussion/management/commands/reload_forum_users.py +++ b/lms/djangoapps/discussion/management/commands/reload_forum_users.py @@ -2,7 +2,7 @@ """ Reload forum (comment client) users from existing users. """ -from __future__ import absolute_import, print_function + from django.contrib.auth.models import User from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/discussion/management/commands/seed_permissions_roles.py b/lms/djangoapps/discussion/management/commands/seed_permissions_roles.py index 7bc0d0f9b2..6dc624093f 100644 --- a/lms/djangoapps/discussion/management/commands/seed_permissions_roles.py +++ b/lms/djangoapps/discussion/management/commands/seed_permissions_roles.py @@ -2,7 +2,7 @@ """ Management command to seed default permissions and roles. """ -from __future__ import absolute_import + from django.core.management.base import BaseCommand from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/discussion/management/commands/show_permissions.py b/lms/djangoapps/discussion/management/commands/show_permissions.py index fcd52ca662..88930cf9bd 100644 --- a/lms/djangoapps/discussion/management/commands/show_permissions.py +++ b/lms/djangoapps/discussion/management/commands/show_permissions.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring,too-many-format-args -from __future__ import absolute_import, print_function + from django.contrib.auth.models import User from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/discussion/management/commands/sync_user_info.py b/lms/djangoapps/discussion/management/commands/sync_user_info.py index 2de2f167ba..8b221fa353 100644 --- a/lms/djangoapps/discussion/management/commands/sync_user_info.py +++ b/lms/djangoapps/discussion/management/commands/sync_user_info.py @@ -3,7 +3,7 @@ One-off script to sync all user information to the discussion service (later info will be synced automatically) """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/discussion/notification_prefs/tests.py b/lms/djangoapps/discussion/notification_prefs/tests.py index 814bc1bcf0..d9c2e6b451 100644 --- a/lms/djangoapps/discussion/notification_prefs/tests.py +++ b/lms/djangoapps/discussion/notification_prefs/tests.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring,consider-iterating-dictionary -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/discussion/notification_prefs/views.py b/lms/djangoapps/discussion/notification_prefs/views.py index e77729425e..075b8ab753 100644 --- a/lms/djangoapps/discussion/notification_prefs/views.py +++ b/lms/djangoapps/discussion/notification_prefs/views.py @@ -3,7 +3,7 @@ Views to support notification preferences. """ -from __future__ import absolute_import, division + import json import os diff --git a/lms/djangoapps/discussion/notifier_api/serializers.py b/lms/djangoapps/discussion/notifier_api/serializers.py index eceedab956..3bcb68b8fa 100644 --- a/lms/djangoapps/discussion/notifier_api/serializers.py +++ b/lms/djangoapps/discussion/notifier_api/serializers.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import six from django.contrib.auth.models import User diff --git a/lms/djangoapps/discussion/notifier_api/tests.py b/lms/djangoapps/discussion/notifier_api/tests.py index a02b4ec6f5..6726cbe681 100644 --- a/lms/djangoapps/discussion/notifier_api/tests.py +++ b/lms/djangoapps/discussion/notifier_api/tests.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import itertools diff --git a/lms/djangoapps/discussion/notifier_api/urls.py b/lms/djangoapps/discussion/notifier_api/urls.py index 62d8eff7aa..844ce8f5a2 100644 --- a/lms/djangoapps/discussion/notifier_api/urls.py +++ b/lms/djangoapps/discussion/notifier_api/urls.py @@ -2,7 +2,7 @@ URLs for the notifier api app """ -from __future__ import absolute_import + from django.conf.urls import include, url from rest_framework import routers diff --git a/lms/djangoapps/discussion/notifier_api/views.py b/lms/djangoapps/discussion/notifier_api/views.py index 18059865c7..de25b178ec 100644 --- a/lms/djangoapps/discussion/notifier_api/views.py +++ b/lms/djangoapps/discussion/notifier_api/views.py @@ -1,7 +1,7 @@ """ Django views for the Notifier. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from rest_framework import pagination diff --git a/lms/djangoapps/discussion/plugins.py b/lms/djangoapps/discussion/plugins.py index c64d409763..1fb4dc48a7 100644 --- a/lms/djangoapps/discussion/plugins.py +++ b/lms/djangoapps/discussion/plugins.py @@ -2,7 +2,7 @@ Views handling read (GET) requests for the Discussion tab and inline discussions. """ -from __future__ import absolute_import + from django.conf import settings from django.utils.translation import ugettext_noop diff --git a/lms/djangoapps/discussion/rest_api/api.py b/lms/djangoapps/discussion/rest_api/api.py index 1683dca114..20c251c51a 100644 --- a/lms/djangoapps/discussion/rest_api/api.py +++ b/lms/djangoapps/discussion/rest_api/api.py @@ -1,7 +1,7 @@ """ Discussion API internal interface """ -from __future__ import absolute_import + import itertools from collections import defaultdict diff --git a/lms/djangoapps/discussion/rest_api/exceptions.py b/lms/djangoapps/discussion/rest_api/exceptions.py index 715e67feec..d7c8e981ce 100644 --- a/lms/djangoapps/discussion/rest_api/exceptions.py +++ b/lms/djangoapps/discussion/rest_api/exceptions.py @@ -1,5 +1,5 @@ """ Errors used by the Discussion API. """ -from __future__ import absolute_import + from django.core.exceptions import ObjectDoesNotExist diff --git a/lms/djangoapps/discussion/rest_api/forms.py b/lms/djangoapps/discussion/rest_api/forms.py index d0a995473e..05b1f367dc 100644 --- a/lms/djangoapps/discussion/rest_api/forms.py +++ b/lms/djangoapps/discussion/rest_api/forms.py @@ -1,7 +1,7 @@ """ Discussion API forms """ -from __future__ import absolute_import + import six.moves.urllib.error # pylint: disable=import-error import six.moves.urllib.parse # pylint: disable=import-error diff --git a/lms/djangoapps/discussion/rest_api/pagination.py b/lms/djangoapps/discussion/rest_api/pagination.py index 7b1a2b4673..420150baa7 100644 --- a/lms/djangoapps/discussion/rest_api/pagination.py +++ b/lms/djangoapps/discussion/rest_api/pagination.py @@ -1,7 +1,7 @@ """ Discussion API pagination support """ -from __future__ import absolute_import + from edx_rest_framework_extensions.paginators import NamespacedPageNumberPagination from rest_framework.utils.urls import replace_query_param diff --git a/lms/djangoapps/discussion/rest_api/permissions.py b/lms/djangoapps/discussion/rest_api/permissions.py index 13de2c32ca..e3c32689e2 100644 --- a/lms/djangoapps/discussion/rest_api/permissions.py +++ b/lms/djangoapps/discussion/rest_api/permissions.py @@ -1,7 +1,7 @@ """ Discussion API permission logic """ -from __future__ import absolute_import + from openedx.core.djangoapps.django_comment_common.comment_client.comment import Comment from openedx.core.djangoapps.django_comment_common.comment_client.thread import Thread diff --git a/lms/djangoapps/discussion/rest_api/render.py b/lms/djangoapps/discussion/rest_api/render.py index 236fb7213f..d2d52b2074 100644 --- a/lms/djangoapps/discussion/rest_api/render.py +++ b/lms/djangoapps/discussion/rest_api/render.py @@ -4,7 +4,7 @@ Content rendering functionality Note that this module is designed to imitate the front end behavior as implemented in Markdown.Sanitizer.js. """ -from __future__ import absolute_import + import re diff --git a/lms/djangoapps/discussion/rest_api/serializers.py b/lms/djangoapps/discussion/rest_api/serializers.py index c37a3efc78..51fbb5a3cc 100644 --- a/lms/djangoapps/discussion/rest_api/serializers.py +++ b/lms/djangoapps/discussion/rest_api/serializers.py @@ -1,7 +1,7 @@ """ Discussion API serializers """ -from __future__ import absolute_import + from django.contrib.auth.models import User as DjangoUser from django.core.exceptions import ValidationError diff --git a/lms/djangoapps/discussion/rest_api/tests/test_api.py b/lms/djangoapps/discussion/rest_api/tests/test_api.py index ee8d7486e1..58feaa85d3 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_api.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests for Discussion API internal interface """ -from __future__ import absolute_import + import itertools from datetime import datetime, timedelta diff --git a/lms/djangoapps/discussion/rest_api/tests/test_forms.py b/lms/djangoapps/discussion/rest_api/tests/test_forms.py index 559c436d06..8afb23ee86 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_forms.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_forms.py @@ -1,7 +1,7 @@ """ Tests for Discussion API forms """ -from __future__ import absolute_import + import itertools from unittest import TestCase diff --git a/lms/djangoapps/discussion/rest_api/tests/test_pagination.py b/lms/djangoapps/discussion/rest_api/tests/test_pagination.py index 2dfd7ddc7c..58811304d2 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_pagination.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_pagination.py @@ -1,7 +1,7 @@ """ Tests for Discussion API pagination support """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/lms/djangoapps/discussion/rest_api/tests/test_permissions.py b/lms/djangoapps/discussion/rest_api/tests/test_permissions.py index 0cec1ca8ce..e637a795e2 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_permissions.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_permissions.py @@ -1,7 +1,7 @@ """ Tests for discussion API permission logic """ -from __future__ import absolute_import + import itertools diff --git a/lms/djangoapps/discussion/rest_api/tests/test_render.py b/lms/djangoapps/discussion/rest_api/tests/test_render.py index fba3a90670..e17f2fa15f 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_render.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_render.py @@ -1,7 +1,7 @@ """ Tests for content rendering """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/lms/djangoapps/discussion/rest_api/tests/test_serializers.py b/lms/djangoapps/discussion/rest_api/tests/test_serializers.py index 604b506d9b..c56ef80abf 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_serializers.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_serializers.py @@ -1,7 +1,7 @@ """ Tests for Discussion API serializers """ -from __future__ import absolute_import + import itertools diff --git a/lms/djangoapps/discussion/rest_api/tests/test_views.py b/lms/djangoapps/discussion/rest_api/tests/test_views.py index fe770a8b9d..7ad1527a64 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_views.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for Discussion API views """ -from __future__ import absolute_import, unicode_literals + import json from datetime import datetime diff --git a/lms/djangoapps/discussion/rest_api/tests/utils.py b/lms/djangoapps/discussion/rest_api/tests/utils.py index 126f2d2515..172e04e839 100644 --- a/lms/djangoapps/discussion/rest_api/tests/utils.py +++ b/lms/djangoapps/discussion/rest_api/tests/utils.py @@ -1,7 +1,7 @@ """ Discussion API test utilities """ -from __future__ import absolute_import, unicode_literals + import hashlib import json diff --git a/lms/djangoapps/discussion/rest_api/urls.py b/lms/djangoapps/discussion/rest_api/urls.py index bdf15f42cf..5978a94885 100644 --- a/lms/djangoapps/discussion/rest_api/urls.py +++ b/lms/djangoapps/discussion/rest_api/urls.py @@ -2,7 +2,7 @@ """ Discussion API URLs """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/lms/djangoapps/discussion/rest_api/views.py b/lms/djangoapps/discussion/rest_api/views.py index e534872c0b..f3a10af27f 100644 --- a/lms/djangoapps/discussion/rest_api/views.py +++ b/lms/djangoapps/discussion/rest_api/views.py @@ -1,7 +1,7 @@ """ Discussion API views """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/discussion/signals/handlers.py b/lms/djangoapps/discussion/signals/handlers.py index 0e9334f8b4..4515ffcf50 100644 --- a/lms/djangoapps/discussion/signals/handlers.py +++ b/lms/djangoapps/discussion/signals/handlers.py @@ -1,7 +1,7 @@ """ Signal handlers related to discussions. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/discussion/tasks.py b/lms/djangoapps/discussion/tasks.py index 537d861b1c..212814085f 100644 --- a/lms/djangoapps/discussion/tasks.py +++ b/lms/djangoapps/discussion/tasks.py @@ -2,7 +2,7 @@ Defines asynchronous celery task for sending email notification (through edx-ace) pertaining to new discussion forum comments. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/discussion/tests/test_signals.py b/lms/djangoapps/discussion/tests/test_signals.py index 9794d5ce09..f30a422e0a 100644 --- a/lms/djangoapps/discussion/tests/test_signals.py +++ b/lms/djangoapps/discussion/tests/test_signals.py @@ -1,7 +1,7 @@ """ Tests the forum notification signals. """ -from __future__ import absolute_import + import mock from django.test import TestCase diff --git a/lms/djangoapps/discussion/tests/test_tasks.py b/lms/djangoapps/discussion/tests/test_tasks.py index cb57fbf127..c6a8b64ebb 100644 --- a/lms/djangoapps/discussion/tests/test_tasks.py +++ b/lms/djangoapps/discussion/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Tests the execution of forum notification tasks. """ -from __future__ import absolute_import + import json import math diff --git a/lms/djangoapps/discussion/tests/test_views.py b/lms/djangoapps/discussion/tests/test_views.py index d1c3944b0c..2e95e16427 100644 --- a/lms/djangoapps/discussion/tests/test_views.py +++ b/lms/djangoapps/discussion/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests the forum notification views. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/discussion/urls.py b/lms/djangoapps/discussion/urls.py index 82593824aa..e0fb48e475 100644 --- a/lms/djangoapps/discussion/urls.py +++ b/lms/djangoapps/discussion/urls.py @@ -1,7 +1,7 @@ """ Forum urls for the django_comment_client. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/discussion/views.py b/lms/djangoapps/discussion/views.py index 5d43d4ade5..a4bb67aab4 100644 --- a/lms/djangoapps/discussion/views.py +++ b/lms/djangoapps/discussion/views.py @@ -1,7 +1,7 @@ """ Views handling read (GET) requests for the Discussion tab and inline discussions. """ -from __future__ import absolute_import, print_function + import logging from functools import wraps diff --git a/lms/djangoapps/edxnotes/api_urls.py b/lms/djangoapps/edxnotes/api_urls.py index 7da89076ea..bcf0984c29 100644 --- a/lms/djangoapps/edxnotes/api_urls.py +++ b/lms/djangoapps/edxnotes/api_urls.py @@ -1,7 +1,7 @@ """ API URLs for EdxNotes """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/edxnotes/decorators.py b/lms/djangoapps/edxnotes/decorators.py index 007b8a05ba..768a275398 100644 --- a/lms/djangoapps/edxnotes/decorators.py +++ b/lms/djangoapps/edxnotes/decorators.py @@ -2,7 +2,7 @@ Decorators related to edXNotes. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/edxnotes/helpers.py b/lms/djangoapps/edxnotes/helpers.py index 58cc7bb78f..9a79a7a923 100644 --- a/lms/djangoapps/edxnotes/helpers.py +++ b/lms/djangoapps/edxnotes/helpers.py @@ -1,7 +1,7 @@ """ Helper methods related to EdxNotes. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/edxnotes/plugins.py b/lms/djangoapps/edxnotes/plugins.py index 87e60fd3d7..45f468121f 100644 --- a/lms/djangoapps/edxnotes/plugins.py +++ b/lms/djangoapps/edxnotes/plugins.py @@ -1,7 +1,7 @@ """ Registers the "edX Notes" feature for the edX platform. """ -from __future__ import absolute_import + from django.conf import settings from django.utils.translation import ugettext_noop diff --git a/lms/djangoapps/edxnotes/tests.py b/lms/djangoapps/edxnotes/tests.py index 1faf285239..de11662ddd 100644 --- a/lms/djangoapps/edxnotes/tests.py +++ b/lms/djangoapps/edxnotes/tests.py @@ -1,7 +1,7 @@ """ Tests for the EdxNotes app. """ -from __future__ import absolute_import + import json from contextlib import contextmanager diff --git a/lms/djangoapps/edxnotes/urls.py b/lms/djangoapps/edxnotes/urls.py index 8666561ee3..62b05a89ac 100644 --- a/lms/djangoapps/edxnotes/urls.py +++ b/lms/djangoapps/edxnotes/urls.py @@ -1,7 +1,7 @@ """ URLs for EdxNotes. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/edxnotes/views.py b/lms/djangoapps/edxnotes/views.py index 818b34cd7d..600a11d8fa 100644 --- a/lms/djangoapps/edxnotes/views.py +++ b/lms/djangoapps/edxnotes/views.py @@ -1,7 +1,7 @@ """ Views related to EdxNotes. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/email_marketing/admin.py b/lms/djangoapps/email_marketing/admin.py index d877c2905a..7665819c0b 100644 --- a/lms/djangoapps/email_marketing/admin.py +++ b/lms/djangoapps/email_marketing/admin.py @@ -1,6 +1,6 @@ """ Admin site bindings for email marketing """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/email_marketing/apps.py b/lms/djangoapps/email_marketing/apps.py index 8ccb836709..246ea5243b 100644 --- a/lms/djangoapps/email_marketing/apps.py +++ b/lms/djangoapps/email_marketing/apps.py @@ -1,7 +1,7 @@ """ Configuration for the email_marketing Django application. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/email_marketing/migrations/0001_initial.py b/lms/djangoapps/email_marketing/migrations/0001_initial.py index 7a16f87de3..e5f0a24476 100644 --- a/lms/djangoapps/email_marketing/migrations/0001_initial.py +++ b/lms/djangoapps/email_marketing/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py b/lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py index b81815ff5f..73df493754 100644 --- a/lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py +++ b/lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py b/lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py index cbc49f3d5a..40b727bef9 100644 --- a/lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py +++ b/lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py b/lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py index f07a692bf0..f603b7297d 100644 --- a/lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py +++ b/lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py b/lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py index 30c365178b..3a1d82dfc8 100644 --- a/lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py +++ b/lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py b/lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py index 54b0793348..7ed6b3d45f 100644 --- a/lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py +++ b/lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py b/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py index 017c2eff9d..a417fe4f27 100644 --- a/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py +++ b/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py b/lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py index 653c6d2e68..69a0bff8fa 100644 --- a/lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py +++ b/lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py b/lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py index 9dbc041297..f5abbb5352 100644 --- a/lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py +++ b/lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py b/lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py index 4514391dac..27f2c9ab39 100644 --- a/lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py +++ b/lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-25 12:00 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/email_marketing/models.py b/lms/djangoapps/email_marketing/models.py index 1822a18bd6..de217c2930 100644 --- a/lms/djangoapps/email_marketing/models.py +++ b/lms/djangoapps/email_marketing/models.py @@ -1,7 +1,7 @@ """ Email-marketing-related models. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db import models diff --git a/lms/djangoapps/email_marketing/signals.py b/lms/djangoapps/email_marketing/signals.py index 21d80928ca..76271d45c9 100644 --- a/lms/djangoapps/email_marketing/signals.py +++ b/lms/djangoapps/email_marketing/signals.py @@ -1,7 +1,7 @@ """ This module contains signals needed for email integration """ -from __future__ import absolute_import + import datetime import logging diff --git a/lms/djangoapps/email_marketing/tasks.py b/lms/djangoapps/email_marketing/tasks.py index 6309dc2d23..47c7d52dca 100644 --- a/lms/djangoapps/email_marketing/tasks.py +++ b/lms/djangoapps/email_marketing/tasks.py @@ -2,7 +2,7 @@ This file contains celery tasks for email marketing signal handler. """ -from __future__ import absolute_import + import logging import time diff --git a/lms/djangoapps/email_marketing/tests/test_signals.py b/lms/djangoapps/email_marketing/tests/test_signals.py index 77b5dc4584..879f3680af 100644 --- a/lms/djangoapps/email_marketing/tests/test_signals.py +++ b/lms/djangoapps/email_marketing/tests/test_signals.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests of email marketing signal handlers.""" -from __future__ import absolute_import + import datetime import logging diff --git a/lms/djangoapps/experiments/admin.py b/lms/djangoapps/experiments/admin.py index 2be829a0c1..6f96735dd7 100644 --- a/lms/djangoapps/experiments/admin.py +++ b/lms/djangoapps/experiments/admin.py @@ -1,7 +1,7 @@ """ Experimentation admin config """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/lms/djangoapps/experiments/factories.py b/lms/djangoapps/experiments/factories.py index e818deb558..c4d501e8ed 100644 --- a/lms/djangoapps/experiments/factories.py +++ b/lms/djangoapps/experiments/factories.py @@ -1,7 +1,7 @@ """ Experimentation factories """ -from __future__ import absolute_import + import factory import factory.fuzzy diff --git a/lms/djangoapps/experiments/filters.py b/lms/djangoapps/experiments/filters.py index 00919ed843..38c43e0cc1 100644 --- a/lms/djangoapps/experiments/filters.py +++ b/lms/djangoapps/experiments/filters.py @@ -1,7 +1,7 @@ """ Experimentation filters """ -from __future__ import absolute_import + import django_filters diff --git a/lms/djangoapps/experiments/migrations/0001_initial.py b/lms/djangoapps/experiments/migrations/0001_initial.py index db0d360c13..5529da6d4b 100644 --- a/lms/djangoapps/experiments/migrations/0001_initial.py +++ b/lms/djangoapps/experiments/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models from django.conf import settings import django.utils.timezone diff --git a/lms/djangoapps/experiments/migrations/0002_auto_20170627_1402.py b/lms/djangoapps/experiments/migrations/0002_auto_20170627_1402.py index 8bf323d605..f5b4271682 100644 --- a/lms/djangoapps/experiments/migrations/0002_auto_20170627_1402.py +++ b/lms/djangoapps/experiments/migrations/0002_auto_20170627_1402.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import django.utils.timezone import model_utils.fields diff --git a/lms/djangoapps/experiments/migrations/0003_auto_20170713_1148.py b/lms/djangoapps/experiments/migrations/0003_auto_20170713_1148.py index a367964fe6..c9a89a6e06 100644 --- a/lms/djangoapps/experiments/migrations/0003_auto_20170713_1148.py +++ b/lms/djangoapps/experiments/migrations/0003_auto_20170713_1148.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models diff --git a/lms/djangoapps/experiments/models.py b/lms/djangoapps/experiments/models.py index 6a2d62e993..6228362f14 100644 --- a/lms/djangoapps/experiments/models.py +++ b/lms/djangoapps/experiments/models.py @@ -1,7 +1,7 @@ """ Experimentation models """ -from __future__ import absolute_import + from django.conf import settings from django.db import models diff --git a/lms/djangoapps/experiments/permissions.py b/lms/djangoapps/experiments/permissions.py index 48fe79a99a..165a0d4706 100644 --- a/lms/djangoapps/experiments/permissions.py +++ b/lms/djangoapps/experiments/permissions.py @@ -1,7 +1,7 @@ """ Experimentation permissions """ -from __future__ import absolute_import + from rest_framework.permissions import SAFE_METHODS, BasePermission diff --git a/lms/djangoapps/experiments/routers.py b/lms/djangoapps/experiments/routers.py index e11fb17ade..36b69842f3 100644 --- a/lms/djangoapps/experiments/routers.py +++ b/lms/djangoapps/experiments/routers.py @@ -1,7 +1,7 @@ """ Experimentation routers """ -from __future__ import absolute_import + from rest_framework import routers from rest_framework.routers import DynamicDetailRoute, DynamicListRoute, Route diff --git a/lms/djangoapps/experiments/serializers.py b/lms/djangoapps/experiments/serializers.py index 8e516722da..e9851d5745 100644 --- a/lms/djangoapps/experiments/serializers.py +++ b/lms/djangoapps/experiments/serializers.py @@ -1,7 +1,7 @@ """ Experimentation serializers """ -from __future__ import absolute_import + from django.contrib.auth import get_user_model from rest_framework import serializers diff --git a/lms/djangoapps/experiments/tests/test_utils.py b/lms/djangoapps/experiments/tests/test_utils.py index 13535a0177..8e3881de68 100644 --- a/lms/djangoapps/experiments/tests/test_utils.py +++ b/lms/djangoapps/experiments/tests/test_utils.py @@ -1,7 +1,7 @@ """ Tests of experiment functionality """ -from __future__ import absolute_import + from decimal import Decimal from unittest import TestCase diff --git a/lms/djangoapps/experiments/tests/test_views.py b/lms/djangoapps/experiments/tests/test_views.py index caff5e5fc6..510316d789 100644 --- a/lms/djangoapps/experiments/tests/test_views.py +++ b/lms/djangoapps/experiments/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for experimentation views """ -from __future__ import absolute_import + import unittest diff --git a/lms/djangoapps/experiments/tests/test_views_custom.py b/lms/djangoapps/experiments/tests/test_views_custom.py index c59dbc17f6..7ea972bd16 100644 --- a/lms/djangoapps/experiments/tests/test_views_custom.py +++ b/lms/djangoapps/experiments/tests/test_views_custom.py @@ -1,7 +1,7 @@ """ Tests for experimentation views """ -from __future__ import absolute_import + from datetime import timedelta from uuid import uuid4 diff --git a/lms/djangoapps/experiments/urls.py b/lms/djangoapps/experiments/urls.py index f0a013611c..738dc8dd1c 100644 --- a/lms/djangoapps/experiments/urls.py +++ b/lms/djangoapps/experiments/urls.py @@ -1,7 +1,7 @@ """ Experimentation URLs """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/experiments/utils.py b/lms/djangoapps/experiments/utils.py index 4adf53eba5..2a82764297 100644 --- a/lms/djangoapps/experiments/utils.py +++ b/lms/djangoapps/experiments/utils.py @@ -2,7 +2,7 @@ Utilities to facilitate experimentation """ -from __future__ import absolute_import + import logging from decimal import Decimal diff --git a/lms/djangoapps/experiments/views.py b/lms/djangoapps/experiments/views.py index f752451fd4..43300d4df1 100644 --- a/lms/djangoapps/experiments/views.py +++ b/lms/djangoapps/experiments/views.py @@ -1,7 +1,7 @@ """ Experimentation views """ -from __future__ import absolute_import + from django.contrib.auth import get_user_model from django.db import transaction diff --git a/lms/djangoapps/experiments/views_custom.py b/lms/djangoapps/experiments/views_custom.py index 15b169d22f..99d20d8fac 100644 --- a/lms/djangoapps/experiments/views_custom.py +++ b/lms/djangoapps/experiments/views_custom.py @@ -4,7 +4,7 @@ The Discount API Views should return information about discounts that apply to t """ # -*- coding: utf-8 -*- -from __future__ import absolute_import + import six from django.utils.decorators import method_decorator diff --git a/lms/djangoapps/gating/api.py b/lms/djangoapps/gating/api.py index 260b0ddda0..2253a30b7e 100644 --- a/lms/djangoapps/gating/api.py +++ b/lms/djangoapps/gating/api.py @@ -1,7 +1,7 @@ """ API for the gating djangoapp """ -from __future__ import absolute_import + import logging from collections import defaultdict diff --git a/lms/djangoapps/gating/apps.py b/lms/djangoapps/gating/apps.py index 3845ac6b8d..efb4b92a32 100644 --- a/lms/djangoapps/gating/apps.py +++ b/lms/djangoapps/gating/apps.py @@ -1,7 +1,7 @@ """ Django AppConfig module for the Gating app """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/gating/signals.py b/lms/djangoapps/gating/signals.py index 00e17af2d4..36085996f6 100644 --- a/lms/djangoapps/gating/signals.py +++ b/lms/djangoapps/gating/signals.py @@ -1,7 +1,7 @@ """ Signal handlers for the gating djangoapp """ -from __future__ import absolute_import + import six from completion.models import BlockCompletion diff --git a/lms/djangoapps/gating/tasks.py b/lms/djangoapps/gating/tasks.py index c0e27a5660..2072967612 100644 --- a/lms/djangoapps/gating/tasks.py +++ b/lms/djangoapps/gating/tasks.py @@ -1,7 +1,7 @@ """ This file contains celery tasks related to course content gating. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/gating/tests/test_api.py b/lms/djangoapps/gating/tests/test_api.py index 02f8cb4299..4256e2aa0e 100644 --- a/lms/djangoapps/gating/tests/test_api.py +++ b/lms/djangoapps/gating/tests/test_api.py @@ -1,7 +1,7 @@ """ Unit tests for gating.signals module """ -from __future__ import absolute_import + from ddt import data, ddt, unpack from milestones import api as milestones_api diff --git a/lms/djangoapps/gating/tests/test_integration.py b/lms/djangoapps/gating/tests/test_integration.py index 2cf3254f87..49d278f25e 100644 --- a/lms/djangoapps/gating/tests/test_integration.py +++ b/lms/djangoapps/gating/tests/test_integration.py @@ -1,7 +1,7 @@ """ Integration tests for gated content. """ -from __future__ import absolute_import + import ddt from completion import waffle as completion_waffle diff --git a/lms/djangoapps/gating/tests/test_signals.py b/lms/djangoapps/gating/tests/test_signals.py index d04df3c717..231c420de4 100644 --- a/lms/djangoapps/gating/tests/test_signals.py +++ b/lms/djangoapps/gating/tests/test_signals.py @@ -1,7 +1,7 @@ """ Unit tests for gating.signals module """ -from __future__ import absolute_import + from mock import Mock, patch diff --git a/lms/djangoapps/grades/admin.py b/lms/djangoapps/grades/admin.py index 255b4c1098..8405fee792 100644 --- a/lms/djangoapps/grades/admin.py +++ b/lms/djangoapps/grades/admin.py @@ -1,7 +1,7 @@ """ Django admin page for grades models """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/grades/api.py b/lms/djangoapps/grades/api.py index 1d438bfff5..92ad492f56 100644 --- a/lms/djangoapps/grades/api.py +++ b/lms/djangoapps/grades/api.py @@ -2,7 +2,7 @@ """ Python APIs exposed by the grades app to other in-process apps. """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime diff --git a/lms/djangoapps/grades/apps.py b/lms/djangoapps/grades/apps.py index b2a835fa3e..8088278706 100644 --- a/lms/djangoapps/grades/apps.py +++ b/lms/djangoapps/grades/apps.py @@ -4,7 +4,7 @@ Grades Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig from django.conf import settings diff --git a/lms/djangoapps/grades/config/__init__.py b/lms/djangoapps/grades/config/__init__.py index d41f9b6514..829277576a 100644 --- a/lms/djangoapps/grades/config/__init__.py +++ b/lms/djangoapps/grades/config/__init__.py @@ -1,7 +1,7 @@ """ Defines grading configuration. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/lms/djangoapps/grades/config/forms.py b/lms/djangoapps/grades/config/forms.py index 7f79f0cdf4..9be433678e 100644 --- a/lms/djangoapps/grades/config/forms.py +++ b/lms/djangoapps/grades/config/forms.py @@ -1,7 +1,7 @@ """ Defines a form for providing validation of subsection grade templates. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/grades/config/models.py b/lms/djangoapps/grades/config/models.py index 24f6024d95..94b814c25f 100644 --- a/lms/djangoapps/grades/config/models.py +++ b/lms/djangoapps/grades/config/models.py @@ -2,7 +2,7 @@ Models for configuration of the feature flags controlling persistent grades. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.conf import settings diff --git a/lms/djangoapps/grades/config/tests/test_models.py b/lms/djangoapps/grades/config/tests/test_models.py index 1db4a3ef9c..f555497e67 100644 --- a/lms/djangoapps/grades/config/tests/test_models.py +++ b/lms/djangoapps/grades/config/tests/test_models.py @@ -2,7 +2,7 @@ Tests for the models that control the persistent grading feature. """ -from __future__ import absolute_import + import itertools diff --git a/lms/djangoapps/grades/config/tests/utils.py b/lms/djangoapps/grades/config/tests/utils.py index afc60f875b..b019b73a28 100644 --- a/lms/djangoapps/grades/config/tests/utils.py +++ b/lms/djangoapps/grades/config/tests/utils.py @@ -2,7 +2,7 @@ Provides helper functions for tests that want to configure flags related to persistent grading. """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/lms/djangoapps/grades/config/waffle.py b/lms/djangoapps/grades/config/waffle.py index 46e8536329..f209bf1aaa 100644 --- a/lms/djangoapps/grades/config/waffle.py +++ b/lms/djangoapps/grades/config/waffle.py @@ -2,7 +2,7 @@ This module contains various configuration settings via waffle switches for the Grades app. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlagNamespace, WaffleSwitchNamespace diff --git a/lms/djangoapps/grades/context.py b/lms/djangoapps/grades/context.py index 241ec2793b..210fddb73b 100644 --- a/lms/djangoapps/grades/context.py +++ b/lms/djangoapps/grades/context.py @@ -1,7 +1,7 @@ """ Grading Context """ -from __future__ import absolute_import + from collections import OrderedDict diff --git a/lms/djangoapps/grades/course_data.py b/lms/djangoapps/grades/course_data.py index 4d2aad6774..a620b2d812 100644 --- a/lms/djangoapps/grades/course_data.py +++ b/lms/djangoapps/grades/course_data.py @@ -2,7 +2,7 @@ Code used to get and cache the requested course-data """ -from __future__ import absolute_import + from django.utils.encoding import python_2_unicode_compatible diff --git a/lms/djangoapps/grades/course_grade.py b/lms/djangoapps/grades/course_grade.py index fb8181d7da..eef617f162 100644 --- a/lms/djangoapps/grades/course_grade.py +++ b/lms/djangoapps/grades/course_grade.py @@ -1,7 +1,7 @@ """ CourseGrade Class """ -from __future__ import absolute_import + from abc import abstractmethod from collections import OrderedDict, defaultdict diff --git a/lms/djangoapps/grades/course_grade_factory.py b/lms/djangoapps/grades/course_grade_factory.py index 73251008c9..87f3edc8b8 100644 --- a/lms/djangoapps/grades/course_grade_factory.py +++ b/lms/djangoapps/grades/course_grade_factory.py @@ -1,7 +1,7 @@ """ Course Grade Factory Class """ -from __future__ import absolute_import + from collections import namedtuple from logging import getLogger diff --git a/lms/djangoapps/grades/events.py b/lms/djangoapps/grades/events.py index 55751f5bcc..6f55ab177c 100644 --- a/lms/djangoapps/grades/events.py +++ b/lms/djangoapps/grades/events.py @@ -1,7 +1,7 @@ """ Emits course grade events. """ -from __future__ import absolute_import + import six from crum import get_current_user diff --git a/lms/djangoapps/grades/grade_utils.py b/lms/djangoapps/grades/grade_utils.py index a76e326aa1..cd432c9e2d 100644 --- a/lms/djangoapps/grades/grade_utils.py +++ b/lms/djangoapps/grades/grade_utils.py @@ -1,7 +1,7 @@ """ This module contains utility functions for grading. """ -from __future__ import absolute_import, unicode_literals + import logging from datetime import timedelta diff --git a/lms/djangoapps/grades/management/commands/compute_grades.py b/lms/djangoapps/grades/management/commands/compute_grades.py index 2271614649..45da8e340f 100644 --- a/lms/djangoapps/grades/management/commands/compute_grades.py +++ b/lms/djangoapps/grades/management/commands/compute_grades.py @@ -2,7 +2,7 @@ Command to compute all grades for specified courses. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import hashlib import logging diff --git a/lms/djangoapps/grades/management/commands/recalculate_learner_grades.py b/lms/djangoapps/grades/management/commands/recalculate_learner_grades.py index af54b945e0..813e483ebb 100644 --- a/lms/djangoapps/grades/management/commands/recalculate_learner_grades.py +++ b/lms/djangoapps/grades/management/commands/recalculate_learner_grades.py @@ -3,7 +3,7 @@ Command to recalculate a user's grades for a course, for every user in a csv of (user, course) pairs. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import csv diff --git a/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py b/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py index a1f6948c11..ca9fa750f2 100644 --- a/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py +++ b/lms/djangoapps/grades/management/commands/recalculate_subsection_grades.py @@ -3,7 +3,7 @@ Command to recalculate grades for all subsections with problem submissions in the specified time range. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging from datetime import datetime diff --git a/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py b/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py index 7c057fbe31..513810a199 100644 --- a/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py +++ b/lms/djangoapps/grades/management/commands/tests/test_compute_grades.py @@ -4,7 +4,7 @@ Tests for compute_grades management command. # pylint: disable=protected-access -from __future__ import absolute_import, division, print_function, unicode_literals + import ddt import six diff --git a/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py b/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py index 4a2a0ce663..04e089efb4 100644 --- a/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py +++ b/lms/djangoapps/grades/management/commands/tests/test_recalculate_learner_grades.py @@ -2,7 +2,7 @@ Tests for recalculate_learner_grades management command. """ -from __future__ import absolute_import + from tempfile import NamedTemporaryFile diff --git a/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py b/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py index 41a5ca40ee..f978b30c14 100644 --- a/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py +++ b/lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py @@ -2,7 +2,7 @@ Tests for reset_grades management command. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/grades/migrations/0001_initial.py b/lms/djangoapps/grades/migrations/0001_initial.py index 02d42f52e1..313c647f0f 100644 --- a/lms/djangoapps/grades/migrations/0001_initial.py +++ b/lms/djangoapps/grades/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/lms/djangoapps/grades/migrations/0002_rename_last_edited_field.py b/lms/djangoapps/grades/migrations/0002_rename_last_edited_field.py index 14c71a41ce..01693ec507 100644 --- a/lms/djangoapps/grades/migrations/0002_rename_last_edited_field.py +++ b/lms/djangoapps/grades/migrations/0002_rename_last_edited_field.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0003_coursepersistentgradesflag_persistentgradesenabledflag.py b/lms/djangoapps/grades/migrations/0003_coursepersistentgradesflag_persistentgradesenabledflag.py index f935523f4a..419e388ac5 100644 --- a/lms/djangoapps/grades/migrations/0003_coursepersistentgradesflag_persistentgradesenabledflag.py +++ b/lms/djangoapps/grades/migrations/0003_coursepersistentgradesflag_persistentgradesenabledflag.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/grades/migrations/0004_visibleblocks_course_id.py b/lms/djangoapps/grades/migrations/0004_visibleblocks_course_id.py index 778fef458b..3119eaacb9 100644 --- a/lms/djangoapps/grades/migrations/0004_visibleblocks_course_id.py +++ b/lms/djangoapps/grades/migrations/0004_visibleblocks_course_id.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField diff --git a/lms/djangoapps/grades/migrations/0005_multiple_course_flags.py b/lms/djangoapps/grades/migrations/0005_multiple_course_flags.py index b2c4763c16..4928ff6c78 100644 --- a/lms/djangoapps/grades/migrations/0005_multiple_course_flags.py +++ b/lms/djangoapps/grades/migrations/0005_multiple_course_flags.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField diff --git a/lms/djangoapps/grades/migrations/0006_persistent_course_grades.py b/lms/djangoapps/grades/migrations/0006_persistent_course_grades.py index f5b1534932..232b801334 100644 --- a/lms/djangoapps/grades/migrations/0006_persistent_course_grades.py +++ b/lms/djangoapps/grades/migrations/0006_persistent_course_grades.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/lms/djangoapps/grades/migrations/0007_add_passed_timestamp_column.py b/lms/djangoapps/grades/migrations/0007_add_passed_timestamp_column.py index 47b456da78..9fba12b146 100644 --- a/lms/djangoapps/grades/migrations/0007_add_passed_timestamp_column.py +++ b/lms/djangoapps/grades/migrations/0007_add_passed_timestamp_column.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0008_persistentsubsectiongrade_first_attempted.py b/lms/djangoapps/grades/migrations/0008_persistentsubsectiongrade_first_attempted.py index a86c3c5c87..ca83336310 100644 --- a/lms/djangoapps/grades/migrations/0008_persistentsubsectiongrade_first_attempted.py +++ b/lms/djangoapps/grades/migrations/0008_persistentsubsectiongrade_first_attempted.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0009_auto_20170111_1507.py b/lms/djangoapps/grades/migrations/0009_auto_20170111_1507.py index eab35e6729..adfdabad60 100644 --- a/lms/djangoapps/grades/migrations/0009_auto_20170111_1507.py +++ b/lms/djangoapps/grades/migrations/0009_auto_20170111_1507.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0010_auto_20170112_1156.py b/lms/djangoapps/grades/migrations/0010_auto_20170112_1156.py index 6588c002a1..22315052a2 100644 --- a/lms/djangoapps/grades/migrations/0010_auto_20170112_1156.py +++ b/lms/djangoapps/grades/migrations/0010_auto_20170112_1156.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0011_null_edited_time.py b/lms/djangoapps/grades/migrations/0011_null_edited_time.py index 8ffb853285..3ee67cb275 100644 --- a/lms/djangoapps/grades/migrations/0011_null_edited_time.py +++ b/lms/djangoapps/grades/migrations/0011_null_edited_time.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0012_computegradessetting.py b/lms/djangoapps/grades/migrations/0012_computegradessetting.py index 275e3a79b8..ceb7a7486a 100644 --- a/lms/djangoapps/grades/migrations/0012_computegradessetting.py +++ b/lms/djangoapps/grades/migrations/0012_computegradessetting.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/grades/migrations/0013_persistentsubsectiongradeoverride.py b/lms/djangoapps/grades/migrations/0013_persistentsubsectiongradeoverride.py index 23079ea0fc..dafe50799d 100644 --- a/lms/djangoapps/grades/migrations/0013_persistentsubsectiongradeoverride.py +++ b/lms/djangoapps/grades/migrations/0013_persistentsubsectiongradeoverride.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py b/lms/djangoapps/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py index 445cb656ef..4a0554277c 100644 --- a/lms/djangoapps/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py +++ b/lms/djangoapps/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-27 20:53 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/grades/migrations/0015_historicalpersistentsubsectiongradeoverride.py b/lms/djangoapps/grades/migrations/0015_historicalpersistentsubsectiongradeoverride.py index dc8f179cc8..3def73d57f 100644 --- a/lms/djangoapps/grades/migrations/0015_historicalpersistentsubsectiongradeoverride.py +++ b/lms/djangoapps/grades/migrations/0015_historicalpersistentsubsectiongradeoverride.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-06-05 13:59 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/grades/migrations/0016_auto_20190703_1446.py b/lms/djangoapps/grades/migrations/0016_auto_20190703_1446.py index b7c21d6e61..2e31eda302 100644 --- a/lms/djangoapps/grades/migrations/0016_auto_20190703_1446.py +++ b/lms/djangoapps/grades/migrations/0016_auto_20190703_1446.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-07-03 14:46 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/grades/models.py b/lms/djangoapps/grades/models.py index b38d19f99e..5ede956a96 100644 --- a/lms/djangoapps/grades/models.py +++ b/lms/djangoapps/grades/models.py @@ -8,7 +8,7 @@ a student's score or the course grading policy changes. As they are persisted, course grades are also immune to changes in course content. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/grades/models_api.py b/lms/djangoapps/grades/models_api.py index 81046d85cc..7c3e37b34f 100644 --- a/lms/djangoapps/grades/models_api.py +++ b/lms/djangoapps/grades/models_api.py @@ -1,7 +1,7 @@ """ Provides Python APIs exposed from Grades models. """ -from __future__ import absolute_import + from opaque_keys.edx.keys import CourseKey, UsageKey diff --git a/lms/djangoapps/grades/rest_api/serializers.py b/lms/djangoapps/grades/rest_api/serializers.py index a68db6f0f6..75c91bc56f 100644 --- a/lms/djangoapps/grades/rest_api/serializers.py +++ b/lms/djangoapps/grades/rest_api/serializers.py @@ -1,7 +1,7 @@ """ API Serializers """ -from __future__ import absolute_import + from collections import defaultdict diff --git a/lms/djangoapps/grades/rest_api/urls.py b/lms/djangoapps/grades/rest_api/urls.py index 8ae2733167..a6bed7f127 100644 --- a/lms/djangoapps/grades/rest_api/urls.py +++ b/lms/djangoapps/grades/rest_api/urls.py @@ -2,7 +2,7 @@ Grades API URLs. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/grades/rest_api/v1/gradebook_views.py b/lms/djangoapps/grades/rest_api/v1/gradebook_views.py index a89664c749..b766995092 100644 --- a/lms/djangoapps/grades/rest_api/v1/gradebook_views.py +++ b/lms/djangoapps/grades/rest_api/v1/gradebook_views.py @@ -1,7 +1,7 @@ """ Defines an endpoint for gradebook data related to a course. """ -from __future__ import absolute_import + import logging from collections import namedtuple diff --git a/lms/djangoapps/grades/rest_api/v1/tests/mixins.py b/lms/djangoapps/grades/rest_api/v1/tests/mixins.py index 7b12399351..695737e2c7 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/mixins.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/mixins.py @@ -1,7 +1,7 @@ """ Mixins classes being used by all test classes within this folder """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py b/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py index 0041547ecc..6dfedd71e7 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/test_gradebook_views.py @@ -1,7 +1,7 @@ """ Tests for the course grading API view """ -from __future__ import absolute_import, unicode_literals + import json from collections import OrderedDict, namedtuple diff --git a/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py b/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py index 975e3f2399..2afd9e42c2 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/test_grading_policy_view.py @@ -1,7 +1,7 @@ """ Tests for the views """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/grades/rest_api/v1/tests/test_views.py b/lms/djangoapps/grades/rest_api/v1/tests/test_views.py index 578a59bc60..287697e8ee 100644 --- a/lms/djangoapps/grades/rest_api/v1/tests/test_views.py +++ b/lms/djangoapps/grades/rest_api/v1/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for v1 views """ -from __future__ import absolute_import, unicode_literals + from collections import OrderedDict diff --git a/lms/djangoapps/grades/rest_api/v1/urls.py b/lms/djangoapps/grades/rest_api/v1/urls.py index 2f7e6618f0..effefc7e5b 100644 --- a/lms/djangoapps/grades/rest_api/v1/urls.py +++ b/lms/djangoapps/grades/rest_api/v1/urls.py @@ -1,5 +1,5 @@ """ Grades API v1 URLs. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/grades/rest_api/v1/utils.py b/lms/djangoapps/grades/rest_api/v1/utils.py index 6e3ccd8d5c..4c2fd9af50 100644 --- a/lms/djangoapps/grades/rest_api/v1/utils.py +++ b/lms/djangoapps/grades/rest_api/v1/utils.py @@ -1,7 +1,7 @@ """ Define some view level utility functions here that multiple view modules will share """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/lms/djangoapps/grades/rest_api/v1/views.py b/lms/djangoapps/grades/rest_api/v1/views.py index 58a4d667b6..5bb66b5325 100644 --- a/lms/djangoapps/grades/rest_api/v1/views.py +++ b/lms/djangoapps/grades/rest_api/v1/views.py @@ -1,5 +1,5 @@ """ API v0 views. """ -from __future__ import absolute_import + import logging from contextlib import contextmanager diff --git a/lms/djangoapps/grades/scores.py b/lms/djangoapps/grades/scores.py index 8a30e5f14a..7ce6016eca 100644 --- a/lms/djangoapps/grades/scores.py +++ b/lms/djangoapps/grades/scores.py @@ -1,7 +1,7 @@ """ Functionality for problem scores. """ -from __future__ import absolute_import + from logging import getLogger diff --git a/lms/djangoapps/grades/services.py b/lms/djangoapps/grades/services.py index 713dc26da8..0daac4d9d1 100644 --- a/lms/djangoapps/grades/services.py +++ b/lms/djangoapps/grades/services.py @@ -1,7 +1,7 @@ """ Grade service """ -from __future__ import absolute_import + from . import api diff --git a/lms/djangoapps/grades/signals/handlers.py b/lms/djangoapps/grades/signals/handlers.py index a59643d712..6091fe27e1 100644 --- a/lms/djangoapps/grades/signals/handlers.py +++ b/lms/djangoapps/grades/signals/handlers.py @@ -1,7 +1,7 @@ """ Grades related signals. """ -from __future__ import absolute_import + from contextlib import contextmanager from logging import getLogger diff --git a/lms/djangoapps/grades/signals/signals.py b/lms/djangoapps/grades/signals/signals.py index 9b7836b5d5..3354c94b45 100644 --- a/lms/djangoapps/grades/signals/signals.py +++ b/lms/djangoapps/grades/signals/signals.py @@ -1,7 +1,7 @@ """ Grades related signals. """ -from __future__ import absolute_import + from django.dispatch import Signal diff --git a/lms/djangoapps/grades/subsection_grade.py b/lms/djangoapps/grades/subsection_grade.py index 31412e3c1c..f81d7ba383 100644 --- a/lms/djangoapps/grades/subsection_grade.py +++ b/lms/djangoapps/grades/subsection_grade.py @@ -1,7 +1,7 @@ """ SubsectionGrade Class """ -from __future__ import absolute_import + from abc import ABCMeta from collections import OrderedDict diff --git a/lms/djangoapps/grades/subsection_grade_factory.py b/lms/djangoapps/grades/subsection_grade_factory.py index 8765b503f9..cebbbd5426 100644 --- a/lms/djangoapps/grades/subsection_grade_factory.py +++ b/lms/djangoapps/grades/subsection_grade_factory.py @@ -2,7 +2,7 @@ SubsectionGrade Factory Class """ -from __future__ import absolute_import + from collections import OrderedDict from logging import getLogger diff --git a/lms/djangoapps/grades/tasks.py b/lms/djangoapps/grades/tasks.py index a3ea2dcb19..7bf06355b5 100644 --- a/lms/djangoapps/grades/tasks.py +++ b/lms/djangoapps/grades/tasks.py @@ -2,7 +2,7 @@ This module contains tasks for asynchronous execution of grade updates. """ -from __future__ import absolute_import + from logging import getLogger diff --git a/lms/djangoapps/grades/tests/base.py b/lms/djangoapps/grades/tests/base.py index bf476a9cb4..17146e1cc6 100644 --- a/lms/djangoapps/grades/tests/base.py +++ b/lms/djangoapps/grades/tests/base.py @@ -1,7 +1,7 @@ """ Base file for Grades tests """ -from __future__ import absolute_import + from crum import set_current_request diff --git a/lms/djangoapps/grades/tests/integration/test_access.py b/lms/djangoapps/grades/tests/integration/test_access.py index 08c5653b59..b426b37d10 100644 --- a/lms/djangoapps/grades/tests/integration/test_access.py +++ b/lms/djangoapps/grades/tests/integration/test_access.py @@ -1,7 +1,7 @@ """ Test grading with access changes. """ -from __future__ import absolute_import + from crum import set_current_request diff --git a/lms/djangoapps/grades/tests/integration/test_events.py b/lms/djangoapps/grades/tests/integration/test_events.py index 68a6d7f4c6..6b601669e2 100644 --- a/lms/djangoapps/grades/tests/integration/test_events.py +++ b/lms/djangoapps/grades/tests/integration/test_events.py @@ -2,7 +2,7 @@ Test grading events across apps. """ -from __future__ import absolute_import + import six from crum import set_current_request diff --git a/lms/djangoapps/grades/tests/integration/test_problems.py b/lms/djangoapps/grades/tests/integration/test_problems.py index 3c2984353e..6a659b2f2d 100644 --- a/lms/djangoapps/grades/tests/integration/test_problems.py +++ b/lms/djangoapps/grades/tests/integration/test_problems.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import datetime import itertools diff --git a/lms/djangoapps/grades/tests/test_api.py b/lms/djangoapps/grades/tests/test_api.py index eef4875e00..eb34b71166 100644 --- a/lms/djangoapps/grades/tests/test_api.py +++ b/lms/djangoapps/grades/tests/test_api.py @@ -1,6 +1,6 @@ """ Tests calling the grades api directly """ -from __future__ import absolute_import + import ddt from mock import patch diff --git a/lms/djangoapps/grades/tests/test_course_data.py b/lms/djangoapps/grades/tests/test_course_data.py index 372be7aa3d..6c54faa662 100644 --- a/lms/djangoapps/grades/tests/test_course_data.py +++ b/lms/djangoapps/grades/tests/test_course_data.py @@ -1,7 +1,7 @@ """ Tests for CourseData utility class. """ -from __future__ import absolute_import + import six from mock import patch diff --git a/lms/djangoapps/grades/tests/test_course_grade.py b/lms/djangoapps/grades/tests/test_course_grade.py index 534cb6bdd4..7520cc03f3 100644 --- a/lms/djangoapps/grades/tests/test_course_grade.py +++ b/lms/djangoapps/grades/tests/test_course_grade.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import ddt import six diff --git a/lms/djangoapps/grades/tests/test_course_grade_factory.py b/lms/djangoapps/grades/tests/test_course_grade_factory.py index e69577d209..ca5610c79e 100644 --- a/lms/djangoapps/grades/tests/test_course_grade_factory.py +++ b/lms/djangoapps/grades/tests/test_course_grade_factory.py @@ -1,7 +1,7 @@ """ Tests for the CourseGradeFactory class. """ -from __future__ import absolute_import + import itertools diff --git a/lms/djangoapps/grades/tests/test_models.py b/lms/djangoapps/grades/tests/test_models.py index 7282fbe4a8..2a071f6ba5 100644 --- a/lms/djangoapps/grades/tests/test_models.py +++ b/lms/djangoapps/grades/tests/test_models.py @@ -1,7 +1,7 @@ """ Unit tests for grades models. """ -from __future__ import absolute_import + import json from base64 import b64encode diff --git a/lms/djangoapps/grades/tests/test_scores.py b/lms/djangoapps/grades/tests/test_scores.py index 8dc43d4cc2..8e0a667674 100644 --- a/lms/djangoapps/grades/tests/test_scores.py +++ b/lms/djangoapps/grades/tests/test_scores.py @@ -1,7 +1,7 @@ """ Tests for grades.scores module. """ -from __future__ import absolute_import + import itertools # pylint: disable=protected-access diff --git a/lms/djangoapps/grades/tests/test_services.py b/lms/djangoapps/grades/tests/test_services.py index f88296f49b..5da2fea458 100644 --- a/lms/djangoapps/grades/tests/test_services.py +++ b/lms/djangoapps/grades/tests/test_services.py @@ -1,7 +1,7 @@ """ Grades Service Tests """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/grades/tests/test_signals.py b/lms/djangoapps/grades/tests/test_signals.py index 0a61cc6247..3474c85a42 100644 --- a/lms/djangoapps/grades/tests/test_signals.py +++ b/lms/djangoapps/grades/tests/test_signals.py @@ -1,7 +1,7 @@ """ Tests for the score change signals defined in the courseware models module. """ -from __future__ import absolute_import + import re from datetime import datetime diff --git a/lms/djangoapps/grades/tests/test_subsection_grade.py b/lms/djangoapps/grades/tests/test_subsection_grade.py index 2f903491d9..48b51d2619 100644 --- a/lms/djangoapps/grades/tests/test_subsection_grade.py +++ b/lms/djangoapps/grades/tests/test_subsection_grade.py @@ -1,7 +1,7 @@ """ Tests of the SubsectionGrade classes. """ -from __future__ import absolute_import + from ddt import data, ddt, unpack diff --git a/lms/djangoapps/grades/tests/test_subsection_grade_factory.py b/lms/djangoapps/grades/tests/test_subsection_grade_factory.py index 53068d855d..6e94df6741 100644 --- a/lms/djangoapps/grades/tests/test_subsection_grade_factory.py +++ b/lms/djangoapps/grades/tests/test_subsection_grade_factory.py @@ -1,7 +1,7 @@ """ Tests for the SubsectionGradeFactory class. """ -from __future__ import absolute_import + import ddt from django.conf import settings diff --git a/lms/djangoapps/grades/tests/test_tasks.py b/lms/djangoapps/grades/tests/test_tasks.py index f70441e101..7bc892aa6d 100644 --- a/lms/djangoapps/grades/tests/test_tasks.py +++ b/lms/djangoapps/grades/tests/test_tasks.py @@ -2,7 +2,7 @@ Tests for the functionality and infrastructure of grades tasks. """ -from __future__ import absolute_import + import itertools from collections import OrderedDict diff --git a/lms/djangoapps/grades/tests/test_transformer.py b/lms/djangoapps/grades/tests/test_transformer.py index 903241b40d..28f7420430 100644 --- a/lms/djangoapps/grades/tests/test_transformer.py +++ b/lms/djangoapps/grades/tests/test_transformer.py @@ -2,7 +2,7 @@ Test the behavior of the GradesTransformer """ -from __future__ import absolute_import + import datetime import random diff --git a/lms/djangoapps/grades/tests/utils.py b/lms/djangoapps/grades/tests/utils.py index 996fbe88f3..d0eb7596d2 100644 --- a/lms/djangoapps/grades/tests/utils.py +++ b/lms/djangoapps/grades/tests/utils.py @@ -1,7 +1,7 @@ """ Utilities for grades related tests """ -from __future__ import absolute_import + from contextlib import contextmanager from datetime import datetime diff --git a/lms/djangoapps/grades/transformer.py b/lms/djangoapps/grades/transformer.py index c1028c0590..ff143c35b9 100644 --- a/lms/djangoapps/grades/transformer.py +++ b/lms/djangoapps/grades/transformer.py @@ -1,7 +1,7 @@ """ Grades Transformer """ -from __future__ import absolute_import + import json from base64 import b64encode diff --git a/lms/djangoapps/grades/util_services.py b/lms/djangoapps/grades/util_services.py index ab4d35d677..706fecdd52 100644 --- a/lms/djangoapps/grades/util_services.py +++ b/lms/djangoapps/grades/util_services.py @@ -1,5 +1,5 @@ "A light weight interface to grading helper functions" -from __future__ import absolute_import + from . import grade_utils diff --git a/lms/djangoapps/instructor/access.py b/lms/djangoapps/instructor/access.py index 881c1ef690..e7e34f7879 100644 --- a/lms/djangoapps/instructor/access.py +++ b/lms/djangoapps/instructor/access.py @@ -9,7 +9,7 @@ TO DO sync instructor and staff flags {instructor: true, staff: true} """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/instructor/apps.py b/lms/djangoapps/instructor/apps.py index b0cb83e1e4..2afd32c3f2 100644 --- a/lms/djangoapps/instructor/apps.py +++ b/lms/djangoapps/instructor/apps.py @@ -2,7 +2,7 @@ Instructor Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig from django.conf import settings diff --git a/lms/djangoapps/instructor/enrollment.py b/lms/djangoapps/instructor/enrollment.py index dc70eaff24..c5e0955fcd 100644 --- a/lms/djangoapps/instructor/enrollment.py +++ b/lms/djangoapps/instructor/enrollment.py @@ -4,7 +4,7 @@ Enrollment operations for use by instructor APIs. Does not include any access control, be sure to check access before calling. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/instructor/enrollment_report.py b/lms/djangoapps/instructor/enrollment_report.py index a31cb0186e..33a86b086c 100644 --- a/lms/djangoapps/instructor/enrollment_report.py +++ b/lms/djangoapps/instructor/enrollment_report.py @@ -2,7 +2,7 @@ Defines abstract class for the Enrollment Reports. """ -from __future__ import absolute_import + import abc import collections diff --git a/lms/djangoapps/instructor/message_types.py b/lms/djangoapps/instructor/message_types.py index c9bbfdb4f2..c03a6c71f1 100644 --- a/lms/djangoapps/instructor/message_types.py +++ b/lms/djangoapps/instructor/message_types.py @@ -2,7 +2,7 @@ ACE message types for the instructor module. """ -from __future__ import absolute_import + from openedx.core.djangoapps.ace_common.message import BaseMessageType diff --git a/lms/djangoapps/instructor/paidcourse_enrollment_report.py b/lms/djangoapps/instructor/paidcourse_enrollment_report.py index d4b67f30b1..41113be167 100644 --- a/lms/djangoapps/instructor/paidcourse_enrollment_report.py +++ b/lms/djangoapps/instructor/paidcourse_enrollment_report.py @@ -2,7 +2,7 @@ Defines concrete class for cybersource Enrollment Report. """ -from __future__ import absolute_import + import collections diff --git a/lms/djangoapps/instructor/services.py b/lms/djangoapps/instructor/services.py index 200eafa27e..7061793f97 100644 --- a/lms/djangoapps/instructor/services.py +++ b/lms/djangoapps/instructor/services.py @@ -2,7 +2,7 @@ Implementation of "Instructor" service """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/instructor/settings/common.py b/lms/djangoapps/instructor/settings/common.py index 1eb900bbec..eb5c4db80a 100644 --- a/lms/djangoapps/instructor/settings/common.py +++ b/lms/djangoapps/instructor/settings/common.py @@ -1,5 +1,5 @@ """Common environment variables unique to the instructor plugin.""" -from __future__ import absolute_import + from django.utils.translation import ugettext_lazy as _ diff --git a/lms/djangoapps/instructor/settings/production.py b/lms/djangoapps/instructor/settings/production.py index 4ea1626fed..7f91625587 100644 --- a/lms/djangoapps/instructor/settings/production.py +++ b/lms/djangoapps/instructor/settings/production.py @@ -1,5 +1,5 @@ """AWS environment variables unique to the instructor plugin.""" -from __future__ import absolute_import + import warnings diff --git a/lms/djangoapps/instructor/tests/test_access.py b/lms/djangoapps/instructor/tests/test_access.py index de149a8e53..9028a34850 100644 --- a/lms/djangoapps/instructor/tests/test_access.py +++ b/lms/djangoapps/instructor/tests/test_access.py @@ -2,7 +2,7 @@ Test instructor.access """ -from __future__ import absolute_import + import pytest from six.moves import range diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 4b54ed2e24..ec75e27452 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -2,7 +2,7 @@ """ Unit tests for instructor.api methods. """ -from __future__ import absolute_import, print_function + import datetime import functools diff --git a/lms/djangoapps/instructor/tests/test_api_email_localization.py b/lms/djangoapps/instructor/tests/test_api_email_localization.py index 248b9b0510..8f278638bb 100644 --- a/lms/djangoapps/instructor/tests/test_api_email_localization.py +++ b/lms/djangoapps/instructor/tests/test_api_email_localization.py @@ -3,7 +3,7 @@ Unit tests for the localization of emails sent by instructor.api methods. """ -from __future__ import absolute_import + from django.core import mail from django.test.utils import override_settings diff --git a/lms/djangoapps/instructor/tests/test_certificates.py b/lms/djangoapps/instructor/tests/test_certificates.py index af5113cdd5..a9e44b4513 100644 --- a/lms/djangoapps/instructor/tests/test_certificates.py +++ b/lms/djangoapps/instructor/tests/test_certificates.py @@ -1,5 +1,5 @@ """Tests for the certificates panel of the instructor dash. """ -from __future__ import absolute_import + import contextlib import io diff --git a/lms/djangoapps/instructor/tests/test_ecommerce.py b/lms/djangoapps/instructor/tests/test_ecommerce.py index 715a435ed0..2bbe32ad05 100644 --- a/lms/djangoapps/instructor/tests/test_ecommerce.py +++ b/lms/djangoapps/instructor/tests/test_ecommerce.py @@ -2,7 +2,7 @@ Unit tests for Ecommerce feature flag in new instructor dashboard. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/instructor/tests/test_email.py b/lms/djangoapps/instructor/tests/test_email.py index 3fec3bce12..bb4d4ea8d3 100644 --- a/lms/djangoapps/instructor/tests/test_email.py +++ b/lms/djangoapps/instructor/tests/test_email.py @@ -5,7 +5,7 @@ non-Mongo backed courses, regardless of email feature flag, and that the view is conditionally available when Course Auth is turned on. """ -from __future__ import absolute_import + from django.urls import reverse from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/instructor/tests/test_enrollment.py b/lms/djangoapps/instructor/tests/test_enrollment.py index e037c84812..3044c2a418 100644 --- a/lms/djangoapps/instructor/tests/test_enrollment.py +++ b/lms/djangoapps/instructor/tests/test_enrollment.py @@ -2,7 +2,7 @@ """ Unit tests for instructor.enrollment methods. """ -from __future__ import absolute_import, print_function + import json from abc import ABCMeta diff --git a/lms/djangoapps/instructor/tests/test_enrollment_store_provider.py b/lms/djangoapps/instructor/tests/test_enrollment_store_provider.py index 22bbfb4476..a857d3d08b 100644 --- a/lms/djangoapps/instructor/tests/test_enrollment_store_provider.py +++ b/lms/djangoapps/instructor/tests/test_enrollment_store_provider.py @@ -2,7 +2,7 @@ Exercises tests on the base_store_provider file """ -from __future__ import absolute_import + from django.test import TestCase diff --git a/lms/djangoapps/instructor/tests/test_proctoring.py b/lms/djangoapps/instructor/tests/test_proctoring.py index ac399897d7..5ae726ce07 100644 --- a/lms/djangoapps/instructor/tests/test_proctoring.py +++ b/lms/djangoapps/instructor/tests/test_proctoring.py @@ -2,7 +2,7 @@ Unit tests for Edx Proctoring feature flag in new instructor dashboard. """ -from __future__ import absolute_import + import ddt from django.apps import apps diff --git a/lms/djangoapps/instructor/tests/test_registration_codes.py b/lms/djangoapps/instructor/tests/test_registration_codes.py index 29a0416ec1..111def9e92 100644 --- a/lms/djangoapps/instructor/tests/test_registration_codes.py +++ b/lms/djangoapps/instructor/tests/test_registration_codes.py @@ -1,7 +1,7 @@ """ Test for the registration code status information. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/instructor/tests/test_services.py b/lms/djangoapps/instructor/tests/test_services.py index 970624854c..d8def87254 100644 --- a/lms/djangoapps/instructor/tests/test_services.py +++ b/lms/djangoapps/instructor/tests/test_services.py @@ -2,7 +2,7 @@ Tests for the InstructorService """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py index 1fa34bbf04..73d6260fd3 100644 --- a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py +++ b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py @@ -2,7 +2,7 @@ Tests of the instructor dashboard spoc gradebook """ -from __future__ import absolute_import + from django.urls import reverse from six import text_type diff --git a/lms/djangoapps/instructor/tests/test_tools.py b/lms/djangoapps/instructor/tests/test_tools.py index 1072f2acea..6b3695cc10 100644 --- a/lms/djangoapps/instructor/tests/test_tools.py +++ b/lms/djangoapps/instructor/tests/test_tools.py @@ -1,7 +1,7 @@ """ Tests for views/tools.py. """ -from __future__ import absolute_import, unicode_literals + import datetime import json diff --git a/lms/djangoapps/instructor/tests/utils.py b/lms/djangoapps/instructor/tests/utils.py index 4d549eea7e..2a65e8509e 100644 --- a/lms/djangoapps/instructor/tests/utils.py +++ b/lms/djangoapps/instructor/tests/utils.py @@ -1,7 +1,7 @@ """ Utilities for instructor unit tests """ -from __future__ import absolute_import + import datetime import json diff --git a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py index e3c159cfe7..81118ed4f2 100644 --- a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py +++ b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py @@ -1,7 +1,7 @@ """ Unit tests for instructor_dashboard.py. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/instructor/utils.py b/lms/djangoapps/instructor/utils.py index c17213d7ea..da55668ddc 100644 --- a/lms/djangoapps/instructor/utils.py +++ b/lms/djangoapps/instructor/utils.py @@ -2,7 +2,7 @@ Helpers for instructor app. """ -from __future__ import absolute_import + from lms.djangoapps.courseware.model_data import FieldDataCache from lms.djangoapps.courseware.module_render import get_module diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 3cf7e7e1b4..457383e3f0 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -5,7 +5,7 @@ JSON views which the instructor dashboard requests. Many of these GETs may become PUTs in the future. """ -from __future__ import absolute_import + import csv import decimal diff --git a/lms/djangoapps/instructor/views/api_urls.py b/lms/djangoapps/instructor/views/api_urls.py index dad91793c3..2083902ccc 100644 --- a/lms/djangoapps/instructor/views/api_urls.py +++ b/lms/djangoapps/instructor/views/api_urls.py @@ -2,7 +2,7 @@ Instructor API endpoint urls. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/instructor/views/coupons.py b/lms/djangoapps/instructor/views/coupons.py index a823a17637..2b0e5723b5 100644 --- a/lms/djangoapps/instructor/views/coupons.py +++ b/lms/djangoapps/instructor/views/coupons.py @@ -1,7 +1,7 @@ """ E-commerce Tab Instructor Dashboard Coupons Operations views """ -from __future__ import absolute_import + import datetime import logging diff --git a/lms/djangoapps/instructor/views/gradebook_api.py b/lms/djangoapps/instructor/views/gradebook_api.py index 532180f54d..32f0ed3197 100644 --- a/lms/djangoapps/instructor/views/gradebook_api.py +++ b/lms/djangoapps/instructor/views/gradebook_api.py @@ -2,7 +2,7 @@ Grade book view for instructor and pagination work (for grade book) which is currently use by ccx and instructor apps. """ -from __future__ import absolute_import + import math diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index cbe1a38d3e..51c441cd13 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -2,7 +2,7 @@ Instructor Dashboard Views """ -from __future__ import absolute_import + import datetime import logging diff --git a/lms/djangoapps/instructor/views/instructor_task_helpers.py b/lms/djangoapps/instructor/views/instructor_task_helpers.py index 99c1b88ca0..d3e6c501bc 100644 --- a/lms/djangoapps/instructor/views/instructor_task_helpers.py +++ b/lms/djangoapps/instructor/views/instructor_task_helpers.py @@ -2,7 +2,7 @@ A collection of helper utility functions for working with instructor tasks. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/instructor/views/registration_codes.py b/lms/djangoapps/instructor/views/registration_codes.py index 01e199f4d5..57348574e4 100644 --- a/lms/djangoapps/instructor/views/registration_codes.py +++ b/lms/djangoapps/instructor/views/registration_codes.py @@ -1,7 +1,7 @@ """ E-commerce Tab Instructor Dashboard Query Registration Code Status. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/instructor/views/tools.py b/lms/djangoapps/instructor/views/tools.py index 8e0879095e..d630bd2e6d 100644 --- a/lms/djangoapps/instructor/views/tools.py +++ b/lms/djangoapps/instructor/views/tools.py @@ -1,7 +1,7 @@ """ Tools for the instructor dashboard """ -from __future__ import absolute_import + import json import operator diff --git a/lms/djangoapps/instructor_analytics/basic.py b/lms/djangoapps/instructor_analytics/basic.py index 9f48160918..0ed2c3def0 100644 --- a/lms/djangoapps/instructor_analytics/basic.py +++ b/lms/djangoapps/instructor_analytics/basic.py @@ -3,7 +3,7 @@ Student and course analytics. Serve miscellaneous course and student data """ -from __future__ import absolute_import + import datetime import json diff --git a/lms/djangoapps/instructor_analytics/csvs.py b/lms/djangoapps/instructor_analytics/csvs.py index 67700a8ddb..c83619f09b 100644 --- a/lms/djangoapps/instructor_analytics/csvs.py +++ b/lms/djangoapps/instructor_analytics/csvs.py @@ -4,7 +4,7 @@ Student and course analytics. Format and create csv responses """ -from __future__ import absolute_import + import csv diff --git a/lms/djangoapps/instructor_analytics/distributions.py b/lms/djangoapps/instructor_analytics/distributions.py index 697b59cb65..b6b71870b0 100644 --- a/lms/djangoapps/instructor_analytics/distributions.py +++ b/lms/djangoapps/instructor_analytics/distributions.py @@ -21,7 +21,7 @@ The distribution in a course for gender might look like: } """ -from __future__ import absolute_import + from django.db.models import Count diff --git a/lms/djangoapps/instructor_analytics/tests/test_basic.py b/lms/djangoapps/instructor_analytics/tests/test_basic.py index eebfaec3df..ef1d8d2b86 100644 --- a/lms/djangoapps/instructor_analytics/tests/test_basic.py +++ b/lms/djangoapps/instructor_analytics/tests/test_basic.py @@ -2,7 +2,7 @@ """ Tests for instructor.basic """ -from __future__ import absolute_import + import ddt import datetime diff --git a/lms/djangoapps/instructor_analytics/tests/test_csvs.py b/lms/djangoapps/instructor_analytics/tests/test_csvs.py index 568f79d192..5d9c3c297a 100644 --- a/lms/djangoapps/instructor_analytics/tests/test_csvs.py +++ b/lms/djangoapps/instructor_analytics/tests/test_csvs.py @@ -1,6 +1,6 @@ """ Tests for analytics.csvs """ -from __future__ import absolute_import + import pytest from django.test import TestCase diff --git a/lms/djangoapps/instructor_analytics/tests/test_distributions.py b/lms/djangoapps/instructor_analytics/tests/test_distributions.py index 1ca18523cc..beb55083a4 100644 --- a/lms/djangoapps/instructor_analytics/tests/test_distributions.py +++ b/lms/djangoapps/instructor_analytics/tests/test_distributions.py @@ -1,5 +1,5 @@ """ Tests for analytics.distributions """ -from __future__ import absolute_import, print_function + import pytest from django.test import TestCase diff --git a/lms/djangoapps/instructor_task/admin.py b/lms/djangoapps/instructor_task/admin.py index 6b4ed131fb..5ddcd85ea4 100644 --- a/lms/djangoapps/instructor_task/admin.py +++ b/lms/djangoapps/instructor_task/admin.py @@ -5,7 +5,7 @@ This will mostly involve searching by course_id or task_id and manually failing a task. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/instructor_task/api.py b/lms/djangoapps/instructor_task/api.py index 52c06bb68a..bbef2c2f8c 100644 --- a/lms/djangoapps/instructor_task/api.py +++ b/lms/djangoapps/instructor_task/api.py @@ -6,7 +6,7 @@ already been submitted, filtered either by running state or input arguments. """ -from __future__ import absolute_import + import hashlib from collections import Counter diff --git a/lms/djangoapps/instructor_task/api_helper.py b/lms/djangoapps/instructor_task/api_helper.py index 59fa29dd36..0ea0a43e5b 100644 --- a/lms/djangoapps/instructor_task/api_helper.py +++ b/lms/djangoapps/instructor_task/api_helper.py @@ -4,7 +4,7 @@ Helper lib for instructor_tasks API. Includes methods to check args for rescoring task, encoding student input, and task submission logic, including handling the Celery backend. """ -from __future__ import absolute_import + import hashlib import json diff --git a/lms/djangoapps/instructor_task/config/models.py b/lms/djangoapps/instructor_task/config/models.py index 23406d80c9..b7a03ad7c5 100644 --- a/lms/djangoapps/instructor_task/config/models.py +++ b/lms/djangoapps/instructor_task/config/models.py @@ -2,7 +2,7 @@ Models for configuration of settings relevant to instructor tasks. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db.models import IntegerField diff --git a/lms/djangoapps/instructor_task/config/waffle.py b/lms/djangoapps/instructor_task/config/waffle.py index d8d68f8015..51bde4b971 100644 --- a/lms/djangoapps/instructor_task/config/waffle.py +++ b/lms/djangoapps/instructor_task/config/waffle.py @@ -2,7 +2,7 @@ This module contains various configuration settings via waffle switches for the instructor_task app. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlagNamespace, WaffleSwitchNamespace diff --git a/lms/djangoapps/instructor_task/management/commands/fail_old_tasks.py b/lms/djangoapps/instructor_task/management/commands/fail_old_tasks.py index dca6ac783f..476871aea3 100644 --- a/lms/djangoapps/instructor_task/management/commands/fail_old_tasks.py +++ b/lms/djangoapps/instructor_task/management/commands/fail_old_tasks.py @@ -1,7 +1,7 @@ """ Commands to fail old tasks """ -from __future__ import absolute_import, print_function, unicode_literals + from datetime import datetime from textwrap import dedent diff --git a/lms/djangoapps/instructor_task/management/commands/tests/test_fail_old_tasks.py b/lms/djangoapps/instructor_task/management/commands/tests/test_fail_old_tasks.py index 543f757ef6..9c1062cd4d 100644 --- a/lms/djangoapps/instructor_task/management/commands/tests/test_fail_old_tasks.py +++ b/lms/djangoapps/instructor_task/management/commands/tests/test_fail_old_tasks.py @@ -1,7 +1,7 @@ """ Tests for failing old tasks """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/instructor_task/migrations/0001_initial.py b/lms/djangoapps/instructor_task/migrations/0001_initial.py index 316c6c18f8..d7bad25638 100644 --- a/lms/djangoapps/instructor_task/migrations/0001_initial.py +++ b/lms/djangoapps/instructor_task/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py b/lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py index 2ba86491ce..e155bfbc78 100644 --- a/lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py +++ b/lms/djangoapps/instructor_task/migrations/0002_gradereportsetting.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/instructor_task/migrations/0003_alter_task_input_field.py b/lms/djangoapps/instructor_task/migrations/0003_alter_task_input_field.py index e440e544b7..d12c4aa860 100644 --- a/lms/djangoapps/instructor_task/migrations/0003_alter_task_input_field.py +++ b/lms/djangoapps/instructor_task/migrations/0003_alter_task_input_field.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-07-01 12:48 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/instructor_task/models.py b/lms/djangoapps/instructor_task/models.py index e142fe8edd..82ceea68a1 100644 --- a/lms/djangoapps/instructor_task/models.py +++ b/lms/djangoapps/instructor_task/models.py @@ -12,7 +12,7 @@ file and check it in at the same time as your model changes. To do that, ASSUMPTIONS: modules have unique IDs, even across different module_types """ -from __future__ import absolute_import + import codecs import csv diff --git a/lms/djangoapps/instructor_task/subtasks.py b/lms/djangoapps/instructor_task/subtasks.py index 75ec200325..d3839ba3e8 100644 --- a/lms/djangoapps/instructor_task/subtasks.py +++ b/lms/djangoapps/instructor_task/subtasks.py @@ -1,7 +1,7 @@ """ This module contains celery task functions for handling the management of subtasks. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/instructor_task/tasks.py b/lms/djangoapps/instructor_task/tasks.py index 89dcd6f6b8..ae697a1c7e 100644 --- a/lms/djangoapps/instructor_task/tasks.py +++ b/lms/djangoapps/instructor_task/tasks.py @@ -19,7 +19,7 @@ a problem URL and optionally a student. These are used to set up the initial va of the query for traversing StudentModule objects. """ -from __future__ import absolute_import + import logging from functools import partial diff --git a/lms/djangoapps/instructor_task/tasks_base.py b/lms/djangoapps/instructor_task/tasks_base.py index b520b62a6c..dd2f068713 100644 --- a/lms/djangoapps/instructor_task/tasks_base.py +++ b/lms/djangoapps/instructor_task/tasks_base.py @@ -1,7 +1,7 @@ """ Base class for Instructor celery tasks. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/instructor_task/tasks_helper/certs.py b/lms/djangoapps/instructor_task/tasks_helper/certs.py index 11e6375dba..714a32b2d7 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/certs.py +++ b/lms/djangoapps/instructor_task/tasks_helper/certs.py @@ -1,7 +1,7 @@ """ Instructor tasks related to certificates. """ -from __future__ import absolute_import + from time import time diff --git a/lms/djangoapps/instructor_task/tasks_helper/enrollments.py b/lms/djangoapps/instructor_task/tasks_helper/enrollments.py index 5e06cc68ed..34c48bdba1 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/enrollments.py +++ b/lms/djangoapps/instructor_task/tasks_helper/enrollments.py @@ -1,7 +1,7 @@ """ Instructor tasks related to enrollments. """ -from __future__ import absolute_import + import logging from datetime import datetime diff --git a/lms/djangoapps/instructor_task/tasks_helper/grades.py b/lms/djangoapps/instructor_task/tasks_helper/grades.py index d9e62cbce1..fae35afc51 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/grades.py +++ b/lms/djangoapps/instructor_task/tasks_helper/grades.py @@ -1,7 +1,7 @@ """ Functionality for generating grade reports. """ -from __future__ import absolute_import + import logging import re diff --git a/lms/djangoapps/instructor_task/tasks_helper/misc.py b/lms/djangoapps/instructor_task/tasks_helper/misc.py index 852225d74f..b2906d01f9 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/misc.py +++ b/lms/djangoapps/instructor_task/tasks_helper/misc.py @@ -3,7 +3,7 @@ This file contains tasks that are designed to perform background operations on t running state of a course. """ -from __future__ import absolute_import + import logging from collections import OrderedDict diff --git a/lms/djangoapps/instructor_task/tasks_helper/module_state.py b/lms/djangoapps/instructor_task/tasks_helper/module_state.py index d1c1461bcc..5e8d3d9473 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/module_state.py +++ b/lms/djangoapps/instructor_task/tasks_helper/module_state.py @@ -1,7 +1,7 @@ """ Instructor Tasks related to module state. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/instructor_task/tasks_helper/runner.py b/lms/djangoapps/instructor_task/tasks_helper/runner.py index 52611ef80a..1724e44a7d 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/runner.py +++ b/lms/djangoapps/instructor_task/tasks_helper/runner.py @@ -1,7 +1,7 @@ """ Instrutor Task runner """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/instructor_task/tasks_helper/utils.py b/lms/djangoapps/instructor_task/tasks_helper/utils.py index 6d166dac46..b5552029ad 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/utils.py +++ b/lms/djangoapps/instructor_task/tasks_helper/utils.py @@ -1,7 +1,7 @@ """ Utility methods for instructor tasks """ -from __future__ import absolute_import + from eventtracking import tracker diff --git a/lms/djangoapps/instructor_task/tests/factories.py b/lms/djangoapps/instructor_task/tests/factories.py index 7a34bac44d..f68ec11d16 100644 --- a/lms/djangoapps/instructor_task/tests/factories.py +++ b/lms/djangoapps/instructor_task/tests/factories.py @@ -1,7 +1,7 @@ """ Instructor Task Factory """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/instructor_task/tests/test_api.py b/lms/djangoapps/instructor_task/tests/test_api.py index b7041397b5..3ed2a34643 100644 --- a/lms/djangoapps/instructor_task/tests/test_api.py +++ b/lms/djangoapps/instructor_task/tests/test_api.py @@ -1,7 +1,7 @@ """ Test for LMS instructor background task queue management """ -from __future__ import absolute_import + import ddt from celery.states import FAILURE diff --git a/lms/djangoapps/instructor_task/tests/test_base.py b/lms/djangoapps/instructor_task/tests/test_base.py index 53205f6dfe..9e5776c9d2 100644 --- a/lms/djangoapps/instructor_task/tests/test_base.py +++ b/lms/djangoapps/instructor_task/tests/test_base.py @@ -2,7 +2,7 @@ Base test classes for LMS instructor-initiated background tasks """ -from __future__ import absolute_import + import json # pylint: disable=attribute-defined-outside-init diff --git a/lms/djangoapps/instructor_task/tests/test_integration.py b/lms/djangoapps/instructor_task/tests/test_integration.py index 7c09eea095..78bd539eeb 100644 --- a/lms/djangoapps/instructor_task/tests/test_integration.py +++ b/lms/djangoapps/instructor_task/tests/test_integration.py @@ -5,7 +5,7 @@ Runs tasks on answers to course problems to validate that code paths actually work. """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/instructor_task/tests/test_models.py b/lms/djangoapps/instructor_task/tests/test_models.py index 96d74807d7..2d16d10454 100644 --- a/lms/djangoapps/instructor_task/tests/test_models.py +++ b/lms/djangoapps/instructor_task/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for instructor_task/models.py. """ -from __future__ import absolute_import + import copy import time diff --git a/lms/djangoapps/instructor_task/tests/test_subtasks.py b/lms/djangoapps/instructor_task/tests/test_subtasks.py index 65fe2ead5a..e78f7cabe0 100644 --- a/lms/djangoapps/instructor_task/tests/test_subtasks.py +++ b/lms/djangoapps/instructor_task/tests/test_subtasks.py @@ -1,7 +1,7 @@ """ Unit tests for instructor_task subtasks. """ -from __future__ import absolute_import + from uuid import uuid4 diff --git a/lms/djangoapps/instructor_task/tests/test_tasks.py b/lms/djangoapps/instructor_task/tests/test_tasks.py index 0ed3706982..1abc5633fc 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks.py @@ -5,7 +5,7 @@ Runs tasks on answers to course problems to validate that code paths actually work. """ -from __future__ import absolute_import + import json from functools import partial diff --git a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py index 60f804af6a..7086b86794 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py @@ -7,7 +7,7 @@ Unit tests for LMS instructor-initiated background tasks helper functions. - Tests all of the existing reports. """ -from __future__ import absolute_import, unicode_literals + import os import shutil diff --git a/lms/djangoapps/instructor_task/tests/test_views.py b/lms/djangoapps/instructor_task/tests/test_views.py index cb404b9811..3ddc85381e 100644 --- a/lms/djangoapps/instructor_task/tests/test_views.py +++ b/lms/djangoapps/instructor_task/tests/test_views.py @@ -2,7 +2,7 @@ """ Test for LMS instructor background task views. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/instructor_task/views.py b/lms/djangoapps/instructor_task/views.py index 803a84806d..1c1bf88a7a 100644 --- a/lms/djangoapps/instructor_task/views.py +++ b/lms/djangoapps/instructor_task/views.py @@ -1,5 +1,5 @@ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/learner_dashboard/programs.py b/lms/djangoapps/learner_dashboard/programs.py index e2510d42fe..a7c3518566 100644 --- a/lms/djangoapps/learner_dashboard/programs.py +++ b/lms/djangoapps/learner_dashboard/programs.py @@ -1,7 +1,7 @@ """ Fragments for rendering programs. """ -from __future__ import absolute_import + import json diff --git a/lms/djangoapps/learner_dashboard/tests/test_programs.py b/lms/djangoapps/learner_dashboard/tests/test_programs.py index f52459f0bd..18463a33fd 100644 --- a/lms/djangoapps/learner_dashboard/tests/test_programs.py +++ b/lms/djangoapps/learner_dashboard/tests/test_programs.py @@ -2,7 +2,7 @@ """ Unit tests covering the program listing and detail pages. """ -from __future__ import absolute_import + import json import re diff --git a/lms/djangoapps/learner_dashboard/tests/test_utils.py b/lms/djangoapps/learner_dashboard/tests/test_utils.py index 0d187a84bf..44852d027c 100644 --- a/lms/djangoapps/learner_dashboard/tests/test_utils.py +++ b/lms/djangoapps/learner_dashboard/tests/test_utils.py @@ -2,7 +2,7 @@ Unit test module covering utils module """ -from __future__ import absolute_import + import ddt import six diff --git a/lms/djangoapps/learner_dashboard/urls.py b/lms/djangoapps/learner_dashboard/urls.py index 5d5e0debbf..dff13d82c0 100644 --- a/lms/djangoapps/learner_dashboard/urls.py +++ b/lms/djangoapps/learner_dashboard/urls.py @@ -1,5 +1,5 @@ """Learner dashboard URL routing configuration""" -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/learner_dashboard/utils.py b/lms/djangoapps/learner_dashboard/utils.py index 06dafa61fb..3285028e7b 100644 --- a/lms/djangoapps/learner_dashboard/utils.py +++ b/lms/djangoapps/learner_dashboard/utils.py @@ -1,7 +1,7 @@ """ The utility methods and functions to help the djangoapp logic """ -from __future__ import absolute_import + import six from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/learner_dashboard/views.py b/lms/djangoapps/learner_dashboard/views.py index 1101c3a122..dd0beedeef 100644 --- a/lms/djangoapps/learner_dashboard/views.py +++ b/lms/djangoapps/learner_dashboard/views.py @@ -1,5 +1,5 @@ """Learner dashboard views""" -from __future__ import absolute_import + from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_GET diff --git a/lms/djangoapps/lms_initialization/apps.py b/lms/djangoapps/lms_initialization/apps.py index 925775726d..6a99331026 100644 --- a/lms/djangoapps/lms_initialization/apps.py +++ b/lms/djangoapps/lms_initialization/apps.py @@ -5,7 +5,7 @@ This app consists solely of a ready method in its AppConfig, and should be included early in the INSTALLED_APPS list. """ -from __future__ import absolute_import + import analytics from django.apps import AppConfig diff --git a/lms/djangoapps/lms_xblock/admin.py b/lms/djangoapps/lms_xblock/admin.py index 388efdb6bb..097d606a7f 100644 --- a/lms/djangoapps/lms_xblock/admin.py +++ b/lms/djangoapps/lms_xblock/admin.py @@ -2,7 +2,7 @@ Django admin dashboard configuration for LMS XBlock infrastructure. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/lms_xblock/apps.py b/lms/djangoapps/lms_xblock/apps.py index 5d0a392bcb..9b919fa1a2 100644 --- a/lms/djangoapps/lms_xblock/apps.py +++ b/lms/djangoapps/lms_xblock/apps.py @@ -1,7 +1,7 @@ """ lms_xblock Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/lms_xblock/field_data.py b/lms/djangoapps/lms_xblock/field_data.py index a3092651b3..514dca9712 100644 --- a/lms/djangoapps/lms_xblock/field_data.py +++ b/lms/djangoapps/lms_xblock/field_data.py @@ -2,7 +2,7 @@ :class:`~xblock.field_data.FieldData` subclasses used by the LMS """ -from __future__ import absolute_import + from xblock.field_data import ReadOnlyFieldData, SplitFieldData from xblock.fields import Scope diff --git a/lms/djangoapps/lms_xblock/migrations/0001_initial.py b/lms/djangoapps/lms_xblock/migrations/0001_initial.py index 298fda4258..5d65c5d218 100644 --- a/lms/djangoapps/lms_xblock/migrations/0001_initial.py +++ b/lms/djangoapps/lms_xblock/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/lms_xblock/mixin.py b/lms/djangoapps/lms_xblock/mixin.py index 8e346a3f58..1f34e8d2ed 100644 --- a/lms/djangoapps/lms_xblock/mixin.py +++ b/lms/djangoapps/lms_xblock/mixin.py @@ -3,7 +3,7 @@ Namespace that defines fields common to all blocks used in the LMS """ #from django.utils.translation import ugettext_noop as _ -from __future__ import absolute_import + import six from lazy import lazy diff --git a/lms/djangoapps/lms_xblock/models.py b/lms/djangoapps/lms_xblock/models.py index cbfbde5b3c..017460e5aa 100644 --- a/lms/djangoapps/lms_xblock/models.py +++ b/lms/djangoapps/lms_xblock/models.py @@ -6,7 +6,7 @@ Includes: rendered in the LMS. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db.models import TextField diff --git a/lms/djangoapps/lms_xblock/runtime.py b/lms/djangoapps/lms_xblock/runtime.py index 1a31eaa3f6..cada6bf2d4 100644 --- a/lms/djangoapps/lms_xblock/runtime.py +++ b/lms/djangoapps/lms_xblock/runtime.py @@ -1,7 +1,7 @@ """ Module implementing `xblock.runtime.Runtime` functionality for the LMS """ -from __future__ import absolute_import + import six import xblock.reference.plugins diff --git a/lms/djangoapps/lms_xblock/test/test_runtime.py b/lms/djangoapps/lms_xblock/test/test_runtime.py index b39a5e3db9..badb6947b9 100644 --- a/lms/djangoapps/lms_xblock/test/test_runtime.py +++ b/lms/djangoapps/lms_xblock/test/test_runtime.py @@ -2,7 +2,7 @@ Tests of the LMS XBlock Runtime and associated utilities """ -from __future__ import absolute_import + from ddt import data, ddt from django.conf import settings diff --git a/lms/djangoapps/lti_provider/admin.py b/lms/djangoapps/lti_provider/admin.py index 54d0b31349..ed4095625a 100644 --- a/lms/djangoapps/lti_provider/admin.py +++ b/lms/djangoapps/lti_provider/admin.py @@ -2,7 +2,7 @@ Admin interface for LTI Provider app. """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/lms/djangoapps/lti_provider/apps.py b/lms/djangoapps/lti_provider/apps.py index b41fbb1a1d..9360bbaf07 100644 --- a/lms/djangoapps/lti_provider/apps.py +++ b/lms/djangoapps/lti_provider/apps.py @@ -1,7 +1,7 @@ """ Configuration for the lti_provider Django application. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/lti_provider/management/commands/resend_lti_scores.py b/lms/djangoapps/lti_provider/management/commands/resend_lti_scores.py index 13783f3326..36db797df7 100644 --- a/lms/djangoapps/lti_provider/management/commands/resend_lti_scores.py +++ b/lms/djangoapps/lti_provider/management/commands/resend_lti_scores.py @@ -2,7 +2,7 @@ Management command to resend all lti scores for the requested course. """ -from __future__ import absolute_import + import textwrap diff --git a/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py b/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py index f9a3000b49..691a66a0cd 100644 --- a/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py +++ b/lms/djangoapps/lti_provider/management/commands/tests/test_resend_lti_scores.py @@ -3,7 +3,7 @@ Test lti_provider management commands. """ -from __future__ import absolute_import + import six from django.test import TestCase diff --git a/lms/djangoapps/lti_provider/migrations/0001_initial.py b/lms/djangoapps/lti_provider/migrations/0001_initial.py index e1c4e81069..c0032812ac 100644 --- a/lms/djangoapps/lti_provider/migrations/0001_initial.py +++ b/lms/djangoapps/lti_provider/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import provider.utils from django.conf import settings diff --git a/lms/djangoapps/lti_provider/migrations/0002_auto_20160325_0407.py b/lms/djangoapps/lti_provider/migrations/0002_auto_20160325_0407.py index f3383de1c4..53d9801b9e 100644 --- a/lms/djangoapps/lti_provider/migrations/0002_auto_20160325_0407.py +++ b/lms/djangoapps/lti_provider/migrations/0002_auto_20160325_0407.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import provider.utils from django.db import migrations, models diff --git a/lms/djangoapps/lti_provider/migrations/0003_auto_20161118_1040.py b/lms/djangoapps/lti_provider/migrations/0003_auto_20161118_1040.py index a0ae188286..44690ecb1f 100644 --- a/lms/djangoapps/lti_provider/migrations/0003_auto_20161118_1040.py +++ b/lms/djangoapps/lti_provider/migrations/0003_auto_20161118_1040.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/lti_provider/models.py b/lms/djangoapps/lti_provider/models.py index 086d20cda0..a0ecb06a5c 100644 --- a/lms/djangoapps/lti_provider/models.py +++ b/lms/djangoapps/lti_provider/models.py @@ -8,7 +8,7 @@ changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py lms schemamigration lti_provider --auto "description" --settings=devstack """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/lti_provider/outcomes.py b/lms/djangoapps/lti_provider/outcomes.py index 3389735c32..665e656d65 100644 --- a/lms/djangoapps/lti_provider/outcomes.py +++ b/lms/djangoapps/lti_provider/outcomes.py @@ -3,7 +3,7 @@ Helper functions for managing interactions with the LTI outcomes service defined in LTI v1.1. """ -from __future__ import absolute_import + import logging import uuid diff --git a/lms/djangoapps/lti_provider/signals.py b/lms/djangoapps/lti_provider/signals.py index 5d2318d66d..bbba8e456f 100644 --- a/lms/djangoapps/lti_provider/signals.py +++ b/lms/djangoapps/lti_provider/signals.py @@ -1,7 +1,7 @@ """ Signals handlers for the lti_provider Django app. """ -from __future__ import absolute_import + import logging from django.conf import settings diff --git a/lms/djangoapps/lti_provider/signature_validator.py b/lms/djangoapps/lti_provider/signature_validator.py index c42aff30e4..5badfe5a8c 100644 --- a/lms/djangoapps/lti_provider/signature_validator.py +++ b/lms/djangoapps/lti_provider/signature_validator.py @@ -2,7 +2,7 @@ Subclass of oauthlib's RequestValidator that checks an OAuth signature. """ -from __future__ import absolute_import + import six from oauthlib.oauth1 import RequestValidator, SignatureOnlyEndpoint diff --git a/lms/djangoapps/lti_provider/tasks.py b/lms/djangoapps/lti_provider/tasks.py index d9f2d08151..01e54e2bc9 100644 --- a/lms/djangoapps/lti_provider/tasks.py +++ b/lms/djangoapps/lti_provider/tasks.py @@ -2,7 +2,7 @@ Asynchronous tasks for the LTI provider app. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/lti_provider/tests/test_outcomes.py b/lms/djangoapps/lti_provider/tests/test_outcomes.py index 1976031158..165155d793 100644 --- a/lms/djangoapps/lti_provider/tests/test_outcomes.py +++ b/lms/djangoapps/lti_provider/tests/test_outcomes.py @@ -2,7 +2,7 @@ Tests for the LTI outcome service handlers, both in outcomes.py and in tasks.py """ -from __future__ import absolute_import + from django.test import TestCase from lxml import etree diff --git a/lms/djangoapps/lti_provider/tests/test_signature_validator.py b/lms/djangoapps/lti_provider/tests/test_signature_validator.py index 2b746846f6..a03c6cfaa3 100644 --- a/lms/djangoapps/lti_provider/tests/test_signature_validator.py +++ b/lms/djangoapps/lti_provider/tests/test_signature_validator.py @@ -2,7 +2,7 @@ Tests for the SignatureValidator class. """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/lms/djangoapps/lti_provider/tests/test_tasks.py b/lms/djangoapps/lti_provider/tests/test_tasks.py index 822206c701..088df96bfd 100644 --- a/lms/djangoapps/lti_provider/tests/test_tasks.py +++ b/lms/djangoapps/lti_provider/tests/test_tasks.py @@ -2,7 +2,7 @@ Tests for the LTI outcome service handlers, both in outcomes.py and in tasks.py """ -from __future__ import absolute_import + import ddt import six diff --git a/lms/djangoapps/lti_provider/tests/test_users.py b/lms/djangoapps/lti_provider/tests/test_users.py index 63082646f5..7f10f58172 100644 --- a/lms/djangoapps/lti_provider/tests/test_users.py +++ b/lms/djangoapps/lti_provider/tests/test_users.py @@ -2,7 +2,7 @@ Tests for the LTI user management functionality """ -from __future__ import absolute_import + import string diff --git a/lms/djangoapps/lti_provider/tests/test_views.py b/lms/djangoapps/lti_provider/tests/test_views.py index 5ad29b7930..691d1e9cc6 100644 --- a/lms/djangoapps/lti_provider/tests/test_views.py +++ b/lms/djangoapps/lti_provider/tests/test_views.py @@ -2,7 +2,7 @@ Tests for the LTI provider views """ -from __future__ import absolute_import + import six from django.test import TestCase diff --git a/lms/djangoapps/lti_provider/urls.py b/lms/djangoapps/lti_provider/urls.py index 6fe617fa37..6b82fc01b2 100644 --- a/lms/djangoapps/lti_provider/urls.py +++ b/lms/djangoapps/lti_provider/urls.py @@ -2,7 +2,7 @@ LTI Provider API endpoint urls. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/lti_provider/users.py b/lms/djangoapps/lti_provider/users.py index a28bbd2664..3ab714b4ee 100644 --- a/lms/djangoapps/lti_provider/users.py +++ b/lms/djangoapps/lti_provider/users.py @@ -3,7 +3,7 @@ LTI user management functionality. This module reconciles the two identities that an individual has in the campus LMS platform and on edX. """ -from __future__ import absolute_import + import random import string diff --git a/lms/djangoapps/lti_provider/views.py b/lms/djangoapps/lti_provider/views.py index d67e16ab1c..43b6afda30 100644 --- a/lms/djangoapps/lti_provider/views.py +++ b/lms/djangoapps/lti_provider/views.py @@ -2,7 +2,7 @@ LTI Provider view functions """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/mailing/management/commands/mailchimp_id.py b/lms/djangoapps/mailing/management/commands/mailchimp_id.py index fc398def19..ca30454dd7 100644 --- a/lms/djangoapps/mailing/management/commands/mailchimp_id.py +++ b/lms/djangoapps/mailing/management/commands/mailchimp_id.py @@ -2,7 +2,7 @@ mailchimp_id: Returns whether or not a given mailchimp key represents a valid list. """ -from __future__ import absolute_import, print_function + import sys diff --git a/lms/djangoapps/mailing/management/commands/mailchimp_sync_announcements.py b/lms/djangoapps/mailing/management/commands/mailchimp_sync_announcements.py index a077aa0315..b1691e2885 100644 --- a/lms/djangoapps/mailing/management/commands/mailchimp_sync_announcements.py +++ b/lms/djangoapps/mailing/management/commands/mailchimp_sync_announcements.py @@ -1,7 +1,7 @@ """ Synchronizes the announcement list with all active students. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py b/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py index 5f77b92ed6..cf736855c1 100644 --- a/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py +++ b/lms/djangoapps/mailing/management/commands/mailchimp_sync_course.py @@ -1,7 +1,7 @@ """ Synchronizes a mailchimp list with the students of a course. """ -from __future__ import absolute_import + import itertools import logging diff --git a/lms/djangoapps/mobile_api/admin.py b/lms/djangoapps/mobile_api/admin.py index f136dccb3b..0991d46a2e 100644 --- a/lms/djangoapps/mobile_api/admin.py +++ b/lms/djangoapps/mobile_api/admin.py @@ -2,7 +2,7 @@ Django admin dashboard configuration for LMS XBlock infrastructure. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/lms/djangoapps/mobile_api/context_processor.py b/lms/djangoapps/mobile_api/context_processor.py index 6d379bdf6c..54fc2b954d 100644 --- a/lms/djangoapps/mobile_api/context_processor.py +++ b/lms/djangoapps/mobile_api/context_processor.py @@ -2,7 +2,7 @@ Django template context processors. """ -from __future__ import absolute_import + from openedx.core.lib.mobile_utils import is_request_from_mobile_app diff --git a/lms/djangoapps/mobile_api/course_info/tests.py b/lms/djangoapps/mobile_api/course_info/tests.py index f4697d3be2..045f41acba 100644 --- a/lms/djangoapps/mobile_api/course_info/tests.py +++ b/lms/djangoapps/mobile_api/course_info/tests.py @@ -2,7 +2,7 @@ Tests for course_info """ -from __future__ import absolute_import + import ddt from django.conf import settings diff --git a/lms/djangoapps/mobile_api/course_info/urls.py b/lms/djangoapps/mobile_api/course_info/urls.py index b279e1d5f0..e46612bcc5 100644 --- a/lms/djangoapps/mobile_api/course_info/urls.py +++ b/lms/djangoapps/mobile_api/course_info/urls.py @@ -2,7 +2,7 @@ URLs for course_info API """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/mobile_api/course_info/views.py b/lms/djangoapps/mobile_api/course_info/views.py index ab66f7853e..80a52e840b 100644 --- a/lms/djangoapps/mobile_api/course_info/views.py +++ b/lms/djangoapps/mobile_api/course_info/views.py @@ -2,7 +2,7 @@ Views for course info API """ -from __future__ import absolute_import + from rest_framework import generics from rest_framework.response import Response diff --git a/lms/djangoapps/mobile_api/decorators.py b/lms/djangoapps/mobile_api/decorators.py index bbe18ea6b5..a3b1a95281 100644 --- a/lms/djangoapps/mobile_api/decorators.py +++ b/lms/djangoapps/mobile_api/decorators.py @@ -1,7 +1,7 @@ """ Decorators for Mobile APIs. """ -from __future__ import absolute_import + import functools diff --git a/lms/djangoapps/mobile_api/middleware.py b/lms/djangoapps/mobile_api/middleware.py index 0a87057970..0258f7f431 100644 --- a/lms/djangoapps/mobile_api/middleware.py +++ b/lms/djangoapps/mobile_api/middleware.py @@ -1,7 +1,7 @@ """ Middleware for Mobile APIs """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/mobile_api/migrations/0001_initial.py b/lms/djangoapps/mobile_api/migrations/0001_initial.py index c90b1f8108..ae604e95bc 100644 --- a/lms/djangoapps/mobile_api/migrations/0001_initial.py +++ b/lms/djangoapps/mobile_api/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py b/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py index 98fb7fe912..602317c69d 100644 --- a/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py +++ b/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py b/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py index 5ce0250677..89816f0bd5 100644 --- a/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py +++ b/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/lms/djangoapps/mobile_api/mobile_platform.py b/lms/djangoapps/mobile_api/mobile_platform.py index e05648a1e4..3ea901b330 100644 --- a/lms/djangoapps/mobile_api/mobile_platform.py +++ b/lms/djangoapps/mobile_api/mobile_platform.py @@ -1,7 +1,7 @@ """ Platform related Operations for Mobile APP """ -from __future__ import absolute_import + import abc import re diff --git a/lms/djangoapps/mobile_api/models.py b/lms/djangoapps/mobile_api/models.py index 10a0bd579a..1313d91723 100644 --- a/lms/djangoapps/mobile_api/models.py +++ b/lms/djangoapps/mobile_api/models.py @@ -1,7 +1,7 @@ """ ConfigurationModel for the mobile_api djangoapp. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db import models diff --git a/lms/djangoapps/mobile_api/tests/test_context_processor.py b/lms/djangoapps/mobile_api/tests/test_context_processor.py index 08cedfeb22..8d5fb4ba30 100644 --- a/lms/djangoapps/mobile_api/tests/test_context_processor.py +++ b/lms/djangoapps/mobile_api/tests/test_context_processor.py @@ -1,7 +1,7 @@ """ Tests for Django template context processors. """ -from __future__ import absolute_import + from django.conf import settings from django.test import TestCase diff --git a/lms/djangoapps/mobile_api/tests/test_decorator.py b/lms/djangoapps/mobile_api/tests/test_decorator.py index fa9ee8598d..65cbb14ffe 100644 --- a/lms/djangoapps/mobile_api/tests/test_decorator.py +++ b/lms/djangoapps/mobile_api/tests/test_decorator.py @@ -3,7 +3,7 @@ Tests for mobile API utilities. """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/lms/djangoapps/mobile_api/tests/test_middleware.py b/lms/djangoapps/mobile_api/tests/test_middleware.py index c698de698b..29a73c93e0 100644 --- a/lms/djangoapps/mobile_api/tests/test_middleware.py +++ b/lms/djangoapps/mobile_api/tests/test_middleware.py @@ -1,7 +1,7 @@ """ Tests for Version Based App Upgrade Middleware """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/mobile_api/tests/test_milestones.py b/lms/djangoapps/mobile_api/tests/test_milestones.py index 7aab67c34f..8e305672e3 100644 --- a/lms/djangoapps/mobile_api/tests/test_milestones.py +++ b/lms/djangoapps/mobile_api/tests/test_milestones.py @@ -1,7 +1,7 @@ """ Milestone related tests for the mobile_api """ -from __future__ import absolute_import + import six from crum import set_current_request diff --git a/lms/djangoapps/mobile_api/tests/test_mobile_platform.py b/lms/djangoapps/mobile_api/tests/test_mobile_platform.py index d4ecd583e3..fcce75d0cf 100644 --- a/lms/djangoapps/mobile_api/tests/test_mobile_platform.py +++ b/lms/djangoapps/mobile_api/tests/test_mobile_platform.py @@ -1,7 +1,7 @@ """ Tests for Platform against Mobile App Request """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/lms/djangoapps/mobile_api/tests/test_model.py b/lms/djangoapps/mobile_api/tests/test_model.py index a28af09451..faf0903307 100644 --- a/lms/djangoapps/mobile_api/tests/test_model.py +++ b/lms/djangoapps/mobile_api/tests/test_model.py @@ -1,7 +1,7 @@ """ Tests for Mobile API Configuration Models """ -from __future__ import absolute_import + from datetime import datetime diff --git a/lms/djangoapps/mobile_api/testutils.py b/lms/djangoapps/mobile_api/testutils.py index 50bf949e41..51022f4f02 100644 --- a/lms/djangoapps/mobile_api/testutils.py +++ b/lms/djangoapps/mobile_api/testutils.py @@ -11,7 +11,7 @@ Test utilities for mobile API tests: """ # pylint: disable=no-member -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/mobile_api/urls.py b/lms/djangoapps/mobile_api/urls.py index 67b9e778b1..b116fd9e79 100644 --- a/lms/djangoapps/mobile_api/urls.py +++ b/lms/djangoapps/mobile_api/urls.py @@ -2,7 +2,7 @@ URLs for mobile API """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/mobile_api/users/serializers.py b/lms/djangoapps/mobile_api/users/serializers.py index c985dfba9b..87312ada41 100644 --- a/lms/djangoapps/mobile_api/users/serializers.py +++ b/lms/djangoapps/mobile_api/users/serializers.py @@ -2,7 +2,7 @@ Serializer for user API """ -from __future__ import absolute_import + import six from rest_framework import serializers diff --git a/lms/djangoapps/mobile_api/users/tests.py b/lms/djangoapps/mobile_api/users/tests.py index 91925e8995..2215b5f062 100644 --- a/lms/djangoapps/mobile_api/users/tests.py +++ b/lms/djangoapps/mobile_api/users/tests.py @@ -1,7 +1,7 @@ """ Tests for users API """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/mobile_api/users/urls.py b/lms/djangoapps/mobile_api/users/urls.py index d474b0affe..928572fa9d 100644 --- a/lms/djangoapps/mobile_api/users/urls.py +++ b/lms/djangoapps/mobile_api/users/urls.py @@ -2,7 +2,7 @@ URLs for user API """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/mobile_api/users/views.py b/lms/djangoapps/mobile_api/users/views.py index 31eacc1323..7c6846f00d 100644 --- a/lms/djangoapps/mobile_api/users/views.py +++ b/lms/djangoapps/mobile_api/users/views.py @@ -2,7 +2,7 @@ Views for user API """ -from __future__ import absolute_import + import six from django.contrib.auth.signals import user_logged_in diff --git a/lms/djangoapps/oauth2_handler/__init__.py b/lms/djangoapps/oauth2_handler/__init__.py index bb3f7ed55a..7be226e394 100644 --- a/lms/djangoapps/oauth2_handler/__init__.py +++ b/lms/djangoapps/oauth2_handler/__init__.py @@ -1,5 +1,5 @@ """ Handlers for OpenID Connect provider. """ -from __future__ import absolute_import + from oauth2_handler.handlers import IDTokenHandler, UserInfoHandler diff --git a/lms/djangoapps/oauth2_handler/handlers.py b/lms/djangoapps/oauth2_handler/handlers.py index 85bf6cedf5..a1fd188ba4 100644 --- a/lms/djangoapps/oauth2_handler/handlers.py +++ b/lms/djangoapps/oauth2_handler/handlers.py @@ -1,6 +1,6 @@ """ Handlers for OpenID Connect provider. """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/lms/djangoapps/oauth2_handler/tests.py b/lms/djangoapps/oauth2_handler/tests.py index 169eef8955..38cbbd0b57 100644 --- a/lms/djangoapps/oauth2_handler/tests.py +++ b/lms/djangoapps/oauth2_handler/tests.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import mock import six diff --git a/lms/djangoapps/program_enrollments/admin.py b/lms/djangoapps/program_enrollments/admin.py index aa79547bed..150c745e08 100644 --- a/lms/djangoapps/program_enrollments/admin.py +++ b/lms/djangoapps/program_enrollments/admin.py @@ -2,7 +2,7 @@ """ Admin tool for the Program Enrollments models """ -from __future__ import absolute_import, unicode_literals + from django.contrib import admin diff --git a/lms/djangoapps/program_enrollments/api/__init__.py b/lms/djangoapps/program_enrollments/api/__init__.py index 104e612271..49b292c440 100644 --- a/lms/djangoapps/program_enrollments/api/__init__.py +++ b/lms/djangoapps/program_enrollments/api/__init__.py @@ -12,7 +12,7 @@ We use explicit imports here because (1) it hides internal variables in the sub-modules and (2) it provides a nice catalog of functions for someone using this API. """ -from __future__ import absolute_import + from .grades import iter_program_course_grades from .linking import link_program_enrollment_to_lms_user, link_program_enrollments diff --git a/lms/djangoapps/program_enrollments/api/grades.py b/lms/djangoapps/program_enrollments/api/grades.py index 6af6f88991..fb3292d42b 100644 --- a/lms/djangoapps/program_enrollments/api/grades.py +++ b/lms/djangoapps/program_enrollments/api/grades.py @@ -4,7 +4,7 @@ Python API functions related to reading program-course grades. Outside of this subpackage, import these functions from `lms.djangoapps.program_enrollments.api`. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/program_enrollments/api/linking.py b/lms/djangoapps/program_enrollments/api/linking.py index 9538c0833e..4eea8dceb4 100644 --- a/lms/djangoapps/program_enrollments/api/linking.py +++ b/lms/djangoapps/program_enrollments/api/linking.py @@ -5,7 +5,7 @@ LMS user. Outside of this subpackage, import these functions from `lms.djangoapps.program_enrollments.api`. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/program_enrollments/api/reading.py b/lms/djangoapps/program_enrollments/api/reading.py index 84cc8fcea6..4a95bf7415 100644 --- a/lms/djangoapps/program_enrollments/api/reading.py +++ b/lms/djangoapps/program_enrollments/api/reading.py @@ -4,7 +4,7 @@ Python API functions related to reading program enrollments. Outside of this subpackage, import these functions from `lms.djangoapps.program_enrollments.api`. """ -from __future__ import absolute_import, unicode_literals + from organizations.models import Organization from social_django.models import UserSocialAuth diff --git a/lms/djangoapps/program_enrollments/api/tests/test_grades.py b/lms/djangoapps/program_enrollments/api/tests/test_grades.py index cb48754e19..83f6d22741 100644 --- a/lms/djangoapps/program_enrollments/api/tests/test_grades.py +++ b/lms/djangoapps/program_enrollments/api/tests/test_grades.py @@ -9,4 +9,4 @@ mocks in the view tests. This file serves as a placeholder and reminder to do that the next time there is development on the program_enrollments grades API. """ -from __future__ import absolute_import, unicode_literals + diff --git a/lms/djangoapps/program_enrollments/api/tests/test_linking.py b/lms/djangoapps/program_enrollments/api/tests/test_linking.py index a278b8a9ab..54d588bc5e 100644 --- a/lms/djangoapps/program_enrollments/api/tests/test_linking.py +++ b/lms/djangoapps/program_enrollments/api/tests/test_linking.py @@ -1,7 +1,7 @@ """ Tests for account linking Python API. """ -from __future__ import absolute_import, unicode_literals + from uuid import uuid4 diff --git a/lms/djangoapps/program_enrollments/api/tests/test_reading.py b/lms/djangoapps/program_enrollments/api/tests/test_reading.py index 44a8604e5c..1ad65ed612 100644 --- a/lms/djangoapps/program_enrollments/api/tests/test_reading.py +++ b/lms/djangoapps/program_enrollments/api/tests/test_reading.py @@ -1,7 +1,7 @@ """ Tests for program enrollment reading Python API. """ -from __future__ import absolute_import, unicode_literals + from uuid import UUID diff --git a/lms/djangoapps/program_enrollments/api/tests/test_writing.py b/lms/djangoapps/program_enrollments/api/tests/test_writing.py index 5db2decbca..d075e0f910 100644 --- a/lms/djangoapps/program_enrollments/api/tests/test_writing.py +++ b/lms/djangoapps/program_enrollments/api/tests/test_writing.py @@ -7,7 +7,7 @@ This is okay for now because they are all used in Eventually it would be good to directly test the Python API function and just use mocks in the view tests. """ -from __future__ import absolute_import, unicode_literals + from uuid import UUID diff --git a/lms/djangoapps/program_enrollments/api/writing.py b/lms/djangoapps/program_enrollments/api/writing.py index 6c9fdab91c..259c43e6d4 100644 --- a/lms/djangoapps/program_enrollments/api/writing.py +++ b/lms/djangoapps/program_enrollments/api/writing.py @@ -4,7 +4,7 @@ Python API functions related to writing program enrollments. Outside of this subpackage, import these functions from `lms.djangoapps.program_enrollments.api`. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/program_enrollments/apps.py b/lms/djangoapps/program_enrollments/apps.py index 55d1465691..c2e56b0697 100644 --- a/lms/djangoapps/program_enrollments/apps.py +++ b/lms/djangoapps/program_enrollments/apps.py @@ -2,7 +2,7 @@ """ ProgramEnrollments Application Configuration """ -from __future__ import absolute_import, unicode_literals + from django.apps import AppConfig diff --git a/lms/djangoapps/program_enrollments/constants.py b/lms/djangoapps/program_enrollments/constants.py index b02ba1834d..b8fea1f44f 100644 --- a/lms/djangoapps/program_enrollments/constants.py +++ b/lms/djangoapps/program_enrollments/constants.py @@ -2,7 +2,7 @@ Constants used throughout the program_enrollments app and exposed to other in-process apps through api.py. """ -from __future__ import absolute_import, unicode_literals + class ProgramEnrollmentStatuses(object): diff --git a/lms/djangoapps/program_enrollments/exceptions.py b/lms/djangoapps/program_enrollments/exceptions.py index 5ef09ee7c9..1cf14c9c84 100644 --- a/lms/djangoapps/program_enrollments/exceptions.py +++ b/lms/djangoapps/program_enrollments/exceptions.py @@ -1,7 +1,7 @@ """ Exceptions raised by functions exposed by program_enrollments Django app. """ -from __future__ import absolute_import, unicode_literals + # Every `__init__` here calls empty Exception() constructor. # pylint: disable=super-init-not-called diff --git a/lms/djangoapps/program_enrollments/management/commands/expire_waiting_enrollments.py b/lms/djangoapps/program_enrollments/management/commands/expire_waiting_enrollments.py index 6887c4abda..0d550dd010 100644 --- a/lms/djangoapps/program_enrollments/management/commands/expire_waiting_enrollments.py +++ b/lms/djangoapps/program_enrollments/management/commands/expire_waiting_enrollments.py @@ -1,5 +1,5 @@ """ Management command to cleanup old waiting enrollments """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/program_enrollments/management/commands/link_program_enrollments.py b/lms/djangoapps/program_enrollments/management/commands/link_program_enrollments.py index 62758a7785..e202575e17 100644 --- a/lms/djangoapps/program_enrollments/management/commands/link_program_enrollments.py +++ b/lms/djangoapps/program_enrollments/management/commands/link_program_enrollments.py @@ -1,5 +1,5 @@ """ Management command to link program enrollments and external student_keys to an LMS user """ -from __future__ import absolute_import, unicode_literals + from uuid import UUID diff --git a/lms/djangoapps/program_enrollments/management/commands/migrate_saml_uids.py b/lms/djangoapps/program_enrollments/management/commands/migrate_saml_uids.py index 466cb05950..91729d2453 100644 --- a/lms/djangoapps/program_enrollments/management/commands/migrate_saml_uids.py +++ b/lms/djangoapps/program_enrollments/management/commands/migrate_saml_uids.py @@ -5,7 +5,7 @@ Intented for use in production environments, to help support migration of existing SSO learners into our most-recent program enrollment flow without needing to manually re-link their account. """ -from __future__ import absolute_import, unicode_literals + import json import logging diff --git a/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py b/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py index 676d77d0ad..fa71747871 100644 --- a/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py +++ b/lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py @@ -4,7 +4,7 @@ a side effect of enrolling students. Intented for use in integration sandbox environments """ -from __future__ import absolute_import, unicode_literals + import logging from textwrap import dedent diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/test_expire_waiting_enrollments.py b/lms/djangoapps/program_enrollments/management/commands/tests/test_expire_waiting_enrollments.py index 72a33d8f37..7333b64bcd 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/test_expire_waiting_enrollments.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/test_expire_waiting_enrollments.py @@ -1,7 +1,7 @@ """ Tests for the expire_waiting_enrollments management command. """ -from __future__ import absolute_import + import ddt from django.core.management import call_command diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/test_link_program_enrollments.py b/lms/djangoapps/program_enrollments/management/commands/tests/test_link_program_enrollments.py index 262fd7a6f7..fcf9204706 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/test_link_program_enrollments.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/test_link_program_enrollments.py @@ -1,7 +1,7 @@ """ Tests for the link_program_enrollments management command. """ -from __future__ import absolute_import + from uuid import UUID diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py b/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py index 9c84d69e83..00e6137aec 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py @@ -1,7 +1,7 @@ """ Tests for the migrate_saml_uids management command. """ -from __future__ import absolute_import + from django.core.management import call_command from django.test import TestCase diff --git a/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py b/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py index 9bf25ee682..e8322807f1 100644 --- a/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py +++ b/lms/djangoapps/program_enrollments/management/commands/tests/test_reset_enrollment_data.py @@ -1,7 +1,7 @@ """ Tests for the reset_enrollment_data management command. """ -from __future__ import absolute_import + import sys from contextlib import contextmanager diff --git a/lms/djangoapps/program_enrollments/migrations/0001_initial.py b/lms/djangoapps/program_enrollments/migrations/0001_initial.py index 014a7eb4d9..6a30650384 100644 --- a/lms/djangoapps/program_enrollments/migrations/0001_initial.py +++ b/lms/djangoapps/program_enrollments/migrations/0001_initial.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-09 19:32 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/program_enrollments/migrations/0002_historicalprogramcourseenrollment_programcourseenrollment.py b/lms/djangoapps/program_enrollments/migrations/0002_historicalprogramcourseenrollment_programcourseenrollment.py index 32ae8cc5b0..443a346507 100644 --- a/lms/djangoapps/program_enrollments/migrations/0002_historicalprogramcourseenrollment_programcourseenrollment.py +++ b/lms/djangoapps/program_enrollments/migrations/0002_historicalprogramcourseenrollment_programcourseenrollment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-19 16:48 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/program_enrollments/migrations/0003_auto_20190424_1622.py b/lms/djangoapps/program_enrollments/migrations/0003_auto_20190424_1622.py index fec3bafd92..917bf37343 100644 --- a/lms/djangoapps/program_enrollments/migrations/0003_auto_20190424_1622.py +++ b/lms/djangoapps/program_enrollments/migrations/0003_auto_20190424_1622.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-24 16:22 -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations diff --git a/lms/djangoapps/program_enrollments/migrations/0004_add_programcourseenrollment_relatedname.py b/lms/djangoapps/program_enrollments/migrations/0004_add_programcourseenrollment_relatedname.py index cad69109b3..f38452ee72 100644 --- a/lms/djangoapps/program_enrollments/migrations/0004_add_programcourseenrollment_relatedname.py +++ b/lms/djangoapps/program_enrollments/migrations/0004_add_programcourseenrollment_relatedname.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-01 21:46 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/lms/djangoapps/program_enrollments/migrations/0005_canceled_not_withdrawn.py b/lms/djangoapps/program_enrollments/migrations/0005_canceled_not_withdrawn.py index 544ea23ad7..7f28a1f0e4 100644 --- a/lms/djangoapps/program_enrollments/migrations/0005_canceled_not_withdrawn.py +++ b/lms/djangoapps/program_enrollments/migrations/0005_canceled_not_withdrawn.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-06-03 13:14 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/program_enrollments/migrations/0006_add_the_correct_constraints.py b/lms/djangoapps/program_enrollments/migrations/0006_add_the_correct_constraints.py index 78d8e8f717..ada5553593 100644 --- a/lms/djangoapps/program_enrollments/migrations/0006_add_the_correct_constraints.py +++ b/lms/djangoapps/program_enrollments/migrations/0006_add_the_correct_constraints.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-08-23 15:37 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations diff --git a/lms/djangoapps/program_enrollments/migrations/0007_waiting_programcourseenrollment_constraint.py b/lms/djangoapps/program_enrollments/migrations/0007_waiting_programcourseenrollment_constraint.py index 1b8aa75a34..72eff0e767 100644 --- a/lms/djangoapps/program_enrollments/migrations/0007_waiting_programcourseenrollment_constraint.py +++ b/lms/djangoapps/program_enrollments/migrations/0007_waiting_programcourseenrollment_constraint.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-08-27 13:11 -from __future__ import unicode_literals + from django.db import migrations diff --git a/lms/djangoapps/program_enrollments/migrations/0008_add_ended_programenrollment_status.py b/lms/djangoapps/program_enrollments/migrations/0008_add_ended_programenrollment_status.py index 1e60ae929a..bfe8b369cc 100644 --- a/lms/djangoapps/program_enrollments/migrations/0008_add_ended_programenrollment_status.py +++ b/lms/djangoapps/program_enrollments/migrations/0008_add_ended_programenrollment_status.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2019-10-09 16:49 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/program_enrollments/models.py b/lms/djangoapps/program_enrollments/models.py index 06ff34f2a5..466181e2e2 100644 --- a/lms/djangoapps/program_enrollments/models.py +++ b/lms/djangoapps/program_enrollments/models.py @@ -2,7 +2,7 @@ """ Django model specifications for the Program Enrollments API """ -from __future__ import absolute_import, unicode_literals + from django.contrib.auth.models import User from django.core.exceptions import ValidationError diff --git a/lms/djangoapps/program_enrollments/rest_api/urls.py b/lms/djangoapps/program_enrollments/rest_api/urls.py index 6c95b7d39d..78fa347e16 100644 --- a/lms/djangoapps/program_enrollments/rest_api/urls.py +++ b/lms/djangoapps/program_enrollments/rest_api/urls.py @@ -2,7 +2,7 @@ Program Enrollment API URLs. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/constants.py b/lms/djangoapps/program_enrollments/rest_api/v1/constants.py index 9b81884e39..8beca787ab 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/constants.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/constants.py @@ -1,7 +1,7 @@ """ Constants used throughout the program_enrollments V1 API. """ -from __future__ import absolute_import, unicode_literals + # Captures strings composed of alphanumeric characters a-f and dashes. PROGRAM_UUID_PATTERN = r'(?P[A-Fa-f0-9-]+)' diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/serializers.py b/lms/djangoapps/program_enrollments/rest_api/v1/serializers.py index 758ff8f251..71a3cbd3ec 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/serializers.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/serializers.py @@ -1,7 +1,7 @@ """ API Serializers """ -from __future__ import absolute_import, unicode_literals + from rest_framework import serializers from six import text_type diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py b/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py index a3160f75ae..969ac87eac 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/tests/test_views.py @@ -1,7 +1,7 @@ """ Unit tests for ProgramEnrollment views. """ -from __future__ import absolute_import, unicode_literals + import json from collections import defaultdict diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/urls.py b/lms/djangoapps/program_enrollments/rest_api/v1/urls.py index 3aa3087587..9899ecbaa9 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/urls.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/urls.py @@ -1,5 +1,5 @@ """ Program Enrollments API v1 URLs. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/utils.py b/lms/djangoapps/program_enrollments/rest_api/v1/utils.py index a283e6b6f8..a7331a50b3 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/utils.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/utils.py @@ -2,7 +2,7 @@ """ ProgramEnrollment V1 API internal utilities. """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime, timedelta from functools import wraps diff --git a/lms/djangoapps/program_enrollments/rest_api/v1/views.py b/lms/djangoapps/program_enrollments/rest_api/v1/views.py index dbb31946b2..59d48f5a64 100644 --- a/lms/djangoapps/program_enrollments/rest_api/v1/views.py +++ b/lms/djangoapps/program_enrollments/rest_api/v1/views.py @@ -2,7 +2,7 @@ """ ProgramEnrollment Views """ -from __future__ import absolute_import, unicode_literals + from ccx_keys.locator import CCXLocator from django.conf import settings diff --git a/lms/djangoapps/program_enrollments/signals.py b/lms/djangoapps/program_enrollments/signals.py index a0f062c56c..6fa79d353d 100644 --- a/lms/djangoapps/program_enrollments/signals.py +++ b/lms/djangoapps/program_enrollments/signals.py @@ -1,7 +1,7 @@ """ Signal handlers for program enrollments """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/program_enrollments/tasks.py b/lms/djangoapps/program_enrollments/tasks.py index a2d86eb396..e454491e33 100644 --- a/lms/djangoapps/program_enrollments/tasks.py +++ b/lms/djangoapps/program_enrollments/tasks.py @@ -1,5 +1,5 @@ """ Tasks for program enrollments """ -from __future__ import absolute_import, unicode_literals + import logging from datetime import timedelta diff --git a/lms/djangoapps/program_enrollments/tests/factories.py b/lms/djangoapps/program_enrollments/tests/factories.py index f21a053c39..cb2e5e4844 100644 --- a/lms/djangoapps/program_enrollments/tests/factories.py +++ b/lms/djangoapps/program_enrollments/tests/factories.py @@ -1,7 +1,7 @@ """ Factories for Program Enrollment tests. """ -from __future__ import absolute_import + from uuid import uuid4 diff --git a/lms/djangoapps/program_enrollments/tests/test_admin.py b/lms/djangoapps/program_enrollments/tests/test_admin.py index 2cc5b7a0bf..ff46a116d7 100644 --- a/lms/djangoapps/program_enrollments/tests/test_admin.py +++ b/lms/djangoapps/program_enrollments/tests/test_admin.py @@ -1,7 +1,7 @@ """ Unit tests for the ProgramEnrollment admin classes. """ -from __future__ import absolute_import, unicode_literals + import mock from django.contrib.admin.sites import AdminSite diff --git a/lms/djangoapps/program_enrollments/tests/test_models.py b/lms/djangoapps/program_enrollments/tests/test_models.py index 596991bf39..ffd8abc568 100644 --- a/lms/djangoapps/program_enrollments/tests/test_models.py +++ b/lms/djangoapps/program_enrollments/tests/test_models.py @@ -1,7 +1,7 @@ """ Unit tests for ProgramEnrollment models. """ -from __future__ import absolute_import, unicode_literals + from uuid import uuid4 diff --git a/lms/djangoapps/program_enrollments/tests/test_signals.py b/lms/djangoapps/program_enrollments/tests/test_signals.py index 19152ce7ea..5bfc749d7a 100644 --- a/lms/djangoapps/program_enrollments/tests/test_signals.py +++ b/lms/djangoapps/program_enrollments/tests/test_signals.py @@ -2,7 +2,7 @@ Test signal handlers for program_enrollments """ -from __future__ import absolute_import, unicode_literals + import mock import pytest diff --git a/lms/djangoapps/program_enrollments/tests/test_tasks.py b/lms/djangoapps/program_enrollments/tests/test_tasks.py index d6c8d730b2..644c6a5747 100644 --- a/lms/djangoapps/program_enrollments/tests/test_tasks.py +++ b/lms/djangoapps/program_enrollments/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Unit tests for program_course_enrollments tasks """ -from __future__ import absolute_import, unicode_literals + from datetime import timedelta diff --git a/lms/djangoapps/rss_proxy/admin.py b/lms/djangoapps/rss_proxy/admin.py index c2a9092d5f..9710d5b343 100644 --- a/lms/djangoapps/rss_proxy/admin.py +++ b/lms/djangoapps/rss_proxy/admin.py @@ -1,7 +1,7 @@ """ Admin module for the rss_proxy djangoapp. """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/lms/djangoapps/rss_proxy/migrations/0001_initial.py b/lms/djangoapps/rss_proxy/migrations/0001_initial.py index 2ca263bbdb..db125c2bc0 100644 --- a/lms/djangoapps/rss_proxy/migrations/0001_initial.py +++ b/lms/djangoapps/rss_proxy/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import django.utils.timezone import model_utils.fields diff --git a/lms/djangoapps/rss_proxy/models.py b/lms/djangoapps/rss_proxy/models.py index 44ff8bcf87..f9712f152b 100644 --- a/lms/djangoapps/rss_proxy/models.py +++ b/lms/djangoapps/rss_proxy/models.py @@ -1,7 +1,7 @@ """ Models for the rss_proxy djangoapp. """ -from __future__ import absolute_import + import six from django.db import models diff --git a/lms/djangoapps/rss_proxy/tests/test_models.py b/lms/djangoapps/rss_proxy/tests/test_models.py index af9af26680..b93eacf2f3 100644 --- a/lms/djangoapps/rss_proxy/tests/test_models.py +++ b/lms/djangoapps/rss_proxy/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the rss_proxy models """ -from __future__ import absolute_import + import six from django.test import TestCase diff --git a/lms/djangoapps/rss_proxy/tests/test_views.py b/lms/djangoapps/rss_proxy/tests/test_views.py index 80f0256838..fc658d5b00 100644 --- a/lms/djangoapps/rss_proxy/tests/test_views.py +++ b/lms/djangoapps/rss_proxy/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the rss_proxy views """ -from __future__ import absolute_import, print_function + from django.test import TestCase from django.urls import reverse diff --git a/lms/djangoapps/rss_proxy/urls.py b/lms/djangoapps/rss_proxy/urls.py index 16db5edbed..0e397c0f1c 100644 --- a/lms/djangoapps/rss_proxy/urls.py +++ b/lms/djangoapps/rss_proxy/urls.py @@ -1,7 +1,7 @@ """ URLs for the rss_proxy djangoapp. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/rss_proxy/views.py b/lms/djangoapps/rss_proxy/views.py index c09919fe71..1761a24c1d 100644 --- a/lms/djangoapps/rss_proxy/views.py +++ b/lms/djangoapps/rss_proxy/views.py @@ -1,7 +1,7 @@ """ Views for the rss_proxy djangoapp. """ -from __future__ import absolute_import, print_function + import requests from django.conf import settings diff --git a/lms/djangoapps/shoppingcart/admin.py b/lms/djangoapps/shoppingcart/admin.py index 29cf3ee379..ebaccaa349 100644 --- a/lms/djangoapps/shoppingcart/admin.py +++ b/lms/djangoapps/shoppingcart/admin.py @@ -1,5 +1,5 @@ """Django admin interface for the shopping cart models. """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/lms/djangoapps/shoppingcart/api.py b/lms/djangoapps/shoppingcart/api.py index 059e971828..e13ac2c6c0 100644 --- a/lms/djangoapps/shoppingcart/api.py +++ b/lms/djangoapps/shoppingcart/api.py @@ -1,7 +1,7 @@ """ API for for getting information about the user's shopping cart. """ -from __future__ import absolute_import + from django.urls import reverse diff --git a/lms/djangoapps/shoppingcart/decorators.py b/lms/djangoapps/shoppingcart/decorators.py index 256c0f784d..08b1ffc889 100644 --- a/lms/djangoapps/shoppingcart/decorators.py +++ b/lms/djangoapps/shoppingcart/decorators.py @@ -2,7 +2,7 @@ This file defines any decorators used by the shopping cart app """ -from __future__ import absolute_import + from django.http import Http404 diff --git a/lms/djangoapps/shoppingcart/management/commands/retire_order.py b/lms/djangoapps/shoppingcart/management/commands/retire_order.py index e38a82260a..3ff1f2cbe0 100644 --- a/lms/djangoapps/shoppingcart/management/commands/retire_order.py +++ b/lms/djangoapps/shoppingcart/management/commands/retire_order.py @@ -2,7 +2,7 @@ Script for retiring order that went through cybersource but weren't marked as "purchased" in the db """ -from __future__ import absolute_import, print_function + from django.core.management.base import BaseCommand from six import text_type diff --git a/lms/djangoapps/shoppingcart/management/tests/test_retire_order.py b/lms/djangoapps/shoppingcart/management/tests/test_retire_order.py index 9e8185ac2c..44919e6631 100644 --- a/lms/djangoapps/shoppingcart/management/tests/test_retire_order.py +++ b/lms/djangoapps/shoppingcart/management/tests/test_retire_order.py @@ -1,6 +1,6 @@ """Tests for the retire_order command""" -from __future__ import absolute_import + from six import text_type from tempfile import NamedTemporaryFile diff --git a/lms/djangoapps/shoppingcart/migrations/0001_initial.py b/lms/djangoapps/shoppingcart/migrations/0001_initial.py index 4cc7dbd42b..f0917ab38d 100644 --- a/lms/djangoapps/shoppingcart/migrations/0001_initial.py +++ b/lms/djangoapps/shoppingcart/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/shoppingcart/migrations/0002_auto_20151208_1034.py b/lms/djangoapps/shoppingcart/migrations/0002_auto_20151208_1034.py index f32c3a720f..d394e88e41 100644 --- a/lms/djangoapps/shoppingcart/migrations/0002_auto_20151208_1034.py +++ b/lms/djangoapps/shoppingcart/migrations/0002_auto_20151208_1034.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/shoppingcart/migrations/0003_auto_20151217_0958.py b/lms/djangoapps/shoppingcart/migrations/0003_auto_20151217_0958.py index 4193192adb..15a5fcfb01 100644 --- a/lms/djangoapps/shoppingcart/migrations/0003_auto_20151217_0958.py +++ b/lms/djangoapps/shoppingcart/migrations/0003_auto_20151217_0958.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/shoppingcart/migrations/0004_change_meta_options.py b/lms/djangoapps/shoppingcart/migrations/0004_change_meta_options.py index 743e12cc87..ddf578d3c7 100644 --- a/lms/djangoapps/shoppingcart/migrations/0004_change_meta_options.py +++ b/lms/djangoapps/shoppingcart/migrations/0004_change_meta_options.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-05-14 20:37 -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index e019173a06..39a2f2ad74 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -1,7 +1,7 @@ # pylint: disable=arguments-differ """ Models for the shopping cart and assorted purchase types """ -from __future__ import absolute_import + import csv import json diff --git a/lms/djangoapps/shoppingcart/processors/CyberSource2.py b/lms/djangoapps/shoppingcart/processors/CyberSource2.py index 0fc58a22df..2e865a80d8 100644 --- a/lms/djangoapps/shoppingcart/processors/CyberSource2.py +++ b/lms/djangoapps/shoppingcart/processors/CyberSource2.py @@ -20,7 +20,7 @@ To enable this implementation, add the following Django settings: """ -from __future__ import absolute_import + import binascii import hmac diff --git a/lms/djangoapps/shoppingcart/processors/__init__.py b/lms/djangoapps/shoppingcart/processors/__init__.py index e95c0c7e09..70fe7a2a24 100644 --- a/lms/djangoapps/shoppingcart/processors/__init__.py +++ b/lms/djangoapps/shoppingcart/processors/__init__.py @@ -9,7 +9,7 @@ The specific implementation is determined at runtime using Django settings: """ -from __future__ import absolute_import + from django.conf import settings diff --git a/lms/djangoapps/shoppingcart/processors/exceptions.py b/lms/djangoapps/shoppingcart/processors/exceptions.py index 98ef8935ea..25cd397225 100644 --- a/lms/djangoapps/shoppingcart/processors/exceptions.py +++ b/lms/djangoapps/shoppingcart/processors/exceptions.py @@ -1,7 +1,7 @@ """ Payment processing exceptions """ -from __future__ import absolute_import + from shoppingcart.exceptions import PaymentException diff --git a/lms/djangoapps/shoppingcart/processors/helpers.py b/lms/djangoapps/shoppingcart/processors/helpers.py index aeb2ce1f53..79bf23b5ec 100644 --- a/lms/djangoapps/shoppingcart/processors/helpers.py +++ b/lms/djangoapps/shoppingcart/processors/helpers.py @@ -3,7 +3,7 @@ Helper methods for credit card processing modules. These methods should be shared among all processor implementations, but should NOT be imported by modules outside this package. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/lms/djangoapps/shoppingcart/processors/tests/test_CyberSource2.py b/lms/djangoapps/shoppingcart/processors/tests/test_CyberSource2.py index b67ef978f1..62606efaba 100644 --- a/lms/djangoapps/shoppingcart/processors/tests/test_CyberSource2.py +++ b/lms/djangoapps/shoppingcart/processors/tests/test_CyberSource2.py @@ -2,7 +2,7 @@ """ Tests for the newer CyberSource API implementation. """ -from __future__ import absolute_import + import ddt from django.conf import settings diff --git a/lms/djangoapps/shoppingcart/reports.py b/lms/djangoapps/shoppingcart/reports.py index 322903c5e7..79269a0c68 100644 --- a/lms/djangoapps/shoppingcart/reports.py +++ b/lms/djangoapps/shoppingcart/reports.py @@ -1,6 +1,6 @@ """ Objects and functions related to generating CSV reports """ -from __future__ import absolute_import + from decimal import Decimal diff --git a/lms/djangoapps/shoppingcart/tests/payment_fake.py b/lms/djangoapps/shoppingcart/tests/payment_fake.py index e1847d61e3..f48ad61747 100644 --- a/lms/djangoapps/shoppingcart/tests/payment_fake.py +++ b/lms/djangoapps/shoppingcart/tests/payment_fake.py @@ -13,7 +13,7 @@ request to the view with param "success" set to "success" or "failure". The view defaults to payment success. """ -from __future__ import absolute_import + from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.csrf import csrf_exempt diff --git a/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py b/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py index a046f53d79..3df8d56b7a 100644 --- a/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py +++ b/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py @@ -2,7 +2,7 @@ """ Dashboard with Shopping Cart History tests with configuration overrides. """ -from __future__ import absolute_import + from django.urls import reverse from mock import patch diff --git a/lms/djangoapps/shoppingcart/tests/test_context_processor.py b/lms/djangoapps/shoppingcart/tests/test_context_processor.py index 30ae9e42bf..605d7aec4c 100644 --- a/lms/djangoapps/shoppingcart/tests/test_context_processor.py +++ b/lms/djangoapps/shoppingcart/tests/test_context_processor.py @@ -1,7 +1,7 @@ """ Unit tests for shoppingcart context_processor """ -from __future__ import absolute_import + from django.conf import settings from django.contrib.auth.models import AnonymousUser diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index ce58763fdb..d0a2954e54 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the Shopping Cart Models """ -from __future__ import absolute_import + import copy import datetime diff --git a/lms/djangoapps/shoppingcart/tests/test_payment_fake.py b/lms/djangoapps/shoppingcart/tests/test_payment_fake.py index 29f56ae996..44f1b8ea9b 100644 --- a/lms/djangoapps/shoppingcart/tests/test_payment_fake.py +++ b/lms/djangoapps/shoppingcart/tests/test_payment_fake.py @@ -2,7 +2,7 @@ Tests for the fake payment page used in acceptance tests. """ -from __future__ import absolute_import + from collections import OrderedDict diff --git a/lms/djangoapps/shoppingcart/tests/test_reports.py b/lms/djangoapps/shoppingcart/tests/test_reports.py index 0a2be06666..c13a09776c 100644 --- a/lms/djangoapps/shoppingcart/tests/test_reports.py +++ b/lms/djangoapps/shoppingcart/tests/test_reports.py @@ -2,7 +2,7 @@ """ Tests for the Shopping Cart Models """ -from __future__ import absolute_import + import datetime from textwrap import dedent diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index 25327ea6d8..3c4d7856ef 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for Shopping Cart views """ -from __future__ import absolute_import + import json from collections import OrderedDict diff --git a/lms/djangoapps/shoppingcart/urls.py b/lms/djangoapps/shoppingcart/urls.py index e1a2ab7d6b..e2e9612233 100644 --- a/lms/djangoapps/shoppingcart/urls.py +++ b/lms/djangoapps/shoppingcart/urls.py @@ -2,7 +2,7 @@ Defines the shoppingcart URLs """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/shoppingcart/utils.py b/lms/djangoapps/shoppingcart/utils.py index c591e39aea..5052e0ec1f 100644 --- a/lms/djangoapps/shoppingcart/utils.py +++ b/lms/djangoapps/shoppingcart/utils.py @@ -2,7 +2,7 @@ Utility methods for the Shopping Cart app """ -from __future__ import absolute_import + from django.conf import settings from pdfminer.converter import PDFPageAggregator diff --git a/lms/djangoapps/shoppingcart/views.py b/lms/djangoapps/shoppingcart/views.py index 645ffb0a6c..edfbf5bf78 100644 --- a/lms/djangoapps/shoppingcart/views.py +++ b/lms/djangoapps/shoppingcart/views.py @@ -1,6 +1,6 @@ """This module contains views related to shopping cart""" -from __future__ import absolute_import + import datetime import decimal diff --git a/lms/djangoapps/static_template_view/tests/test_views.py b/lms/djangoapps/static_template_view/tests/test_views.py index 4bfb85d443..749fcd4abf 100644 --- a/lms/djangoapps/static_template_view/tests/test_views.py +++ b/lms/djangoapps/static_template_view/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for static templates """ -from __future__ import absolute_import + from django.conf import settings from django.test import TestCase diff --git a/lms/djangoapps/static_template_view/urls.py b/lms/djangoapps/static_template_view/urls.py index 1ed255832a..caba6c8bfb 100644 --- a/lms/djangoapps/static_template_view/urls.py +++ b/lms/djangoapps/static_template_view/urls.py @@ -2,7 +2,7 @@ URLs for static_template_view app """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/static_template_view/views.py b/lms/djangoapps/static_template_view/views.py index 0c0d4e46c8..d917ceb0b3 100644 --- a/lms/djangoapps/static_template_view/views.py +++ b/lms/djangoapps/static_template_view/views.py @@ -3,7 +3,7 @@ # List of valid templates is explicitly managed for (short-term) # security reasons. -from __future__ import absolute_import + import mimetypes diff --git a/lms/djangoapps/staticbook/tests.py b/lms/djangoapps/staticbook/tests.py index aaaedc0a04..149bb237f0 100644 --- a/lms/djangoapps/staticbook/tests.py +++ b/lms/djangoapps/staticbook/tests.py @@ -2,7 +2,7 @@ Test the lms/staticbook views. """ -from __future__ import absolute_import + import textwrap diff --git a/lms/djangoapps/staticbook/views.py b/lms/djangoapps/staticbook/views.py index d184bfe1e4..d2ecda05a2 100644 --- a/lms/djangoapps/staticbook/views.py +++ b/lms/djangoapps/staticbook/views.py @@ -2,7 +2,7 @@ Views for serving static textbooks. """ -from __future__ import absolute_import + from django.contrib.auth.decorators import login_required from django.http import Http404 diff --git a/lms/djangoapps/support/decorators.py b/lms/djangoapps/support/decorators.py index a1971e218e..e910cb7e57 100644 --- a/lms/djangoapps/support/decorators.py +++ b/lms/djangoapps/support/decorators.py @@ -1,7 +1,7 @@ """ Decorators used by the support app. """ -from __future__ import absolute_import + from functools import wraps diff --git a/lms/djangoapps/support/serializers.py b/lms/djangoapps/support/serializers.py index f5bf594fdd..0dfff10191 100644 --- a/lms/djangoapps/support/serializers.py +++ b/lms/djangoapps/support/serializers.py @@ -1,7 +1,7 @@ """ Serializers for use in the support app. """ -from __future__ import absolute_import + from rest_framework import serializers diff --git a/lms/djangoapps/support/tests/test_refund.py b/lms/djangoapps/support/tests/test_refund.py index e68d64b1d7..51a50541d2 100644 --- a/lms/djangoapps/support/tests/test_refund.py +++ b/lms/djangoapps/support/tests/test_refund.py @@ -7,7 +7,7 @@ so we can easily deprecate it once the transition from shoppingcart to the E-Commerce service is complete. """ -from __future__ import absolute_import + import datetime diff --git a/lms/djangoapps/support/tests/test_views.py b/lms/djangoapps/support/tests/test_views.py index f2416a7508..9a6a4bd0e6 100644 --- a/lms/djangoapps/support/tests/test_views.py +++ b/lms/djangoapps/support/tests/test_views.py @@ -3,7 +3,7 @@ Tests for support views. """ -from __future__ import absolute_import + import itertools import json diff --git a/lms/djangoapps/support/urls.py b/lms/djangoapps/support/urls.py index 237775f0a7..49b3bf2eee 100644 --- a/lms/djangoapps/support/urls.py +++ b/lms/djangoapps/support/urls.py @@ -1,7 +1,7 @@ """ URLs for the student support app. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/support/views/certificate.py b/lms/djangoapps/support/views/certificate.py index 4bd7b78669..7f0952f03f 100644 --- a/lms/djangoapps/support/views/certificate.py +++ b/lms/djangoapps/support/views/certificate.py @@ -1,7 +1,7 @@ """ Certificate tool in the student support app. """ -from __future__ import absolute_import + from six.moves.urllib.parse import unquote, quote_plus # pylint: disable=import-error from django.utils.decorators import method_decorator diff --git a/lms/djangoapps/support/views/contact_us.py b/lms/djangoapps/support/views/contact_us.py index a8ff65bf16..7a63d3f3b8 100644 --- a/lms/djangoapps/support/views/contact_us.py +++ b/lms/djangoapps/support/views/contact_us.py @@ -1,7 +1,7 @@ """ Signle support contact view """ -from __future__ import absolute_import + from django.conf import settings from django.http import Http404 diff --git a/lms/djangoapps/support/views/course_entitlements.py b/lms/djangoapps/support/views/course_entitlements.py index 912e38f075..fef11fdc77 100644 --- a/lms/djangoapps/support/views/course_entitlements.py +++ b/lms/djangoapps/support/views/course_entitlements.py @@ -1,7 +1,7 @@ """ Support tool for changing and granting course entitlements """ -from __future__ import absolute_import + from django.utils.decorators import method_decorator from django.views.generic import View diff --git a/lms/djangoapps/support/views/enrollments.py b/lms/djangoapps/support/views/enrollments.py index 3c7d7aa092..6a7f2dd399 100644 --- a/lms/djangoapps/support/views/enrollments.py +++ b/lms/djangoapps/support/views/enrollments.py @@ -1,7 +1,7 @@ """ Support tool for changing course enrollments. """ -from __future__ import absolute_import + import six from django.contrib.auth.models import User diff --git a/lms/djangoapps/support/views/feature_based_enrollments.py b/lms/djangoapps/support/views/feature_based_enrollments.py index 94d524bc35..d6511a82e9 100644 --- a/lms/djangoapps/support/views/feature_based_enrollments.py +++ b/lms/djangoapps/support/views/feature_based_enrollments.py @@ -1,7 +1,7 @@ """ Support tool for viewing course duration information """ -from __future__ import absolute_import + from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator diff --git a/lms/djangoapps/support/views/index.py b/lms/djangoapps/support/views/index.py index 2a8d4adddf..002df54eb0 100644 --- a/lms/djangoapps/support/views/index.py +++ b/lms/djangoapps/support/views/index.py @@ -1,7 +1,7 @@ """ Index view for the support app. """ -from __future__ import absolute_import + from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ diff --git a/lms/djangoapps/support/views/manage_user.py b/lms/djangoapps/support/views/manage_user.py index a56e56d5a6..7642ca734e 100644 --- a/lms/djangoapps/support/views/manage_user.py +++ b/lms/djangoapps/support/views/manage_user.py @@ -1,7 +1,7 @@ """ Support tool for disabling user accounts. """ -from __future__ import absolute_import + from django.contrib.auth import get_user_model from django.db.models import Q diff --git a/lms/djangoapps/support/views/program_enrollments.py b/lms/djangoapps/support/views/program_enrollments.py index 32c3eaced8..54615d84a2 100644 --- a/lms/djangoapps/support/views/program_enrollments.py +++ b/lms/djangoapps/support/views/program_enrollments.py @@ -1,7 +1,7 @@ """ Support tool for changing course enrollments. """ -from __future__ import absolute_import, unicode_literals + import csv from uuid import UUID diff --git a/lms/djangoapps/support/views/refund.py b/lms/djangoapps/support/views/refund.py index 5c8718a643..b7385414b9 100644 --- a/lms/djangoapps/support/views/refund.py +++ b/lms/djangoapps/support/views/refund.py @@ -10,7 +10,7 @@ with an E-Commerce service that supports automatic refunds. Once that transition is complete, we can remove this view. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/survey/admin.py b/lms/djangoapps/survey/admin.py index f16a6de4aa..5e73e1c2bf 100644 --- a/lms/djangoapps/survey/admin.py +++ b/lms/djangoapps/survey/admin.py @@ -2,7 +2,7 @@ Provide accessors to these models via the Django Admin pages """ -from __future__ import absolute_import + from django import forms from django.contrib import admin diff --git a/lms/djangoapps/survey/apps.py b/lms/djangoapps/survey/apps.py index 43ebba50a9..9ef9dac3cd 100644 --- a/lms/djangoapps/survey/apps.py +++ b/lms/djangoapps/survey/apps.py @@ -2,7 +2,7 @@ Survey Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/survey/migrations/0001_initial.py b/lms/djangoapps/survey/migrations/0001_initial.py index b02e217644..91f3cc5316 100644 --- a/lms/djangoapps/survey/migrations/0001_initial.py +++ b/lms/djangoapps/survey/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import django.utils.timezone from django.conf import settings diff --git a/lms/djangoapps/survey/models.py b/lms/djangoapps/survey/models.py index a446dd1bc8..9c68f693e9 100644 --- a/lms/djangoapps/survey/models.py +++ b/lms/djangoapps/survey/models.py @@ -2,7 +2,7 @@ Models to support Course Surveys feature """ -from __future__ import absolute_import + import logging from collections import OrderedDict diff --git a/lms/djangoapps/survey/signals.py b/lms/djangoapps/survey/signals.py index 665c7d6660..4796477188 100644 --- a/lms/djangoapps/survey/signals.py +++ b/lms/djangoapps/survey/signals.py @@ -1,7 +1,7 @@ """ Signal handlers for the survey app """ -from __future__ import absolute_import + from django.dispatch.dispatcher import receiver diff --git a/lms/djangoapps/survey/tests/factories.py b/lms/djangoapps/survey/tests/factories.py index 8c35737733..f8f3bbf217 100644 --- a/lms/djangoapps/survey/tests/factories.py +++ b/lms/djangoapps/survey/tests/factories.py @@ -1,5 +1,5 @@ # pylint:disable=missing-docstring -from __future__ import absolute_import + import factory diff --git a/lms/djangoapps/survey/tests/test_models.py b/lms/djangoapps/survey/tests/test_models.py index ed2de628fd..e0ac8de628 100644 --- a/lms/djangoapps/survey/tests/test_models.py +++ b/lms/djangoapps/survey/tests/test_models.py @@ -2,7 +2,7 @@ Python tests for the Survey models """ -from __future__ import absolute_import + from collections import OrderedDict diff --git a/lms/djangoapps/survey/tests/test_signals.py b/lms/djangoapps/survey/tests/test_signals.py index dfaf002382..e5b869321d 100644 --- a/lms/djangoapps/survey/tests/test_signals.py +++ b/lms/djangoapps/survey/tests/test_signals.py @@ -2,7 +2,7 @@ Test signal handlers for the survey app """ -from __future__ import absolute_import + from lms.djangoapps.survey.signals import _listen_for_lms_retire from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement diff --git a/lms/djangoapps/survey/tests/test_utils.py b/lms/djangoapps/survey/tests/test_utils.py index 912b17858c..42fdf18d4b 100644 --- a/lms/djangoapps/survey/tests/test_utils.py +++ b/lms/djangoapps/survey/tests/test_utils.py @@ -2,7 +2,7 @@ Python tests for the Survey models """ -from __future__ import absolute_import + from collections import OrderedDict diff --git a/lms/djangoapps/survey/tests/test_views.py b/lms/djangoapps/survey/tests/test_views.py index 2bcbfa9644..985d9b0c91 100644 --- a/lms/djangoapps/survey/tests/test_views.py +++ b/lms/djangoapps/survey/tests/test_views.py @@ -2,7 +2,7 @@ Python tests for the Survey views """ -from __future__ import absolute_import + import json from collections import OrderedDict diff --git a/lms/djangoapps/survey/urls.py b/lms/djangoapps/survey/urls.py index 1426acfa72..17adeb4cc4 100644 --- a/lms/djangoapps/survey/urls.py +++ b/lms/djangoapps/survey/urls.py @@ -2,7 +2,7 @@ URL mappings for the Survey feature """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/lms/djangoapps/survey/utils.py b/lms/djangoapps/survey/utils.py index 5cc90a574e..462ffcbfbe 100644 --- a/lms/djangoapps/survey/utils.py +++ b/lms/djangoapps/survey/utils.py @@ -1,7 +1,7 @@ """ Utilities for determining whether or not a survey needs to be completed. """ -from __future__ import absolute_import + from lms.djangoapps.courseware.access import has_access from survey.models import SurveyAnswer, SurveyForm diff --git a/lms/djangoapps/survey/views.py b/lms/djangoapps/survey/views.py index a7566d4ec9..b64a0a5310 100644 --- a/lms/djangoapps/survey/views.py +++ b/lms/djangoapps/survey/views.py @@ -2,7 +2,7 @@ View endpoints for Survey """ -from __future__ import absolute_import + import json import logging diff --git a/lms/djangoapps/teams/__init__.py b/lms/djangoapps/teams/__init__.py index 97dc0bca22..f2600b66db 100644 --- a/lms/djangoapps/teams/__init__.py +++ b/lms/djangoapps/teams/__init__.py @@ -1,7 +1,7 @@ """ Defines common methods shared by Teams classes """ -from __future__ import absolute_import, unicode_literals + from django.conf import settings diff --git a/lms/djangoapps/teams/admin.py b/lms/djangoapps/teams/admin.py index 6b5e931472..0bb7d8377c 100644 --- a/lms/djangoapps/teams/admin.py +++ b/lms/djangoapps/teams/admin.py @@ -1,7 +1,7 @@ """ Admin registration for Course Teams. """ -from __future__ import absolute_import, unicode_literals + from django.contrib import admin diff --git a/lms/djangoapps/teams/api.py b/lms/djangoapps/teams/api.py index 01f6f8d0aa..109bb15d89 100644 --- a/lms/djangoapps/teams/api.py +++ b/lms/djangoapps/teams/api.py @@ -1,7 +1,7 @@ """ The Python API other app should use to work with Teams feature """ -from __future__ import absolute_import, unicode_literals + import logging from enum import Enum diff --git a/lms/djangoapps/teams/api_urls.py b/lms/djangoapps/teams/api_urls.py index 025caf84b6..8c8f905d14 100644 --- a/lms/djangoapps/teams/api_urls.py +++ b/lms/djangoapps/teams/api_urls.py @@ -1,7 +1,7 @@ """ Defines the URL routes for the Team API. """ -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/teams/errors.py b/lms/djangoapps/teams/errors.py index 491660b49b..35f0c08c31 100644 --- a/lms/djangoapps/teams/errors.py +++ b/lms/djangoapps/teams/errors.py @@ -1,7 +1,7 @@ """ Errors thrown in the Team API. """ -from __future__ import absolute_import, unicode_literals + class TeamAPIRequestError(Exception): diff --git a/lms/djangoapps/teams/management/commands/reindex_course_team.py b/lms/djangoapps/teams/management/commands/reindex_course_team.py index 92c764f16c..6ea3374919 100644 --- a/lms/djangoapps/teams/management/commands/reindex_course_team.py +++ b/lms/djangoapps/teams/management/commands/reindex_course_team.py @@ -1,7 +1,7 @@ """ Management command to update course_teams' search index. """ -from __future__ import absolute_import, print_function, unicode_literals + from textwrap import dedent diff --git a/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py b/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py index f049f2a2af..393a9dcc9b 100644 --- a/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py +++ b/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py @@ -1,7 +1,7 @@ """ Tests for course_team reindex command. """ -from __future__ import absolute_import, unicode_literals + import ddt from django.core.management import CommandError, call_command diff --git a/lms/djangoapps/teams/migrations/0001_initial.py b/lms/djangoapps/teams/migrations/0001_initial.py index 7c91d36fd6..1b206d0bd0 100644 --- a/lms/djangoapps/teams/migrations/0001_initial.py +++ b/lms/djangoapps/teams/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django_countries.fields from django.conf import settings diff --git a/lms/djangoapps/teams/migrations/0002_slug_field_ids.py b/lms/djangoapps/teams/migrations/0002_slug_field_ids.py index c44314da5b..834f51c449 100644 --- a/lms/djangoapps/teams/migrations/0002_slug_field_ids.py +++ b/lms/djangoapps/teams/migrations/0002_slug_field_ids.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-10-22 14:42 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/teams/migrations/0003_courseteam_organization_protected.py b/lms/djangoapps/teams/migrations/0003_courseteam_organization_protected.py index 5fb87f0ca8..9c201539da 100644 --- a/lms/djangoapps/teams/migrations/0003_courseteam_organization_protected.py +++ b/lms/djangoapps/teams/migrations/0003_courseteam_organization_protected.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-11-04 19:15 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/teams/models.py b/lms/djangoapps/teams/models.py index e9cb9cc278..aebd6a80fe 100644 --- a/lms/djangoapps/teams/models.py +++ b/lms/djangoapps/teams/models.py @@ -1,7 +1,7 @@ """ Django models related to teams functionality. """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime from uuid import uuid4 diff --git a/lms/djangoapps/teams/plugins.py b/lms/djangoapps/teams/plugins.py index 9d1074ab31..da67b48e76 100644 --- a/lms/djangoapps/teams/plugins.py +++ b/lms/djangoapps/teams/plugins.py @@ -1,7 +1,7 @@ """ Definition of the course team feature. """ -from __future__ import absolute_import, unicode_literals + from django.utils.translation import ugettext_noop diff --git a/lms/djangoapps/teams/search_indexes.py b/lms/djangoapps/teams/search_indexes.py index 6806555b52..0d9caf72cf 100644 --- a/lms/djangoapps/teams/search_indexes.py +++ b/lms/djangoapps/teams/search_indexes.py @@ -2,7 +2,7 @@ Search index used to load data into elasticsearch. """ -from __future__ import absolute_import, unicode_literals + import logging from functools import wraps diff --git a/lms/djangoapps/teams/serializers.py b/lms/djangoapps/teams/serializers.py index 67a760a119..8a8b1ce953 100644 --- a/lms/djangoapps/teams/serializers.py +++ b/lms/djangoapps/teams/serializers.py @@ -1,7 +1,7 @@ """ Defines serializers used by the Team API. """ -from __future__ import absolute_import, unicode_literals + from copy import deepcopy diff --git a/lms/djangoapps/teams/services.py b/lms/djangoapps/teams/services.py index 486a2a81d8..900d4eb0b6 100644 --- a/lms/djangoapps/teams/services.py +++ b/lms/djangoapps/teams/services.py @@ -1,5 +1,5 @@ """ Services to expose the Teams API to XBlocks """ -from __future__ import absolute_import + from django.urls import reverse diff --git a/lms/djangoapps/teams/tests/factories.py b/lms/djangoapps/teams/tests/factories.py index b1917a49b1..fd76b9f40d 100644 --- a/lms/djangoapps/teams/tests/factories.py +++ b/lms/djangoapps/teams/tests/factories.py @@ -1,7 +1,7 @@ """ Factories for testing the Teams API. """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime from uuid import uuid4 diff --git a/lms/djangoapps/teams/tests/test_api.py b/lms/djangoapps/teams/tests/test_api.py index fb4ab853d7..9b09cc2378 100644 --- a/lms/djangoapps/teams/tests/test_api.py +++ b/lms/djangoapps/teams/tests/test_api.py @@ -2,7 +2,7 @@ """ Tests for Python APIs of the Teams app """ -from __future__ import absolute_import, unicode_literals + import unittest from uuid import uuid4 diff --git a/lms/djangoapps/teams/tests/test_models.py b/lms/djangoapps/teams/tests/test_models.py index 42fad5d3ce..f953d180e9 100644 --- a/lms/djangoapps/teams/tests/test_models.py +++ b/lms/djangoapps/teams/tests/test_models.py @@ -2,7 +2,7 @@ """ Tests for the teams API at the HTTP request level. """ -from __future__ import absolute_import, unicode_literals + import itertools from contextlib import contextmanager diff --git a/lms/djangoapps/teams/tests/test_serializers.py b/lms/djangoapps/teams/tests/test_serializers.py index fde8125581..b90bc3ec56 100644 --- a/lms/djangoapps/teams/tests/test_serializers.py +++ b/lms/djangoapps/teams/tests/test_serializers.py @@ -2,7 +2,7 @@ """ Tests for custom Teams Serializers. """ -from __future__ import absolute_import, unicode_literals + import six from django.core.paginator import Paginator diff --git a/lms/djangoapps/teams/tests/test_services.py b/lms/djangoapps/teams/tests/test_services.py index 09708e6310..acde4570e0 100644 --- a/lms/djangoapps/teams/tests/test_services.py +++ b/lms/djangoapps/teams/tests/test_services.py @@ -2,7 +2,7 @@ """ Tests for any Teams app services """ -from __future__ import absolute_import, unicode_literals + from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from openedx.core.djangoapps.catalog.tests.factories import CourseRunFactory diff --git a/lms/djangoapps/teams/tests/test_views.py b/lms/djangoapps/teams/tests/test_views.py index a7d288075c..a18ad0ba9a 100644 --- a/lms/djangoapps/teams/tests/test_views.py +++ b/lms/djangoapps/teams/tests/test_views.py @@ -2,7 +2,7 @@ """ Tests for the teams API at the HTTP request level. """ -from __future__ import absolute_import, unicode_literals + import json import unittest diff --git a/lms/djangoapps/teams/urls.py b/lms/djangoapps/teams/urls.py index 5f4de64f97..b506d4896a 100644 --- a/lms/djangoapps/teams/urls.py +++ b/lms/djangoapps/teams/urls.py @@ -2,7 +2,7 @@ Defines the URL routes for this app. """ -from __future__ import absolute_import, unicode_literals + from django.conf.urls import url from django.contrib.auth.decorators import login_required diff --git a/lms/djangoapps/teams/utils.py b/lms/djangoapps/teams/utils.py index fb134ec691..6efe6db3b3 100644 --- a/lms/djangoapps/teams/utils.py +++ b/lms/djangoapps/teams/utils.py @@ -2,7 +2,7 @@ Utility methods related to teams. """ -from __future__ import absolute_import, unicode_literals + from eventtracking import tracker diff --git a/lms/djangoapps/teams/views.py b/lms/djangoapps/teams/views.py index a0aa038f8e..e9146b3b11 100644 --- a/lms/djangoapps/teams/views.py +++ b/lms/djangoapps/teams/views.py @@ -1,7 +1,7 @@ """ HTTP endpoints for the Teams API. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/lms/djangoapps/tests/test_utils.py b/lms/djangoapps/tests/test_utils.py index 29b061fa33..0d809a9eb7 100644 --- a/lms/djangoapps/tests/test_utils.py +++ b/lms/djangoapps/tests/test_utils.py @@ -1,7 +1,7 @@ """ Unit Tests for Utils Class """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/lms/djangoapps/verify_student/admin.py b/lms/djangoapps/verify_student/admin.py index 971d2d689c..cfaff49d8f 100644 --- a/lms/djangoapps/verify_student/admin.py +++ b/lms/djangoapps/verify_student/admin.py @@ -3,7 +3,7 @@ Admin site configurations for verify_student. """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/lms/djangoapps/verify_student/apps.py b/lms/djangoapps/verify_student/apps.py index cbc1d7c447..4470839318 100644 --- a/lms/djangoapps/verify_student/apps.py +++ b/lms/djangoapps/verify_student/apps.py @@ -2,7 +2,7 @@ Student Identity Verification Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/lms/djangoapps/verify_student/image.py b/lms/djangoapps/verify_student/image.py index 77773d2023..3209b2a395 100644 --- a/lms/djangoapps/verify_student/image.py +++ b/lms/djangoapps/verify_student/image.py @@ -1,7 +1,7 @@ """ Image encoding helpers for the verification app. """ -from __future__ import absolute_import + import base64 import logging diff --git a/lms/djangoapps/verify_student/management/commands/delete_historical_verify_student_data.py b/lms/djangoapps/verify_student/management/commands/delete_historical_verify_student_data.py index ec30f5a58b..098de9f1b4 100644 --- a/lms/djangoapps/verify_student/management/commands/delete_historical_verify_student_data.py +++ b/lms/djangoapps/verify_student/management/commands/delete_historical_verify_student_data.py @@ -2,7 +2,7 @@ Command to delete all rows from the verify_student_historicalverificationdeadline table. """ -from __future__ import absolute_import + import logging diff --git a/lms/djangoapps/verify_student/management/commands/manual_verifications.py b/lms/djangoapps/verify_student/management/commands/manual_verifications.py index 2f2d5c6c56..47a9869979 100644 --- a/lms/djangoapps/verify_student/management/commands/manual_verifications.py +++ b/lms/djangoapps/verify_student/management/commands/manual_verifications.py @@ -1,7 +1,7 @@ """ Django admin commands related to verify_student """ -from __future__ import absolute_import + import logging import os diff --git a/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py b/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py index 0c56118b6a..4f9ed84108 100644 --- a/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py +++ b/lms/djangoapps/verify_student/management/commands/populate_expiry_date.py @@ -1,7 +1,7 @@ """ Django admin command to populate expiry_date for approved verifications in SoftwareSecurePhotoVerification """ -from __future__ import absolute_import + import logging import time diff --git a/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py b/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py index 515c3ad8eb..7b900f9a81 100644 --- a/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py +++ b/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py @@ -1,7 +1,7 @@ """ Django admin commands related to verify_student """ -from __future__ import absolute_import, print_function + import logging from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py b/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py index fce36f6041..fee92b27ff 100644 --- a/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py +++ b/lms/djangoapps/verify_student/management/commands/send_verification_expiry_email.py @@ -1,7 +1,7 @@ """ Django admin command to send verification expiry email to learners """ -from __future__ import absolute_import + import logging import time diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py b/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py index 170e15d131..ab7aa0cab3 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_manual_verify_student.py @@ -2,7 +2,7 @@ Tests for django admin commands in the verify_student module """ -from __future__ import absolute_import + import logging import os diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py b/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py index 9337a2b1c3..3dcbaa60d7 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_populate_expiry_date.py @@ -2,7 +2,7 @@ Tests for django admin command `populate_expiry_date` in the verify_student module """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py b/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py index 11449eccd4..f763f6c68b 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_send_verification_expiry_email.py @@ -2,7 +2,7 @@ Tests for django admin command `send_verification_expiry_email` in the verify_student module """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py b/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py index 6fdc032b52..76ac4864d6 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py @@ -3,7 +3,7 @@ Tests for django admin commands in the verify_student module Lots of imports from verify_student's model tests, since they cover similar ground """ -from __future__ import absolute_import + import boto from django.conf import settings diff --git a/lms/djangoapps/verify_student/message_types.py b/lms/djangoapps/verify_student/message_types.py index e04c0c07c7..210e28af3c 100644 --- a/lms/djangoapps/verify_student/message_types.py +++ b/lms/djangoapps/verify_student/message_types.py @@ -2,7 +2,7 @@ ACE message types for the verify_student module. """ -from __future__ import absolute_import + from openedx.core.djangoapps.ace_common.message import BaseMessageType diff --git a/lms/djangoapps/verify_student/migrations/0001_initial.py b/lms/djangoapps/verify_student/migrations/0001_initial.py index 5f70dc6c64..97337a34b4 100644 --- a/lms/djangoapps/verify_student/migrations/0001_initial.py +++ b/lms/djangoapps/verify_student/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py b/lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py index 51a13a886b..4fc4b2ecea 100644 --- a/lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py +++ b/lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/verify_student/migrations/0003_auto_20151113_1443.py b/lms/djangoapps/verify_student/migrations/0003_auto_20151113_1443.py index 34628b5f5c..837de2c231 100644 --- a/lms/djangoapps/verify_student/migrations/0003_auto_20151113_1443.py +++ b/lms/djangoapps/verify_student/migrations/0003_auto_20151113_1443.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/verify_student/migrations/0004_delete_historical_records.py b/lms/djangoapps/verify_student/migrations/0004_delete_historical_records.py index 66c70d7210..816acc32c6 100644 --- a/lms/djangoapps/verify_student/migrations/0004_delete_historical_records.py +++ b/lms/djangoapps/verify_student/migrations/0004_delete_historical_records.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/verify_student/migrations/0005_remove_deprecated_models.py b/lms/djangoapps/verify_student/migrations/0005_remove_deprecated_models.py index 40fc29a02b..38f79bade3 100644 --- a/lms/djangoapps/verify_student/migrations/0005_remove_deprecated_models.py +++ b/lms/djangoapps/verify_student/migrations/0005_remove_deprecated_models.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/verify_student/migrations/0006_ssoverification.py b/lms/djangoapps/verify_student/migrations/0006_ssoverification.py index 3782313d3e..9264bc512f 100644 --- a/lms/djangoapps/verify_student/migrations/0006_ssoverification.py +++ b/lms/djangoapps/verify_student/migrations/0006_ssoverification.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-11 15:20 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py b/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py index aa702ca9a2..e7762f8a53 100644 --- a/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py +++ b/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-12 15:22 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/verify_student/migrations/0008_populate_idverificationaggregate.py b/lms/djangoapps/verify_student/migrations/0008_populate_idverificationaggregate.py index 2661010619..528ab4655c 100644 --- a/lms/djangoapps/verify_student/migrations/0008_populate_idverificationaggregate.py +++ b/lms/djangoapps/verify_student/migrations/0008_populate_idverificationaggregate.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-11 19:15 -from __future__ import absolute_import, unicode_literals + from itertools import chain diff --git a/lms/djangoapps/verify_student/migrations/0009_remove_id_verification_aggregate.py b/lms/djangoapps/verify_student/migrations/0009_remove_id_verification_aggregate.py index 2a08ae4a88..e2b8ea9cf1 100644 --- a/lms/djangoapps/verify_student/migrations/0009_remove_id_verification_aggregate.py +++ b/lms/djangoapps/verify_student/migrations/0009_remove_id_verification_aggregate.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-27 16:27 -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/lms/djangoapps/verify_student/migrations/0010_manualverification.py b/lms/djangoapps/verify_student/migrations/0010_manualverification.py index 874e1c5f29..d50580181a 100644 --- a/lms/djangoapps/verify_student/migrations/0010_manualverification.py +++ b/lms/djangoapps/verify_student/migrations/0010_manualverification.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-07 10:51 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/lms/djangoapps/verify_student/migrations/0011_add_fields_to_sspv.py b/lms/djangoapps/verify_student/migrations/0011_add_fields_to_sspv.py index 570703cb2c..2ec2c1ce0e 100644 --- a/lms/djangoapps/verify_student/migrations/0011_add_fields_to_sspv.py +++ b/lms/djangoapps/verify_student/migrations/0011_add_fields_to_sspv.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-10 09:19 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/lms/djangoapps/verify_student/migrations/0012_sspverificationretryconfig.py b/lms/djangoapps/verify_student/migrations/0012_sspverificationretryconfig.py index 2f150fdd4e..b69b5a3611 100644 --- a/lms/djangoapps/verify_student/migrations/0012_sspverificationretryconfig.py +++ b/lms/djangoapps/verify_student/migrations/0012_sspverificationretryconfig.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-12-10 11:19 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 32a864f33f..cdf9250ae8 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -8,7 +8,7 @@ of a student over a period of time. Right now, the only models are the abstract `SoftwareSecurePhotoVerification`. The hope is to keep as much of the photo verification process as generic as possible. """ -from __future__ import absolute_import, unicode_literals + import base64 import codecs diff --git a/lms/djangoapps/verify_student/services.py b/lms/djangoapps/verify_student/services.py index 795904c8f1..00db27f3cf 100644 --- a/lms/djangoapps/verify_student/services.py +++ b/lms/djangoapps/verify_student/services.py @@ -2,7 +2,7 @@ Implementation of abstraction layer for other parts of the system to make queries related to ID Verification. """ -from __future__ import absolute_import + import logging from itertools import chain diff --git a/lms/djangoapps/verify_student/signals.py b/lms/djangoapps/verify_student/signals.py index a5c8062681..3e80a44fa3 100644 --- a/lms/djangoapps/verify_student/signals.py +++ b/lms/djangoapps/verify_student/signals.py @@ -1,7 +1,7 @@ """ Signal handler for setting default course verification dates """ -from __future__ import absolute_import + from django.core.exceptions import ObjectDoesNotExist from django.dispatch.dispatcher import receiver diff --git a/lms/djangoapps/verify_student/ssencrypt.py b/lms/djangoapps/verify_student/ssencrypt.py index 3715055bb9..9481341700 100644 --- a/lms/djangoapps/verify_student/ssencrypt.py +++ b/lms/djangoapps/verify_student/ssencrypt.py @@ -15,7 +15,7 @@ An RSA private key can be in any of the following formats: * PKCS#1 RSAPrivateKey DER SEQUENCE (binary or PEM encoding) * PKCS#8 PrivateKeyInfo DER SEQUENCE (binary or PEM encoding) """ -from __future__ import absolute_import, division + import base64 import binascii diff --git a/lms/djangoapps/verify_student/tasks.py b/lms/djangoapps/verify_student/tasks.py index 6f8f58768b..d1bd5b8a5f 100644 --- a/lms/djangoapps/verify_student/tasks.py +++ b/lms/djangoapps/verify_student/tasks.py @@ -1,7 +1,7 @@ """ Django Celery tasks for service status app """ -from __future__ import absolute_import + import logging from smtplib import SMTPException diff --git a/lms/djangoapps/verify_student/tests/factories.py b/lms/djangoapps/verify_student/tests/factories.py index baae3033ae..b84f48be9d 100644 --- a/lms/djangoapps/verify_student/tests/factories.py +++ b/lms/djangoapps/verify_student/tests/factories.py @@ -1,7 +1,7 @@ """ Factories related to student verification. """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/lms/djangoapps/verify_student/tests/fake_software_secure.py b/lms/djangoapps/verify_student/tests/fake_software_secure.py index fff0bff092..6f517b2e90 100644 --- a/lms/djangoapps/verify_student/tests/fake_software_secure.py +++ b/lms/djangoapps/verify_student/tests/fake_software_secure.py @@ -2,7 +2,7 @@ Fake Software Secure page for use in acceptance tests. """ -from __future__ import absolute_import + from django.conf import settings from django.contrib.auth.decorators import login_required diff --git a/lms/djangoapps/verify_student/tests/test_fake_software_secure.py b/lms/djangoapps/verify_student/tests/test_fake_software_secure.py index cb5bd0d274..8f82778164 100644 --- a/lms/djangoapps/verify_student/tests/test_fake_software_secure.py +++ b/lms/djangoapps/verify_student/tests/test_fake_software_secure.py @@ -2,7 +2,7 @@ Tests for the fake software secure response. """ -from __future__ import absolute_import, unicode_literals + from django.test import TestCase from mock import patch diff --git a/lms/djangoapps/verify_student/tests/test_integration.py b/lms/djangoapps/verify_student/tests/test_integration.py index f0ad8dafb8..34c772004e 100644 --- a/lms/djangoapps/verify_student/tests/test_integration.py +++ b/lms/djangoapps/verify_student/tests/test_integration.py @@ -2,7 +2,7 @@ Integration tests of the payment flow, including course mode selection. """ -from __future__ import absolute_import + import six from django.urls import reverse diff --git a/lms/djangoapps/verify_student/tests/test_models.py b/lms/djangoapps/verify_student/tests/test_models.py index a269dd4b70..b9f25ea85b 100644 --- a/lms/djangoapps/verify_student/tests/test_models.py +++ b/lms/djangoapps/verify_student/tests/test_models.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import + import base64 import simplejson as json diff --git a/lms/djangoapps/verify_student/tests/test_services.py b/lms/djangoapps/verify_student/tests/test_services.py index be055ff81e..a547f8af34 100644 --- a/lms/djangoapps/verify_student/tests/test_services.py +++ b/lms/djangoapps/verify_student/tests/test_services.py @@ -3,7 +3,7 @@ Tests for the service classes in verify_student. """ -from __future__ import absolute_import + import ddt from django.conf import settings diff --git a/lms/djangoapps/verify_student/tests/test_signals.py b/lms/djangoapps/verify_student/tests/test_signals.py index 8e794c943d..d4e6767570 100644 --- a/lms/djangoapps/verify_student/tests/test_signals.py +++ b/lms/djangoapps/verify_student/tests/test_signals.py @@ -2,7 +2,7 @@ Unit tests for the VerificationDeadline signals """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/lms/djangoapps/verify_student/tests/test_ssencrypt.py b/lms/djangoapps/verify_student/tests/test_ssencrypt.py index 71cdce8af0..fa6213792c 100644 --- a/lms/djangoapps/verify_student/tests/test_ssencrypt.py +++ b/lms/djangoapps/verify_student/tests/test_ssencrypt.py @@ -2,7 +2,7 @@ Tests of the encryption and decryption utilities in the ssencrypt module. """ -from __future__ import absolute_import + import base64 import binascii diff --git a/lms/djangoapps/verify_student/tests/test_utils.py b/lms/djangoapps/verify_student/tests/test_utils.py index 1622c45046..415820453a 100644 --- a/lms/djangoapps/verify_student/tests/test_utils.py +++ b/lms/djangoapps/verify_student/tests/test_utils.py @@ -3,7 +3,7 @@ Tests for verify_student utility functions. """ -from __future__ import absolute_import + import unittest from datetime import timedelta diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 730f201bb8..1a844f831f 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -3,7 +3,7 @@ Tests of verify_student views. """ -from __future__ import absolute_import + import simplejson as json from datetime import timedelta diff --git a/lms/djangoapps/verify_student/urls.py b/lms/djangoapps/verify_student/urls.py index 322090bc28..dab0ab9a4a 100644 --- a/lms/djangoapps/verify_student/urls.py +++ b/lms/djangoapps/verify_student/urls.py @@ -2,7 +2,7 @@ URL definitions for the verify_student app. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/lms/djangoapps/verify_student/utils.py b/lms/djangoapps/verify_student/utils.py index 929baaff28..199bf25a92 100644 --- a/lms/djangoapps/verify_student/utils.py +++ b/lms/djangoapps/verify_student/utils.py @@ -3,7 +3,7 @@ Common Utilities for the verify_student application. """ -from __future__ import absolute_import + import datetime import logging diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index 28cdf2e8ab..599abba1f4 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -2,7 +2,7 @@ Views for the verification flow """ -from __future__ import absolute_import + import datetime import decimal diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index 42780d6b1d..9b83c63395 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -11,7 +11,7 @@ support both generating static assets to a directory and also serving static from the same directory. """ -from __future__ import absolute_import + # Silence noisy logs import logging diff --git a/lms/envs/common.py b/lms/envs/common.py index a399284486..c6726326a9 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -28,7 +28,7 @@ Longer TODO: # and throws spurious errors. Therefore, we disable invalid-name checking. # pylint: disable=invalid-name, wrong-import-position -from __future__ import absolute_import + import imp import sys diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 8b82b22dbd..8670c3c689 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -1,7 +1,7 @@ """ Specific overrides to the base prod settings to make development easier. """ -from __future__ import absolute_import + # Silence noisy logs import logging diff --git a/lms/envs/devstack_optimized.py b/lms/envs/devstack_optimized.py index 4070c771dc..cc8a9fa68c 100644 --- a/lms/envs/devstack_optimized.py +++ b/lms/envs/devstack_optimized.py @@ -18,7 +18,7 @@ as they are for non-optimized devstack. Instead, update_assets must be invoked each time that changes have been made. """ -from __future__ import absolute_import + import os diff --git a/lms/envs/devstack_with_worker.py b/lms/envs/devstack_with_worker.py index 6516c1597b..0fd6def5ef 100644 --- a/lms/envs/devstack_with_worker.py +++ b/lms/envs/devstack_with_worker.py @@ -11,7 +11,7 @@ In two separate processes on devstack: ./manage.py lms celery worker --settings=devstack_with_worker """ -from __future__ import absolute_import + import os diff --git a/lms/envs/load_test.py b/lms/envs/load_test.py index c9fe2821ec..e2f5d92b18 100644 --- a/lms/envs/load_test.py +++ b/lms/envs/load_test.py @@ -6,7 +6,7 @@ Settings for load testing. # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import -from __future__ import absolute_import + from six.moves import filter diff --git a/lms/envs/production.py b/lms/envs/production.py index 4e0198c896..f02bc906d9 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -17,7 +17,7 @@ Common traits: # and throws spurious errors. Therefore, we disable invalid-name checking. # pylint: disable=invalid-name -from __future__ import absolute_import + import codecs import datetime diff --git a/lms/envs/static.py b/lms/envs/static.py index 3e43371dca..6435795dc6 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -12,7 +12,7 @@ sessions. Assumes structure: # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import -from __future__ import absolute_import + from openedx.core.lib.derived import derive_settings from openedx.core.lib.logsettings import get_logger_config diff --git a/lms/envs/test.py b/lms/envs/test.py index 322310a393..0fd7613637 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -12,7 +12,7 @@ sessions. Assumes structure: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import -from __future__ import absolute_import + import logging import os diff --git a/lms/envs/test_static_optimized.py b/lms/envs/test_static_optimized.py index dcd6ceb4e2..2862db1b06 100644 --- a/lms/envs/test_static_optimized.py +++ b/lms/envs/test_static_optimized.py @@ -11,7 +11,7 @@ from the same directory. """ # Start with the common settings -from __future__ import absolute_import + from openedx.core.lib.derived import derive_settings diff --git a/lms/lib/courseware_search/lms_filter_generator.py b/lms/lib/courseware_search/lms_filter_generator.py index 478ce837a1..e348c3b2e9 100644 --- a/lms/lib/courseware_search/lms_filter_generator.py +++ b/lms/lib/courseware_search/lms_filter_generator.py @@ -3,7 +3,7 @@ This file contains implementation override of SearchFilterGenerator which will a * Filter by all courses in which the user is enrolled in """ -from __future__ import absolute_import + import six from search.filter_generator import SearchFilterGenerator diff --git a/lms/lib/courseware_search/lms_result_processor.py b/lms/lib/courseware_search/lms_result_processor.py index 9ab0ac7174..e05feadf5f 100644 --- a/lms/lib/courseware_search/lms_result_processor.py +++ b/lms/lib/courseware_search/lms_result_processor.py @@ -3,7 +3,7 @@ This file contains implementation override of SearchResultProcessor which will a * Blends in "location" property * Confirms user access to object """ -from __future__ import absolute_import + from django.urls import reverse from opaque_keys.edx.keys import CourseKey, UsageKey diff --git a/lms/lib/courseware_search/lms_search_initializer.py b/lms/lib/courseware_search/lms_search_initializer.py index fc5ed25af4..072e210bae 100644 --- a/lms/lib/courseware_search/lms_search_initializer.py +++ b/lms/lib/courseware_search/lms_search_initializer.py @@ -3,7 +3,7 @@ This file contains implementation override of SearchInitializer which will allow * To set initial set of masquerades and other parameters """ -from __future__ import absolute_import + from opaque_keys.edx.keys import CourseKey from search.initializer import SearchInitializer diff --git a/lms/lib/courseware_search/test/test_lms_filter_generator.py b/lms/lib/courseware_search/test/test_lms_filter_generator.py index 84fd7da6a6..210d4192c3 100644 --- a/lms/lib/courseware_search/test/test_lms_filter_generator.py +++ b/lms/lib/courseware_search/test/test_lms_filter_generator.py @@ -1,7 +1,7 @@ """ Tests for the lms_filter_generator """ -from __future__ import absolute_import + import six from mock import Mock, patch diff --git a/lms/lib/courseware_search/test/test_lms_result_processor.py b/lms/lib/courseware_search/test/test_lms_result_processor.py index 4731bbbe12..2bfed8f2b9 100644 --- a/lms/lib/courseware_search/test/test_lms_result_processor.py +++ b/lms/lib/courseware_search/test/test_lms_result_processor.py @@ -1,7 +1,7 @@ """ Tests for the lms_result_processor """ -from __future__ import absolute_import + import six diff --git a/lms/lib/tests/test_utils.py b/lms/lib/tests/test_utils.py index 284ad8e33b..aa35647a5e 100644 --- a/lms/lib/tests/test_utils.py +++ b/lms/lib/tests/test_utils.py @@ -1,7 +1,7 @@ """ Tests for the LMS/lib utils """ -from __future__ import absolute_import + from lms.lib import utils from xmodule.modulestore import ModuleStoreEnum diff --git a/lms/lib/xblock/test/test_mixin.py b/lms/lib/xblock/test/test_mixin.py index 7c74792121..48ef4c8d91 100644 --- a/lms/lib/xblock/test/test_mixin.py +++ b/lms/lib/xblock/test/test_mixin.py @@ -1,7 +1,7 @@ """ Tests of the LMS XBlock Mixin """ -from __future__ import absolute_import + import ddt from xblock.validation import ValidationMessage diff --git a/lms/startup.py b/lms/startup.py index f2bb31c048..5988837009 100644 --- a/lms/startup.py +++ b/lms/startup.py @@ -2,7 +2,7 @@ Module for code that should run during LMS startup (deprecated) """ -from __future__ import absolute_import + import django from django.conf import settings diff --git a/lms/tests.py b/lms/tests.py index dcca4359df..7a79fda7e5 100644 --- a/lms/tests.py +++ b/lms/tests.py @@ -1,6 +1,6 @@ """Tests for the lms module itself.""" -from __future__ import absolute_import + import logging import mimetypes diff --git a/lms/urls.py b/lms/urls.py index bbf60f4565..f077e73a94 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -2,7 +2,7 @@ URLs for LMS """ -from __future__ import absolute_import + from config_models.views import ConfigurationModelCurrentAPIView from django.conf import settings diff --git a/lms/wsgi.py b/lms/wsgi.py index 4d7f6d10e0..dfa26b71db 100644 --- a/lms/wsgi.py +++ b/lms/wsgi.py @@ -7,7 +7,7 @@ It exposes a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting. """ -from __future__ import absolute_import + from openedx.core.lib.logsettings import log_python_warnings log_python_warnings() diff --git a/lms/wsgi_apache_lms.py b/lms/wsgi_apache_lms.py index 59f99ada77..4648b82385 100644 --- a/lms/wsgi_apache_lms.py +++ b/lms/wsgi_apache_lms.py @@ -4,7 +4,7 @@ Apache WSGI file for LMS This module contains the WSGI application used for Apache deployment. It exposes a module-level variable named ``application``. """ -from __future__ import absolute_import + from openedx.core.lib.logsettings import log_python_warnings log_python_warnings() diff --git a/manage.py b/manage.py index db44ae802b..66ca09ac78 100755 --- a/manage.py +++ b/manage.py @@ -11,7 +11,7 @@ by passing the --settings flag, you can specify what environment specific settin Any arguments not understood by this manage.py will be passed to django-admin.py """ # pylint: disable=wrong-import-order, wrong-import-position -from __future__ import absolute_import, print_function + from openedx.core.lib.logsettings import log_python_warnings log_python_warnings() diff --git a/openedx/core/djangoapps/ace_common/apps.py b/openedx/core/djangoapps/ace_common/apps.py index 1ce81ea830..b8f7f095aa 100644 --- a/openedx/core/djangoapps/ace_common/apps.py +++ b/openedx/core/djangoapps/ace_common/apps.py @@ -1,7 +1,7 @@ """ Configuration for the ace_common Django app. """ -from __future__ import absolute_import + from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/core/djangoapps/ace_common/message.py b/openedx/core/djangoapps/ace_common/message.py index 34b8fc97d9..c2fd91c233 100644 --- a/openedx/core/djangoapps/ace_common/message.py +++ b/openedx/core/djangoapps/ace_common/message.py @@ -1,7 +1,7 @@ """ Base Message types to be used to construct ace messages. """ -from __future__ import absolute_import + from edx_ace.message import MessageType diff --git a/openedx/core/djangoapps/ace_common/settings/devstack.py b/openedx/core/djangoapps/ace_common/settings/devstack.py index 342df5a927..1eb3462dd9 100644 --- a/openedx/core/djangoapps/ace_common/settings/devstack.py +++ b/openedx/core/djangoapps/ace_common/settings/devstack.py @@ -2,7 +2,7 @@ Settings for edX ACE on devstack. """ -from __future__ import absolute_import + from openedx.core.djangoapps.ace_common.settings import common diff --git a/openedx/core/djangoapps/ace_common/template_context.py b/openedx/core/djangoapps/ace_common/template_context.py index 0309193c07..032c861ee7 100644 --- a/openedx/core/djangoapps/ace_common/template_context.py +++ b/openedx/core/djangoapps/ace_common/template_context.py @@ -1,7 +1,7 @@ """ Context dictionary for templates that use the ace_common base template. """ -from __future__ import absolute_import + from django.conf import settings from django.core.urlresolvers import NoReverseMatch diff --git a/openedx/core/djangoapps/ace_common/templatetags/ace.py b/openedx/core/djangoapps/ace_common/templatetags/ace.py index 49c6038d73..43064e6f82 100644 --- a/openedx/core/djangoapps/ace_common/templatetags/ace.py +++ b/openedx/core/djangoapps/ace_common/templatetags/ace.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from crum import get_current_request from django import template diff --git a/openedx/core/djangoapps/ace_common/tests/mixins.py b/openedx/core/djangoapps/ace_common/tests/mixins.py index efe445702e..bc6dfe3241 100644 --- a/openedx/core/djangoapps/ace_common/tests/mixins.py +++ b/openedx/core/djangoapps/ace_common/tests/mixins.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import uuid diff --git a/openedx/core/djangoapps/ace_common/tests/test_message.py b/openedx/core/djangoapps/ace_common/tests/test_message.py index ec6680a387..0f4016af3d 100644 --- a/openedx/core/djangoapps/ace_common/tests/test_message.py +++ b/openedx/core/djangoapps/ace_common/tests/test_message.py @@ -1,7 +1,7 @@ """ Tests for ace message module """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/openedx/core/djangoapps/ace_common/tests/test_templatetags.py b/openedx/core/djangoapps/ace_common/tests/test_templatetags.py index c044844734..9606b68095 100644 --- a/openedx/core/djangoapps/ace_common/tests/test_templatetags.py +++ b/openedx/core/djangoapps/ace_common/tests/test_templatetags.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from django.template import VariableDoesNotExist from django.test import override_settings diff --git a/openedx/core/djangoapps/ace_common/tests/test_tracking.py b/openedx/core/djangoapps/ace_common/tests/test_tracking.py index e978e5ba6f..85f71eaf94 100644 --- a/openedx/core/djangoapps/ace_common/tests/test_tracking.py +++ b/openedx/core/djangoapps/ace_common/tests/test_tracking.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from unittest import TestCase diff --git a/openedx/core/djangoapps/ace_common/tracking.py b/openedx/core/djangoapps/ace_common/tracking.py index ab528a4744..dfa54a9f2f 100644 --- a/openedx/core/djangoapps/ace_common/tracking.py +++ b/openedx/core/djangoapps/ace_common/tracking.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import attr import six diff --git a/openedx/core/djangoapps/api_admin/admin.py b/openedx/core/djangoapps/api_admin/admin.py index a9f50f5c88..4eebccf223 100644 --- a/openedx/core/djangoapps/api_admin/admin.py +++ b/openedx/core/djangoapps/api_admin/admin.py @@ -1,5 +1,5 @@ """Admin views for API managment.""" -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/api_admin/api/filters.py b/openedx/core/djangoapps/api_admin/api/filters.py index 557c84748b..63d4bf6ec7 100644 --- a/openedx/core/djangoapps/api_admin/api/filters.py +++ b/openedx/core/djangoapps/api_admin/api/filters.py @@ -1,7 +1,7 @@ """ Filters for api_admin api """ -from __future__ import absolute_import + from rest_framework import filters diff --git a/openedx/core/djangoapps/api_admin/api/urls.py b/openedx/core/djangoapps/api_admin/api/urls.py index 27c424e318..4baebd749e 100644 --- a/openedx/core/djangoapps/api_admin/api/urls.py +++ b/openedx/core/djangoapps/api_admin/api/urls.py @@ -1,7 +1,7 @@ """ URL definitions for api access request API. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/openedx/core/djangoapps/api_admin/api/v1/serializers.py b/openedx/core/djangoapps/api_admin/api/v1/serializers.py index 45dddce7e8..cc83d8efbe 100644 --- a/openedx/core/djangoapps/api_admin/api/v1/serializers.py +++ b/openedx/core/djangoapps/api_admin/api/v1/serializers.py @@ -1,7 +1,7 @@ """ API v1 serializers. """ -from __future__ import absolute_import + from rest_framework import serializers from openedx.core.djangoapps.api_admin.models import ApiAccessRequest diff --git a/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py b/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py index 2496963ea7..f326021c90 100644 --- a/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py +++ b/openedx/core/djangoapps/api_admin/api/v1/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the `api_admin` api module. """ -from __future__ import absolute_import + import json from rest_framework.reverse import reverse diff --git a/openedx/core/djangoapps/api_admin/api/v1/urls.py b/openedx/core/djangoapps/api_admin/api/v1/urls.py index 666ea629e9..4724450737 100644 --- a/openedx/core/djangoapps/api_admin/api/v1/urls.py +++ b/openedx/core/djangoapps/api_admin/api/v1/urls.py @@ -1,7 +1,7 @@ """ URL definitions for api access request API v1. """ -from __future__ import absolute_import + from django.conf.urls import url from openedx.core.djangoapps.api_admin.api.v1 import views diff --git a/openedx/core/djangoapps/api_admin/api/v1/views.py b/openedx/core/djangoapps/api_admin/api/v1/views.py index c009c8032d..ff476ee650 100644 --- a/openedx/core/djangoapps/api_admin/api/v1/views.py +++ b/openedx/core/djangoapps/api_admin/api/v1/views.py @@ -1,7 +1,7 @@ """ API Views. """ -from __future__ import absolute_import + from django_filters.rest_framework import DjangoFilterBackend from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication diff --git a/openedx/core/djangoapps/api_admin/decorators.py b/openedx/core/djangoapps/api_admin/decorators.py index 8871f62abf..31fb59cb56 100644 --- a/openedx/core/djangoapps/api_admin/decorators.py +++ b/openedx/core/djangoapps/api_admin/decorators.py @@ -1,5 +1,5 @@ """Decorators for API access management.""" -from __future__ import absolute_import + from functools import wraps diff --git a/openedx/core/djangoapps/api_admin/forms.py b/openedx/core/djangoapps/api_admin/forms.py index 15a653eb55..e3bca0be4a 100644 --- a/openedx/core/djangoapps/api_admin/forms.py +++ b/openedx/core/djangoapps/api_admin/forms.py @@ -1,5 +1,5 @@ """Forms for API management.""" -from __future__ import absolute_import + from django import forms from django.contrib.auth.models import User diff --git a/openedx/core/djangoapps/api_admin/management/commands/create_api_access_request.py b/openedx/core/djangoapps/api_admin/management/commands/create_api_access_request.py index ff0ce9df4c..a6ad67f0b6 100644 --- a/openedx/core/djangoapps/api_admin/management/commands/create_api_access_request.py +++ b/openedx/core/djangoapps/api_admin/management/commands/create_api_access_request.py @@ -1,5 +1,5 @@ """ Management command to create an ApiAccessRequest for given users """ -from __future__ import unicode_literals + import logging from contextlib import contextmanager diff --git a/openedx/core/djangoapps/api_admin/management/commands/delete_historical_api_admin_data.py b/openedx/core/djangoapps/api_admin/management/commands/delete_historical_api_admin_data.py index 843b5fc98c..b54e8c42c0 100644 --- a/openedx/core/djangoapps/api_admin/management/commands/delete_historical_api_admin_data.py +++ b/openedx/core/djangoapps/api_admin/management/commands/delete_historical_api_admin_data.py @@ -2,7 +2,7 @@ Command to delete all rows from the api_admin_historicalapiaccessrequest table. """ -from __future__ import absolute_import + import logging from openedx.core.djangoapps.api_admin.models import ApiAccessRequest from openedx.core.djangoapps.util.row_delete import delete_rows, BaseDeletionCommand diff --git a/openedx/core/djangoapps/api_admin/migrations/0001_initial.py b/openedx/core/djangoapps/api_admin/migrations/0001_initial.py index e4b23e9a97..33a67ad67a 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0001_initial.py +++ b/openedx/core/djangoapps/api_admin/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/openedx/core/djangoapps/api_admin/migrations/0002_auto_20160325_1604.py b/openedx/core/djangoapps/api_admin/migrations/0002_auto_20160325_1604.py index 1fdbb3e335..a657afdfcb 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0002_auto_20160325_1604.py +++ b/openedx/core/djangoapps/api_admin/migrations/0002_auto_20160325_1604.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py b/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py index 54132a12ec..c63c751125 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py +++ b/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/api_admin/migrations/0004_auto_20160412_1506.py b/openedx/core/djangoapps/api_admin/migrations/0004_auto_20160412_1506.py index 09ab008f6f..17e1661dd5 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0004_auto_20160412_1506.py +++ b/openedx/core/djangoapps/api_admin/migrations/0004_auto_20160412_1506.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/openedx/core/djangoapps/api_admin/migrations/0005_auto_20160414_1232.py b/openedx/core/djangoapps/api_admin/migrations/0005_auto_20160414_1232.py index cc6b4f9086..af1d16694a 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0005_auto_20160414_1232.py +++ b/openedx/core/djangoapps/api_admin/migrations/0005_auto_20160414_1232.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/api_admin/migrations/0006_catalog.py b/openedx/core/djangoapps/api_admin/migrations/0006_catalog.py index f87158451e..b11ca1fcae 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0006_catalog.py +++ b/openedx/core/djangoapps/api_admin/migrations/0006_catalog.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/api_admin/migrations/0007_delete_historical_api_records.py b/openedx/core/djangoapps/api_admin/migrations/0007_delete_historical_api_records.py index 3ce0995c5b..1b5b398ebf 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0007_delete_historical_api_records.py +++ b/openedx/core/djangoapps/api_admin/migrations/0007_delete_historical_api_records.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/api_admin/models.py b/openedx/core/djangoapps/api_admin/models.py index 8f6aacea8c..60e7808dfb 100644 --- a/openedx/core/djangoapps/api_admin/models.py +++ b/openedx/core/djangoapps/api_admin/models.py @@ -1,5 +1,5 @@ """Models for API management.""" -from __future__ import absolute_import + import logging from smtplib import SMTPException diff --git a/openedx/core/djangoapps/api_admin/tests/factories.py b/openedx/core/djangoapps/api_admin/tests/factories.py index 189ef572f3..337bbfbb32 100644 --- a/openedx/core/djangoapps/api_admin/tests/factories.py +++ b/openedx/core/djangoapps/api_admin/tests/factories.py @@ -1,5 +1,5 @@ """Factories for API management.""" -from __future__ import absolute_import + import factory from factory.django import DjangoModelFactory diff --git a/openedx/core/djangoapps/api_admin/tests/test_forms.py b/openedx/core/djangoapps/api_admin/tests/test_forms.py index 7e64b3aa58..e55a455208 100644 --- a/openedx/core/djangoapps/api_admin/tests/test_forms.py +++ b/openedx/core/djangoapps/api_admin/tests/test_forms.py @@ -1,6 +1,6 @@ #pylint: disable=missing-docstring -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/openedx/core/djangoapps/api_admin/tests/test_models.py b/openedx/core/djangoapps/api_admin/tests/test_models.py index 1ca4611fcd..6e3edc4bf5 100644 --- a/openedx/core/djangoapps/api_admin/tests/test_models.py +++ b/openedx/core/djangoapps/api_admin/tests/test_models.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from smtplib import SMTPException diff --git a/openedx/core/djangoapps/api_admin/tests/test_views.py b/openedx/core/djangoapps/api_admin/tests/test_views.py index 1fb80e2653..1176dc44da 100644 --- a/openedx/core/djangoapps/api_admin/tests/test_views.py +++ b/openedx/core/djangoapps/api_admin/tests/test_views.py @@ -1,6 +1,6 @@ """ Tests for the api_admin app's views. """ -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/api_admin/urls.py b/openedx/core/djangoapps/api_admin/urls.py index 2b9b1ac160..ba93257d3b 100644 --- a/openedx/core/djangoapps/api_admin/urls.py +++ b/openedx/core/djangoapps/api_admin/urls.py @@ -1,6 +1,6 @@ """URLs for API access management.""" -from __future__ import absolute_import + from django.conf.urls import include, url from django.contrib.admin.views.decorators import staff_member_required diff --git a/openedx/core/djangoapps/api_admin/views.py b/openedx/core/djangoapps/api_admin/views.py index b3cee71694..c5ce3cbe07 100644 --- a/openedx/core/djangoapps/api_admin/views.py +++ b/openedx/core/djangoapps/api_admin/views.py @@ -1,5 +1,5 @@ """Views for API management.""" -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/api_admin/widgets.py b/openedx/core/djangoapps/api_admin/widgets.py index 3e913766be..9b1d1de8cf 100644 --- a/openedx/core/djangoapps/api_admin/widgets.py +++ b/openedx/core/djangoapps/api_admin/widgets.py @@ -1,6 +1,6 @@ """ Form widget classes """ -from __future__ import absolute_import + from django.conf import settings from django.forms.utils import flatatt diff --git a/openedx/core/djangoapps/auth_exchange/forms.py b/openedx/core/djangoapps/auth_exchange/forms.py index b8940660c4..159378851b 100644 --- a/openedx/core/djangoapps/auth_exchange/forms.py +++ b/openedx/core/djangoapps/auth_exchange/forms.py @@ -1,7 +1,7 @@ """ Forms to support third-party to first-party OAuth 2.0 access token exchange """ -from __future__ import absolute_import + import provider.constants from django.contrib.auth.models import User diff --git a/openedx/core/djangoapps/auth_exchange/tests/mixins.py b/openedx/core/djangoapps/auth_exchange/tests/mixins.py index 18bbb43bd2..021536dce5 100644 --- a/openedx/core/djangoapps/auth_exchange/tests/mixins.py +++ b/openedx/core/djangoapps/auth_exchange/tests/mixins.py @@ -3,7 +3,7 @@ Mixins to facilitate testing OAuth connections to Django-OAuth-Toolkit or Django-OAuth2-Provider. """ -from __future__ import absolute_import + from unittest import expectedFailure diff --git a/openedx/core/djangoapps/auth_exchange/tests/test_forms.py b/openedx/core/djangoapps/auth_exchange/tests/test_forms.py index 775d8ac989..5f4f028d21 100644 --- a/openedx/core/djangoapps/auth_exchange/tests/test_forms.py +++ b/openedx/core/djangoapps/auth_exchange/tests/test_forms.py @@ -2,7 +2,7 @@ """ Tests for OAuth token exchange forms """ -from __future__ import absolute_import + import unittest diff --git a/openedx/core/djangoapps/auth_exchange/tests/test_views.py b/openedx/core/djangoapps/auth_exchange/tests/test_views.py index 2ad2829111..ec79b0add9 100644 --- a/openedx/core/djangoapps/auth_exchange/tests/test_views.py +++ b/openedx/core/djangoapps/auth_exchange/tests/test_views.py @@ -4,7 +4,7 @@ Tests for OAuth token exchange views # pylint: disable=no-member -from __future__ import absolute_import + import json import unittest diff --git a/openedx/core/djangoapps/auth_exchange/tests/utils.py b/openedx/core/djangoapps/auth_exchange/tests/utils.py index 377641286a..8f29eba836 100644 --- a/openedx/core/djangoapps/auth_exchange/tests/utils.py +++ b/openedx/core/djangoapps/auth_exchange/tests/utils.py @@ -2,7 +2,7 @@ Test utilities for OAuth access token exchange """ -from __future__ import absolute_import + from django.conf import settings from social_django.models import Partial, UserSocialAuth diff --git a/openedx/core/djangoapps/auth_exchange/views.py b/openedx/core/djangoapps/auth_exchange/views.py index b3ebad2dfb..36ef3bf880 100644 --- a/openedx/core/djangoapps/auth_exchange/views.py +++ b/openedx/core/djangoapps/auth_exchange/views.py @@ -9,7 +9,7 @@ The following are currently implemented: # pylint: disable=abstract-method -from __future__ import absolute_import + import django.contrib.auth as auth import social_django.utils as social_utils diff --git a/openedx/core/djangoapps/bookmarks/__init__.py b/openedx/core/djangoapps/bookmarks/__init__.py index dfb5f1ed2e..4879e7774c 100644 --- a/openedx/core/djangoapps/bookmarks/__init__.py +++ b/openedx/core/djangoapps/bookmarks/__init__.py @@ -1,7 +1,7 @@ """ Bookmarks module. """ -from __future__ import absolute_import + from collections import namedtuple diff --git a/openedx/core/djangoapps/bookmarks/api.py b/openedx/core/djangoapps/bookmarks/api.py index 5d8605e5e0..9cba6320a7 100644 --- a/openedx/core/djangoapps/bookmarks/api.py +++ b/openedx/core/djangoapps/bookmarks/api.py @@ -1,7 +1,7 @@ """ Bookmarks Python API. """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/openedx/core/djangoapps/bookmarks/apps.py b/openedx/core/djangoapps/bookmarks/apps.py index de92351103..48e1af2fa4 100644 --- a/openedx/core/djangoapps/bookmarks/apps.py +++ b/openedx/core/djangoapps/bookmarks/apps.py @@ -1,7 +1,7 @@ """ Configuration for bookmarks Django app """ -from __future__ import absolute_import + from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/core/djangoapps/bookmarks/migrations/0001_initial.py b/openedx/core/djangoapps/bookmarks/migrations/0001_initial.py index 10499d71c3..e190dfa091 100644 --- a/openedx/core/djangoapps/bookmarks/migrations/0001_initial.py +++ b/openedx/core/djangoapps/bookmarks/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import model_utils.fields import jsonfield.fields diff --git a/openedx/core/djangoapps/bookmarks/models.py b/openedx/core/djangoapps/bookmarks/models.py index 60ce8d5f06..cdc7d1c38b 100644 --- a/openedx/core/djangoapps/bookmarks/models.py +++ b/openedx/core/djangoapps/bookmarks/models.py @@ -1,7 +1,7 @@ """ Models for Bookmarks. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/bookmarks/serializers.py b/openedx/core/djangoapps/bookmarks/serializers.py index 993e0324e2..45721b2f30 100644 --- a/openedx/core/djangoapps/bookmarks/serializers.py +++ b/openedx/core/djangoapps/bookmarks/serializers.py @@ -1,7 +1,7 @@ """ Serializers for Bookmarks. """ -from __future__ import absolute_import + import six from rest_framework import serializers diff --git a/openedx/core/djangoapps/bookmarks/services.py b/openedx/core/djangoapps/bookmarks/services.py index d9421e73ab..b5eafcf5e8 100644 --- a/openedx/core/djangoapps/bookmarks/services.py +++ b/openedx/core/djangoapps/bookmarks/services.py @@ -1,7 +1,7 @@ """ Bookmarks service. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/bookmarks/signals.py b/openedx/core/djangoapps/bookmarks/signals.py index 3404d01fe6..9394fe47bd 100644 --- a/openedx/core/djangoapps/bookmarks/signals.py +++ b/openedx/core/djangoapps/bookmarks/signals.py @@ -1,7 +1,7 @@ """ Signals for bookmarks. """ -from __future__ import absolute_import + from importlib import import_module diff --git a/openedx/core/djangoapps/bookmarks/tasks.py b/openedx/core/djangoapps/bookmarks/tasks.py index 302f347277..81b3f85138 100644 --- a/openedx/core/djangoapps/bookmarks/tasks.py +++ b/openedx/core/djangoapps/bookmarks/tasks.py @@ -1,7 +1,7 @@ """ Tasks for bookmarks. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/bookmarks/tests/factories.py b/openedx/core/djangoapps/bookmarks/tests/factories.py index 0bc97faa29..56a2c68eed 100644 --- a/openedx/core/djangoapps/bookmarks/tests/factories.py +++ b/openedx/core/djangoapps/bookmarks/tests/factories.py @@ -2,7 +2,7 @@ Factories for Bookmark models. """ -from __future__ import absolute_import + from functools import partial diff --git a/openedx/core/djangoapps/bookmarks/tests/test_api.py b/openedx/core/djangoapps/bookmarks/tests/test_api.py index cba9ef64a5..3ddff6ba0b 100644 --- a/openedx/core/djangoapps/bookmarks/tests/test_api.py +++ b/openedx/core/djangoapps/bookmarks/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests for bookmarks api. """ -from __future__ import absolute_import + import ddt import six diff --git a/openedx/core/djangoapps/bookmarks/tests/test_models.py b/openedx/core/djangoapps/bookmarks/tests/test_models.py index 9194a78576..fd00c1bf91 100644 --- a/openedx/core/djangoapps/bookmarks/tests/test_models.py +++ b/openedx/core/djangoapps/bookmarks/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for Bookmarks models. """ -from __future__ import absolute_import + import datetime from contextlib import contextmanager diff --git a/openedx/core/djangoapps/bookmarks/tests/test_services.py b/openedx/core/djangoapps/bookmarks/tests/test_services.py index 3e9f992553..2500d876eb 100644 --- a/openedx/core/djangoapps/bookmarks/tests/test_services.py +++ b/openedx/core/djangoapps/bookmarks/tests/test_services.py @@ -2,7 +2,7 @@ Tests for bookmark services. """ -from __future__ import absolute_import + from opaque_keys.edx.keys import UsageKey diff --git a/openedx/core/djangoapps/bookmarks/tests/test_tasks.py b/openedx/core/djangoapps/bookmarks/tests/test_tasks.py index 76833d3b07..840fbd8b54 100644 --- a/openedx/core/djangoapps/bookmarks/tests/test_tasks.py +++ b/openedx/core/djangoapps/bookmarks/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Tests for tasks. """ -from __future__ import absolute_import + import ddt import six diff --git a/openedx/core/djangoapps/bookmarks/tests/test_views.py b/openedx/core/djangoapps/bookmarks/tests/test_views.py index 973b60296e..c60725ba38 100644 --- a/openedx/core/djangoapps/bookmarks/tests/test_views.py +++ b/openedx/core/djangoapps/bookmarks/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for bookmark views. """ -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/bookmarks/urls.py b/openedx/core/djangoapps/bookmarks/urls.py index 06175f3a6f..ae59daccbd 100644 --- a/openedx/core/djangoapps/bookmarks/urls.py +++ b/openedx/core/djangoapps/bookmarks/urls.py @@ -2,7 +2,7 @@ URL routes for the bookmarks app. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/core/djangoapps/bookmarks/views.py b/openedx/core/djangoapps/bookmarks/views.py index 59c271b189..a0b44b3258 100644 --- a/openedx/core/djangoapps/bookmarks/views.py +++ b/openedx/core/djangoapps/bookmarks/views.py @@ -4,7 +4,7 @@ HTTP end-points for the Bookmarks API. For more information, see: https://openedx.atlassian.net/wiki/display/TNL/Bookmarks+API """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/cache_toolbox/app_settings.py b/openedx/core/djangoapps/cache_toolbox/app_settings.py index 63ece6385c..8377908086 100644 --- a/openedx/core/djangoapps/cache_toolbox/app_settings.py +++ b/openedx/core/djangoapps/cache_toolbox/app_settings.py @@ -2,7 +2,7 @@ Settings for cache_toolbox. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/core/djangoapps/cache_toolbox/core.py b/openedx/core/djangoapps/cache_toolbox/core.py index b6ee9f86c5..97bb5f93e5 100644 --- a/openedx/core/djangoapps/cache_toolbox/core.py +++ b/openedx/core/djangoapps/cache_toolbox/core.py @@ -8,7 +8,7 @@ Core methods """ -from __future__ import absolute_import + from django.core.cache import cache from django.db import DEFAULT_DB_ALIAS diff --git a/openedx/core/djangoapps/cache_toolbox/middleware.py b/openedx/core/djangoapps/cache_toolbox/middleware.py index 6ca177c0df..357ef89718 100644 --- a/openedx/core/djangoapps/cache_toolbox/middleware.py +++ b/openedx/core/djangoapps/cache_toolbox/middleware.py @@ -78,7 +78,7 @@ choice for most environments but you may be happy with the trade-offs of the """ -from __future__ import absolute_import + from logging import getLogger diff --git a/openedx/core/djangoapps/cache_toolbox/model.py b/openedx/core/djangoapps/cache_toolbox/model.py index 77cbfaaaf7..92b8aa72f1 100644 --- a/openedx/core/djangoapps/cache_toolbox/model.py +++ b/openedx/core/djangoapps/cache_toolbox/model.py @@ -54,7 +54,7 @@ instance:: ... Foo.DoesNotExist """ -from __future__ import absolute_import + from django.db.models.signals import post_delete, post_save diff --git a/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py b/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py index d791718c42..116e150988 100644 --- a/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py +++ b/openedx/core/djangoapps/cache_toolbox/templatetags/cache_toolbox.py @@ -2,7 +2,7 @@ Implementation of custom django template tags for automatically caching template fragments. """ -from __future__ import absolute_import + from django import template from django.core.cache import cache diff --git a/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py b/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py index 8f7869b27e..6eb5015e3e 100644 --- a/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py +++ b/openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py @@ -1,5 +1,5 @@ """Tests for cached authentication middleware.""" -from __future__ import absolute_import + from django.conf import settings from django.contrib.auth.models import User diff --git a/openedx/core/djangoapps/catalog/admin.py b/openedx/core/djangoapps/catalog/admin.py index a80f1161ae..d46441836a 100644 --- a/openedx/core/djangoapps/catalog/admin.py +++ b/openedx/core/djangoapps/catalog/admin.py @@ -1,7 +1,7 @@ """ Django admin bindings for catalog support models. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/catalog/constants.py b/openedx/core/djangoapps/catalog/constants.py index c3700e77bd..471972acd4 100644 --- a/openedx/core/djangoapps/catalog/constants.py +++ b/openedx/core/djangoapps/catalog/constants.py @@ -1,5 +1,5 @@ """ Constants associated with catalog """ -from __future__ import absolute_import + from enum import Enum diff --git a/openedx/core/djangoapps/catalog/management/commands/cache_programs.py b/openedx/core/djangoapps/catalog/management/commands/cache_programs.py index cd8760d957..8e099e7c1e 100644 --- a/openedx/core/djangoapps/catalog/management/commands/cache_programs.py +++ b/openedx/core/djangoapps/catalog/management/commands/cache_programs.py @@ -1,5 +1,5 @@ """"Management command to add program information to the cache.""" -from __future__ import absolute_import + import logging import sys diff --git a/openedx/core/djangoapps/catalog/management/commands/create_catalog_integrations.py b/openedx/core/djangoapps/catalog/management/commands/create_catalog_integrations.py index f533082e4d..5650e267a7 100644 --- a/openedx/core/djangoapps/catalog/management/commands/create_catalog_integrations.py +++ b/openedx/core/djangoapps/catalog/management/commands/create_catalog_integrations.py @@ -1,6 +1,6 @@ '''CatalogIntegration management command''' -from __future__ import absolute_import + from django.core.management import BaseCommand, CommandError from openedx.core.djangoapps.catalog.models import CatalogIntegration diff --git a/openedx/core/djangoapps/catalog/management/commands/sync_course_runs.py b/openedx/core/djangoapps/catalog/management/commands/sync_course_runs.py index f9bceac94e..1ddb9d86ca 100644 --- a/openedx/core/djangoapps/catalog/management/commands/sync_course_runs.py +++ b/openedx/core/djangoapps/catalog/management/commands/sync_course_runs.py @@ -1,7 +1,7 @@ """ Sync course runs from catalog service. """ -from __future__ import absolute_import + from collections import namedtuple import logging diff --git a/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py b/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py index 2994d9ca64..e1c6bd9216 100644 --- a/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py +++ b/openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py @@ -1,7 +1,7 @@ """ Test cases for cache_programs command. """ -from __future__ import absolute_import + import json import httpretty diff --git a/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py b/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py index 84923a3d75..a32db906b8 100644 --- a/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py +++ b/openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py @@ -1,7 +1,7 @@ """ Test cases for catalog_integrations command. """ -from __future__ import absolute_import + from django.test import TestCase from django.core.management import call_command, CommandError diff --git a/openedx/core/djangoapps/catalog/management/commands/tests/test_sync_course_runs.py b/openedx/core/djangoapps/catalog/management/commands/tests/test_sync_course_runs.py index 454af59416..c6b5d0114e 100644 --- a/openedx/core/djangoapps/catalog/management/commands/tests/test_sync_course_runs.py +++ b/openedx/core/djangoapps/catalog/management/commands/tests/test_sync_course_runs.py @@ -1,7 +1,7 @@ """ Tests for the sync course runs management command. """ -from __future__ import absolute_import + import ddt import mock diff --git a/openedx/core/djangoapps/catalog/migrations/0001_initial.py b/openedx/core/djangoapps/catalog/migrations/0001_initial.py index 07a020a8e1..497f183f9f 100644 --- a/openedx/core/djangoapps/catalog/migrations/0001_initial.py +++ b/openedx/core/djangoapps/catalog/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/catalog/migrations/0002_catalogintegration_username.py b/openedx/core/djangoapps/catalog/migrations/0002_catalogintegration_username.py index 3cc61b86d7..82439c15b5 100644 --- a/openedx/core/djangoapps/catalog/migrations/0002_catalogintegration_username.py +++ b/openedx/core/djangoapps/catalog/migrations/0002_catalogintegration_username.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/catalog/migrations/0003_catalogintegration_page_size.py b/openedx/core/djangoapps/catalog/migrations/0003_catalogintegration_page_size.py index 1a2f026d29..7b4a4f18ca 100644 --- a/openedx/core/djangoapps/catalog/migrations/0003_catalogintegration_page_size.py +++ b/openedx/core/djangoapps/catalog/migrations/0003_catalogintegration_page_size.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/catalog/migrations/0004_auto_20170616_0618.py b/openedx/core/djangoapps/catalog/migrations/0004_auto_20170616_0618.py index 386c25d086..9047426cdc 100644 --- a/openedx/core/djangoapps/catalog/migrations/0004_auto_20170616_0618.py +++ b/openedx/core/djangoapps/catalog/migrations/0004_auto_20170616_0618.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/catalog/migrations/0005_catalogintegration_long_term_cache_ttl.py b/openedx/core/djangoapps/catalog/migrations/0005_catalogintegration_long_term_cache_ttl.py index 13da1bf44b..eaaf701985 100644 --- a/openedx/core/djangoapps/catalog/migrations/0005_catalogintegration_long_term_cache_ttl.py +++ b/openedx/core/djangoapps/catalog/migrations/0005_catalogintegration_long_term_cache_ttl.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/catalog/models.py b/openedx/core/djangoapps/catalog/models.py index 8f178d2325..b9a1c2dadb 100644 --- a/openedx/core/djangoapps/catalog/models.py +++ b/openedx/core/djangoapps/catalog/models.py @@ -1,5 +1,5 @@ """Models governing integration with the catalog service.""" -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.conf import settings diff --git a/openedx/core/djangoapps/catalog/tests/factories.py b/openedx/core/djangoapps/catalog/tests/factories.py index f7429f3546..6562ddd1ca 100644 --- a/openedx/core/djangoapps/catalog/tests/factories.py +++ b/openedx/core/djangoapps/catalog/tests/factories.py @@ -1,6 +1,6 @@ """Factories for generating fake catalog data.""" # pylint: disable=missing-docstring, invalid-name -from __future__ import absolute_import + import uuid from functools import partial diff --git a/openedx/core/djangoapps/catalog/tests/mixins.py b/openedx/core/djangoapps/catalog/tests/mixins.py index 8bb38ccdf5..fb256fd67c 100644 --- a/openedx/core/djangoapps/catalog/tests/mixins.py +++ b/openedx/core/djangoapps/catalog/tests/mixins.py @@ -1,5 +1,5 @@ """Mixins to help test catalog integration.""" -from __future__ import absolute_import + from openedx.core.djangoapps.catalog.models import CatalogIntegration diff --git a/openedx/core/djangoapps/catalog/tests/test_models.py b/openedx/core/djangoapps/catalog/tests/test_models.py index bd983445ac..ff0231afcc 100644 --- a/openedx/core/djangoapps/catalog/tests/test_models.py +++ b/openedx/core/djangoapps/catalog/tests/test_models.py @@ -1,5 +1,5 @@ """Catalog model tests.""" -from __future__ import absolute_import + import ddt import mock diff --git a/openedx/core/djangoapps/catalog/tests/test_utils.py b/openedx/core/djangoapps/catalog/tests/test_utils.py index 47ce167c86..8768237cf6 100644 --- a/openedx/core/djangoapps/catalog/tests/test_utils.py +++ b/openedx/core/djangoapps/catalog/tests/test_utils.py @@ -1,7 +1,7 @@ """Tests covering utilities for integrating with the catalog service.""" # pylint: disable=missing-docstring -from __future__ import absolute_import + from collections import defaultdict from datetime import timedelta diff --git a/openedx/core/djangoapps/catalog/urls.py b/openedx/core/djangoapps/catalog/urls.py index 6914d14bab..5fafa74c0b 100644 --- a/openedx/core/djangoapps/catalog/urls.py +++ b/openedx/core/djangoapps/catalog/urls.py @@ -1,7 +1,7 @@ """ Defines the URL routes for this app. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/openedx/core/djangoapps/catalog/utils.py b/openedx/core/djangoapps/catalog/utils.py index cb3343c4cf..90164b2f2e 100644 --- a/openedx/core/djangoapps/catalog/utils.py +++ b/openedx/core/djangoapps/catalog/utils.py @@ -1,5 +1,5 @@ """Helper functions for working with the catalog service.""" -from __future__ import absolute_import, unicode_literals + import copy import datetime diff --git a/openedx/core/djangoapps/catalog/views.py b/openedx/core/djangoapps/catalog/views.py index 8a9f150c99..ecc1fd381f 100644 --- a/openedx/core/djangoapps/catalog/views.py +++ b/openedx/core/djangoapps/catalog/views.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django.conf import settings from django.core.management import call_command diff --git a/openedx/core/djangoapps/ccxcon/admin.py b/openedx/core/djangoapps/ccxcon/admin.py index 68e642985b..c0b5b1f162 100644 --- a/openedx/core/djangoapps/ccxcon/admin.py +++ b/openedx/core/djangoapps/ccxcon/admin.py @@ -2,7 +2,7 @@ Admin site bindings for ccxcon """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/openedx/core/djangoapps/ccxcon/api.py b/openedx/core/djangoapps/ccxcon/api.py index b946f92b3a..44950fb742 100644 --- a/openedx/core/djangoapps/ccxcon/api.py +++ b/openedx/core/djangoapps/ccxcon/api.py @@ -2,7 +2,7 @@ Module containing API functions for the CCXCon """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/ccxcon/apps.py b/openedx/core/djangoapps/ccxcon/apps.py index 285f651b97..52f37f1a0c 100644 --- a/openedx/core/djangoapps/ccxcon/apps.py +++ b/openedx/core/djangoapps/ccxcon/apps.py @@ -2,7 +2,7 @@ Configuration for CCX connector """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/ccxcon/migrations/0001_initial_ccxcon_model.py b/openedx/core/djangoapps/ccxcon/migrations/0001_initial_ccxcon_model.py index a956f37b8a..e51633bc68 100644 --- a/openedx/core/djangoapps/ccxcon/migrations/0001_initial_ccxcon_model.py +++ b/openedx/core/djangoapps/ccxcon/migrations/0001_initial_ccxcon_model.py @@ -1,7 +1,7 @@ """ Initial migration """ -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/ccxcon/migrations/0002_auto_20160325_0407.py b/openedx/core/djangoapps/ccxcon/migrations/0002_auto_20160325_0407.py index e2bcf5ac1f..deb4906fa3 100644 --- a/openedx/core/djangoapps/ccxcon/migrations/0002_auto_20160325_0407.py +++ b/openedx/core/djangoapps/ccxcon/migrations/0002_auto_20160325_0407.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/ccxcon/models.py b/openedx/core/djangoapps/ccxcon/models.py index 99b68fd27a..a97fd1c95b 100644 --- a/openedx/core/djangoapps/ccxcon/models.py +++ b/openedx/core/djangoapps/ccxcon/models.py @@ -2,7 +2,7 @@ Models for the ccxcon """ -from __future__ import absolute_import + from django.db import models from django.utils.encoding import python_2_unicode_compatible diff --git a/openedx/core/djangoapps/ccxcon/signals.py b/openedx/core/djangoapps/ccxcon/signals.py index e005278da2..b4baa55685 100644 --- a/openedx/core/djangoapps/ccxcon/signals.py +++ b/openedx/core/djangoapps/ccxcon/signals.py @@ -1,7 +1,7 @@ """ Signal handler for posting course updated to CCXCon """ -from __future__ import absolute_import + import six from django.dispatch.dispatcher import receiver diff --git a/openedx/core/djangoapps/ccxcon/tasks.py b/openedx/core/djangoapps/ccxcon/tasks.py index 0074926615..8bffd88691 100644 --- a/openedx/core/djangoapps/ccxcon/tasks.py +++ b/openedx/core/djangoapps/ccxcon/tasks.py @@ -2,7 +2,7 @@ This file contains celery tasks for ccxcon """ -from __future__ import absolute_import + from celery.task import task from celery.utils.log import get_task_logger diff --git a/openedx/core/djangoapps/ccxcon/tests/factories.py b/openedx/core/djangoapps/ccxcon/tests/factories.py index b495ea8782..7d2e3258c7 100644 --- a/openedx/core/djangoapps/ccxcon/tests/factories.py +++ b/openedx/core/djangoapps/ccxcon/tests/factories.py @@ -1,7 +1,7 @@ """ Dummy factories for tests """ -from __future__ import absolute_import + from factory.django import DjangoModelFactory diff --git a/openedx/core/djangoapps/ccxcon/tests/test_api.py b/openedx/core/djangoapps/ccxcon/tests/test_api.py index ff305d256d..fa74fd6931 100644 --- a/openedx/core/djangoapps/ccxcon/tests/test_api.py +++ b/openedx/core/djangoapps/ccxcon/tests/test_api.py @@ -2,7 +2,7 @@ Unit tests for the API module """ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/ccxcon/tests/test_signals.py b/openedx/core/djangoapps/ccxcon/tests/test_signals.py index 82e06fb538..d16a8fca95 100644 --- a/openedx/core/djangoapps/ccxcon/tests/test_signals.py +++ b/openedx/core/djangoapps/ccxcon/tests/test_signals.py @@ -2,7 +2,7 @@ Test for contentstore signals receiver """ -from __future__ import absolute_import + import mock from django.test import TestCase diff --git a/openedx/core/djangoapps/ccxcon/tests/test_tasks.py b/openedx/core/djangoapps/ccxcon/tests/test_tasks.py index 6171a6d81e..af333cee06 100644 --- a/openedx/core/djangoapps/ccxcon/tests/test_tasks.py +++ b/openedx/core/djangoapps/ccxcon/tests/test_tasks.py @@ -2,7 +2,7 @@ Tests for the CCXCon celery tasks """ -from __future__ import absolute_import + import mock from django.test import TestCase diff --git a/openedx/core/djangoapps/certificates/api.py b/openedx/core/djangoapps/certificates/api.py index ac7cccf12f..4d9cd20680 100644 --- a/openedx/core/djangoapps/certificates/api.py +++ b/openedx/core/djangoapps/certificates/api.py @@ -1,7 +1,7 @@ """ The public API for certificates. """ -from __future__ import absolute_import + import logging from datetime import datetime diff --git a/openedx/core/djangoapps/certificates/config/waffle.py b/openedx/core/djangoapps/certificates/config/waffle.py index 93042c7c57..8ecd11bc68 100644 --- a/openedx/core/djangoapps/certificates/config/waffle.py +++ b/openedx/core/djangoapps/certificates/config/waffle.py @@ -2,7 +2,7 @@ This module contains various configuration settings via waffle switches for the Certificates app. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace diff --git a/openedx/core/djangoapps/certificates/tests/test_api.py b/openedx/core/djangoapps/certificates/tests/test_api.py index 45e21835a6..319e727621 100644 --- a/openedx/core/djangoapps/certificates/tests/test_api.py +++ b/openedx/core/djangoapps/certificates/tests/test_api.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import itertools from contextlib import contextmanager diff --git a/openedx/core/djangoapps/commerce/utils.py b/openedx/core/djangoapps/commerce/utils.py index 3bde30d588..ccadba7c8f 100644 --- a/openedx/core/djangoapps/commerce/utils.py +++ b/openedx/core/djangoapps/commerce/utils.py @@ -1,5 +1,5 @@ """ Commerce API Service. """ -from __future__ import absolute_import + from django.conf import settings from edx_rest_api_client.client import EdxRestApiClient diff --git a/openedx/core/djangoapps/common_initialization/apps.py b/openedx/core/djangoapps/common_initialization/apps.py index 1091b5c5a8..58722ccb4f 100644 --- a/openedx/core/djangoapps/common_initialization/apps.py +++ b/openedx/core/djangoapps/common_initialization/apps.py @@ -2,7 +2,7 @@ Common initialization app for the LMS and CMS """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/common_initialization/checks.py b/openedx/core/djangoapps/common_initialization/checks.py index 7eccf537d2..99fbd55d7f 100644 --- a/openedx/core/djangoapps/common_initialization/checks.py +++ b/openedx/core/djangoapps/common_initialization/checks.py @@ -5,7 +5,7 @@ Only populate this module with general settings validators which do not fit in other, more specific djangoapps. Usually, settings which are widely used across the entire LMS or CMS can be validated here. """ -from __future__ import absolute_import + from django.conf import settings from django.core.checks import Error, Tags, register diff --git a/openedx/core/djangoapps/common_views/xblock.py b/openedx/core/djangoapps/common_views/xblock.py index 28176a00a8..a3a1d32e8e 100644 --- a/openedx/core/djangoapps/common_views/xblock.py +++ b/openedx/core/djangoapps/common_views/xblock.py @@ -1,7 +1,7 @@ """ Common views dedicated to rendering xblocks. """ -from __future__ import absolute_import + import logging import mimetypes diff --git a/openedx/core/djangoapps/config_model_utils/admin.py b/openedx/core/djangoapps/config_model_utils/admin.py index 56deb5c779..3875973984 100644 --- a/openedx/core/djangoapps/config_model_utils/admin.py +++ b/openedx/core/djangoapps/config_model_utils/admin.py @@ -2,7 +2,7 @@ Convenience classes for defining StackedConfigModel Admin pages. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django import forms diff --git a/openedx/core/djangoapps/config_model_utils/apps.py b/openedx/core/djangoapps/config_model_utils/apps.py index 1b96ccde9f..1eb59e2d51 100644 --- a/openedx/core/djangoapps/config_model_utils/apps.py +++ b/openedx/core/djangoapps/config_model_utils/apps.py @@ -2,7 +2,7 @@ Django AppConfig for ConfigurationModel utilities """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/config_model_utils/models.py b/openedx/core/djangoapps/config_model_utils/models.py index 3bb6893119..abf6b5a038 100644 --- a/openedx/core/djangoapps/config_model_utils/models.py +++ b/openedx/core/djangoapps/config_model_utils/models.py @@ -5,7 +5,7 @@ StackedConfigurationModel: A ConfigurationModel that can be overridden at site, """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from collections import defaultdict from enum import Enum diff --git a/openedx/core/djangoapps/config_model_utils/utils.py b/openedx/core/djangoapps/config_model_utils/utils.py index 56bbb0c1fa..692a61934f 100644 --- a/openedx/core/djangoapps/config_model_utils/utils.py +++ b/openedx/core/djangoapps/config_model_utils/utils.py @@ -1,5 +1,5 @@ """utils for feature-based enrollments""" -from __future__ import absolute_import + from student.models import FBEEnrollmentExclusion diff --git a/openedx/core/djangoapps/content/block_structure/admin.py b/openedx/core/djangoapps/content/block_structure/admin.py index a1c74f261e..e3279c4c76 100644 --- a/openedx/core/djangoapps/content/block_structure/admin.py +++ b/openedx/core/djangoapps/content/block_structure/admin.py @@ -1,7 +1,7 @@ """ Django Admin for Block Structures. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/content/block_structure/api.py b/openedx/core/djangoapps/content/block_structure/api.py index eba7936aec..da1823cc86 100644 --- a/openedx/core/djangoapps/content/block_structure/api.py +++ b/openedx/core/djangoapps/content/block_structure/api.py @@ -1,7 +1,7 @@ """ Higher order functions built on the BlockStructureManager to interact with a django cache. """ -from __future__ import absolute_import + from django.core.cache import cache diff --git a/openedx/core/djangoapps/content/block_structure/apps.py b/openedx/core/djangoapps/content/block_structure/apps.py index d75e61b718..c38805cbc7 100644 --- a/openedx/core/djangoapps/content/block_structure/apps.py +++ b/openedx/core/djangoapps/content/block_structure/apps.py @@ -2,7 +2,7 @@ Configuration for block_structure djangoapp """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/content/block_structure/block_structure.py b/openedx/core/djangoapps/content/block_structure/block_structure.py index ea1a0e4454..612c9dd584 100644 --- a/openedx/core/djangoapps/content/block_structure/block_structure.py +++ b/openedx/core/djangoapps/content/block_structure/block_structure.py @@ -8,7 +8,7 @@ The following internal data structures are implemented: _BlockRelations - Data structure for a single block's relations. _BlockData - Data structure for a single block's data. """ -from __future__ import absolute_import + from copy import deepcopy from functools import partial diff --git a/openedx/core/djangoapps/content/block_structure/config/__init__.py b/openedx/core/djangoapps/content/block_structure/config/__init__.py index c8ce73aabf..05b0b4e766 100644 --- a/openedx/core/djangoapps/content/block_structure/config/__init__.py +++ b/openedx/core/djangoapps/content/block_structure/config/__init__.py @@ -2,7 +2,7 @@ This module contains various configuration settings via waffle switches for the Block Structure framework. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace from openedx.core.lib.cache_utils import request_cached diff --git a/openedx/core/djangoapps/content/block_structure/config/models.py b/openedx/core/djangoapps/content/block_structure/config/models.py index 2aa34d75ea..965fba3a3e 100644 --- a/openedx/core/djangoapps/content/block_structure/config/models.py +++ b/openedx/core/djangoapps/content/block_structure/config/models.py @@ -1,7 +1,7 @@ """ Models for configuration of Block Structures. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db.models import IntegerField diff --git a/openedx/core/djangoapps/content/block_structure/management/commands/generate_course_blocks.py b/openedx/core/djangoapps/content/block_structure/management/commands/generate_course_blocks.py index e4e7912f59..7d9c22cebc 100644 --- a/openedx/core/djangoapps/content/block_structure/management/commands/generate_course_blocks.py +++ b/openedx/core/djangoapps/content/block_structure/management/commands/generate_course_blocks.py @@ -1,7 +1,7 @@ """ Command to load course blocks. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/content/block_structure/management/commands/tests/test_generate_course_blocks.py b/openedx/core/djangoapps/content/block_structure/management/commands/tests/test_generate_course_blocks.py index cc2afc787d..f1dc62c6cb 100644 --- a/openedx/core/djangoapps/content/block_structure/management/commands/tests/test_generate_course_blocks.py +++ b/openedx/core/djangoapps/content/block_structure/management/commands/tests/test_generate_course_blocks.py @@ -1,7 +1,7 @@ """ Tests for generate_course_blocks management command. """ -from __future__ import absolute_import + import itertools diff --git a/openedx/core/djangoapps/content/block_structure/manager.py b/openedx/core/djangoapps/content/block_structure/manager.py index 364d0a7a4a..1623d208c2 100644 --- a/openedx/core/djangoapps/content/block_structure/manager.py +++ b/openedx/core/djangoapps/content/block_structure/manager.py @@ -2,7 +2,7 @@ Top-level module for the Block Structure framework with a class for managing BlockStructures. """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/openedx/core/djangoapps/content/block_structure/migrations/0001_config.py b/openedx/core/djangoapps/content/block_structure/migrations/0001_config.py index 1d2fc9a9f9..cb78e2eb06 100644 --- a/openedx/core/djangoapps/content/block_structure/migrations/0001_config.py +++ b/openedx/core/djangoapps/content/block_structure/migrations/0001_config.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/content/block_structure/migrations/0002_blockstructuremodel.py b/openedx/core/djangoapps/content/block_structure/migrations/0002_blockstructuremodel.py index d1f69f22ea..18946f9016 100644 --- a/openedx/core/djangoapps/content/block_structure/migrations/0002_blockstructuremodel.py +++ b/openedx/core/djangoapps/content/block_structure/migrations/0002_blockstructuremodel.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.utils.timezone diff --git a/openedx/core/djangoapps/content/block_structure/migrations/0003_blockstructuremodel_storage.py b/openedx/core/djangoapps/content/block_structure/migrations/0003_blockstructuremodel_storage.py index 68786cd80f..94d77a83a1 100644 --- a/openedx/core/djangoapps/content/block_structure/migrations/0003_blockstructuremodel_storage.py +++ b/openedx/core/djangoapps/content/block_structure/migrations/0003_blockstructuremodel_storage.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import openedx.core.djangoapps.content.block_structure.models diff --git a/openedx/core/djangoapps/content/block_structure/migrations/0004_blockstructuremodel_usagekeywithrun.py b/openedx/core/djangoapps/content/block_structure/migrations/0004_blockstructuremodel_usagekeywithrun.py index 6ea7b0cb47..a5a6002269 100644 --- a/openedx/core/djangoapps/content/block_structure/migrations/0004_blockstructuremodel_usagekeywithrun.py +++ b/openedx/core/djangoapps/content/block_structure/migrations/0004_blockstructuremodel_usagekeywithrun.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import openedx.core.djangoapps.xmodule_django.models diff --git a/openedx/core/djangoapps/content/block_structure/models.py b/openedx/core/djangoapps/content/block_structure/models.py index 31ad25f303..0b9d37950e 100644 --- a/openedx/core/djangoapps/content/block_structure/models.py +++ b/openedx/core/djangoapps/content/block_structure/models.py @@ -2,7 +2,7 @@ Models used by the block structure framework. """ -from __future__ import absolute_import + import errno from contextlib import contextmanager diff --git a/openedx/core/djangoapps/content/block_structure/signals.py b/openedx/core/djangoapps/content/block_structure/signals.py index cfc340b2b6..ce8267dab3 100644 --- a/openedx/core/djangoapps/content/block_structure/signals.py +++ b/openedx/core/djangoapps/content/block_structure/signals.py @@ -1,7 +1,7 @@ """ Signal handlers for invalidating cached data. """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/openedx/core/djangoapps/content/block_structure/store.py b/openedx/core/djangoapps/content/block_structure/store.py index b35b92f61b..28e76dc4a0 100644 --- a/openedx/core/djangoapps/content/block_structure/store.py +++ b/openedx/core/djangoapps/content/block_structure/store.py @@ -2,7 +2,7 @@ Module for the Storage of BlockStructure objects. """ # pylint: disable=protected-access -from __future__ import absolute_import + from logging import getLogger diff --git a/openedx/core/djangoapps/content/block_structure/tasks.py b/openedx/core/djangoapps/content/block_structure/tasks.py index 714d73b4c8..7301c3f6b6 100644 --- a/openedx/core/djangoapps/content/block_structure/tasks.py +++ b/openedx/core/djangoapps/content/block_structure/tasks.py @@ -1,7 +1,7 @@ """ Asynchronous tasks related to the Course Blocks sub-application. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/content/block_structure/tests/helpers.py b/openedx/core/djangoapps/content/block_structure/tests/helpers.py index 931055827c..d7750da7b8 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/helpers.py +++ b/openedx/core/djangoapps/content/block_structure/tests/helpers.py @@ -1,7 +1,7 @@ """ Common utilities for tests in block_structure module """ -from __future__ import absolute_import + from contextlib import contextmanager from uuid import uuid4 diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_block_structure.py b/openedx/core/djangoapps/content/block_structure/tests/test_block_structure.py index cba1fe43f1..dcd0360bad 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_block_structure.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_block_structure.py @@ -1,7 +1,7 @@ """ Tests for block_structure.py """ -from __future__ import absolute_import + import itertools # pylint: disable=protected-access diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_factory.py b/openedx/core/djangoapps/content/block_structure/tests/test_factory.py index f6524f7d02..a79171e180 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_factory.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_factory.py @@ -1,7 +1,7 @@ """ Tests for block_structure_factory.py """ -from __future__ import absolute_import + from django.test import TestCase diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_manager.py b/openedx/core/djangoapps/content/block_structure/tests/test_manager.py index 8714830518..6fb13a3f2b 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_manager.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_manager.py @@ -1,7 +1,7 @@ """ Tests for manager.py """ -from __future__ import absolute_import + import ddt import six diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_models.py b/openedx/core/djangoapps/content/block_structure/tests/test_models.py index 5939a428ab..6e614874ea 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_models.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_models.py @@ -2,7 +2,7 @@ Unit tests for Block Structure models. """ # pylint: disable=protected-access -from __future__ import absolute_import + import errno from itertools import product diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_signals.py b/openedx/core/djangoapps/content/block_structure/tests/test_signals.py index 65f461eabd..5d6fb55fed 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_signals.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_signals.py @@ -1,7 +1,7 @@ """ Unit tests for the Course Blocks signals """ -from __future__ import absolute_import + import ddt from mock import patch diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_store.py b/openedx/core/djangoapps/content/block_structure/tests/test_store.py index e1b9bf1163..aa35635ab4 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_store.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_store.py @@ -1,7 +1,7 @@ """ Tests for block_structure/cache.py """ -from __future__ import absolute_import + import ddt diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_tasks.py b/openedx/core/djangoapps/content/block_structure/tests/test_tasks.py index d36efe3734..6fdf2c0176 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_tasks.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_tasks.py @@ -2,7 +2,7 @@ Unit tests for the Course Blocks tasks """ -from __future__ import absolute_import + from mock import patch diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_transformer_registry.py b/openedx/core/djangoapps/content/block_structure/tests/test_transformer_registry.py index 49b7b39928..1d3e77741f 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_transformer_registry.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_transformer_registry.py @@ -2,7 +2,7 @@ Tests for transformer_registry.py """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_transformers.py b/openedx/core/djangoapps/content/block_structure/tests/test_transformers.py index 7911d6b273..4302bfea5d 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_transformers.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_transformers.py @@ -1,7 +1,7 @@ """ Tests for transformers.py """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/openedx/core/djangoapps/content/block_structure/transformer.py b/openedx/core/djangoapps/content/block_structure/transformer.py index 2a68810b84..5f1ad27530 100644 --- a/openedx/core/djangoapps/content/block_structure/transformer.py +++ b/openedx/core/djangoapps/content/block_structure/transformer.py @@ -2,7 +2,7 @@ This module provides the abstract base class for all Block Structure Transformers. """ -from __future__ import absolute_import + from abc import abstractmethod diff --git a/openedx/core/djangoapps/content/block_structure/transformer_registry.py b/openedx/core/djangoapps/content/block_structure/transformer_registry.py index 7ff510bcdc..dcfa42247e 100644 --- a/openedx/core/djangoapps/content/block_structure/transformer_registry.py +++ b/openedx/core/djangoapps/content/block_structure/transformer_registry.py @@ -2,7 +2,7 @@ Block Structure Transformer Registry implemented using the platform's PluginManager. """ -from __future__ import absolute_import + from base64 import b64encode from hashlib import sha1 diff --git a/openedx/core/djangoapps/content/block_structure/transformers.py b/openedx/core/djangoapps/content/block_structure/transformers.py index 3e83295df4..ae7a002813 100644 --- a/openedx/core/djangoapps/content/block_structure/transformers.py +++ b/openedx/core/djangoapps/content/block_structure/transformers.py @@ -1,7 +1,7 @@ """ Module for a collection of BlockStructureTransformers. """ -from __future__ import absolute_import + import functools from logging import getLogger diff --git a/openedx/core/djangoapps/content/course_overviews/admin.py b/openedx/core/djangoapps/content/course_overviews/admin.py index f53c3049ca..291c50b1bb 100644 --- a/openedx/core/djangoapps/content/course_overviews/admin.py +++ b/openedx/core/djangoapps/content/course_overviews/admin.py @@ -3,7 +3,7 @@ Django admin page for CourseOverviews, the basic metadata about a course that is used in user dashboard queries and other places where you need info like name, and start dates, but don't actually need to crawl into course content. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/content/course_overviews/apps.py b/openedx/core/djangoapps/content/course_overviews/apps.py index c95bf3a9d2..82c04a0d19 100644 --- a/openedx/core/djangoapps/content/course_overviews/apps.py +++ b/openedx/core/djangoapps/content/course_overviews/apps.py @@ -1,7 +1,7 @@ """ Configuration for course_overviews Django app """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py b/openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py index 52d49ce65f..e641b93177 100644 --- a/openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py +++ b/openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py @@ -2,7 +2,7 @@ Command to load course overviews. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/content/course_overviews/management/commands/simulate_publish.py b/openedx/core/djangoapps/content/course_overviews/management/commands/simulate_publish.py index 7df4196eb7..5250ef5ca8 100644 --- a/openedx/core/djangoapps/content/course_overviews/management/commands/simulate_publish.py +++ b/openedx/core/djangoapps/content/course_overviews/management/commands/simulate_publish.py @@ -11,7 +11,7 @@ This management command will emit the SignalHandler.course_published signal for some subset of courses and signal listeners, and then rely on existing listener behavior to trigger the necessary data updates. """ -from __future__ import absolute_import, print_function + import copy import logging diff --git a/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_generate_course_overview.py b/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_generate_course_overview.py index 4495cd4bb3..c1009462a9 100644 --- a/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_generate_course_overview.py +++ b/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_generate_course_overview.py @@ -1,7 +1,7 @@ """ Tests that the generate_course_overview management command actually generates course overviews. """ -from __future__ import absolute_import + import six from django.core.management.base import CommandError diff --git a/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_simulate_publish.py b/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_simulate_publish.py index 492f11166f..103201fded 100644 --- a/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_simulate_publish.py +++ b/openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_simulate_publish.py @@ -1,7 +1,7 @@ """ Tests the simulate_publish management command. """ -from __future__ import absolute_import + import six diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py b/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py index 110caa2230..c9ac11e2ba 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models import django.utils.timezone diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0002_add_course_catalog_fields.py b/openedx/core/djangoapps/content/course_overviews/migrations/0002_add_course_catalog_fields.py index 60fcc9a728..1447878994 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0002_add_course_catalog_fields.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0002_add_course_catalog_fields.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0003_courseoverviewgeneratedhistory.py b/openedx/core/djangoapps/content/course_overviews/migrations/0003_courseoverviewgeneratedhistory.py index ccbdd351c4..787aa5f605 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0003_courseoverviewgeneratedhistory.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0003_courseoverviewgeneratedhistory.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models import django.utils.timezone import model_utils.fields diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0004_courseoverview_org.py b/openedx/core/djangoapps/content/course_overviews/migrations/0004_courseoverview_org.py index 12d7b9376b..4bbffea144 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0004_courseoverview_org.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0004_courseoverview_org.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0005_delete_courseoverviewgeneratedhistory.py b/openedx/core/djangoapps/content/course_overviews/migrations/0005_delete_courseoverviewgeneratedhistory.py index 55444710f4..0fcda0a917 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0005_delete_courseoverviewgeneratedhistory.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0005_delete_courseoverviewgeneratedhistory.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0006_courseoverviewimageset.py b/openedx/core/djangoapps/content/course_overviews/migrations/0006_courseoverviewimageset.py index d45f3f8516..9f460af193 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0006_courseoverviewimageset.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0006_courseoverviewimageset.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models import django.utils.timezone diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0007_courseoverviewimageconfig.py b/openedx/core/djangoapps/content/course_overviews/migrations/0007_courseoverviewimageconfig.py index 92033152d9..6173ea2ae8 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0007_courseoverviewimageconfig.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0007_courseoverviewimageconfig.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0008_remove_courseoverview_facebook_url.py b/openedx/core/djangoapps/content/course_overviews/migrations/0008_remove_courseoverview_facebook_url.py index 6f176cb8b6..ae42b205b3 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0008_remove_courseoverview_facebook_url.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0008_remove_courseoverview_facebook_url.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0009_readd_facebook_url.py b/openedx/core/djangoapps/content/course_overviews/migrations/0009_readd_facebook_url.py index dbbccdc38f..1e6399fa59 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0009_readd_facebook_url.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0009_readd_facebook_url.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models, connection diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0010_auto_20160329_2317.py b/openedx/core/djangoapps/content/course_overviews/migrations/0010_auto_20160329_2317.py index cbe956d08e..9761d7aea9 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0010_auto_20160329_2317.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0010_auto_20160329_2317.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0011_courseoverview_marketing_url.py b/openedx/core/djangoapps/content/course_overviews/migrations/0011_courseoverview_marketing_url.py index 5e3cc797e5..2b13de82e4 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0011_courseoverview_marketing_url.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0011_courseoverview_marketing_url.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0012_courseoverview_eligible_for_financial_aid.py b/openedx/core/djangoapps/content/course_overviews/migrations/0012_courseoverview_eligible_for_financial_aid.py index b5bfe9b93b..2d99e61559 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0012_courseoverview_eligible_for_financial_aid.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0012_courseoverview_eligible_for_financial_aid.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0013_courseoverview_language.py b/openedx/core/djangoapps/content/course_overviews/migrations/0013_courseoverview_language.py index b01732dae6..290d29d491 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0013_courseoverview_language.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0013_courseoverview_language.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0014_courseoverview_certificate_available_date.py b/openedx/core/djangoapps/content/course_overviews/migrations/0014_courseoverview_certificate_available_date.py index c89f7e7993..4af0297475 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0014_courseoverview_certificate_available_date.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0014_courseoverview_certificate_available_date.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0015_historicalcourseoverview.py b/openedx/core/djangoapps/content/course_overviews/migrations/0015_historicalcourseoverview.py index 9de62d0baf..9b6c71f290 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0015_historicalcourseoverview.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0015_historicalcourseoverview.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-30 21:13 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0016_simulatecoursepublishconfig.py b/openedx/core/djangoapps/content/course_overviews/migrations/0016_simulatecoursepublishconfig.py index 0827faf4d6..28a8186354 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0016_simulatecoursepublishconfig.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0016_simulatecoursepublishconfig.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-09-16 10:45 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0017_auto_20191002_0823.py b/openedx/core/djangoapps/content/course_overviews/migrations/0017_auto_20191002_0823.py index be538e111d..197cbe5a68 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0017_auto_20191002_0823.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0017_auto_20191002_0823.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2019-10-02 08:23 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/content/course_overviews/models.py b/openedx/core/djangoapps/content/course_overviews/models.py index f22b6c5b30..786a66b625 100644 --- a/openedx/core/djangoapps/content/course_overviews/models.py +++ b/openedx/core/djangoapps/content/course_overviews/models.py @@ -1,7 +1,7 @@ """ Declaration of CourseOverview model """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/content/course_overviews/signals.py b/openedx/core/djangoapps/content/course_overviews/signals.py index d8110da05f..a683bf7ca3 100644 --- a/openedx/core/djangoapps/content/course_overviews/signals.py +++ b/openedx/core/djangoapps/content/course_overviews/signals.py @@ -1,7 +1,7 @@ """ Signal handler for invalidating cached course overviews """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/content/course_overviews/tasks.py b/openedx/core/djangoapps/content/course_overviews/tasks.py index dc98073da0..d21e9dcbb6 100644 --- a/openedx/core/djangoapps/content/course_overviews/tasks.py +++ b/openedx/core/djangoapps/content/course_overviews/tasks.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/content/course_overviews/tests/factories.py b/openedx/core/djangoapps/content/course_overviews/tests/factories.py index acd44df62c..8ade26bb10 100644 --- a/openedx/core/djangoapps/content/course_overviews/tests/factories.py +++ b/openedx/core/djangoapps/content/course_overviews/tests/factories.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from datetime import timedelta import json diff --git a/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py b/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py index 0706bc98d8..b81e9ca035 100644 --- a/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py +++ b/openedx/core/djangoapps/content/course_overviews/tests/test_course_overviews.py @@ -1,7 +1,7 @@ """ Tests for course_overviews app. """ -from __future__ import absolute_import + import datetime import itertools diff --git a/openedx/core/djangoapps/content/course_overviews/tests/test_signals.py b/openedx/core/djangoapps/content/course_overviews/tests/test_signals.py index 16011898f6..7849a9d36f 100644 --- a/openedx/core/djangoapps/content/course_overviews/tests/test_signals.py +++ b/openedx/core/djangoapps/content/course_overviews/tests/test_signals.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/content/course_overviews/tests/test_tasks.py b/openedx/core/djangoapps/content/course_overviews/tests/test_tasks.py index 615d437822..336ad2dcfe 100644 --- a/openedx/core/djangoapps/content/course_overviews/tests/test_tasks.py +++ b/openedx/core/djangoapps/content/course_overviews/tests/test_tasks.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import mock import six diff --git a/openedx/core/djangoapps/content_libraries/api.py b/openedx/core/djangoapps/content_libraries/api.py index 77c94a66dd..238dafe79d 100644 --- a/openedx/core/djangoapps/content_libraries/api.py +++ b/openedx/core/djangoapps/content_libraries/api.py @@ -4,7 +4,7 @@ Python API for content libraries. Unless otherwise specified, all APIs in this file deal with the DRAFT version of the content library. """ -from __future__ import absolute_import, division, print_function, unicode_literals + from uuid import UUID import logging diff --git a/openedx/core/djangoapps/content_libraries/apps.py b/openedx/core/djangoapps/content_libraries/apps.py index 1590e287b1..7e487d9876 100644 --- a/openedx/core/djangoapps/content_libraries/apps.py +++ b/openedx/core/djangoapps/content_libraries/apps.py @@ -2,7 +2,7 @@ Django AppConfig for Content Libraries Implementation """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, division, print_function, unicode_literals + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/content_libraries/library_bundle.py b/openedx/core/djangoapps/content_libraries/library_bundle.py index 5e537cf10f..954113a08c 100644 --- a/openedx/core/djangoapps/content_libraries/library_bundle.py +++ b/openedx/core/djangoapps/content_libraries/library_bundle.py @@ -1,7 +1,7 @@ """ Helper code for working with Blockstore bundles that contain OLX """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging from django.utils.lru_cache import lru_cache diff --git a/openedx/core/djangoapps/content_libraries/library_context.py b/openedx/core/djangoapps/content_libraries/library_context.py index 034ce43010..21c1c09598 100644 --- a/openedx/core/djangoapps/content_libraries/library_context.py +++ b/openedx/core/djangoapps/content_libraries/library_context.py @@ -1,7 +1,7 @@ """ Definition of "Library" as a learning context. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging from openedx.core.djangoapps.content_libraries.library_bundle import ( diff --git a/openedx/core/djangoapps/content_libraries/migrations/0001_initial.py b/openedx/core/djangoapps/content_libraries/migrations/0001_initial.py index 8f2eb6761f..46952d94b4 100644 --- a/openedx/core/djangoapps/content_libraries/migrations/0001_initial.py +++ b/openedx/core/djangoapps/content_libraries/migrations/0001_initial.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-08-28 20:27 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/content_libraries/models.py b/openedx/core/djangoapps/content_libraries/models.py index 44f8f133ee..71f0653e66 100644 --- a/openedx/core/djangoapps/content_libraries/models.py +++ b/openedx/core/djangoapps/content_libraries/models.py @@ -1,7 +1,7 @@ """ Models for new Content Libraries """ -from __future__ import absolute_import, division, print_function, unicode_literals + from django.contrib.auth import get_user_model from django.db import models diff --git a/openedx/core/djangoapps/content_libraries/serializers.py b/openedx/core/djangoapps/content_libraries/serializers.py index b438d31cc3..781c66c37c 100644 --- a/openedx/core/djangoapps/content_libraries/serializers.py +++ b/openedx/core/djangoapps/content_libraries/serializers.py @@ -2,7 +2,7 @@ Serializers for the content libraries REST API """ # pylint: disable=abstract-method -from __future__ import absolute_import, division, print_function, unicode_literals + from django.core.validators import validate_unicode_slug from rest_framework import serializers diff --git a/openedx/core/djangoapps/content_libraries/tests/base.py b/openedx/core/djangoapps/content_libraries/tests/base.py index 32362e0295..fb2a38f316 100644 --- a/openedx/core/djangoapps/content_libraries/tests/base.py +++ b/openedx/core/djangoapps/content_libraries/tests/base.py @@ -2,7 +2,7 @@ """ Tests for Blockstore-based Content Libraries """ -from __future__ import absolute_import, division, print_function, unicode_literals + import unittest from django.conf import settings diff --git a/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py b/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py index e0f7db6f03..5d5b5b264e 100644 --- a/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py +++ b/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py @@ -2,7 +2,7 @@ """ Tests for Blockstore-based Content Libraries """ -from __future__ import absolute_import, division, print_function, unicode_literals + import unittest from uuid import UUID diff --git a/openedx/core/djangoapps/content_libraries/tests/test_runtime.py b/openedx/core/djangoapps/content_libraries/tests/test_runtime.py index acde9be45f..43778856d7 100644 --- a/openedx/core/djangoapps/content_libraries/tests/test_runtime.py +++ b/openedx/core/djangoapps/content_libraries/tests/test_runtime.py @@ -2,7 +2,7 @@ """ Test the Blockstore-based XBlock runtime and content libraries together. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import json from completion.test_utils import CompletionWaffleTestMixin diff --git a/openedx/core/djangoapps/content_libraries/tests/test_static_assets.py b/openedx/core/djangoapps/content_libraries/tests/test_static_assets.py index 71f66c5a26..8adaf65f9c 100644 --- a/openedx/core/djangoapps/content_libraries/tests/test_static_assets.py +++ b/openedx/core/djangoapps/content_libraries/tests/test_static_assets.py @@ -2,7 +2,7 @@ """ Tests for static asset files in Blockstore-based Content Libraries """ -from __future__ import absolute_import, division, print_function, unicode_literals + import requests diff --git a/openedx/core/djangoapps/content_libraries/tests/user_state_block.py b/openedx/core/djangoapps/content_libraries/tests/user_state_block.py index 2738f5854f..3bcd77f0df 100644 --- a/openedx/core/djangoapps/content_libraries/tests/user_state_block.py +++ b/openedx/core/djangoapps/content_libraries/tests/user_state_block.py @@ -2,7 +2,7 @@ """ Block for testing variously scoped XBlock fields. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import json from webob import Response diff --git a/openedx/core/djangoapps/content_libraries/urls.py b/openedx/core/djangoapps/content_libraries/urls.py index adea51cd8e..b0e740e5ba 100644 --- a/openedx/core/djangoapps/content_libraries/urls.py +++ b/openedx/core/djangoapps/content_libraries/urls.py @@ -1,7 +1,7 @@ """ URL configuration for Studio's Content Libraries REST API """ -from __future__ import absolute_import, division, print_function, unicode_literals + from django.conf.urls import include, url diff --git a/openedx/core/djangoapps/content_libraries/views.py b/openedx/core/djangoapps/content_libraries/views.py index 5d116de626..913f8eca15 100644 --- a/openedx/core/djangoapps/content_libraries/views.py +++ b/openedx/core/djangoapps/content_libraries/views.py @@ -1,7 +1,7 @@ """ REST API for Blockstore-based content libraries """ -from __future__ import absolute_import, division, print_function, unicode_literals + from functools import wraps import logging diff --git a/openedx/core/djangoapps/contentserver/admin.py b/openedx/core/djangoapps/contentserver/admin.py index 416973de7e..a7c513631b 100644 --- a/openedx/core/djangoapps/contentserver/admin.py +++ b/openedx/core/djangoapps/contentserver/admin.py @@ -2,7 +2,7 @@ Django admin page for CourseAssetCacheTtlConfig, which allows you to configure the TTL that gets used when sending cachability headers back with request course assets. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/contentserver/caching.py b/openedx/core/djangoapps/contentserver/caching.py index 41af2582f7..3b3fa43f54 100644 --- a/openedx/core/djangoapps/contentserver/caching.py +++ b/openedx/core/djangoapps/contentserver/caching.py @@ -1,7 +1,7 @@ """ Helper functions for caching course assets. """ -from __future__ import absolute_import + import six diff --git a/openedx/core/djangoapps/contentserver/middleware.py b/openedx/core/djangoapps/contentserver/middleware.py index 88f392462d..7085a3a354 100644 --- a/openedx/core/djangoapps/contentserver/middleware.py +++ b/openedx/core/djangoapps/contentserver/middleware.py @@ -2,7 +2,7 @@ Middleware to serve assets. """ -from __future__ import absolute_import + import logging import datetime diff --git a/openedx/core/djangoapps/contentserver/migrations/0001_initial.py b/openedx/core/djangoapps/contentserver/migrations/0001_initial.py index 05f60887a1..73c156f189 100644 --- a/openedx/core/djangoapps/contentserver/migrations/0001_initial.py +++ b/openedx/core/djangoapps/contentserver/migrations/0001_initial.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- #pylint: skip-file -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/contentserver/migrations/0002_cdnuseragentsconfig.py b/openedx/core/djangoapps/contentserver/migrations/0002_cdnuseragentsconfig.py index 2498400e6c..be2a423efa 100644 --- a/openedx/core/djangoapps/contentserver/migrations/0002_cdnuseragentsconfig.py +++ b/openedx/core/djangoapps/contentserver/migrations/0002_cdnuseragentsconfig.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/contentserver/models.py b/openedx/core/djangoapps/contentserver/models.py index d7d7cfd37b..385eb04eca 100644 --- a/openedx/core/djangoapps/contentserver/models.py +++ b/openedx/core/djangoapps/contentserver/models.py @@ -2,7 +2,7 @@ Models for contentserver """ -from __future__ import absolute_import + import six diff --git a/openedx/core/djangoapps/contentserver/test/test_contentserver.py b/openedx/core/djangoapps/contentserver/test/test_contentserver.py index 902ecf78df..60977d8c9b 100644 --- a/openedx/core/djangoapps/contentserver/test/test_contentserver.py +++ b/openedx/core/djangoapps/contentserver/test/test_contentserver.py @@ -1,7 +1,7 @@ """ Tests for StaticContentServer """ -from __future__ import absolute_import + import copy diff --git a/openedx/core/djangoapps/cors_csrf/admin.py b/openedx/core/djangoapps/cors_csrf/admin.py index a27c99ff6e..d1c69e02a9 100644 --- a/openedx/core/djangoapps/cors_csrf/admin.py +++ b/openedx/core/djangoapps/cors_csrf/admin.py @@ -2,7 +2,7 @@ Manage cross-domain configuration. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/cors_csrf/authentication.py b/openedx/core/djangoapps/cors_csrf/authentication.py index fc7b1e48cc..9bedb94353 100644 --- a/openedx/core/djangoapps/cors_csrf/authentication.py +++ b/openedx/core/djangoapps/cors_csrf/authentication.py @@ -1,7 +1,7 @@ """ Django Rest Framework Authentication classes for cross-domain end-points. """ -from __future__ import absolute_import + from django.middleware.csrf import CsrfViewMiddleware from rest_framework import authentication diff --git a/openedx/core/djangoapps/cors_csrf/decorators.py b/openedx/core/djangoapps/cors_csrf/decorators.py index 5da86e4927..d62893508c 100644 --- a/openedx/core/djangoapps/cors_csrf/decorators.py +++ b/openedx/core/djangoapps/cors_csrf/decorators.py @@ -1,5 +1,5 @@ """Decorators for cross-domain CSRF. """ -from __future__ import absolute_import + from django.views.decorators.csrf import ensure_csrf_cookie diff --git a/openedx/core/djangoapps/cors_csrf/helpers.py b/openedx/core/djangoapps/cors_csrf/helpers.py index 423854c22e..560fbb3e45 100644 --- a/openedx/core/djangoapps/cors_csrf/helpers.py +++ b/openedx/core/djangoapps/cors_csrf/helpers.py @@ -1,5 +1,5 @@ """Helper methods for CORS and CSRF checks. """ -from __future__ import absolute_import + import contextlib import logging diff --git a/openedx/core/djangoapps/cors_csrf/middleware.py b/openedx/core/djangoapps/cors_csrf/middleware.py index 5d860531e1..dede0e3fc7 100644 --- a/openedx/core/djangoapps/cors_csrf/middleware.py +++ b/openedx/core/djangoapps/cors_csrf/middleware.py @@ -42,7 +42,7 @@ CSRF cookie. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/cors_csrf/migrations/0001_initial.py b/openedx/core/djangoapps/cors_csrf/migrations/0001_initial.py index 254e6afaef..0cb67d6057 100644 --- a/openedx/core/djangoapps/cors_csrf/migrations/0001_initial.py +++ b/openedx/core/djangoapps/cors_csrf/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/cors_csrf/models.py b/openedx/core/djangoapps/cors_csrf/models.py index 62e3dbbaa2..d4ca1306ee 100644 --- a/openedx/core/djangoapps/cors_csrf/models.py +++ b/openedx/core/djangoapps/cors_csrf/models.py @@ -1,5 +1,5 @@ """Models for cross-domain configuration. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db import models diff --git a/openedx/core/djangoapps/cors_csrf/tests/test_authentication.py b/openedx/core/djangoapps/cors_csrf/tests/test_authentication.py index ae62df2a0f..1501e573e0 100644 --- a/openedx/core/djangoapps/cors_csrf/tests/test_authentication.py +++ b/openedx/core/djangoapps/cors_csrf/tests/test_authentication.py @@ -1,5 +1,5 @@ """Tests for the CORS CSRF version of Django Rest Framework's SessionAuthentication.""" -from __future__ import absolute_import + from mock import patch diff --git a/openedx/core/djangoapps/cors_csrf/tests/test_decorators.py b/openedx/core/djangoapps/cors_csrf/tests/test_decorators.py index 5b7c99d45b..6153a8bf3c 100644 --- a/openedx/core/djangoapps/cors_csrf/tests/test_decorators.py +++ b/openedx/core/djangoapps/cors_csrf/tests/test_decorators.py @@ -1,5 +1,5 @@ """Tests for cross-domain CSRF decorators. """ -from __future__ import absolute_import + import json import mock diff --git a/openedx/core/djangoapps/cors_csrf/tests/test_middleware.py b/openedx/core/djangoapps/cors_csrf/tests/test_middleware.py index fc70f13536..9a36cdfc5b 100644 --- a/openedx/core/djangoapps/cors_csrf/tests/test_middleware.py +++ b/openedx/core/djangoapps/cors_csrf/tests/test_middleware.py @@ -2,7 +2,7 @@ Tests for the CORS CSRF middleware """ -from __future__ import absolute_import + from mock import patch, Mock import ddt diff --git a/openedx/core/djangoapps/cors_csrf/tests/test_views.py b/openedx/core/djangoapps/cors_csrf/tests/test_views.py index 9710e9e747..b0699875af 100644 --- a/openedx/core/djangoapps/cors_csrf/tests/test_views.py +++ b/openedx/core/djangoapps/cors_csrf/tests/test_views.py @@ -1,6 +1,6 @@ """Tests for cross-domain request views. """ -from __future__ import absolute_import + import json import unittest diff --git a/openedx/core/djangoapps/cors_csrf/views.py b/openedx/core/djangoapps/cors_csrf/views.py index c9daaecd17..b6a26900d6 100644 --- a/openedx/core/djangoapps/cors_csrf/views.py +++ b/openedx/core/djangoapps/cors_csrf/views.py @@ -1,5 +1,5 @@ """Views for enabling cross-domain requests. """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/course_groups/api.py b/openedx/core/djangoapps/course_groups/api.py index ce2c835924..b9f4796ba3 100644 --- a/openedx/core/djangoapps/course_groups/api.py +++ b/openedx/core/djangoapps/course_groups/api.py @@ -1,7 +1,7 @@ """ course_groups API """ -from __future__ import absolute_import + from django.contrib.auth.models import User diff --git a/openedx/core/djangoapps/course_groups/cohorts.py b/openedx/core/djangoapps/course_groups/cohorts.py index 3b6950704c..b824a6b9fa 100644 --- a/openedx/core/djangoapps/course_groups/cohorts.py +++ b/openedx/core/djangoapps/course_groups/cohorts.py @@ -3,7 +3,7 @@ This file contains the logic for cohorts, as exposed internally to the forums, and to the cohort admin views. """ -from __future__ import absolute_import + import logging import random diff --git a/openedx/core/djangoapps/course_groups/migrations/0001_initial.py b/openedx/core/djangoapps/course_groups/migrations/0001_initial.py index f8b634a13d..6b34bb9432 100644 --- a/openedx/core/djangoapps/course_groups/migrations/0001_initial.py +++ b/openedx/core/djangoapps/course_groups/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models from django.conf import settings diff --git a/openedx/core/djangoapps/course_groups/migrations/0002_change_inline_default_cohort_value.py b/openedx/core/djangoapps/course_groups/migrations/0002_change_inline_default_cohort_value.py index 5380fcfaf8..f11a103f8c 100644 --- a/openedx/core/djangoapps/course_groups/migrations/0002_change_inline_default_cohort_value.py +++ b/openedx/core/djangoapps/course_groups/migrations/0002_change_inline_default_cohort_value.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models diff --git a/openedx/core/djangoapps/course_groups/migrations/0003_auto_20170609_1455.py b/openedx/core/djangoapps/course_groups/migrations/0003_auto_20170609_1455.py index b9a62615b9..866b6e0bf1 100644 --- a/openedx/core/djangoapps/course_groups/migrations/0003_auto_20170609_1455.py +++ b/openedx/core/djangoapps/course_groups/migrations/0003_auto_20170609_1455.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import + from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField diff --git a/openedx/core/djangoapps/course_groups/models.py b/openedx/core/djangoapps/course_groups/models.py index 9c43ec7379..216dc7244f 100644 --- a/openedx/core/djangoapps/course_groups/models.py +++ b/openedx/core/djangoapps/course_groups/models.py @@ -2,7 +2,7 @@ Django models related to course groups functionality. """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/course_groups/partition_scheme.py b/openedx/core/djangoapps/course_groups/partition_scheme.py index 2b851971bb..53d437c15b 100644 --- a/openedx/core/djangoapps/course_groups/partition_scheme.py +++ b/openedx/core/djangoapps/course_groups/partition_scheme.py @@ -1,7 +1,7 @@ """ Provides a UserPartition driver for cohorts. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/course_groups/serializers.py b/openedx/core/djangoapps/course_groups/serializers.py index 9136c32ef2..7d838b4ceb 100644 --- a/openedx/core/djangoapps/course_groups/serializers.py +++ b/openedx/core/djangoapps/course_groups/serializers.py @@ -1,7 +1,7 @@ """ Cohorts API serializers. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from rest_framework import serializers diff --git a/openedx/core/djangoapps/course_groups/signals/signals.py b/openedx/core/djangoapps/course_groups/signals/signals.py index 7abff89bad..c283ee483e 100644 --- a/openedx/core/djangoapps/course_groups/signals/signals.py +++ b/openedx/core/djangoapps/course_groups/signals/signals.py @@ -1,7 +1,7 @@ """ Cohorts related signals. """ -from __future__ import absolute_import + from django.dispatch import Signal COHORT_MEMBERSHIP_UPDATED = Signal(providing_args=['user', 'course_key']) diff --git a/openedx/core/djangoapps/course_groups/tests/helpers.py b/openedx/core/djangoapps/course_groups/tests/helpers.py index 47d506242f..f67e25508b 100644 --- a/openedx/core/djangoapps/course_groups/tests/helpers.py +++ b/openedx/core/djangoapps/course_groups/tests/helpers.py @@ -2,7 +2,7 @@ Helper methods for testing cohorts. """ -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/course_groups/tests/test_api_views.py b/openedx/core/djangoapps/course_groups/tests/test_api_views.py index 0c5fd3ebec..6e2448ab41 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_api_views.py +++ b/openedx/core/djangoapps/course_groups/tests/test_api_views.py @@ -1,7 +1,7 @@ """ Tests for Cohort API """ -from __future__ import absolute_import + import json import tempfile diff --git a/openedx/core/djangoapps/course_groups/tests/test_cohorts.py b/openedx/core/djangoapps/course_groups/tests/test_cohorts.py index dbb791c594..75f8c154aa 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_cohorts.py +++ b/openedx/core/djangoapps/course_groups/tests/test_cohorts.py @@ -2,7 +2,7 @@ Tests for cohorts """ # pylint: disable=no-member -from __future__ import absolute_import + import ddt from django.contrib.auth.models import AnonymousUser, User diff --git a/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py b/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py index 80cc1d324d..824beb6e71 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py +++ b/openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py @@ -2,7 +2,7 @@ Test the partitions and partitions service """ -from __future__ import absolute_import + import django.test from mock import patch diff --git a/openedx/core/djangoapps/course_groups/tests/test_views.py b/openedx/core/djangoapps/course_groups/tests/test_views.py index 33157c8b27..040a6ff434 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_views.py +++ b/openedx/core/djangoapps/course_groups/tests/test_views.py @@ -3,7 +3,7 @@ Tests for course group views """ # pylint: disable=attribute-defined-outside-init # pylint: disable=no-member -from __future__ import absolute_import + import json from collections import namedtuple diff --git a/openedx/core/djangoapps/course_groups/urls.py b/openedx/core/djangoapps/course_groups/urls.py index 064c74f9a7..2ee3c43277 100644 --- a/openedx/core/djangoapps/course_groups/urls.py +++ b/openedx/core/djangoapps/course_groups/urls.py @@ -2,7 +2,7 @@ Cohort API URLs """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/core/djangoapps/course_groups/views.py b/openedx/core/djangoapps/course_groups/views.py index 10581fc79d..7b331c8f27 100644 --- a/openedx/core/djangoapps/course_groups/views.py +++ b/openedx/core/djangoapps/course_groups/views.py @@ -2,7 +2,7 @@ Views related to course groups functionality. """ -from __future__ import absolute_import + import logging import re diff --git a/openedx/core/djangoapps/coursegraph/apps.py b/openedx/core/djangoapps/coursegraph/apps.py index 7fbb659ee4..36aed0f98a 100644 --- a/openedx/core/djangoapps/coursegraph/apps.py +++ b/openedx/core/djangoapps/coursegraph/apps.py @@ -3,7 +3,7 @@ Coursegraph Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py b/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py index 76009429ce..742ec71e4f 100644 --- a/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py +++ b/openedx/core/djangoapps/coursegraph/management/commands/dump_to_neo4j.py @@ -2,7 +2,7 @@ This file contains a management command for exporting the modulestore to neo4j, a graph database. """ -from __future__ import absolute_import, print_function, unicode_literals + import logging from textwrap import dedent diff --git a/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py b/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py index 2279ffefa6..49d38c586c 100644 --- a/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py +++ b/openedx/core/djangoapps/coursegraph/management/commands/tests/test_dump_to_neo4j.py @@ -2,7 +2,7 @@ """ Tests for the dump_to_neo4j management command. """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime diff --git a/openedx/core/djangoapps/coursegraph/management/commands/tests/utils.py b/openedx/core/djangoapps/coursegraph/management/commands/tests/utils.py index 1ff642debe..3fc155c25d 100644 --- a/openedx/core/djangoapps/coursegraph/management/commands/tests/utils.py +++ b/openedx/core/djangoapps/coursegraph/management/commands/tests/utils.py @@ -1,7 +1,7 @@ """ Utilities for testing the dump_to_neo4j management command """ -from __future__ import absolute_import, unicode_literals + from py2neo import Node diff --git a/openedx/core/djangoapps/coursegraph/tasks.py b/openedx/core/djangoapps/coursegraph/tasks.py index 72cfc7d1a0..4e32a2d53a 100644 --- a/openedx/core/djangoapps/coursegraph/tasks.py +++ b/openedx/core/djangoapps/coursegraph/tasks.py @@ -2,7 +2,7 @@ This file contains a management command for exporting the modulestore to neo4j, a graph database. """ -from __future__ import absolute_import, print_function, unicode_literals + import logging diff --git a/openedx/core/djangoapps/crawlers/admin.py b/openedx/core/djangoapps/crawlers/admin.py index 068000189d..86c63ff794 100644 --- a/openedx/core/djangoapps/crawlers/admin.py +++ b/openedx/core/djangoapps/crawlers/admin.py @@ -1,5 +1,5 @@ """Admin panel for configuring which user agents we consider to be Crawlers.""" -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/crawlers/migrations/0001_initial.py b/openedx/core/djangoapps/crawlers/migrations/0001_initial.py index 35f48222c7..d8f6e371ec 100644 --- a/openedx/core/djangoapps/crawlers/migrations/0001_initial.py +++ b/openedx/core/djangoapps/crawlers/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py b/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py index 56bf335397..197e40c2d6 100644 --- a/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py +++ b/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/crawlers/models.py b/openedx/core/djangoapps/crawlers/models.py index b56b6cd517..66619cfe50 100644 --- a/openedx/core/djangoapps/crawlers/models.py +++ b/openedx/core/djangoapps/crawlers/models.py @@ -2,7 +2,7 @@ This module handles the detection of crawlers, so that we can handle them appropriately in other parts of the code. """ -from __future__ import absolute_import + import six from config_models.models import ConfigurationModel diff --git a/openedx/core/djangoapps/crawlers/tests/test_models.py b/openedx/core/djangoapps/crawlers/tests/test_models.py index d477a9e95e..0b243eb253 100644 --- a/openedx/core/djangoapps/crawlers/tests/test_models.py +++ b/openedx/core/djangoapps/crawlers/tests/test_models.py @@ -2,7 +2,7 @@ """ Tests that the request came from a crawler or not. """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/openedx/core/djangoapps/credentials/admin.py b/openedx/core/djangoapps/credentials/admin.py index 5081594046..057c58de09 100644 --- a/openedx/core/djangoapps/credentials/admin.py +++ b/openedx/core/djangoapps/credentials/admin.py @@ -2,7 +2,7 @@ Django admin pages for credentials support models. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/credentials/apps.py b/openedx/core/djangoapps/credentials/apps.py index ba58aa606a..bab64ea93e 100644 --- a/openedx/core/djangoapps/credentials/apps.py +++ b/openedx/core/djangoapps/credentials/apps.py @@ -1,7 +1,7 @@ """ Credentials Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py b/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py index f42314bb67..c41eb14836 100644 --- a/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py +++ b/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py @@ -9,7 +9,7 @@ This management command will manually trigger the receivers we care about. (We don't want to trigger all receivers for these signals, since these are busy signals.) """ -from __future__ import absolute_import, division, print_function + import logging import math diff --git a/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py b/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py index 3941042600..4327a42019 100644 --- a/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py +++ b/openedx/core/djangoapps/credentials/management/commands/tests/test_notify_credentials.py @@ -1,8 +1,8 @@ """ Tests the ``notify_credentials`` management command. """ -from __future__ import absolute_import, unicode_literals -from __future__ import print_function + + from datetime import datetime import mock diff --git a/openedx/core/djangoapps/credentials/migrations/0001_initial.py b/openedx/core/djangoapps/credentials/migrations/0001_initial.py index d800abb502..49ca3138f0 100644 --- a/openedx/core/djangoapps/credentials/migrations/0001_initial.py +++ b/openedx/core/djangoapps/credentials/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/credentials/migrations/0002_auto_20160325_0631.py b/openedx/core/djangoapps/credentials/migrations/0002_auto_20160325_0631.py index 7d14b3d9cf..a23303357c 100644 --- a/openedx/core/djangoapps/credentials/migrations/0002_auto_20160325_0631.py +++ b/openedx/core/djangoapps/credentials/migrations/0002_auto_20160325_0631.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py b/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py index f229452c98..42c69384e0 100644 --- a/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py +++ b/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/credentials/migrations/0004_notifycredentialsconfig.py b/openedx/core/djangoapps/credentials/migrations/0004_notifycredentialsconfig.py index 50998a2930..10b4e3b6dd 100644 --- a/openedx/core/djangoapps/credentials/migrations/0004_notifycredentialsconfig.py +++ b/openedx/core/djangoapps/credentials/migrations/0004_notifycredentialsconfig.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-17 18:14 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/credentials/models.py b/openedx/core/djangoapps/credentials/models.py index 7bb8bd3b44..83f865b5e4 100644 --- a/openedx/core/djangoapps/credentials/models.py +++ b/openedx/core/djangoapps/credentials/models.py @@ -2,7 +2,7 @@ Models for credentials support for the LMS and Studio. """ -from __future__ import absolute_import + import six from config_models.models import ConfigurationModel diff --git a/openedx/core/djangoapps/credentials/signals.py b/openedx/core/djangoapps/credentials/signals.py index 0c351f0ce2..be2b61129c 100644 --- a/openedx/core/djangoapps/credentials/signals.py +++ b/openedx/core/djangoapps/credentials/signals.py @@ -1,7 +1,7 @@ """ This file contains signal handlers for credentials-related functionality. """ -from __future__ import absolute_import + from logging import getLogger diff --git a/openedx/core/djangoapps/credentials/tasks/v1/tasks.py b/openedx/core/djangoapps/credentials/tasks/v1/tasks.py index b01f426b8e..5b3e72fc89 100644 --- a/openedx/core/djangoapps/credentials/tasks/v1/tasks.py +++ b/openedx/core/djangoapps/credentials/tasks/v1/tasks.py @@ -1,7 +1,7 @@ """ This file contains celery tasks for credentials-related functionality. """ -from __future__ import absolute_import + from celery import task from celery.utils.log import get_task_logger diff --git a/openedx/core/djangoapps/credentials/tests/factories.py b/openedx/core/djangoapps/credentials/tests/factories.py index 150905bcf6..de35c72357 100644 --- a/openedx/core/djangoapps/credentials/tests/factories.py +++ b/openedx/core/djangoapps/credentials/tests/factories.py @@ -1,7 +1,7 @@ """Factories for generating fake credentials-related data.""" # pylint: disable=missing-docstring, invalid-name -from __future__ import absolute_import + import factory diff --git a/openedx/core/djangoapps/credentials/tests/mixins.py b/openedx/core/djangoapps/credentials/tests/mixins.py index cf26daeb5b..1f59453af4 100644 --- a/openedx/core/djangoapps/credentials/tests/mixins.py +++ b/openedx/core/djangoapps/credentials/tests/mixins.py @@ -1,6 +1,6 @@ """Mixins for use during testing.""" -from __future__ import absolute_import + from openedx.core.djangoapps.credentials.models import CredentialsApiConfig diff --git a/openedx/core/djangoapps/credentials/tests/test_models.py b/openedx/core/djangoapps/credentials/tests/test_models.py index 59eba16c50..ea34d68b18 100644 --- a/openedx/core/djangoapps/credentials/tests/test_models.py +++ b/openedx/core/djangoapps/credentials/tests/test_models.py @@ -1,6 +1,6 @@ """Tests for models supporting Credentials-related functionality.""" -from __future__ import absolute_import + from django.test import TestCase, override_settings diff --git a/openedx/core/djangoapps/credentials/tests/test_signals.py b/openedx/core/djangoapps/credentials/tests/test_signals.py index e70725d4e8..0ad7d47bc4 100644 --- a/openedx/core/djangoapps/credentials/tests/test_signals.py +++ b/openedx/core/djangoapps/credentials/tests/test_signals.py @@ -1,5 +1,5 @@ """Tests covering Credentials signals.""" -from __future__ import absolute_import + import ddt import mock diff --git a/openedx/core/djangoapps/credentials/tests/test_tasks.py b/openedx/core/djangoapps/credentials/tests/test_tasks.py index ce14649bf9..4ca4334259 100644 --- a/openedx/core/djangoapps/credentials/tests/test_tasks.py +++ b/openedx/core/djangoapps/credentials/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Test credentials tasks """ -from __future__ import absolute_import + import mock from django.conf import settings diff --git a/openedx/core/djangoapps/credentials/tests/test_utils.py b/openedx/core/djangoapps/credentials/tests/test_utils.py index 95ddbb0850..806ca00ed7 100644 --- a/openedx/core/djangoapps/credentials/tests/test_utils.py +++ b/openedx/core/djangoapps/credentials/tests/test_utils.py @@ -1,5 +1,5 @@ """Tests covering Credentials utilities.""" -from __future__ import absolute_import + import uuid diff --git a/openedx/core/djangoapps/credentials/utils.py b/openedx/core/djangoapps/credentials/utils.py index b74eb7b1dc..6c654ef943 100644 --- a/openedx/core/djangoapps/credentials/utils.py +++ b/openedx/core/djangoapps/credentials/utils.py @@ -1,5 +1,5 @@ """Helper functions for working with Credentials.""" -from __future__ import absolute_import, unicode_literals + from edx_rest_api_client.client import EdxRestApiClient diff --git a/openedx/core/djangoapps/credit/admin.py b/openedx/core/djangoapps/credit/admin.py index 1eb63fa04c..b9f9485d80 100644 --- a/openedx/core/djangoapps/credit/admin.py +++ b/openedx/core/djangoapps/credit/admin.py @@ -1,7 +1,7 @@ """ Django admin page for credit eligibility """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/openedx/core/djangoapps/credit/api/eligibility.py b/openedx/core/djangoapps/credit/api/eligibility.py index fe341424b4..948501ec33 100644 --- a/openedx/core/djangoapps/credit/api/eligibility.py +++ b/openedx/core/djangoapps/credit/api/eligibility.py @@ -3,7 +3,7 @@ APIs for configuring credit eligibility requirements and tracking whether a user has satisfied those requirements. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/credit/api/provider.py b/openedx/core/djangoapps/credit/api/provider.py index cf87abdc3d..2a446ca833 100644 --- a/openedx/core/djangoapps/credit/api/provider.py +++ b/openedx/core/djangoapps/credit/api/provider.py @@ -2,7 +2,7 @@ API for initiating and tracking requests for credit from a provider. """ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/credit/apps.py b/openedx/core/djangoapps/credit/apps.py index 9e525f032e..87340c8c52 100644 --- a/openedx/core/djangoapps/credit/apps.py +++ b/openedx/core/djangoapps/credit/apps.py @@ -2,7 +2,7 @@ Credit Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig from django.conf import settings diff --git a/openedx/core/djangoapps/credit/email_utils.py b/openedx/core/djangoapps/credit/email_utils.py index 1313b840e2..6744b6a878 100644 --- a/openedx/core/djangoapps/credit/email_utils.py +++ b/openedx/core/djangoapps/credit/email_utils.py @@ -2,7 +2,7 @@ This file contains utility functions which will responsible for sending emails. """ -from __future__ import absolute_import + import logging import os diff --git a/openedx/core/djangoapps/credit/exceptions.py b/openedx/core/djangoapps/credit/exceptions.py index a12b8e7f2c..b4eb30525f 100644 --- a/openedx/core/djangoapps/credit/exceptions.py +++ b/openedx/core/djangoapps/credit/exceptions.py @@ -1,5 +1,5 @@ """Exceptions raised by the credit API. """ -from __future__ import absolute_import, unicode_literals + from django.utils.translation import ugettext_lazy as _ from rest_framework import status diff --git a/openedx/core/djangoapps/credit/management/commands/delete_historical_credit_data.py b/openedx/core/djangoapps/credit/management/commands/delete_historical_credit_data.py index f0c9ab52a6..119132b2a3 100644 --- a/openedx/core/djangoapps/credit/management/commands/delete_historical_credit_data.py +++ b/openedx/core/djangoapps/credit/management/commands/delete_historical_credit_data.py @@ -3,7 +3,7 @@ Command to delete all rows from the credit_historicalcreditrequest and credit_historicalcreditrequirementstatus tables. """ -from __future__ import absolute_import + import logging from openedx.core.djangoapps.credit.models import CreditRequest, CreditRequirementStatus from openedx.core.djangoapps.util.row_delete import delete_rows, BaseDeletionCommand diff --git a/openedx/core/djangoapps/credit/migrations/0001_initial.py b/openedx/core/djangoapps/credit/migrations/0001_initial.py index ab5a8084e3..3f38795a1e 100644 --- a/openedx/core/djangoapps/credit/migrations/0001_initial.py +++ b/openedx/core/djangoapps/credit/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.core.validators import django.db.models.deletion diff --git a/openedx/core/djangoapps/credit/migrations/0002_creditconfig.py b/openedx/core/djangoapps/credit/migrations/0002_creditconfig.py index 1d6b645c6f..54a8863f6e 100644 --- a/openedx/core/djangoapps/credit/migrations/0002_creditconfig.py +++ b/openedx/core/djangoapps/credit/migrations/0002_creditconfig.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/credit/migrations/0003_auto_20160511_2227.py b/openedx/core/djangoapps/credit/migrations/0003_auto_20160511_2227.py index 5f054e8418..aaf75621a8 100644 --- a/openedx/core/djangoapps/credit/migrations/0003_auto_20160511_2227.py +++ b/openedx/core/djangoapps/credit/migrations/0003_auto_20160511_2227.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/credit/migrations/0004_delete_historical_credit_records.py b/openedx/core/djangoapps/credit/migrations/0004_delete_historical_credit_records.py index 30af0af540..d2a11cdbd6 100644 --- a/openedx/core/djangoapps/credit/migrations/0004_delete_historical_credit_records.py +++ b/openedx/core/djangoapps/credit/migrations/0004_delete_historical_credit_records.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/credit/migrations/0005_creditrequirement_sort_value.py b/openedx/core/djangoapps/credit/migrations/0005_creditrequirement_sort_value.py index a80de9a4d8..f6f6552b9d 100644 --- a/openedx/core/djangoapps/credit/migrations/0005_creditrequirement_sort_value.py +++ b/openedx/core/djangoapps/credit/migrations/0005_creditrequirement_sort_value.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-12-04 21:53 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/credit/models.py b/openedx/core/djangoapps/credit/models.py index e2fe766271..41a9233caf 100644 --- a/openedx/core/djangoapps/credit/models.py +++ b/openedx/core/djangoapps/credit/models.py @@ -6,7 +6,7 @@ Credit courses allow students to receive university credit for successful completion of a course on EdX """ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/credit/routers.py b/openedx/core/djangoapps/credit/routers.py index 461c218d18..efefa799d7 100644 --- a/openedx/core/djangoapps/credit/routers.py +++ b/openedx/core/djangoapps/credit/routers.py @@ -1,6 +1,6 @@ """ DRF routers. """ -from __future__ import absolute_import + from rest_framework import routers diff --git a/openedx/core/djangoapps/credit/serializers.py b/openedx/core/djangoapps/credit/serializers.py index 40f0f91c6d..412b243d89 100644 --- a/openedx/core/djangoapps/credit/serializers.py +++ b/openedx/core/djangoapps/credit/serializers.py @@ -1,6 +1,6 @@ """ Credit API Serializers """ -from __future__ import absolute_import, unicode_literals + import datetime import logging diff --git a/openedx/core/djangoapps/credit/services.py b/openedx/core/djangoapps/credit/services.py index 3cad7f56d4..1f9d450e96 100644 --- a/openedx/core/djangoapps/credit/services.py +++ b/openedx/core/djangoapps/credit/services.py @@ -2,7 +2,7 @@ Implementation of "credit" XBlock service """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/credit/signals.py b/openedx/core/djangoapps/credit/signals.py index 8762b15a35..eed21630ea 100644 --- a/openedx/core/djangoapps/credit/signals.py +++ b/openedx/core/djangoapps/credit/signals.py @@ -2,7 +2,7 @@ This file contains receivers of course publication signals. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/credit/signature.py b/openedx/core/djangoapps/credit/signature.py index 928968fff2..13dfe65e13 100644 --- a/openedx/core/djangoapps/credit/signature.py +++ b/openedx/core/djangoapps/credit/signature.py @@ -16,7 +16,7 @@ we receive from the credit provider. """ -from __future__ import absolute_import + import hashlib import hmac diff --git a/openedx/core/djangoapps/credit/tasks.py b/openedx/core/djangoapps/credit/tasks.py index ad611c5991..30be9cbfa2 100644 --- a/openedx/core/djangoapps/credit/tasks.py +++ b/openedx/core/djangoapps/credit/tasks.py @@ -2,7 +2,7 @@ This file contains celery tasks for credit course views. """ -from __future__ import absolute_import + import six from celery import task diff --git a/openedx/core/djangoapps/credit/tests/factories.py b/openedx/core/djangoapps/credit/tests/factories.py index 36d1d18cbb..1aebc7ff63 100644 --- a/openedx/core/djangoapps/credit/tests/factories.py +++ b/openedx/core/djangoapps/credit/tests/factories.py @@ -1,5 +1,5 @@ # pylint:disable=missing-docstring -from __future__ import absolute_import + import datetime import json diff --git a/openedx/core/djangoapps/credit/tests/test_api.py b/openedx/core/djangoapps/credit/tests/test_api.py index 3c8b5f7039..e16bbfca0c 100644 --- a/openedx/core/djangoapps/credit/tests/test_api.py +++ b/openedx/core/djangoapps/credit/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests for the API functions in the credit app. """ -from __future__ import absolute_import + import datetime import json diff --git a/openedx/core/djangoapps/credit/tests/test_models.py b/openedx/core/djangoapps/credit/tests/test_models.py index 266e4cafe5..ad19287b17 100644 --- a/openedx/core/djangoapps/credit/tests/test_models.py +++ b/openedx/core/djangoapps/credit/tests/test_models.py @@ -3,7 +3,7 @@ Tests for credit course models. """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/openedx/core/djangoapps/credit/tests/test_serializers.py b/openedx/core/djangoapps/credit/tests/test_serializers.py index 7f544dd63c..c9258a12ca 100644 --- a/openedx/core/djangoapps/credit/tests/test_serializers.py +++ b/openedx/core/djangoapps/credit/tests/test_serializers.py @@ -1,6 +1,6 @@ """ Tests for Credit API serializers. """ -from __future__ import absolute_import, unicode_literals + import six from django.test import TestCase diff --git a/openedx/core/djangoapps/credit/tests/test_services.py b/openedx/core/djangoapps/credit/tests/test_services.py index 076c7a3c42..77803f2218 100644 --- a/openedx/core/djangoapps/credit/tests/test_services.py +++ b/openedx/core/djangoapps/credit/tests/test_services.py @@ -2,7 +2,7 @@ Tests for the Credit xBlock service """ -from __future__ import absolute_import + import ddt import six diff --git a/openedx/core/djangoapps/credit/tests/test_signals.py b/openedx/core/djangoapps/credit/tests/test_signals.py index 629cac79b7..2ed22f12ce 100644 --- a/openedx/core/djangoapps/credit/tests/test_signals.py +++ b/openedx/core/djangoapps/credit/tests/test_signals.py @@ -2,7 +2,7 @@ Tests for minimum grade requirement status """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/core/djangoapps/credit/tests/test_signature.py b/openedx/core/djangoapps/credit/tests/test_signature.py index 428c7b38ba..78c1160d82 100644 --- a/openedx/core/djangoapps/credit/tests/test_signature.py +++ b/openedx/core/djangoapps/credit/tests/test_signature.py @@ -3,7 +3,7 @@ Tests for digital signatures used to validate messages to/from credit providers. """ -from __future__ import absolute_import + from django.test import TestCase from django.test.utils import override_settings diff --git a/openedx/core/djangoapps/credit/tests/test_tasks.py b/openedx/core/djangoapps/credit/tests/test_tasks.py index d03213f449..ee3d4c285c 100644 --- a/openedx/core/djangoapps/credit/tests/test_tasks.py +++ b/openedx/core/djangoapps/credit/tests/test_tasks.py @@ -2,7 +2,7 @@ Tests for credit course tasks. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/core/djangoapps/credit/tests/test_views.py b/openedx/core/djangoapps/credit/tests/test_views.py index 1b3c928f6c..358b52e475 100644 --- a/openedx/core/djangoapps/credit/tests/test_views.py +++ b/openedx/core/djangoapps/credit/tests/test_views.py @@ -2,7 +2,7 @@ Tests for credit app views. """ -from __future__ import absolute_import, unicode_literals + import datetime import json diff --git a/openedx/core/djangoapps/credit/urls.py b/openedx/core/djangoapps/credit/urls.py index 736ea9514d..cac6cb6cac 100644 --- a/openedx/core/djangoapps/credit/urls.py +++ b/openedx/core/djangoapps/credit/urls.py @@ -1,7 +1,7 @@ """ URLs for the credit app. """ -from __future__ import absolute_import + from django.conf.urls import include, url diff --git a/openedx/core/djangoapps/credit/utils.py b/openedx/core/djangoapps/credit/utils.py index d69e6b403f..bf78cf153b 100644 --- a/openedx/core/djangoapps/credit/utils.py +++ b/openedx/core/djangoapps/credit/utils.py @@ -1,7 +1,7 @@ """ Utilities for the credit app. """ -from __future__ import absolute_import + from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore diff --git a/openedx/core/djangoapps/credit/views.py b/openedx/core/djangoapps/credit/views.py index 20b657da9c..b3b295280f 100644 --- a/openedx/core/djangoapps/credit/views.py +++ b/openedx/core/djangoapps/credit/views.py @@ -1,7 +1,7 @@ """ Views for the credit Django app. """ -from __future__ import absolute_import, unicode_literals + import datetime import logging diff --git a/openedx/core/djangoapps/dark_lang/admin.py b/openedx/core/djangoapps/dark_lang/admin.py index 6aa6a125ab..693d6c19a5 100644 --- a/openedx/core/djangoapps/dark_lang/admin.py +++ b/openedx/core/djangoapps/dark_lang/admin.py @@ -2,7 +2,7 @@ Admin site bindings for dark_lang """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/dark_lang/middleware.py b/openedx/core/djangoapps/dark_lang/middleware.py index 2fd5022bfa..ee43b06ee6 100644 --- a/openedx/core/djangoapps/dark_lang/middleware.py +++ b/openedx/core/djangoapps/dark_lang/middleware.py @@ -7,7 +7,7 @@ Language setting page. This middleware must be placed before the LocaleMiddleware, but after the SessionMiddleware. """ -from __future__ import absolute_import + from django.conf import settings from django.utils.translation import LANGUAGE_SESSION_KEY diff --git a/openedx/core/djangoapps/dark_lang/migrations/0001_initial.py b/openedx/core/djangoapps/dark_lang/migrations/0001_initial.py index 871785df8f..904f8bc7d3 100644 --- a/openedx/core/djangoapps/dark_lang/migrations/0001_initial.py +++ b/openedx/core/djangoapps/dark_lang/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py b/openedx/core/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py index 1070e5db10..1c9dd79f56 100644 --- a/openedx/core/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py +++ b/openedx/core/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + # Converted from the original South migration 0002_enable_on_install.py # diff --git a/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py b/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py index aed790b44e..6ad7b2f6dc 100644 --- a/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py +++ b/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-25 07:59 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/dark_lang/models.py b/openedx/core/djangoapps/dark_lang/models.py index 22bbfbf54c..2971fad7ae 100644 --- a/openedx/core/djangoapps/dark_lang/models.py +++ b/openedx/core/djangoapps/dark_lang/models.py @@ -1,7 +1,7 @@ """ Models for the dark-launching languages """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db import models diff --git a/openedx/core/djangoapps/dark_lang/tests.py b/openedx/core/djangoapps/dark_lang/tests.py index 19a0fdd49f..05eee6aa66 100644 --- a/openedx/core/djangoapps/dark_lang/tests.py +++ b/openedx/core/djangoapps/dark_lang/tests.py @@ -1,7 +1,7 @@ """ Tests of DarkLangMiddleware """ -from __future__ import absolute_import + import unittest diff --git a/openedx/core/djangoapps/dark_lang/urls.py b/openedx/core/djangoapps/dark_lang/urls.py index 76bcb0ae8e..792186a55b 100644 --- a/openedx/core/djangoapps/dark_lang/urls.py +++ b/openedx/core/djangoapps/dark_lang/urls.py @@ -2,7 +2,7 @@ Contains all the URLs for the Dark Language Support App """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/openedx/core/djangoapps/dark_lang/views.py b/openedx/core/djangoapps/dark_lang/views.py index 0e16730c09..01f42ca3b9 100644 --- a/openedx/core/djangoapps/dark_lang/views.py +++ b/openedx/core/djangoapps/dark_lang/views.py @@ -1,7 +1,7 @@ """ Views file for the Darklang Django App """ -from __future__ import absolute_import + from django.contrib.auth.decorators import login_required from django.http import Http404 diff --git a/openedx/core/djangoapps/debug/views.py b/openedx/core/djangoapps/debug/views.py index 2f7e0ddfd0..b74b542bea 100644 --- a/openedx/core/djangoapps/debug/views.py +++ b/openedx/core/djangoapps/debug/views.py @@ -3,7 +3,7 @@ Views that are only activated when the project is running in development mode. These views will NOT be shown on production: trying to access them will result in a 404 error. """ -from __future__ import absolute_import + import bleach from django.http import HttpResponseNotFound diff --git a/openedx/core/djangoapps/django_comment_common/admin.py b/openedx/core/djangoapps/django_comment_common/admin.py index 0b7af445e7..6d2d7a34d4 100644 --- a/openedx/core/djangoapps/django_comment_common/admin.py +++ b/openedx/core/djangoapps/django_comment_common/admin.py @@ -1,7 +1,7 @@ """ Admin for managing the connection to the Forums backend service. """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/comment.py b/openedx/core/djangoapps/django_comment_common/comment_client/comment.py index 27537ffbd6..06f400c018 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/comment.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/comment.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring,protected-access -from __future__ import absolute_import + from openedx.core.djangoapps.django_comment_common.comment_client import models, settings diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/commentable.py b/openedx/core/djangoapps/django_comment_common/comment_client/commentable.py index 8586b5d9a1..4c260d7bde 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/commentable.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/commentable.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring """Provides base Commentable model class""" -from __future__ import absolute_import + from openedx.core.djangoapps.django_comment_common.comment_client import models, settings diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/models.py b/openedx/core/djangoapps/django_comment_common/comment_client/models.py index 5ddf1d5559..f3020030b4 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/models.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/models.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring,unused-argument -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/settings.py b/openedx/core/djangoapps/django_comment_common/comment_client/settings.py index 7ed582b99c..4772e38c0d 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/settings.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/settings.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/thread.py b/openedx/core/djangoapps/django_comment_common/comment_client/thread.py index aaa8c7efb9..09a09e26d1 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/thread.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/thread.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring,protected-access -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/user.py b/openedx/core/djangoapps/django_comment_common/comment_client/user.py index 52ace88003..ba7b635075 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/user.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/user.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring,protected-access """ User model wrapper for comment service""" -from __future__ import absolute_import + from six import text_type diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/utils.py b/openedx/core/djangoapps/django_comment_common/comment_client/utils.py index 29357fca2a..3f67a7c865 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/utils.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/utils.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring,unused-argument,broad-except """" Common utilities for comment client wrapper """ -from __future__ import absolute_import + import logging from uuid import uuid4 diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0001_initial.py b/openedx/core/djangoapps/django_comment_common/migrations/0001_initial.py index b9858ab6ed..c244ef888d 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0001_initial.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0002_forumsconfig.py b/openedx/core/djangoapps/django_comment_common/migrations/0002_forumsconfig.py index 645f0f665b..bcb80f7c76 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0002_forumsconfig.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0002_forumsconfig.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0003_enable_forums.py b/openedx/core/djangoapps/django_comment_common/migrations/0003_enable_forums.py index 704086b21d..52fd96da28 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0003_enable_forums.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0003_enable_forums.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0004_auto_20161117_1209.py b/openedx/core/djangoapps/django_comment_common/migrations/0004_auto_20161117_1209.py index 74f58c5a84..fe7b587b29 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0004_auto_20161117_1209.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0004_auto_20161117_1209.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0005_coursediscussionsettings.py b/openedx/core/djangoapps/django_comment_common/migrations/0005_coursediscussionsettings.py index de82766a06..965db95fe1 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0005_coursediscussionsettings.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0005_coursediscussionsettings.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0006_coursediscussionsettings_discussions_id_map.py b/openedx/core/djangoapps/django_comment_common/migrations/0006_coursediscussionsettings_discussions_id_map.py index 18f5ede3ae..b3e91a2d94 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0006_coursediscussionsettings_discussions_id_map.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0006_coursediscussionsettings_discussions_id_map.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-23 21:09 -from __future__ import absolute_import, unicode_literals + from django.db import migrations import jsonfield.fields diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0007_discussionsidmapping.py b/openedx/core/djangoapps/django_comment_common/migrations/0007_discussionsidmapping.py index 08cc49fbdd..38f281c215 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0007_discussionsidmapping.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0007_discussionsidmapping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-13 12:10 -from __future__ import absolute_import, unicode_literals + from django.db import migrations import jsonfield.fields diff --git a/openedx/core/djangoapps/django_comment_common/migrations/0008_role_user_index.py b/openedx/core/djangoapps/django_comment_common/migrations/0008_role_user_index.py index 7b3e9792c3..eb224ab01d 100644 --- a/openedx/core/djangoapps/django_comment_common/migrations/0008_role_user_index.py +++ b/openedx/core/djangoapps/django_comment_common/migrations/0008_role_user_index.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations diff --git a/openedx/core/djangoapps/django_comment_common/models.py b/openedx/core/djangoapps/django_comment_common/models.py index cef466a3b5..6f11b1165e 100644 --- a/openedx/core/djangoapps/django_comment_common/models.py +++ b/openedx/core/djangoapps/django_comment_common/models.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring,unused-argument,model-missing-unicode -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/django_comment_common/signals.py b/openedx/core/djangoapps/django_comment_common/signals.py index 0e7543b1e5..4da3fb139f 100644 --- a/openedx/core/djangoapps/django_comment_common/signals.py +++ b/openedx/core/djangoapps/django_comment_common/signals.py @@ -1,7 +1,7 @@ # pylint: disable=invalid-name """Signals related to the comments service.""" -from __future__ import absolute_import + from django.dispatch import Signal diff --git a/openedx/core/djangoapps/django_comment_common/tests.py b/openedx/core/djangoapps/django_comment_common/tests.py index 8ca050751a..f00338e8e4 100644 --- a/openedx/core/djangoapps/django_comment_common/tests.py +++ b/openedx/core/djangoapps/django_comment_common/tests.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import six from contracts import new_contract diff --git a/openedx/core/djangoapps/django_comment_common/utils.py b/openedx/core/djangoapps/django_comment_common/utils.py index 77bf03cf82..3d9624d6a8 100644 --- a/openedx/core/djangoapps/django_comment_common/utils.py +++ b/openedx/core/djangoapps/django_comment_common/utils.py @@ -3,7 +3,7 @@ Common comment client utility functions. """ -from __future__ import absolute_import + import six from contracts import new_contract diff --git a/openedx/core/djangoapps/embargo/admin.py b/openedx/core/djangoapps/embargo/admin.py index 5d7f769b54..b86409b079 100644 --- a/openedx/core/djangoapps/embargo/admin.py +++ b/openedx/core/djangoapps/embargo/admin.py @@ -1,7 +1,7 @@ """ Django admin page for embargo models """ -from __future__ import absolute_import + import textwrap from config_models.admin import ConfigurationModelAdmin diff --git a/openedx/core/djangoapps/embargo/api.py b/openedx/core/djangoapps/embargo/api.py index 0690e69a66..7369163b1a 100644 --- a/openedx/core/djangoapps/embargo/api.py +++ b/openedx/core/djangoapps/embargo/api.py @@ -5,7 +5,7 @@ business logic that is not directly tied to the data itself. This API is exposed via the middleware(emabargo/middileware.py) layer but may be used directly in-process. """ -from __future__ import absolute_import + import logging from django.conf import settings diff --git a/openedx/core/djangoapps/embargo/forms.py b/openedx/core/djangoapps/embargo/forms.py index 5441a51b5d..dede3d7a39 100644 --- a/openedx/core/djangoapps/embargo/forms.py +++ b/openedx/core/djangoapps/embargo/forms.py @@ -2,7 +2,7 @@ Defines forms for providing validation of embargo admin details. """ -from __future__ import absolute_import + import ipaddress from django import forms from django.utils.translation import ugettext as _ diff --git a/openedx/core/djangoapps/embargo/messages.py b/openedx/core/djangoapps/embargo/messages.py index ba5b0c0f32..df42665147 100644 --- a/openedx/core/djangoapps/embargo/messages.py +++ b/openedx/core/djangoapps/embargo/messages.py @@ -4,7 +4,7 @@ These messages are displayed to users when they are blocked from either enrolling in or accessing a course. """ -from __future__ import absolute_import + from collections import namedtuple BlockedMessage = namedtuple('BlockedMessage', [ diff --git a/openedx/core/djangoapps/embargo/middleware.py b/openedx/core/djangoapps/embargo/middleware.py index 817726cae7..4d355a9d85 100644 --- a/openedx/core/djangoapps/embargo/middleware.py +++ b/openedx/core/djangoapps/embargo/middleware.py @@ -25,7 +25,7 @@ Usage: configure a whitelist or blacklist of countries for that course. """ -from __future__ import absolute_import + import logging import re diff --git a/openedx/core/djangoapps/embargo/migrations/0001_initial.py b/openedx/core/djangoapps/embargo/migrations/0001_initial.py index a5d87b9d62..d9fc389a13 100644 --- a/openedx/core/djangoapps/embargo/migrations/0001_initial.py +++ b/openedx/core/djangoapps/embargo/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django_countries.fields diff --git a/openedx/core/djangoapps/embargo/migrations/0002_data__add_countries.py b/openedx/core/djangoapps/embargo/migrations/0002_data__add_countries.py index 490320ace0..4d75169fb8 100644 --- a/openedx/core/djangoapps/embargo/migrations/0002_data__add_countries.py +++ b/openedx/core/djangoapps/embargo/migrations/0002_data__add_countries.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + # Converted from the original South migration 0003_add_countries.py diff --git a/openedx/core/djangoapps/embargo/models.py b/openedx/core/djangoapps/embargo/models.py index 87549814f3..52b8139975 100644 --- a/openedx/core/djangoapps/embargo/models.py +++ b/openedx/core/djangoapps/embargo/models.py @@ -11,7 +11,7 @@ file and check it in at the same time as your model changes. To do that, 3. Add the migration file created in edx-platform/openedx/core/djangoapps/embargo/migrations/ """ -from __future__ import absolute_import + import ipaddress import json diff --git a/openedx/core/djangoapps/embargo/test_utils.py b/openedx/core/djangoapps/embargo/test_utils.py index 551932302d..9a1f2384d5 100644 --- a/openedx/core/djangoapps/embargo/test_utils.py +++ b/openedx/core/djangoapps/embargo/test_utils.py @@ -1,5 +1,5 @@ """Utilities for writing unit tests that involve course embargos. """ -from __future__ import absolute_import + import contextlib import maxminddb diff --git a/openedx/core/djangoapps/embargo/tests/factories.py b/openedx/core/djangoapps/embargo/tests/factories.py index 7398e1f3a4..7d9fc6c66e 100644 --- a/openedx/core/djangoapps/embargo/tests/factories.py +++ b/openedx/core/djangoapps/embargo/tests/factories.py @@ -1,5 +1,5 @@ """Factories for generating fake embargo data.""" -from __future__ import absolute_import + import factory from factory.django import DjangoModelFactory from xmodule.modulestore.tests.factories import CourseFactory diff --git a/openedx/core/djangoapps/embargo/tests/test_api.py b/openedx/core/djangoapps/embargo/tests/test_api.py index 6ed4dc3f1f..d996754d71 100644 --- a/openedx/core/djangoapps/embargo/tests/test_api.py +++ b/openedx/core/djangoapps/embargo/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests for EmbargoMiddleware """ -from __future__ import absolute_import + from contextlib import contextmanager import geoip2.database diff --git a/openedx/core/djangoapps/embargo/tests/test_forms.py b/openedx/core/djangoapps/embargo/tests/test_forms.py index 7f8359b4d5..c6bb3585cb 100644 --- a/openedx/core/djangoapps/embargo/tests/test_forms.py +++ b/openedx/core/djangoapps/embargo/tests/test_forms.py @@ -3,7 +3,7 @@ Unit tests for embargo app admin forms. """ -from __future__ import absolute_import + import six # Explicitly import the cache from ConfigurationModel so we can reset it after each test diff --git a/openedx/core/djangoapps/embargo/tests/test_middleware.py b/openedx/core/djangoapps/embargo/tests/test_middleware.py index c09c0f8460..74932dc5e6 100644 --- a/openedx/core/djangoapps/embargo/tests/test_middleware.py +++ b/openedx/core/djangoapps/embargo/tests/test_middleware.py @@ -2,7 +2,7 @@ Tests for EmbargoMiddleware with CountryAccessRules """ -from __future__ import absolute_import + import ddt import six diff --git a/openedx/core/djangoapps/embargo/tests/test_models.py b/openedx/core/djangoapps/embargo/tests/test_models.py index 22f8c5b9c5..dfd464eac5 100644 --- a/openedx/core/djangoapps/embargo/tests/test_models.py +++ b/openedx/core/djangoapps/embargo/tests/test_models.py @@ -1,5 +1,5 @@ """Test of models for embargo app""" -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/embargo/tests/test_views.py b/openedx/core/djangoapps/embargo/tests/test_views.py index ffa5b6699a..ac4e982cfa 100644 --- a/openedx/core/djangoapps/embargo/tests/test_views.py +++ b/openedx/core/djangoapps/embargo/tests/test_views.py @@ -1,6 +1,6 @@ """Tests for embargo app views. """ -from __future__ import absolute_import + import ddt import maxminddb import geoip2.database diff --git a/openedx/core/djangoapps/embargo/urls.py b/openedx/core/djangoapps/embargo/urls.py index 180d6cd394..b44fc1002d 100644 --- a/openedx/core/djangoapps/embargo/urls.py +++ b/openedx/core/djangoapps/embargo/urls.py @@ -1,6 +1,6 @@ """URLs served by the embargo app. """ -from __future__ import absolute_import + from django.conf.urls import url from .views import CheckCourseAccessView, CourseAccessMessageView diff --git a/openedx/core/djangoapps/embargo/views.py b/openedx/core/djangoapps/embargo/views.py index 9402763987..fe9bdb4faf 100644 --- a/openedx/core/djangoapps/embargo/views.py +++ b/openedx/core/djangoapps/embargo/views.py @@ -1,6 +1,6 @@ """Views served by the embargo app. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.http import Http404 from django.views.generic.base import View diff --git a/openedx/core/djangoapps/enrollments/api.py b/openedx/core/djangoapps/enrollments/api.py index f23b697762..41e4e54eeb 100644 --- a/openedx/core/djangoapps/enrollments/api.py +++ b/openedx/core/djangoapps/enrollments/api.py @@ -3,7 +3,7 @@ Enrollment API for creating, updating, and deleting enrollments. Also provides a course level, such as available course modes. """ -from __future__ import absolute_import + import importlib import logging diff --git a/openedx/core/djangoapps/enrollments/data.py b/openedx/core/djangoapps/enrollments/data.py index 1170f66f0a..029683918a 100644 --- a/openedx/core/djangoapps/enrollments/data.py +++ b/openedx/core/djangoapps/enrollments/data.py @@ -2,7 +2,7 @@ Data Aggregation Layer of the Enrollment API. Collects all enrollment specific data into a single source to be used throughout the API. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/enrollments/forms.py b/openedx/core/djangoapps/enrollments/forms.py index 88dff93ee1..ae4b094076 100644 --- a/openedx/core/djangoapps/enrollments/forms.py +++ b/openedx/core/djangoapps/enrollments/forms.py @@ -1,7 +1,7 @@ """ Forms for validating user input to the Course Enrollment related views. """ -from __future__ import absolute_import + from django.core.exceptions import ValidationError from django.forms import CharField, Form diff --git a/openedx/core/djangoapps/enrollments/management/commands/enroll_user_in_course.py b/openedx/core/djangoapps/enrollments/management/commands/enroll_user_in_course.py index d41a8a70ce..179c49ed1c 100644 --- a/openedx/core/djangoapps/enrollments/management/commands/enroll_user_in_course.py +++ b/openedx/core/djangoapps/enrollments/management/commands/enroll_user_in_course.py @@ -1,7 +1,7 @@ """ Management command for enrolling a user into a course via the enrollment api """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.core.management.base import BaseCommand from openedx.core.djangoapps.enrollments.data import CourseEnrollmentExistsError diff --git a/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py b/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py index 18c204eee2..566f5fe1ed 100644 --- a/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py +++ b/openedx/core/djangoapps/enrollments/management/tests/test_enroll_user_in_course.py @@ -1,6 +1,6 @@ """ Test the change_enrollment command line script.""" -from __future__ import absolute_import + import unittest from uuid import uuid4 import ddt diff --git a/openedx/core/djangoapps/enrollments/paginators.py b/openedx/core/djangoapps/enrollments/paginators.py index d9a85f882a..de765dc3e2 100644 --- a/openedx/core/djangoapps/enrollments/paginators.py +++ b/openedx/core/djangoapps/enrollments/paginators.py @@ -1,7 +1,7 @@ """ Paginators for the course enrollment related views. """ -from __future__ import absolute_import + from rest_framework.pagination import CursorPagination diff --git a/openedx/core/djangoapps/enrollments/serializers.py b/openedx/core/djangoapps/enrollments/serializers.py index 2b7a3a6b55..8a1c7750ab 100644 --- a/openedx/core/djangoapps/enrollments/serializers.py +++ b/openedx/core/djangoapps/enrollments/serializers.py @@ -1,7 +1,7 @@ """ Serializers for all Course Enrollment related return objects. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/enrollments/tests/fake_data_api.py b/openedx/core/djangoapps/enrollments/tests/fake_data_api.py index 9d466c8f9e..47ff051d83 100644 --- a/openedx/core/djangoapps/enrollments/tests/fake_data_api.py +++ b/openedx/core/djangoapps/enrollments/tests/fake_data_api.py @@ -1,7 +1,7 @@ """ A Fake Data API for testing purposes. """ -from __future__ import absolute_import + import copy import datetime diff --git a/openedx/core/djangoapps/enrollments/tests/test_api.py b/openedx/core/djangoapps/enrollments/tests/test_api.py index 50de1b6459..f963ee11da 100644 --- a/openedx/core/djangoapps/enrollments/tests/test_api.py +++ b/openedx/core/djangoapps/enrollments/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests for student enrollment. """ -from __future__ import absolute_import + import unittest diff --git a/openedx/core/djangoapps/enrollments/tests/test_data.py b/openedx/core/djangoapps/enrollments/tests/test_data.py index bc68f2f95f..f2908e9bb8 100644 --- a/openedx/core/djangoapps/enrollments/tests/test_data.py +++ b/openedx/core/djangoapps/enrollments/tests/test_data.py @@ -2,7 +2,7 @@ Test the Data Aggregation Layer for Course Enrollments. """ -from __future__ import absolute_import + import datetime import unittest diff --git a/openedx/core/djangoapps/enrollments/tests/test_views.py b/openedx/core/djangoapps/enrollments/tests/test_views.py index 0cec786b49..11234d68f8 100644 --- a/openedx/core/djangoapps/enrollments/tests/test_views.py +++ b/openedx/core/djangoapps/enrollments/tests/test_views.py @@ -2,7 +2,7 @@ """ Tests for user enrollment. """ -from __future__ import absolute_import + import datetime import itertools diff --git a/openedx/core/djangoapps/enrollments/urls.py b/openedx/core/djangoapps/enrollments/urls.py index d67a29e641..719701f0ef 100644 --- a/openedx/core/djangoapps/enrollments/urls.py +++ b/openedx/core/djangoapps/enrollments/urls.py @@ -2,7 +2,7 @@ URLs for the Enrollment API """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/core/djangoapps/enrollments/views.py b/openedx/core/djangoapps/enrollments/views.py index 3f035b28ff..26a975acc9 100644 --- a/openedx/core/djangoapps/enrollments/views.py +++ b/openedx/core/djangoapps/enrollments/views.py @@ -3,7 +3,7 @@ The Enrollment API Views should be simple, lean HTTP endpoints for API access. T consist primarily of authentication, request validation, and serialization. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/geoinfo/middleware.py b/openedx/core/djangoapps/geoinfo/middleware.py index bcb3054e5a..b9c3a1bf76 100644 --- a/openedx/core/djangoapps/geoinfo/middleware.py +++ b/openedx/core/djangoapps/geoinfo/middleware.py @@ -10,7 +10,7 @@ decorator `django.utils.decorators.decorator_from_middleware(middleware_class)` """ -from __future__ import absolute_import + import logging import geoip2.database diff --git a/openedx/core/djangoapps/geoinfo/tests/test_middleware.py b/openedx/core/djangoapps/geoinfo/tests/test_middleware.py index 8050fa80c7..dabb861ee8 100644 --- a/openedx/core/djangoapps/geoinfo/tests/test_middleware.py +++ b/openedx/core/djangoapps/geoinfo/tests/test_middleware.py @@ -1,7 +1,7 @@ """ Tests for CountryMiddleware. """ -from __future__ import absolute_import + import geoip2 import maxminddb diff --git a/openedx/core/djangoapps/header_control/decorators.py b/openedx/core/djangoapps/header_control/decorators.py index f18edffa91..6349cbce7a 100644 --- a/openedx/core/djangoapps/header_control/decorators.py +++ b/openedx/core/djangoapps/header_control/decorators.py @@ -2,7 +2,7 @@ Middleware decorator for removing headers. """ -from __future__ import absolute_import + from functools import wraps diff --git a/openedx/core/djangoapps/header_control/middleware.py b/openedx/core/djangoapps/header_control/middleware.py index a21c7eeb99..e00e879149 100644 --- a/openedx/core/djangoapps/header_control/middleware.py +++ b/openedx/core/djangoapps/header_control/middleware.py @@ -1,7 +1,7 @@ """ Middleware used for adjusting headers in a response before it is sent to the end user. """ -from __future__ import absolute_import + import six diff --git a/openedx/core/djangoapps/header_control/tests/test_decorators.py b/openedx/core/djangoapps/header_control/tests/test_decorators.py index 9886a971ca..2821dd24a0 100644 --- a/openedx/core/djangoapps/header_control/tests/test_decorators.py +++ b/openedx/core/djangoapps/header_control/tests/test_decorators.py @@ -1,5 +1,5 @@ """Tests for remove_headers and force_header decorator. """ -from __future__ import absolute_import + from django.http import HttpRequest, HttpResponse from django.test import TestCase diff --git a/openedx/core/djangoapps/header_control/tests/test_middleware.py b/openedx/core/djangoapps/header_control/tests/test_middleware.py index 174852613d..9dd7ab9579 100644 --- a/openedx/core/djangoapps/header_control/tests/test_middleware.py +++ b/openedx/core/djangoapps/header_control/tests/test_middleware.py @@ -1,5 +1,5 @@ """Tests for header_control middleware.""" -from __future__ import absolute_import + from django.http import HttpRequest, HttpResponse from django.test import TestCase diff --git a/openedx/core/djangoapps/heartbeat/default_checks.py b/openedx/core/djangoapps/heartbeat/default_checks.py index 164fb5a221..80414e54ee 100644 --- a/openedx/core/djangoapps/heartbeat/default_checks.py +++ b/openedx/core/djangoapps/heartbeat/default_checks.py @@ -3,7 +3,7 @@ A set of built-in default checks for the platform heartbeat endpoint Other checks should be included in their respective modules/djangoapps """ -from __future__ import absolute_import + from datetime import datetime, timedelta from time import sleep, time diff --git a/openedx/core/djangoapps/heartbeat/runchecks.py b/openedx/core/djangoapps/heartbeat/runchecks.py index 7d033101a0..a1a75949b3 100644 --- a/openedx/core/djangoapps/heartbeat/runchecks.py +++ b/openedx/core/djangoapps/heartbeat/runchecks.py @@ -1,7 +1,7 @@ """ Code for system checks. """ -from __future__ import absolute_import + from importlib import import_module diff --git a/openedx/core/djangoapps/heartbeat/tasks.py b/openedx/core/djangoapps/heartbeat/tasks.py index d7ba1f6dff..b7dbfc6007 100644 --- a/openedx/core/djangoapps/heartbeat/tasks.py +++ b/openedx/core/djangoapps/heartbeat/tasks.py @@ -1,7 +1,7 @@ """ A trivial task for health checks """ -from __future__ import absolute_import + from celery.task import task diff --git a/openedx/core/djangoapps/heartbeat/tests/test_heartbeat.py b/openedx/core/djangoapps/heartbeat/tests/test_heartbeat.py index 9d355f9afc..9c3635bf90 100644 --- a/openedx/core/djangoapps/heartbeat/tests/test_heartbeat.py +++ b/openedx/core/djangoapps/heartbeat/tests/test_heartbeat.py @@ -1,7 +1,7 @@ """ Test the heartbeat """ -from __future__ import absolute_import, print_function + import json diff --git a/openedx/core/djangoapps/heartbeat/urls.py b/openedx/core/djangoapps/heartbeat/urls.py index 5d49ace2de..a69f80f867 100644 --- a/openedx/core/djangoapps/heartbeat/urls.py +++ b/openedx/core/djangoapps/heartbeat/urls.py @@ -1,7 +1,7 @@ """ Urls for verifying health (heartbeat) of the app. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/openedx/core/djangoapps/heartbeat/views.py b/openedx/core/djangoapps/heartbeat/views.py index b61071c99c..22fc15270a 100644 --- a/openedx/core/djangoapps/heartbeat/views.py +++ b/openedx/core/djangoapps/heartbeat/views.py @@ -1,7 +1,7 @@ """ Views for verifying the health (heartbeat) of the app. """ -from __future__ import absolute_import + import six diff --git a/openedx/core/djangoapps/lang_pref/api.py b/openedx/core/djangoapps/lang_pref/api.py index a6440afa01..55b914bb0b 100644 --- a/openedx/core/djangoapps/lang_pref/api.py +++ b/openedx/core/djangoapps/lang_pref/api.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ Python API for language and translation management. """ -from __future__ import absolute_import + from collections import namedtuple diff --git a/openedx/core/djangoapps/lang_pref/middleware.py b/openedx/core/djangoapps/lang_pref/middleware.py index 02299c3bbd..5b1e1e6dfe 100644 --- a/openedx/core/djangoapps/lang_pref/middleware.py +++ b/openedx/core/djangoapps/lang_pref/middleware.py @@ -1,7 +1,7 @@ """ Middleware for Language Preferences """ -from __future__ import absolute_import + from django.conf import settings from django.utils.translation import LANGUAGE_SESSION_KEY diff --git a/openedx/core/djangoapps/lang_pref/tests/test_api.py b/openedx/core/djangoapps/lang_pref/tests/test_api.py index 2b80602d80..c931f444f8 100644 --- a/openedx/core/djangoapps/lang_pref/tests/test_api.py +++ b/openedx/core/djangoapps/lang_pref/tests/test_api.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ Tests for the language API. """ -from __future__ import absolute_import + import ddt from django.contrib.auth.models import User diff --git a/openedx/core/djangoapps/lang_pref/tests/test_middleware.py b/openedx/core/djangoapps/lang_pref/tests/test_middleware.py index f5220f0cff..fe18dc1ae7 100644 --- a/openedx/core/djangoapps/lang_pref/tests/test_middleware.py +++ b/openedx/core/djangoapps/lang_pref/tests/test_middleware.py @@ -2,7 +2,7 @@ Tests for lang_pref middleware. """ -from __future__ import absolute_import + import itertools diff --git a/openedx/core/djangoapps/lang_pref/tests/test_views.py b/openedx/core/djangoapps/lang_pref/tests/test_views.py index 2b2081488b..d1c7ad5442 100644 --- a/openedx/core/djangoapps/lang_pref/tests/test_views.py +++ b/openedx/core/djangoapps/lang_pref/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests: lang pref views """ -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/lang_pref/views.py b/openedx/core/djangoapps/lang_pref/views.py index 139d7d55a8..505230bf22 100644 --- a/openedx/core/djangoapps/lang_pref/views.py +++ b/openedx/core/djangoapps/lang_pref/views.py @@ -2,7 +2,7 @@ Language Preference Views """ -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/models/course_details.py b/openedx/core/djangoapps/models/course_details.py index c00a1319e1..e3624f55cb 100644 --- a/openedx/core/djangoapps/models/course_details.py +++ b/openedx/core/djangoapps/models/course_details.py @@ -1,7 +1,7 @@ """ CourseDetails """ -from __future__ import absolute_import + import logging import re diff --git a/openedx/core/djangoapps/models/tests/test_course_details.py b/openedx/core/djangoapps/models/tests/test_course_details.py index b089a99ca0..1ea675a6dc 100644 --- a/openedx/core/djangoapps/models/tests/test_course_details.py +++ b/openedx/core/djangoapps/models/tests/test_course_details.py @@ -2,7 +2,7 @@ Tests for CourseDetails """ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/oauth_dispatch/adapters/dop.py b/openedx/core/djangoapps/oauth_dispatch/adapters/dop.py index 95a7b0e706..9af2a8bab4 100644 --- a/openedx/core/djangoapps/oauth_dispatch/adapters/dop.py +++ b/openedx/core/djangoapps/oauth_dispatch/adapters/dop.py @@ -2,7 +2,7 @@ Adapter to isolate django-oauth2-provider dependencies """ -from __future__ import absolute_import + from provider import constants, scope from provider.oauth2 import models diff --git a/openedx/core/djangoapps/oauth_dispatch/adapters/dot.py b/openedx/core/djangoapps/oauth_dispatch/adapters/dot.py index aa727dae2c..2bbef39399 100644 --- a/openedx/core/djangoapps/oauth_dispatch/adapters/dot.py +++ b/openedx/core/djangoapps/oauth_dispatch/adapters/dot.py @@ -2,7 +2,7 @@ Adapter to isolate django-oauth-toolkit dependencies """ -from __future__ import absolute_import + from oauth2_provider import models diff --git a/openedx/core/djangoapps/oauth_dispatch/admin.py b/openedx/core/djangoapps/oauth_dispatch/admin.py index 3adf1345b1..77db2d7ce5 100644 --- a/openedx/core/djangoapps/oauth_dispatch/admin.py +++ b/openedx/core/djangoapps/oauth_dispatch/admin.py @@ -2,7 +2,7 @@ Override admin configuration for django-oauth-toolkit """ -from __future__ import absolute_import + from django.contrib.admin import ModelAdmin, site from oauth2_provider import models diff --git a/openedx/core/djangoapps/oauth_dispatch/api.py b/openedx/core/djangoapps/oauth_dispatch/api.py index 34260de6b2..d67d06f9fd 100644 --- a/openedx/core/djangoapps/oauth_dispatch/api.py +++ b/openedx/core/djangoapps/oauth_dispatch/api.py @@ -1,5 +1,5 @@ """ OAuth related Python apis. """ -from __future__ import absolute_import + from oauth2_provider.models import AccessToken as dot_access_token from oauth2_provider.models import RefreshToken as dot_refresh_token diff --git a/openedx/core/djangoapps/oauth_dispatch/apps.py b/openedx/core/djangoapps/oauth_dispatch/apps.py index fa43d0e374..e1c2e0aa32 100644 --- a/openedx/core/djangoapps/oauth_dispatch/apps.py +++ b/openedx/core/djangoapps/oauth_dispatch/apps.py @@ -2,7 +2,7 @@ Configure OAuthDispatch App """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py index b5033de9c8..b5c9cbbc42 100644 --- a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py +++ b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py @@ -1,7 +1,7 @@ """ Custom authentication backends. """ -from __future__ import absolute_import + from django.contrib.auth.backends import AllowAllUsersModelBackend as UserModelBackend from ratelimitbackend.backends import RateLimitMixin diff --git a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py index 3aabbf71da..17cc912640 100644 --- a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py +++ b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py @@ -1,7 +1,7 @@ """ Classes that override default django-oauth-toolkit behavior """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime, timedelta diff --git a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py index 559059711b..7e717c9b3f 100644 --- a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py +++ b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py @@ -1,7 +1,7 @@ """ Classes that override default django-oauth-toolkit behavior """ -from __future__ import absolute_import, unicode_literals + from oauth2_provider.exceptions import OAuthToolkitError from oauth2_provider.http import HttpResponseUriRedirect diff --git a/openedx/core/djangoapps/oauth_dispatch/jwt.py b/openedx/core/djangoapps/oauth_dispatch/jwt.py index c5c1722940..4e70eb46e1 100644 --- a/openedx/core/djangoapps/oauth_dispatch/jwt.py +++ b/openedx/core/djangoapps/oauth_dispatch/jwt.py @@ -1,5 +1,5 @@ """Utilities for working with ID tokens.""" -from __future__ import absolute_import + import json from time import time diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/create_dot_application.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/create_dot_application.py index 35f10abc88..03e2373d03 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/create_dot_application.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/create_dot_application.py @@ -4,7 +4,7 @@ Management command for creating a Django OAuth Toolkit Application model. Also creates an oauth_dispatch application access if scopes are provided. """ -from __future__ import absolute_import, unicode_literals + import logging diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/edx_clear_expired_tokens.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/edx_clear_expired_tokens.py index 10a9786950..a6d9c8d97c 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/edx_clear_expired_tokens.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/edx_clear_expired_tokens.py @@ -1,7 +1,7 @@ """ Management command for clear expired access tokens! """ -from __future__ import absolute_import, unicode_literals + import logging from datetime import timedelta diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/generate_jwt_signing_key.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/generate_jwt_signing_key.py index c10c2663d8..4ae0d1e6b4 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/generate_jwt_signing_key.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/generate_jwt_signing_key.py @@ -2,7 +2,7 @@ Management command for generating an asymmetric keypair to sign JSON Web Tokens. """ # pylint: disable=missing-docstring -from __future__ import absolute_import, print_function, unicode_literals + import json import logging diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py index 65cabf44a4..af34319718 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_clear_expired_tokens.py @@ -1,7 +1,7 @@ """ Tests the ``edx_clear_expired_tokens`` management command. """ -from __future__ import absolute_import + import unittest from datetime import timedelta diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py index 296319dd4a..98d7cbe563 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_create_dot_application.py @@ -1,7 +1,7 @@ """ Tests the ``create_dot_application`` management command. """ -from __future__ import absolute_import, unicode_literals + import ddt from django.core.management import call_command diff --git a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_generate_jwt_signing_key.py b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_generate_jwt_signing_key.py index fe9b4c395f..da71a5a246 100644 --- a/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_generate_jwt_signing_key.py +++ b/openedx/core/djangoapps/oauth_dispatch/management/commands/tests/test_generate_jwt_signing_key.py @@ -2,7 +2,7 @@ Tests the ``generate_jwt_signing_key`` management command. """ # pylint: disable=missing-docstring -from __future__ import absolute_import + import os import sys diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0001_initial.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0001_initial.py index f257e36a99..babaaa7830 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0001_initial.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py index ddf2f1340d..eae9bbf535 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-20 18:22 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django_mysql.models diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0003_application_data.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0003_application_data.py index 0277e88654..18cb2fb735 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0003_application_data.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0003_application_data.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-05 13:19 -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py index 6a4b4b61e8..eab45180f1 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-26 17:49 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django_mysql.models diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0005_applicationaccess_type.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0005_applicationaccess_type.py index 7106ec9d92..2143b75bdb 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0005_applicationaccess_type.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0005_applicationaccess_type.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-29 18:18 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py index 3a79ab4df2..02d0b9bf88 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-23 14:58 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py index e8c3791c5f..52e7c24ec6 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-23 15:12 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/oauth_dispatch/models.py b/openedx/core/djangoapps/oauth_dispatch/models.py index dd24bed7d6..6ea0562371 100644 --- a/openedx/core/djangoapps/oauth_dispatch/models.py +++ b/openedx/core/djangoapps/oauth_dispatch/models.py @@ -2,7 +2,7 @@ Specialized models for oauth_dispatch djangoapp """ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/core/djangoapps/oauth_dispatch/scopes.py b/openedx/core/djangoapps/oauth_dispatch/scopes.py index 8ce5a2ad90..0e40df6882 100644 --- a/openedx/core/djangoapps/oauth_dispatch/scopes.py +++ b/openedx/core/djangoapps/oauth_dispatch/scopes.py @@ -2,7 +2,7 @@ Custom Django OAuth Toolkit scopes backends. """ -from __future__ import absolute_import + from oauth2_provider.scopes import SettingsScopes diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/factories.py b/openedx/core/djangoapps/oauth_dispatch/tests/factories.py index 0c887e27c4..c2a7bebddf 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/factories.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/factories.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py b/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py index 4df899301e..b80c613f3a 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/mixins.py @@ -1,7 +1,7 @@ """ OAuth Dispatch test mixins """ -from __future__ import absolute_import + import jwt from django.conf import settings diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py index 52e43686f6..4e183b971f 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_api.py @@ -1,5 +1,5 @@ """ Tests for OAuth Dispatch python API module. """ -from __future__ import absolute_import + import unittest diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py index 9f17b28c00..c365cf7447 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_client_credentials.py @@ -1,5 +1,5 @@ """ Tests for OAuth 2.0 client credentials support. """ -from __future__ import absolute_import, unicode_literals + import json import unittest diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_dop_adapter.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_dop_adapter.py index 9fd7dab044..65a5434f72 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_dop_adapter.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_dop_adapter.py @@ -2,7 +2,7 @@ Tests for DOP Adapter """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py index 083d73f0a3..f4258db8e2 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_adapter.py @@ -2,7 +2,7 @@ Tests for DOT Adapter """ -from __future__ import absolute_import + import unittest from datetime import timedelta diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py index 9c562a3103..7176710fbf 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_dot_overrides.py @@ -3,7 +3,7 @@ Test of custom django-oauth-toolkit behavior """ # pylint: disable=protected-access -from __future__ import absolute_import + import datetime import unittest diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py index fd63d2b2cc..4c1cecf1f7 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_factories.py @@ -1,6 +1,6 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import + import unittest diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py index 20a1f882f4..e824c4aa50 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_jwt.py @@ -1,5 +1,5 @@ """ Tests for OAuth Dispatch's jwt module. """ -from __future__ import absolute_import + import itertools from datetime import timedelta diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_models.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_models.py index 750e119dea..8601587730 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_models.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for oauth_dispatch models. """ -from __future__ import absolute_import + import six from django.test import TestCase diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_scopes.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_scopes.py index e38ce227eb..70856bf601 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_scopes.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_scopes.py @@ -1,7 +1,7 @@ """ Tests for custom DOT scopes backend. """ -from __future__ import absolute_import + import ddt from django.conf import settings diff --git a/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py b/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py index cf40d9d418..b35d252527 100644 --- a/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py +++ b/openedx/core/djangoapps/oauth_dispatch/tests/test_views.py @@ -2,7 +2,7 @@ Tests for Blocks Views """ -from __future__ import absolute_import + import json import unittest diff --git a/openedx/core/djangoapps/oauth_dispatch/toggles.py b/openedx/core/djangoapps/oauth_dispatch/toggles.py index 94814ac493..51a90ebab1 100644 --- a/openedx/core/djangoapps/oauth_dispatch/toggles.py +++ b/openedx/core/djangoapps/oauth_dispatch/toggles.py @@ -2,7 +2,7 @@ Feature toggle code for oauth_dispatch. """ -from __future__ import absolute_import + from edx_rest_framework_extensions.config import OAUTH_TOGGLE_NAMESPACE, SWITCH_ENFORCE_JWT_SCOPES diff --git a/openedx/core/djangoapps/oauth_dispatch/urls.py b/openedx/core/djangoapps/oauth_dispatch/urls.py index a9712cbe95..c3cdff06ad 100644 --- a/openedx/core/djangoapps/oauth_dispatch/urls.py +++ b/openedx/core/djangoapps/oauth_dispatch/urls.py @@ -2,7 +2,7 @@ OAuth2 wrapper urls """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/core/djangoapps/oauth_dispatch/views.py b/openedx/core/djangoapps/oauth_dispatch/views.py index 4d5a99261d..74a2f56da2 100644 --- a/openedx/core/djangoapps/oauth_dispatch/views.py +++ b/openedx/core/djangoapps/oauth_dispatch/views.py @@ -3,7 +3,7 @@ Views that dispatch processing of OAuth requests to django-oauth2-provider or django-oauth-toolkit as appropriate. """ -from __future__ import absolute_import, unicode_literals + import json diff --git a/openedx/core/djangoapps/password_policy/apps.py b/openedx/core/djangoapps/password_policy/apps.py index 2ef04c6136..e71a6b9fe6 100644 --- a/openedx/core/djangoapps/password_policy/apps.py +++ b/openedx/core/djangoapps/password_policy/apps.py @@ -1,7 +1,7 @@ """ Configuration for password_policy Django app """ -from __future__ import absolute_import + import logging import six from dateutil.parser import parse as parse_date diff --git a/openedx/core/djangoapps/password_policy/compliance.py b/openedx/core/djangoapps/password_policy/compliance.py index c8888f6feb..b6283b9b28 100644 --- a/openedx/core/djangoapps/password_policy/compliance.py +++ b/openedx/core/djangoapps/password_policy/compliance.py @@ -1,7 +1,7 @@ """ Utilities for enforcing and tracking compliance with password policy rules. """ -from __future__ import absolute_import + from datetime import datetime import pytz diff --git a/openedx/core/djangoapps/password_policy/forms.py b/openedx/core/djangoapps/password_policy/forms.py index f687415919..ab3894bf99 100644 --- a/openedx/core/djangoapps/password_policy/forms.py +++ b/openedx/core/djangoapps/password_policy/forms.py @@ -1,7 +1,7 @@ """ Forms for the password policy app. """ -from __future__ import absolute_import + import six diff --git a/openedx/core/djangoapps/password_policy/tests/test_apps.py b/openedx/core/djangoapps/password_policy/tests/test_apps.py index 5d2de31f6c..a8b91a4ee0 100644 --- a/openedx/core/djangoapps/password_policy/tests/test_apps.py +++ b/openedx/core/djangoapps/password_policy/tests/test_apps.py @@ -2,7 +2,7 @@ Test password policy settings """ -from __future__ import absolute_import + import datetime from dateutil.parser import parse as parse_date from django.conf import settings diff --git a/openedx/core/djangoapps/password_policy/tests/test_compliance.py b/openedx/core/djangoapps/password_policy/tests/test_compliance.py index 9a41aca4d7..1f26a5efdb 100644 --- a/openedx/core/djangoapps/password_policy/tests/test_compliance.py +++ b/openedx/core/djangoapps/password_policy/tests/test_compliance.py @@ -1,7 +1,7 @@ """ Test password policy utilities """ -from __future__ import absolute_import + from datetime import datetime, timedelta import pytz diff --git a/openedx/core/djangoapps/password_policy/tests/test_forms.py b/openedx/core/djangoapps/password_policy/tests/test_forms.py index 9a5cb7e2fc..1ee0691cab 100644 --- a/openedx/core/djangoapps/password_policy/tests/test_forms.py +++ b/openedx/core/djangoapps/password_policy/tests/test_forms.py @@ -1,7 +1,7 @@ """ Test password policy forms """ -from __future__ import absolute_import + import mock from django.forms import ValidationError diff --git a/openedx/core/djangoapps/plugin_api/views.py b/openedx/core/djangoapps/plugin_api/views.py index 1214f27665..7989b39196 100644 --- a/openedx/core/djangoapps/plugin_api/views.py +++ b/openedx/core/djangoapps/plugin_api/views.py @@ -2,7 +2,7 @@ Views for building plugins. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/plugins/apps.py b/openedx/core/djangoapps/plugins/apps.py index 41d42b5154..f64f029ce6 100644 --- a/openedx/core/djangoapps/plugins/apps.py +++ b/openedx/core/djangoapps/plugins/apps.py @@ -4,7 +4,7 @@ Plugins Application Configuration Signal handlers are connected here. """ -from __future__ import absolute_import + from django.apps import AppConfig from django.conf import settings from . import constants, plugin_signals diff --git a/openedx/core/djangoapps/plugins/plugin_apps.py b/openedx/core/djangoapps/plugins/plugin_apps.py index 1b64ffb632..34e5b90fd4 100644 --- a/openedx/core/djangoapps/plugins/plugin_apps.py +++ b/openedx/core/djangoapps/plugins/plugin_apps.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from logging import getLogger from . import constants, registry diff --git a/openedx/core/djangoapps/plugins/plugin_settings.py b/openedx/core/djangoapps/plugins/plugin_settings.py index 5cea7ccc90..62849f5d57 100644 --- a/openedx/core/djangoapps/plugins/plugin_settings.py +++ b/openedx/core/djangoapps/plugins/plugin_settings.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from logging import getLogger from . import constants, registry, utils diff --git a/openedx/core/djangoapps/plugins/plugin_signals.py b/openedx/core/djangoapps/plugins/plugin_signals.py index 1540f71756..5a3dd63a36 100644 --- a/openedx/core/djangoapps/plugins/plugin_signals.py +++ b/openedx/core/djangoapps/plugins/plugin_signals.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from logging import getLogger from . import constants, registry, utils diff --git a/openedx/core/djangoapps/plugins/plugin_urls.py b/openedx/core/djangoapps/plugins/plugin_urls.py index da31a91df7..a0215a2e8c 100644 --- a/openedx/core/djangoapps/plugins/plugin_urls.py +++ b/openedx/core/djangoapps/plugins/plugin_urls.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from logging import getLogger from django.conf.urls import include, url from . import constants, registry, utils diff --git a/openedx/core/djangoapps/plugins/registry.py b/openedx/core/djangoapps/plugins/registry.py index 105b535053..4f63a4118f 100644 --- a/openedx/core/djangoapps/plugins/registry.py +++ b/openedx/core/djangoapps/plugins/registry.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from openedx.core.lib.plugins import PluginManager import six diff --git a/openedx/core/djangoapps/plugins/utils.py b/openedx/core/djangoapps/plugins/utils.py index 19fcc6f5f1..d5938f22e1 100644 --- a/openedx/core/djangoapps/plugins/utils.py +++ b/openedx/core/djangoapps/plugins/utils.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from importlib import import_module as system_import_module from django.utils.module_loading import import_string diff --git a/openedx/core/djangoapps/profile_images/exceptions.py b/openedx/core/djangoapps/profile_images/exceptions.py index 53013b18c9..e834a83605 100644 --- a/openedx/core/djangoapps/profile_images/exceptions.py +++ b/openedx/core/djangoapps/profile_images/exceptions.py @@ -1,7 +1,7 @@ """ Exceptions related to the handling of profile images. """ -from __future__ import absolute_import + from six import text_type diff --git a/openedx/core/djangoapps/profile_images/images.py b/openedx/core/djangoapps/profile_images/images.py index 327309766d..144beab9ea 100644 --- a/openedx/core/djangoapps/profile_images/images.py +++ b/openedx/core/djangoapps/profile_images/images.py @@ -1,7 +1,7 @@ """ Image file manipulation functions related to profile images. """ -from __future__ import absolute_import + import binascii from collections import namedtuple diff --git a/openedx/core/djangoapps/profile_images/tests/helpers.py b/openedx/core/djangoapps/profile_images/tests/helpers.py index 08693b47d9..ec8f9aba1d 100644 --- a/openedx/core/djangoapps/profile_images/tests/helpers.py +++ b/openedx/core/djangoapps/profile_images/tests/helpers.py @@ -1,7 +1,7 @@ """ Helper methods for use in profile image tests. """ -from __future__ import absolute_import + from contextlib import contextmanager import os from tempfile import NamedTemporaryFile diff --git a/openedx/core/djangoapps/profile_images/tests/test_images.py b/openedx/core/djangoapps/profile_images/tests/test_images.py index 56c40476f0..5d50e08ce7 100644 --- a/openedx/core/djangoapps/profile_images/tests/test_images.py +++ b/openedx/core/djangoapps/profile_images/tests/test_images.py @@ -1,7 +1,7 @@ """ Test cases for image processing functions in the profile image package. """ -from __future__ import absolute_import + from contextlib import closing from itertools import product import os diff --git a/openedx/core/djangoapps/profile_images/tests/test_views.py b/openedx/core/djangoapps/profile_images/tests/test_views.py index 3a6d18741c..99a4a67db7 100644 --- a/openedx/core/djangoapps/profile_images/tests/test_views.py +++ b/openedx/core/djangoapps/profile_images/tests/test_views.py @@ -1,7 +1,7 @@ """ Test cases for the HTTP endpoints of the profile image api. """ -from __future__ import absolute_import + from contextlib import closing import datetime from pytz import UTC diff --git a/openedx/core/djangoapps/profile_images/urls.py b/openedx/core/djangoapps/profile_images/urls.py index d2bc6e0078..29dcd9d6ab 100644 --- a/openedx/core/djangoapps/profile_images/urls.py +++ b/openedx/core/djangoapps/profile_images/urls.py @@ -8,7 +8,7 @@ NOTE: These views are deprecated. These routes are superseded by """ # pylint: enable=unicode-format-string -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/core/djangoapps/profile_images/views.py b/openedx/core/djangoapps/profile_images/views.py index 8cee2b2588..b5a820a266 100644 --- a/openedx/core/djangoapps/profile_images/views.py +++ b/openedx/core/djangoapps/profile_images/views.py @@ -1,7 +1,7 @@ """ This module implements the upload and remove endpoints of the profile image api. """ -from __future__ import absolute_import + import datetime import itertools diff --git a/openedx/core/djangoapps/programs/__init__.py b/openedx/core/djangoapps/programs/__init__.py index 5a4ef836a8..e9f291aceb 100644 --- a/openedx/core/djangoapps/programs/__init__.py +++ b/openedx/core/djangoapps/programs/__init__.py @@ -8,7 +8,7 @@ if and only if the service is deployed in the Open edX installation. To ensure maximum separation of concerns, and a minimum of interdependencies, this package should be kept small, thin, and stateless. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitch, WaffleSwitchNamespace diff --git a/openedx/core/djangoapps/programs/admin.py b/openedx/core/djangoapps/programs/admin.py index 90ba0d541d..90b461bbc2 100644 --- a/openedx/core/djangoapps/programs/admin.py +++ b/openedx/core/djangoapps/programs/admin.py @@ -1,7 +1,7 @@ """ django admin pages for program support models """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/programs/apps.py b/openedx/core/djangoapps/programs/apps.py index 936e94f621..f3a7b27f8d 100644 --- a/openedx/core/djangoapps/programs/apps.py +++ b/openedx/core/djangoapps/programs/apps.py @@ -1,7 +1,7 @@ """ Programs Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py b/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py index 19067541a3..018f5ced80 100644 --- a/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py +++ b/openedx/core/djangoapps/programs/management/commands/backpopulate_program_credentials.py @@ -1,5 +1,5 @@ """Management command for backpopulating missing program credentials.""" -from __future__ import absolute_import + import logging from collections import namedtuple diff --git a/openedx/core/djangoapps/programs/migrations/0001_initial.py b/openedx/core/djangoapps/programs/migrations/0001_initial.py index e727a8a57d..fdd6463ee0 100644 --- a/openedx/core/djangoapps/programs/migrations/0001_initial.py +++ b/openedx/core/djangoapps/programs/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py b/openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py index d94d1dac49..d397c50933 100644 --- a/openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py +++ b/openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0003_auto_20151120_1613.py b/openedx/core/djangoapps/programs/migrations/0003_auto_20151120_1613.py index 82cc9bd999..7b545d87d1 100644 --- a/openedx/core/djangoapps/programs/migrations/0003_auto_20151120_1613.py +++ b/openedx/core/djangoapps/programs/migrations/0003_auto_20151120_1613.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0004_programsapiconfig_enable_certification.py b/openedx/core/djangoapps/programs/migrations/0004_programsapiconfig_enable_certification.py index 771229dd95..acf80ae487 100644 --- a/openedx/core/djangoapps/programs/migrations/0004_programsapiconfig_enable_certification.py +++ b/openedx/core/djangoapps/programs/migrations/0004_programsapiconfig_enable_certification.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0005_programsapiconfig_max_retries.py b/openedx/core/djangoapps/programs/migrations/0005_programsapiconfig_max_retries.py index 348c229d84..9fec18599f 100644 --- a/openedx/core/djangoapps/programs/migrations/0005_programsapiconfig_max_retries.py +++ b/openedx/core/djangoapps/programs/migrations/0005_programsapiconfig_max_retries.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0006_programsapiconfig_xseries_ad_enabled.py b/openedx/core/djangoapps/programs/migrations/0006_programsapiconfig_xseries_ad_enabled.py index dfe88b43b4..54344f6e28 100644 --- a/openedx/core/djangoapps/programs/migrations/0006_programsapiconfig_xseries_ad_enabled.py +++ b/openedx/core/djangoapps/programs/migrations/0006_programsapiconfig_xseries_ad_enabled.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0007_programsapiconfig_program_listing_enabled.py b/openedx/core/djangoapps/programs/migrations/0007_programsapiconfig_program_listing_enabled.py index 51a7cf21df..7cbfbdcb5b 100644 --- a/openedx/core/djangoapps/programs/migrations/0007_programsapiconfig_program_listing_enabled.py +++ b/openedx/core/djangoapps/programs/migrations/0007_programsapiconfig_program_listing_enabled.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0008_programsapiconfig_program_details_enabled.py b/openedx/core/djangoapps/programs/migrations/0008_programsapiconfig_program_details_enabled.py index 920d648135..39388fc536 100644 --- a/openedx/core/djangoapps/programs/migrations/0008_programsapiconfig_program_details_enabled.py +++ b/openedx/core/djangoapps/programs/migrations/0008_programsapiconfig_program_details_enabled.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0009_programsapiconfig_marketing_path.py b/openedx/core/djangoapps/programs/migrations/0009_programsapiconfig_marketing_path.py index 36b9d0f9ae..b650546752 100644 --- a/openedx/core/djangoapps/programs/migrations/0009_programsapiconfig_marketing_path.py +++ b/openedx/core/djangoapps/programs/migrations/0009_programsapiconfig_marketing_path.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0010_auto_20170204_2332.py b/openedx/core/djangoapps/programs/migrations/0010_auto_20170204_2332.py index 79574b2bfd..108e50c1cc 100644 --- a/openedx/core/djangoapps/programs/migrations/0010_auto_20170204_2332.py +++ b/openedx/core/djangoapps/programs/migrations/0010_auto_20170204_2332.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0011_auto_20170301_1844.py b/openedx/core/djangoapps/programs/migrations/0011_auto_20170301_1844.py index 8671ff357d..5bce27b2f5 100644 --- a/openedx/core/djangoapps/programs/migrations/0011_auto_20170301_1844.py +++ b/openedx/core/djangoapps/programs/migrations/0011_auto_20170301_1844.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py b/openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py index 1b90324bc9..e1d1384319 100644 --- a/openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py +++ b/openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/migrations/0013_customprogramsconfig.py b/openedx/core/djangoapps/programs/migrations/0013_customprogramsconfig.py index 4e2260001e..51164f023b 100644 --- a/openedx/core/djangoapps/programs/migrations/0013_customprogramsconfig.py +++ b/openedx/core/djangoapps/programs/migrations/0013_customprogramsconfig.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-12-13 07:44 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/programs/models.py b/openedx/core/djangoapps/programs/models.py index 1ac3fb749c..965e560048 100644 --- a/openedx/core/djangoapps/programs/models.py +++ b/openedx/core/djangoapps/programs/models.py @@ -1,6 +1,6 @@ """Models providing Programs support for the LMS and Studio.""" -from __future__ import absolute_import + import six from config_models.models import ConfigurationModel diff --git a/openedx/core/djangoapps/programs/signals.py b/openedx/core/djangoapps/programs/signals.py index 1d8351b4ea..aea84fec29 100644 --- a/openedx/core/djangoapps/programs/signals.py +++ b/openedx/core/djangoapps/programs/signals.py @@ -1,7 +1,7 @@ """ This module contains signals / handlers related to programs. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/programs/tasks/v1/tasks.py b/openedx/core/djangoapps/programs/tasks/v1/tasks.py index 24454febbd..6b12824d9f 100644 --- a/openedx/core/djangoapps/programs/tasks/v1/tasks.py +++ b/openedx/core/djangoapps/programs/tasks/v1/tasks.py @@ -1,7 +1,7 @@ """ This file contains celery tasks for programs-related functionality. """ -from __future__ import absolute_import + from celery import task from celery.exceptions import MaxRetriesExceededError diff --git a/openedx/core/djangoapps/programs/tasks/v1/tests/test_tasks.py b/openedx/core/djangoapps/programs/tasks/v1/tests/test_tasks.py index 0af148540f..96d6a3ecb9 100644 --- a/openedx/core/djangoapps/programs/tasks/v1/tests/test_tasks.py +++ b/openedx/core/djangoapps/programs/tasks/v1/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Tests for programs celery tasks. """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/programs/tests/factories.py b/openedx/core/djangoapps/programs/tests/factories.py index 7c582e8e8c..9e1e3f483c 100644 --- a/openedx/core/djangoapps/programs/tests/factories.py +++ b/openedx/core/djangoapps/programs/tests/factories.py @@ -1,6 +1,6 @@ """Factories for generating fake program-related data.""" # pylint: disable=missing-docstring -from __future__ import absolute_import + import factory diff --git a/openedx/core/djangoapps/programs/tests/mixins.py b/openedx/core/djangoapps/programs/tests/mixins.py index ce5c7baaaf..7c67d7f636 100644 --- a/openedx/core/djangoapps/programs/tests/mixins.py +++ b/openedx/core/djangoapps/programs/tests/mixins.py @@ -1,5 +1,5 @@ """Mixins for use during testing.""" -from __future__ import absolute_import + from openedx.core.djangoapps.programs.models import ProgramsApiConfig diff --git a/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py b/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py index b882bd8990..69173cf9f0 100644 --- a/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py +++ b/openedx/core/djangoapps/programs/tests/test_backpopulate_program_credentials.py @@ -1,5 +1,5 @@ """Tests for the backpopulate_program_credentials management command.""" -from __future__ import absolute_import + import ddt import mock diff --git a/openedx/core/djangoapps/programs/tests/test_signals.py b/openedx/core/djangoapps/programs/tests/test_signals.py index 2cae272231..e50d1e1f3a 100644 --- a/openedx/core/djangoapps/programs/tests/test_signals.py +++ b/openedx/core/djangoapps/programs/tests/test_signals.py @@ -2,7 +2,7 @@ This module contains tests for programs-related signals and signal handlers. """ -from __future__ import absolute_import + import mock from django.test import TestCase diff --git a/openedx/core/djangoapps/programs/tests/test_utils.py b/openedx/core/djangoapps/programs/tests/test_utils.py index f613c87ccb..845a5db402 100644 --- a/openedx/core/djangoapps/programs/tests/test_utils.py +++ b/openedx/core/djangoapps/programs/tests/test_utils.py @@ -1,5 +1,5 @@ """Tests covering Programs utilities.""" -from __future__ import absolute_import + import datetime import json diff --git a/openedx/core/djangoapps/programs/utils.py b/openedx/core/djangoapps/programs/utils.py index 5624871d9e..3ab16b8e73 100644 --- a/openedx/core/djangoapps/programs/utils.py +++ b/openedx/core/djangoapps/programs/utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Helper functions for working with Programs.""" -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/safe_sessions/middleware.py b/openedx/core/djangoapps/safe_sessions/middleware.py index 2a29a110b9..65a4b0be45 100644 --- a/openedx/core/djangoapps/safe_sessions/middleware.py +++ b/openedx/core/djangoapps/safe_sessions/middleware.py @@ -55,7 +55,7 @@ SSL-protected channel. Otherwise, a session hijacker could copy the entire cookie and use it to impersonate the victim. """ -from __future__ import absolute_import, unicode_literals + from base64 import b64encode from contextlib import contextmanager diff --git a/openedx/core/djangoapps/safe_sessions/testing.py b/openedx/core/djangoapps/safe_sessions/testing.py index 654cb47d24..9b910e7a81 100644 --- a/openedx/core/djangoapps/safe_sessions/testing.py +++ b/openedx/core/djangoapps/safe_sessions/testing.py @@ -2,7 +2,7 @@ Test overrides to support Safe Cookies with Test Clients. """ -from __future__ import absolute_import + from django.test.client import Client diff --git a/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py b/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py index 8e3a774550..dadecb179a 100644 --- a/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py +++ b/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py @@ -1,7 +1,7 @@ """ Unit tests for SafeSessionMiddleware """ -from __future__ import absolute_import + import ddt import six diff --git a/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py b/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py index 0786a42f07..14e9b64688 100644 --- a/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py +++ b/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py @@ -3,7 +3,7 @@ Unit tests for SafeCookieData """ -from __future__ import absolute_import + import itertools from time import time diff --git a/openedx/core/djangoapps/safe_sessions/tests/test_utils.py b/openedx/core/djangoapps/safe_sessions/tests/test_utils.py index 0e2b075d45..097dbe7f63 100644 --- a/openedx/core/djangoapps/safe_sessions/tests/test_utils.py +++ b/openedx/core/djangoapps/safe_sessions/tests/test_utils.py @@ -2,7 +2,7 @@ Shared test utilities for Safe Sessions tests """ -from __future__ import absolute_import + from contextlib import contextmanager diff --git a/openedx/core/djangoapps/schedules/admin.py b/openedx/core/djangoapps/schedules/admin.py index 1c0b02e1e6..0f6110afe3 100644 --- a/openedx/core/djangoapps/schedules/admin.py +++ b/openedx/core/djangoapps/schedules/admin.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import functools diff --git a/openedx/core/djangoapps/schedules/apps.py b/openedx/core/djangoapps/schedules/apps.py index 1ae8e36fd6..cfbbc53edc 100644 --- a/openedx/core/djangoapps/schedules/apps.py +++ b/openedx/core/djangoapps/schedules/apps.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/core/djangoapps/schedules/config.py b/openedx/core/djangoapps/schedules/config.py index b9e4e73a32..98d39a81ee 100644 --- a/openedx/core/djangoapps/schedules/config.py +++ b/openedx/core/djangoapps/schedules/config.py @@ -1,7 +1,7 @@ """ Contains configuration for schedules app """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import ( WaffleFlagNamespace, CourseWaffleFlag, WaffleFlag, diff --git a/openedx/core/djangoapps/schedules/content_highlights.py b/openedx/core/djangoapps/schedules/content_highlights.py index 0084197185..40f1f4dceb 100644 --- a/openedx/core/djangoapps/schedules/content_highlights.py +++ b/openedx/core/djangoapps/schedules/content_highlights.py @@ -2,7 +2,7 @@ Contains methods for accessing weekly course highlights. Weekly highlights is a schedule experience built on the Schedules app. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/schedules/management/commands/__init__.py b/openedx/core/djangoapps/schedules/management/commands/__init__.py index 59e940bab6..3967b26657 100644 --- a/openedx/core/djangoapps/schedules/management/commands/__init__.py +++ b/openedx/core/djangoapps/schedules/management/commands/__init__.py @@ -1,7 +1,7 @@ """ Base management command for sending emails """ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/schedules/management/commands/send_course_update.py b/openedx/core/djangoapps/schedules/management/commands/send_course_update.py index 3497608eb4..cd5460b8d4 100644 --- a/openedx/core/djangoapps/schedules/management/commands/send_course_update.py +++ b/openedx/core/djangoapps/schedules/management/commands/send_course_update.py @@ -1,7 +1,7 @@ """ Management command to send Schedule course updates """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/openedx/core/djangoapps/schedules/management/commands/send_recurring_nudge.py b/openedx/core/djangoapps/schedules/management/commands/send_recurring_nudge.py index a6cc461fd8..49c6559868 100644 --- a/openedx/core/djangoapps/schedules/management/commands/send_recurring_nudge.py +++ b/openedx/core/djangoapps/schedules/management/commands/send_recurring_nudge.py @@ -1,7 +1,7 @@ """ Management command to send recurring Schedule nudges """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/openedx/core/djangoapps/schedules/management/commands/send_upgrade_reminder.py b/openedx/core/djangoapps/schedules/management/commands/send_upgrade_reminder.py index 4c973abf33..07a3ccaf52 100644 --- a/openedx/core/djangoapps/schedules/management/commands/send_upgrade_reminder.py +++ b/openedx/core/djangoapps/schedules/management/commands/send_upgrade_reminder.py @@ -1,7 +1,7 @@ """ A management command to send Schedule upgrade reminders """ -from __future__ import absolute_import + from textwrap import dedent diff --git a/openedx/core/djangoapps/schedules/management/commands/setup_models_to_send_test_emails.py b/openedx/core/djangoapps/schedules/management/commands/setup_models_to_send_test_emails.py index e975713fb9..3627065205 100644 --- a/openedx/core/djangoapps/schedules/management/commands/setup_models_to_send_test_emails.py +++ b/openedx/core/djangoapps/schedules/management/commands/setup_models_to_send_test_emails.py @@ -2,7 +2,7 @@ A managment command that can be used to set up Schedules with various configurations for testing. """ -from __future__ import absolute_import + import datetime from textwrap import dedent diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py b/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py index 73de50ba80..c7651388d3 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/send_email_base.py @@ -1,7 +1,7 @@ """ Base file for testing email sending functionality """ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py index 4ec60c6ac4..70b4492f8e 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_course_update.py @@ -1,7 +1,7 @@ """ Tests for send_course_update management command. """ -from __future__ import absolute_import + from unittest import skipUnless diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_email_base_command.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_email_base_command.py index 7092938484..73b5908dd1 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_email_base_command.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_email_base_command.py @@ -1,7 +1,7 @@ """ Tests for send_email_base_command """ -from __future__ import absolute_import + import datetime from unittest import skipUnless diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py index 4f70cffff0..698427643f 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py @@ -1,7 +1,7 @@ """ Tests for send_recurring_nudge management command. """ -from __future__ import absolute_import + from unittest import skipUnless diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py index 565796fd0e..f49293f6a5 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/test_send_upgrade_reminder.py @@ -1,7 +1,7 @@ """ Tests for send_upgrade_reminder management command. """ -from __future__ import absolute_import + import logging from unittest import skipUnless diff --git a/openedx/core/djangoapps/schedules/management/commands/tests/upsell_base.py b/openedx/core/djangoapps/schedules/management/commands/tests/upsell_base.py index 75c27ae0f6..26b52b1e01 100644 --- a/openedx/core/djangoapps/schedules/management/commands/tests/upsell_base.py +++ b/openedx/core/djangoapps/schedules/management/commands/tests/upsell_base.py @@ -1,7 +1,7 @@ """ Base file for testing schedules with upsell """ -from __future__ import absolute_import + import datetime import itertools diff --git a/openedx/core/djangoapps/schedules/message_types.py b/openedx/core/djangoapps/schedules/message_types.py index 8d13c52c1b..c43113d7ce 100644 --- a/openedx/core/djangoapps/schedules/message_types.py +++ b/openedx/core/djangoapps/schedules/message_types.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/schedules/migrations/0001_initial.py b/openedx/core/djangoapps/schedules/migrations/0001_initial.py index edf267ddb7..b4d9a85816 100644 --- a/openedx/core/djangoapps/schedules/migrations/0001_initial.py +++ b/openedx/core/djangoapps/schedules/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.utils.timezone import model_utils.fields diff --git a/openedx/core/djangoapps/schedules/migrations/0002_auto_20170816_1532.py b/openedx/core/djangoapps/schedules/migrations/0002_auto_20170816_1532.py index a67dcc4803..4450739eee 100644 --- a/openedx/core/djangoapps/schedules/migrations/0002_auto_20170816_1532.py +++ b/openedx/core/djangoapps/schedules/migrations/0002_auto_20170816_1532.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/schedules/migrations/0003_scheduleconfig.py b/openedx/core/djangoapps/schedules/migrations/0003_scheduleconfig.py index 23addb18fb..d824dd0a8c 100644 --- a/openedx/core/djangoapps/schedules/migrations/0003_scheduleconfig.py +++ b/openedx/core/djangoapps/schedules/migrations/0003_scheduleconfig.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/schedules/migrations/0004_auto_20170922_1428.py b/openedx/core/djangoapps/schedules/migrations/0004_auto_20170922_1428.py index 41a1934e7c..382768cadb 100644 --- a/openedx/core/djangoapps/schedules/migrations/0004_auto_20170922_1428.py +++ b/openedx/core/djangoapps/schedules/migrations/0004_auto_20170922_1428.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/schedules/migrations/0005_auto_20171010_1722.py b/openedx/core/djangoapps/schedules/migrations/0005_auto_20171010_1722.py index 8f22a88c69..ce3667e9af 100644 --- a/openedx/core/djangoapps/schedules/migrations/0005_auto_20171010_1722.py +++ b/openedx/core/djangoapps/schedules/migrations/0005_auto_20171010_1722.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py b/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py index 2730ce62d1..dca76c9c74 100644 --- a/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py +++ b/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/schedules/migrations/0007_scheduleconfig_hold_back_ratio.py b/openedx/core/djangoapps/schedules/migrations/0007_scheduleconfig_hold_back_ratio.py index aa944c701b..87f1619f21 100644 --- a/openedx/core/djangoapps/schedules/migrations/0007_scheduleconfig_hold_back_ratio.py +++ b/openedx/core/djangoapps/schedules/migrations/0007_scheduleconfig_hold_back_ratio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/schedules/migrations/0008_add_new_start_date_field.py b/openedx/core/djangoapps/schedules/migrations/0008_add_new_start_date_field.py index 3169c942bd..9e5ee207aa 100644 --- a/openedx/core/djangoapps/schedules/migrations/0008_add_new_start_date_field.py +++ b/openedx/core/djangoapps/schedules/migrations/0008_add_new_start_date_field.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-11-21 18:00 -from __future__ import unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/schedules/models.py b/openedx/core/djangoapps/schedules/models.py index f79f6951e0..9eb3e9fbd5 100644 --- a/openedx/core/djangoapps/schedules/models.py +++ b/openedx/core/djangoapps/schedules/models.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.contrib.sites.models import Site diff --git a/openedx/core/djangoapps/schedules/resolvers.py b/openedx/core/djangoapps/schedules/resolvers.py index 51d2a139de..78a0a34f2b 100644 --- a/openedx/core/djangoapps/schedules/resolvers.py +++ b/openedx/core/djangoapps/schedules/resolvers.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/schedules/signals.py b/openedx/core/djangoapps/schedules/signals.py index 99886b82a3..b6a128cf8a 100644 --- a/openedx/core/djangoapps/schedules/signals.py +++ b/openedx/core/djangoapps/schedules/signals.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/schedules/tasks.py b/openedx/core/djangoapps/schedules/tasks.py index d410380dc5..4238e3f1b0 100644 --- a/openedx/core/djangoapps/schedules/tasks.py +++ b/openedx/core/djangoapps/schedules/tasks.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/schedules/tests/factories.py b/openedx/core/djangoapps/schedules/tests/factories.py index c50a73d53c..22e7990c5e 100644 --- a/openedx/core/djangoapps/schedules/tests/factories.py +++ b/openedx/core/djangoapps/schedules/tests/factories.py @@ -1,7 +1,7 @@ """ Factories for schedules tests """ -from __future__ import absolute_import + import factory import pytz diff --git a/openedx/core/djangoapps/schedules/tests/test_content_highlights.py b/openedx/core/djangoapps/schedules/tests/test_content_highlights.py index 51f2762b00..7cc9bc119f 100644 --- a/openedx/core/djangoapps/schedules/tests/test_content_highlights.py +++ b/openedx/core/djangoapps/schedules/tests/test_content_highlights.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import + from openedx.core.djangoapps.schedules.config import COURSE_UPDATE_WAFFLE_FLAG from openedx.core.djangoapps.schedules.content_highlights import course_has_highlights, get_week_highlights diff --git a/openedx/core/djangoapps/schedules/tests/test_resolvers.py b/openedx/core/djangoapps/schedules/tests/test_resolvers.py index 89f9a0b7b4..e47458f5e8 100644 --- a/openedx/core/djangoapps/schedules/tests/test_resolvers.py +++ b/openedx/core/djangoapps/schedules/tests/test_resolvers.py @@ -1,7 +1,7 @@ """ Tests for schedules resolvers """ -from __future__ import absolute_import + import datetime from unittest import skipUnless diff --git a/openedx/core/djangoapps/schedules/tests/test_signals.py b/openedx/core/djangoapps/schedules/tests/test_signals.py index bcbb5eab56..d49687ce14 100644 --- a/openedx/core/djangoapps/schedules/tests/test_signals.py +++ b/openedx/core/djangoapps/schedules/tests/test_signals.py @@ -1,7 +1,7 @@ """ Tests for schedules signals """ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/schedules/tests/test_tasks.py b/openedx/core/djangoapps/schedules/tests/test_tasks.py index 5b7fcacf7e..38a9b8e655 100644 --- a/openedx/core/djangoapps/schedules/tests/test_tasks.py +++ b/openedx/core/djangoapps/schedules/tests/test_tasks.py @@ -1,7 +1,7 @@ """ Tests for schedules tasks """ -from __future__ import absolute_import + import datetime from unittest import skipUnless diff --git a/openedx/core/djangoapps/schedules/utils.py b/openedx/core/djangoapps/schedules/utils.py index a04fee2d61..6729b905bf 100644 --- a/openedx/core/djangoapps/schedules/utils.py +++ b/openedx/core/djangoapps/schedules/utils.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/self_paced/admin.py b/openedx/core/djangoapps/self_paced/admin.py index a114d049ef..a57ed353df 100644 --- a/openedx/core/djangoapps/self_paced/admin.py +++ b/openedx/core/djangoapps/self_paced/admin.py @@ -2,7 +2,7 @@ Admin site bindings for self-paced courses. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/self_paced/migrations/0001_initial.py b/openedx/core/djangoapps/self_paced/migrations/0001_initial.py index b6f3df0fe5..d862de4538 100644 --- a/openedx/core/djangoapps/self_paced/migrations/0001_initial.py +++ b/openedx/core/djangoapps/self_paced/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/self_paced/models.py b/openedx/core/djangoapps/self_paced/models.py index 48614f33e7..869ebc5fae 100644 --- a/openedx/core/djangoapps/self_paced/models.py +++ b/openedx/core/djangoapps/self_paced/models.py @@ -2,7 +2,7 @@ Configuration for self-paced courses. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.db.models import BooleanField diff --git a/openedx/core/djangoapps/service_status/tasks.py b/openedx/core/djangoapps/service_status/tasks.py index ae435f2a07..aad8137bd1 100644 --- a/openedx/core/djangoapps/service_status/tasks.py +++ b/openedx/core/djangoapps/service_status/tasks.py @@ -2,7 +2,7 @@ Django Celery tasks for service status app """ -from __future__ import absolute_import + import time diff --git a/openedx/core/djangoapps/service_status/test.py b/openedx/core/djangoapps/service_status/test.py index 4913239889..dc938e6e9d 100644 --- a/openedx/core/djangoapps/service_status/test.py +++ b/openedx/core/djangoapps/service_status/test.py @@ -1,6 +1,6 @@ """Test for async task service status""" -from __future__ import absolute_import + import json import unittest diff --git a/openedx/core/djangoapps/service_status/urls.py b/openedx/core/djangoapps/service_status/urls.py index e06e1eca6d..1804e20980 100644 --- a/openedx/core/djangoapps/service_status/urls.py +++ b/openedx/core/djangoapps/service_status/urls.py @@ -2,7 +2,7 @@ Django URLs for service status app """ -from __future__ import absolute_import + from django.conf.urls import url from openedx.core.djangoapps.service_status.views import celery_ping, celery_status, index diff --git a/openedx/core/djangoapps/service_status/views.py b/openedx/core/djangoapps/service_status/views.py index e61083b56f..0c00d5ed75 100644 --- a/openedx/core/djangoapps/service_status/views.py +++ b/openedx/core/djangoapps/service_status/views.py @@ -2,7 +2,7 @@ Django Views for service status app """ -from __future__ import absolute_import + import json import time diff --git a/openedx/core/djangoapps/session_inactivity_timeout/middleware.py b/openedx/core/djangoapps/session_inactivity_timeout/middleware.py index 65037c3b8c..fdebb66eea 100644 --- a/openedx/core/djangoapps/session_inactivity_timeout/middleware.py +++ b/openedx/core/djangoapps/session_inactivity_timeout/middleware.py @@ -8,7 +8,7 @@ To enable this feature, set in a settings.py: This was taken from StackOverflow (http://stackoverflow.com/questions/14830669/how-to-expire-django-session-in-5minutes) """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/core/djangoapps/signals/signals.py b/openedx/core/djangoapps/signals/signals.py index 796635c369..06ef324aaf 100644 --- a/openedx/core/djangoapps/signals/signals.py +++ b/openedx/core/djangoapps/signals/signals.py @@ -2,7 +2,7 @@ This module contains all general use signals. """ -from __future__ import absolute_import + from django.dispatch import Signal # Signal that fires when a user is graded diff --git a/openedx/core/djangoapps/site_configuration/admin.py b/openedx/core/djangoapps/site_configuration/admin.py index bdef636767..6fda05f472 100644 --- a/openedx/core/djangoapps/site_configuration/admin.py +++ b/openedx/core/djangoapps/site_configuration/admin.py @@ -1,7 +1,7 @@ """ Django admin page for Site Configuration models """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/openedx/core/djangoapps/site_configuration/context_processors.py b/openedx/core/djangoapps/site_configuration/context_processors.py index d0c6dc08d3..a92d8d6541 100644 --- a/openedx/core/djangoapps/site_configuration/context_processors.py +++ b/openedx/core/djangoapps/site_configuration/context_processors.py @@ -1,7 +1,7 @@ """ Django template context processors. """ -from __future__ import absolute_import + from django.conf import settings from django.utils.http import urlquote_plus diff --git a/openedx/core/djangoapps/site_configuration/helpers.py b/openedx/core/djangoapps/site_configuration/helpers.py index 4af9bcd0f9..07cb3ae9a9 100644 --- a/openedx/core/djangoapps/site_configuration/helpers.py +++ b/openedx/core/djangoapps/site_configuration/helpers.py @@ -1,7 +1,7 @@ """ Helpers methods for site configuration. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/core/djangoapps/site_configuration/middleware.py b/openedx/core/djangoapps/site_configuration/middleware.py index 78d30d33ca..2a2ccd7e01 100644 --- a/openedx/core/djangoapps/site_configuration/middleware.py +++ b/openedx/core/djangoapps/site_configuration/middleware.py @@ -1,7 +1,7 @@ """ This file contains Django middleware related to the site_configuration app. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/core/djangoapps/site_configuration/migrations/0001_initial.py b/openedx/core/djangoapps/site_configuration/migrations/0001_initial.py index ce59d2a3ba..fefc51bf20 100644 --- a/openedx/core/djangoapps/site_configuration/migrations/0001_initial.py +++ b/openedx/core/djangoapps/site_configuration/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.utils.timezone diff --git a/openedx/core/djangoapps/site_configuration/migrations/0002_auto_20160720_0231.py b/openedx/core/djangoapps/site_configuration/migrations/0002_auto_20160720_0231.py index 5922dbfe94..84343dd469 100644 --- a/openedx/core/djangoapps/site_configuration/migrations/0002_auto_20160720_0231.py +++ b/openedx/core/djangoapps/site_configuration/migrations/0002_auto_20160720_0231.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/site_configuration/models.py b/openedx/core/djangoapps/site_configuration/models.py index 8a6745c3e4..fb5d885447 100644 --- a/openedx/core/djangoapps/site_configuration/models.py +++ b/openedx/core/djangoapps/site_configuration/models.py @@ -1,7 +1,7 @@ """ Django models for site configurations. """ -from __future__ import absolute_import + import collections from logging import getLogger diff --git a/openedx/core/djangoapps/site_configuration/templatetags/configuration.py b/openedx/core/djangoapps/site_configuration/templatetags/configuration.py index 7aefae38ef..e142a7a385 100644 --- a/openedx/core/djangoapps/site_configuration/templatetags/configuration.py +++ b/openedx/core/djangoapps/site_configuration/templatetags/configuration.py @@ -2,7 +2,7 @@ Template tags and helper functions for displaying breadcrumbs in page titles based on the current site. """ -from __future__ import absolute_import + from django import template from django.conf import settings diff --git a/openedx/core/djangoapps/site_configuration/tests/factories.py b/openedx/core/djangoapps/site_configuration/tests/factories.py index 79849e8f13..4943ca3670 100644 --- a/openedx/core/djangoapps/site_configuration/tests/factories.py +++ b/openedx/core/djangoapps/site_configuration/tests/factories.py @@ -1,7 +1,7 @@ """ Model factories for unit testing views or models. """ -from __future__ import absolute_import + from django.contrib.sites.models import Site from factory.django import DjangoModelFactory diff --git a/openedx/core/djangoapps/site_configuration/tests/mixins.py b/openedx/core/djangoapps/site_configuration/tests/mixins.py index ba1a141d68..6c30b747b9 100644 --- a/openedx/core/djangoapps/site_configuration/tests/mixins.py +++ b/openedx/core/djangoapps/site_configuration/tests/mixins.py @@ -1,7 +1,7 @@ """ Mixins for TestCase classes that need to account for multiple sites """ -from __future__ import absolute_import + from openedx.core.djangoapps.site_configuration.tests.factories import SiteConfigurationFactory, SiteFactory diff --git a/openedx/core/djangoapps/site_configuration/tests/test_context_processors.py b/openedx/core/djangoapps/site_configuration/tests/test_context_processors.py index 259274ffd2..109cdafcad 100644 --- a/openedx/core/djangoapps/site_configuration/tests/test_context_processors.py +++ b/openedx/core/djangoapps/site_configuration/tests/test_context_processors.py @@ -1,7 +1,7 @@ """ Tests for Django template context processors. """ -from __future__ import absolute_import + from django.test import TestCase from django.test.client import RequestFactory diff --git a/openedx/core/djangoapps/site_configuration/tests/test_helpers.py b/openedx/core/djangoapps/site_configuration/tests/test_helpers.py index 6c8b8b8d23..07a21f0aab 100644 --- a/openedx/core/djangoapps/site_configuration/tests/test_helpers.py +++ b/openedx/core/djangoapps/site_configuration/tests/test_helpers.py @@ -1,7 +1,7 @@ """ Tests for helper function provided by site_configuration app. """ -from __future__ import absolute_import + import six from django.test import TestCase diff --git a/openedx/core/djangoapps/site_configuration/tests/test_middleware.py b/openedx/core/djangoapps/site_configuration/tests/test_middleware.py index a17d3dc1b2..890c6453c2 100644 --- a/openedx/core/djangoapps/site_configuration/tests/test_middleware.py +++ b/openedx/core/djangoapps/site_configuration/tests/test_middleware.py @@ -2,7 +2,7 @@ """ Test site_configuration middleware. """ -from __future__ import absolute_import + from mock import patch diff --git a/openedx/core/djangoapps/site_configuration/tests/test_models.py b/openedx/core/djangoapps/site_configuration/tests/test_models.py index a753e6cbb7..0200c58812 100644 --- a/openedx/core/djangoapps/site_configuration/tests/test_models.py +++ b/openedx/core/djangoapps/site_configuration/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for site configuration's django models. """ -from __future__ import absolute_import + from mock import patch import six diff --git a/openedx/core/djangoapps/site_configuration/tests/test_util.py b/openedx/core/djangoapps/site_configuration/tests/test_util.py index 06079ad1bd..bd6277dcc8 100644 --- a/openedx/core/djangoapps/site_configuration/tests/test_util.py +++ b/openedx/core/djangoapps/site_configuration/tests/test_util.py @@ -1,7 +1,7 @@ """ Test helpers for Site Configuration. """ -from __future__ import absolute_import + from functools import wraps import contextlib diff --git a/openedx/core/djangoapps/system_wide_roles/migrations/0001_SystemWideRole_SystemWideRoleAssignment.py b/openedx/core/djangoapps/system_wide_roles/migrations/0001_SystemWideRole_SystemWideRoleAssignment.py index 7c7c054260..b566d556b0 100644 --- a/openedx/core/djangoapps/system_wide_roles/migrations/0001_SystemWideRole_SystemWideRoleAssignment.py +++ b/openedx/core/djangoapps/system_wide_roles/migrations/0001_SystemWideRole_SystemWideRoleAssignment.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-02 09:33 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/system_wide_roles/migrations/0002_add_system_wide_student_support_role.py b/openedx/core/djangoapps/system_wide_roles/migrations/0002_add_system_wide_student_support_role.py index 07cdfc96ab..e2eb65f014 100644 --- a/openedx/core/djangoapps/system_wide_roles/migrations/0002_add_system_wide_student_support_role.py +++ b/openedx/core/djangoapps/system_wide_roles/migrations/0002_add_system_wide_student_support_role.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-11 11:26 -from __future__ import unicode_literals + from django.db import migrations diff --git a/openedx/core/djangoapps/system_wide_roles/models.py b/openedx/core/djangoapps/system_wide_roles/models.py index 409a8b3bcb..f5542b48f6 100644 --- a/openedx/core/djangoapps/system_wide_roles/models.py +++ b/openedx/core/djangoapps/system_wide_roles/models.py @@ -1,7 +1,7 @@ """ Django models for system wide roles. """ -from __future__ import unicode_literals + from edx_rbac.models import UserRole, UserRoleAssignment diff --git a/openedx/core/djangoapps/system_wide_roles/tests/test_models.py b/openedx/core/djangoapps/system_wide_roles/tests/test_models.py index 406af9e22d..1c4168dbe8 100644 --- a/openedx/core/djangoapps/system_wide_roles/tests/test_models.py +++ b/openedx/core/djangoapps/system_wide_roles/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for system wide roles' django models. """ -from __future__ import unicode_literals + from django.test import TestCase from student.tests.factories import UserFactory diff --git a/openedx/core/djangoapps/theming/admin.py b/openedx/core/djangoapps/theming/admin.py index 5c465ad84f..3505c8c19b 100644 --- a/openedx/core/djangoapps/theming/admin.py +++ b/openedx/core/djangoapps/theming/admin.py @@ -1,7 +1,7 @@ """ Django admin page for theming models """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/openedx/core/djangoapps/theming/apps.py b/openedx/core/djangoapps/theming/apps.py index 2ff8a01b06..9c8f58c18a 100644 --- a/openedx/core/djangoapps/theming/apps.py +++ b/openedx/core/djangoapps/theming/apps.py @@ -1,5 +1,5 @@ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/theming/checks.py b/openedx/core/djangoapps/theming/checks.py index fc0ecd9d1e..bb40a933e0 100644 --- a/openedx/core/djangoapps/theming/checks.py +++ b/openedx/core/djangoapps/theming/checks.py @@ -1,7 +1,7 @@ """ Settings validations for the theming app """ -from __future__ import absolute_import + import os diff --git a/openedx/core/djangoapps/theming/finders.py b/openedx/core/djangoapps/theming/finders.py index b7d7db43a5..ff3c1bc91f 100644 --- a/openedx/core/djangoapps/theming/finders.py +++ b/openedx/core/djangoapps/theming/finders.py @@ -17,7 +17,7 @@ interface, as well. .. _Django-Pipeline: https://django-pipeline.readthedocs.org/ .. _Django-Require: https://github.com/etianen/django-require """ -from __future__ import absolute_import + import os from collections import OrderedDict diff --git a/openedx/core/djangoapps/theming/helpers.py b/openedx/core/djangoapps/theming/helpers.py index 46a4df9573..fd2f793546 100644 --- a/openedx/core/djangoapps/theming/helpers.py +++ b/openedx/core/djangoapps/theming/helpers.py @@ -4,7 +4,7 @@ Helpers for accessing comprehensive theming related variables. This file is imported at startup. Imports of models or things which import models will break startup on Django 1.9+. If you need models here, please import them inside the function which uses them. """ -from __future__ import absolute_import + import os import re diff --git a/openedx/core/djangoapps/theming/helpers_dirs.py b/openedx/core/djangoapps/theming/helpers_dirs.py index ca849faa9a..11366affec 100644 --- a/openedx/core/djangoapps/theming/helpers_dirs.py +++ b/openedx/core/djangoapps/theming/helpers_dirs.py @@ -2,7 +2,7 @@ Code which dynamically discovers comprehensive themes. Deliberately uses no Django settings, as the discovery happens during the initial setup of Django settings. """ -from __future__ import absolute_import + import os diff --git a/openedx/core/djangoapps/theming/helpers_static.py b/openedx/core/djangoapps/theming/helpers_static.py index 5dde345b16..25437bb3b9 100644 --- a/openedx/core/djangoapps/theming/helpers_static.py +++ b/openedx/core/djangoapps/theming/helpers_static.py @@ -1,5 +1,5 @@ -from __future__ import absolute_import + from django.contrib.staticfiles.storage import staticfiles_storage diff --git a/openedx/core/djangoapps/theming/management/commands/compile_sass.py b/openedx/core/djangoapps/theming/management/commands/compile_sass.py index db4b0221d6..78f4e81569 100644 --- a/openedx/core/djangoapps/theming/management/commands/compile_sass.py +++ b/openedx/core/djangoapps/theming/management/commands/compile_sass.py @@ -2,7 +2,7 @@ Management command for compiling sass. """ -from __future__ import absolute_import, unicode_literals + import six from django.core.management import BaseCommand, CommandError diff --git a/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py b/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py index 108dfa850b..0bd38b8862 100644 --- a/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py +++ b/openedx/core/djangoapps/theming/management/commands/create_sites_and_configurations.py @@ -2,7 +2,7 @@ This command will be run by an ansible script. """ -from __future__ import absolute_import + import fnmatch import json diff --git a/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py b/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py index 565fc19849..03b62ae9a6 100644 --- a/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py +++ b/openedx/core/djangoapps/theming/management/commands/tests/test_create_sites_and_configurations.py @@ -2,7 +2,7 @@ Test cases for create_sites_and_configurations command. """ -from __future__ import absolute_import + import mock from django.contrib.auth.models import User diff --git a/openedx/core/djangoapps/theming/middleware.py b/openedx/core/djangoapps/theming/middleware.py index 05632183d0..b74cdb4b33 100644 --- a/openedx/core/djangoapps/theming/middleware.py +++ b/openedx/core/djangoapps/theming/middleware.py @@ -5,7 +5,7 @@ Note: This middleware depends on "django_sites_extensions" app So it must be added to INSTALLED_APPS in django settings files. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/core/djangoapps/theming/migrations/0001_initial.py b/openedx/core/djangoapps/theming/migrations/0001_initial.py index a9db371b6d..1ef0af073f 100644 --- a/openedx/core/djangoapps/theming/migrations/0001_initial.py +++ b/openedx/core/djangoapps/theming/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/theming/models.py b/openedx/core/djangoapps/theming/models.py index 88afba3c62..08043374e5 100644 --- a/openedx/core/djangoapps/theming/models.py +++ b/openedx/core/djangoapps/theming/models.py @@ -1,7 +1,7 @@ """ Django models supporting the Comprehensive Theming subsystem """ -from __future__ import absolute_import + from django.contrib.sites.models import Site from django.db import models diff --git a/openedx/core/djangoapps/theming/paver_helpers.py b/openedx/core/djangoapps/theming/paver_helpers.py index 06237a2403..e18ef613b6 100644 --- a/openedx/core/djangoapps/theming/paver_helpers.py +++ b/openedx/core/djangoapps/theming/paver_helpers.py @@ -2,7 +2,7 @@ This file contains helpers for paver commands, Django is not initialized in paver commands. So, django settings, models etc. can not be used here. """ -from __future__ import absolute_import, print_function + import os diff --git a/openedx/core/djangoapps/theming/storage.py b/openedx/core/djangoapps/theming/storage.py index 0a919c618f..a831e3cbbc 100644 --- a/openedx/core/djangoapps/theming/storage.py +++ b/openedx/core/djangoapps/theming/storage.py @@ -2,7 +2,7 @@ Comprehensive Theming support for Django's collectstatic functionality. See https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/ """ -from __future__ import absolute_import + import os.path import posixpath diff --git a/openedx/core/djangoapps/theming/template_loaders.py b/openedx/core/djangoapps/theming/template_loaders.py index 6467faa298..85a4a426e6 100644 --- a/openedx/core/djangoapps/theming/template_loaders.py +++ b/openedx/core/djangoapps/theming/template_loaders.py @@ -1,7 +1,7 @@ """ Theming aware template loaders. """ -from __future__ import absolute_import + from django.template.loaders.filesystem import Loader as FilesystemLoader diff --git a/openedx/core/djangoapps/theming/templatetags/optional_include.py b/openedx/core/djangoapps/theming/templatetags/optional_include.py index 29ffbd07da..1d906962ae 100644 --- a/openedx/core/djangoapps/theming/templatetags/optional_include.py +++ b/openedx/core/djangoapps/theming/templatetags/optional_include.py @@ -10,7 +10,7 @@ except for making it optional. # possible, we should disable pylint so it doesn't complain about the violations # that are already in that file # pylint: skip-file -from __future__ import absolute_import + from django.template import Library, TemplateDoesNotExist from django.template.base import TemplateSyntaxError, token_kwargs diff --git a/openedx/core/djangoapps/theming/templatetags/theme_pipeline.py b/openedx/core/djangoapps/theming/templatetags/theme_pipeline.py index 748adb0cff..4b453bb86e 100644 --- a/openedx/core/djangoapps/theming/templatetags/theme_pipeline.py +++ b/openedx/core/djangoapps/theming/templatetags/theme_pipeline.py @@ -2,7 +2,7 @@ Theme aware pipeline template tags. """ -from __future__ import absolute_import + from django import template from django.template.loader import render_to_string diff --git a/openedx/core/djangoapps/theming/tests/test_commands.py b/openedx/core/djangoapps/theming/tests/test_commands.py index d6ec4a7ee9..d9f775bf0b 100644 --- a/openedx/core/djangoapps/theming/tests/test_commands.py +++ b/openedx/core/djangoapps/theming/tests/test_commands.py @@ -1,7 +1,7 @@ """ Tests for Management commands of comprehensive theming. """ -from __future__ import absolute_import + import six from django.core.management import CommandError, call_command diff --git a/openedx/core/djangoapps/theming/tests/test_finders.py b/openedx/core/djangoapps/theming/tests/test_finders.py index 38db438ff9..ca760df873 100644 --- a/openedx/core/djangoapps/theming/tests/test_finders.py +++ b/openedx/core/djangoapps/theming/tests/test_finders.py @@ -2,7 +2,7 @@ Tests for comprehensive theme static files finders. """ -from __future__ import absolute_import + from django.conf import settings from django.test import TestCase diff --git a/openedx/core/djangoapps/theming/tests/test_helpers.py b/openedx/core/djangoapps/theming/tests/test_helpers.py index 16e30f94e8..3785098a54 100644 --- a/openedx/core/djangoapps/theming/tests/test_helpers.py +++ b/openedx/core/djangoapps/theming/tests/test_helpers.py @@ -1,7 +1,7 @@ """ Test helpers for Comprehensive Theming. """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/openedx/core/djangoapps/theming/tests/test_middleware.py b/openedx/core/djangoapps/theming/tests/test_middleware.py index 72fa17bc5b..45b232baf6 100644 --- a/openedx/core/djangoapps/theming/tests/test_middleware.py +++ b/openedx/core/djangoapps/theming/tests/test_middleware.py @@ -2,7 +2,7 @@ Tests for middleware for comprehensive themes. """ -from __future__ import absolute_import + from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sites.models import Site diff --git a/openedx/core/djangoapps/theming/tests/test_storage.py b/openedx/core/djangoapps/theming/tests/test_storage.py index 3d5170283c..70978924ca 100644 --- a/openedx/core/djangoapps/theming/tests/test_storage.py +++ b/openedx/core/djangoapps/theming/tests/test_storage.py @@ -1,7 +1,7 @@ """ Tests for comprehensive theme static files storage classes. """ -from __future__ import absolute_import + import re diff --git a/openedx/core/djangoapps/theming/tests/test_theme_locales.py b/openedx/core/djangoapps/theming/tests/test_theme_locales.py index 553e83e531..efd6b50875 100644 --- a/openedx/core/djangoapps/theming/tests/test_theme_locales.py +++ b/openedx/core/djangoapps/theming/tests/test_theme_locales.py @@ -1,7 +1,7 @@ """ Tests for Theming locales """ -from __future__ import absolute_import + import os diff --git a/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py b/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py index 5160b0a93e..117fa438e9 100644 --- a/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py +++ b/openedx/core/djangoapps/theming/tests/test_theme_style_overrides.py @@ -1,7 +1,7 @@ """ Tests for comprehensive themes. """ -from __future__ import absolute_import + from django.conf import settings from django.contrib import staticfiles diff --git a/openedx/core/djangoapps/theming/tests/test_util.py b/openedx/core/djangoapps/theming/tests/test_util.py index 603df818ff..8c61eab160 100644 --- a/openedx/core/djangoapps/theming/tests/test_util.py +++ b/openedx/core/djangoapps/theming/tests/test_util.py @@ -1,7 +1,7 @@ """ Test helpers for Comprehensive Theming. """ -from __future__ import absolute_import, print_function + import contextlib import os diff --git a/openedx/core/djangoapps/theming/tests/test_views.py b/openedx/core/djangoapps/theming/tests/test_views.py index f25740634e..570dfacbbe 100644 --- a/openedx/core/djangoapps/theming/tests/test_views.py +++ b/openedx/core/djangoapps/theming/tests/test_views.py @@ -2,7 +2,7 @@ Tests for comprehensive them """ -from __future__ import absolute_import + from django.conf import settings from django.contrib.messages.middleware import MessageMiddleware diff --git a/openedx/core/djangoapps/theming/urls.py b/openedx/core/djangoapps/theming/urls.py index bba24e4caf..eb22026cb1 100644 --- a/openedx/core/djangoapps/theming/urls.py +++ b/openedx/core/djangoapps/theming/urls.py @@ -2,7 +2,7 @@ Defines URLs for theming views. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/openedx/core/djangoapps/theming/views.py b/openedx/core/djangoapps/theming/views.py index 80755e71e7..5c9446d1ed 100644 --- a/openedx/core/djangoapps/theming/views.py +++ b/openedx/core/djangoapps/theming/views.py @@ -2,7 +2,7 @@ Views file for theming administration. """ -from __future__ import absolute_import + from django.conf import settings from django.contrib.auth.decorators import login_required diff --git a/openedx/core/djangoapps/user_api/accounts/__init__.py b/openedx/core/djangoapps/user_api/accounts/__init__.py index 864daf45d3..dc6dfabec3 100644 --- a/openedx/core/djangoapps/user_api/accounts/__init__.py +++ b/openedx/core/djangoapps/user_api/accounts/__init__.py @@ -2,7 +2,7 @@ Account constants """ -from __future__ import absolute_import + from django.utils.text import format_lazy from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/core/djangoapps/user_api/accounts/api.py b/openedx/core/djangoapps/user_api/accounts/api.py index 8568e0e781..53894d67c7 100644 --- a/openedx/core/djangoapps/user_api/accounts/api.py +++ b/openedx/core/djangoapps/user_api/accounts/api.py @@ -3,7 +3,7 @@ """ Programmatic integration point for User API Accounts sub-application """ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/user_api/accounts/forms.py b/openedx/core/djangoapps/user_api/accounts/forms.py index cab513e030..d2f66b97e9 100644 --- a/openedx/core/djangoapps/user_api/accounts/forms.py +++ b/openedx/core/djangoapps/user_api/accounts/forms.py @@ -2,7 +2,7 @@ Django forms for accounts """ -from __future__ import absolute_import + from django import forms from django.core.exceptions import ValidationError diff --git a/openedx/core/djangoapps/user_api/accounts/image_helpers.py b/openedx/core/djangoapps/user_api/accounts/image_helpers.py index cc56435ba9..c1fe1ace19 100644 --- a/openedx/core/djangoapps/user_api/accounts/image_helpers.py +++ b/openedx/core/djangoapps/user_api/accounts/image_helpers.py @@ -1,7 +1,7 @@ """ Helper functions for the accounts API. """ -from __future__ import absolute_import + import hashlib diff --git a/openedx/core/djangoapps/user_api/accounts/permissions.py b/openedx/core/djangoapps/user_api/accounts/permissions.py index 5604b93b1f..691df5629a 100644 --- a/openedx/core/djangoapps/user_api/accounts/permissions.py +++ b/openedx/core/djangoapps/user_api/accounts/permissions.py @@ -1,7 +1,7 @@ """ Permissions classes for User accounts API views. """ -from __future__ import absolute_import, unicode_literals + from django.conf import settings from rest_framework import permissions diff --git a/openedx/core/djangoapps/user_api/accounts/serializers.py b/openedx/core/djangoapps/user_api/accounts/serializers.py index 20178b0cb5..e492bc5196 100644 --- a/openedx/core/djangoapps/user_api/accounts/serializers.py +++ b/openedx/core/djangoapps/user_api/accounts/serializers.py @@ -1,7 +1,7 @@ """ Django REST Framework serializers for the User API Accounts sub-application """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/user_api/accounts/settings_views.py b/openedx/core/djangoapps/user_api/accounts/settings_views.py index ca2fe8e439..4b4fefec50 100644 --- a/openedx/core/djangoapps/user_api/accounts/settings_views.py +++ b/openedx/core/djangoapps/user_api/accounts/settings_views.py @@ -1,6 +1,6 @@ """ Views related to Account Settings. """ -from __future__ import absolute_import + import logging from datetime import datetime diff --git a/openedx/core/djangoapps/user_api/accounts/signals.py b/openedx/core/djangoapps/user_api/accounts/signals.py index 4c88b95069..0fa91e27fe 100644 --- a/openedx/core/djangoapps/user_api/accounts/signals.py +++ b/openedx/core/djangoapps/user_api/accounts/signals.py @@ -2,7 +2,7 @@ Django Signal related functionality for user_api accounts """ -from __future__ import absolute_import + from django.dispatch import Signal diff --git a/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py b/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py index 8b0e0c234b..7d20969953 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/retirement_helpers.py @@ -1,7 +1,7 @@ """ Helpers for testing retirement functionality """ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py index e1b8ee63bb..08f8010936 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py @@ -4,7 +4,7 @@ Unit tests for behavior that is specific to the api methods (vs. the view method Most of the functionality is covered in test_views.py. """ -from __future__ import absolute_import + import itertools import re diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py b/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py index 0deaa321d5..fb9b6715b0 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py @@ -1,7 +1,7 @@ """ Tests for helpers.py """ -from __future__ import absolute_import + import datetime import hashlib diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_models.py b/openedx/core/djangoapps/user_api/accounts/tests/test_models.py index d7f4e29064..b64abff7d5 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_models.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_models.py @@ -1,7 +1,7 @@ """ Model specific tests for user_api """ -from __future__ import absolute_import + import pytest diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py b/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py index 20bfd21a7f..16cc0e8a60 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_permissions.py @@ -1,7 +1,7 @@ """ Tests for User deactivation API permissions """ -from __future__ import absolute_import + from django.test import RequestFactory, TestCase diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py index cc84860454..64da8f4b80 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py @@ -2,7 +2,7 @@ """ Test cases to cover account retirement views """ -from __future__ import absolute_import, print_function + import datetime import json diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py b/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py index 6fd32565fc..bdd0913582 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_serializers.py @@ -1,7 +1,7 @@ """ Test cases to cover Accounts-related serializers of the User API application """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py index accfdb23a9..b235c7f4b7 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py @@ -1,6 +1,6 @@ """ Tests for views related to account settings. """ # -*- coding: utf-8 -*- -from __future__ import absolute_import + import mock from django.conf import settings diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py b/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py index 4f874b4a5c..76276b3eaa 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_utils.py @@ -1,6 +1,6 @@ """ Unit tests for custom UserProfile properties. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import ddt from completion import models diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py index 5ca9444a37..d4c297e9c0 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py @@ -2,7 +2,7 @@ """ Test cases to cover Accounts-related behaviors of the User API application """ -from __future__ import absolute_import + import datetime import hashlib diff --git a/openedx/core/djangoapps/user_api/accounts/tests/testutils.py b/openedx/core/djangoapps/user_api/accounts/tests/testutils.py index 07250584c1..6feb21c536 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/testutils.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/testutils.py @@ -3,7 +3,7 @@ Utility functions, constants, etc. for testing. """ -from __future__ import absolute_import + from openedx.core.djangoapps.user_api.accounts import EMAIL_MAX_LENGTH, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH from util.password_policy_validators import DEFAULT_MAX_PASSWORD_LENGTH diff --git a/openedx/core/djangoapps/user_api/accounts/toggles.py b/openedx/core/djangoapps/user_api/accounts/toggles.py index 2607bea0dd..787662d34a 100644 --- a/openedx/core/djangoapps/user_api/accounts/toggles.py +++ b/openedx/core/djangoapps/user_api/accounts/toggles.py @@ -1,7 +1,7 @@ """ Toggles for accounts related code. """ -from __future__ import absolute_import + from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.waffle_utils import WaffleFlag diff --git a/openedx/core/djangoapps/user_api/accounts/utils.py b/openedx/core/djangoapps/user_api/accounts/utils.py index c560c970c8..9b4667b9d8 100644 --- a/openedx/core/djangoapps/user_api/accounts/utils.py +++ b/openedx/core/djangoapps/user_api/accounts/utils.py @@ -1,7 +1,7 @@ """ Utility methods for the account settings. """ -from __future__ import absolute_import, unicode_literals + import re diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index a3fd938be5..957ef0d9df 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -4,7 +4,7 @@ An API for retrieving user account information. For additional information and historical context, see: https://openedx.atlassian.net/wiki/display/TNL/User+API """ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/core/djangoapps/user_api/admin.py b/openedx/core/djangoapps/user_api/admin.py index b10612f18b..e315f6bc05 100644 --- a/openedx/core/djangoapps/user_api/admin.py +++ b/openedx/core/djangoapps/user_api/admin.py @@ -1,7 +1,7 @@ """ Django admin configuration pages for the user_api app """ -from __future__ import absolute_import + from django.conf.urls import url from django.contrib import admin, messages diff --git a/openedx/core/djangoapps/user_api/config/waffle.py b/openedx/core/djangoapps/user_api/config/waffle.py index b226ab1405..f3500c319a 100644 --- a/openedx/core/djangoapps/user_api/config/waffle.py +++ b/openedx/core/djangoapps/user_api/config/waffle.py @@ -1,7 +1,7 @@ """ Waffle flags and switches to change user API functionality. """ -from __future__ import absolute_import + from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/core/djangoapps/user_api/course_tag/api.py b/openedx/core/djangoapps/user_api/course_tag/api.py index 96954913df..341c44163c 100644 --- a/openedx/core/djangoapps/user_api/course_tag/api.py +++ b/openedx/core/djangoapps/user_api/course_tag/api.py @@ -7,7 +7,7 @@ Stores global metadata using the UserPreference model, and per-course metadata u UserCourseTag model. """ -from __future__ import absolute_import + from collections import defaultdict diff --git a/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py b/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py index 94cf76b11f..cd115cd8fe 100644 --- a/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/course_tag/tests/test_api.py @@ -1,7 +1,7 @@ """ Test the user course tag API. """ -from __future__ import absolute_import + from django.test import TestCase from opaque_keys.edx.locator import CourseLocator diff --git a/openedx/core/djangoapps/user_api/helpers.py b/openedx/core/djangoapps/user_api/helpers.py index 001ee5b718..8b077625df 100644 --- a/openedx/core/djangoapps/user_api/helpers.py +++ b/openedx/core/djangoapps/user_api/helpers.py @@ -2,7 +2,7 @@ Helper functions for the account/profile Python APIs. This is NOT part of the public API. """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/user_api/legacy_urls.py b/openedx/core/djangoapps/user_api/legacy_urls.py index 33beb1f7af..0e06a59443 100644 --- a/openedx/core/djangoapps/user_api/legacy_urls.py +++ b/openedx/core/djangoapps/user_api/legacy_urls.py @@ -2,7 +2,7 @@ Defines the URL routes for this app. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/openedx/core/djangoapps/user_api/management/commands/bulk_user_org_email_optout.py b/openedx/core/djangoapps/user_api/management/commands/bulk_user_org_email_optout.py index 90198e8186..920b84ea09 100644 --- a/openedx/core/djangoapps/user_api/management/commands/bulk_user_org_email_optout.py +++ b/openedx/core/djangoapps/user_api/management/commands/bulk_user_org_email_optout.py @@ -16,7 +16,7 @@ If the user/org combo does not currently exist in the table, a row will be creat will be have the 'email-optin' tag set to 'False'. """ -from __future__ import absolute_import, print_function + import csv import logging diff --git a/openedx/core/djangoapps/user_api/management/commands/cancel_user_retirement_request.py b/openedx/core/djangoapps/user_api/management/commands/cancel_user_retirement_request.py index 0adc84443b..acf53987e4 100644 --- a/openedx/core/djangoapps/user_api/management/commands/cancel_user_retirement_request.py +++ b/openedx/core/djangoapps/user_api/management/commands/cancel_user_retirement_request.py @@ -3,7 +3,7 @@ Use this mgmt command when a user requests retirement mistakenly, then requests for the retirement request to be cancelled. The command can't cancel a retirement that has already commenced - only pending retirements. """ -from __future__ import absolute_import, print_function + import logging diff --git a/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py b/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py index 03395cd9c4..f63d9dcedc 100644 --- a/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py +++ b/openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py @@ -4,7 +4,7 @@ Enrolls the user in the DemoX course. Optionally takes in username, email, and course UUID arguments. """ -from __future__ import absolute_import, unicode_literals + from datetime import datetime from textwrap import dedent diff --git a/openedx/core/djangoapps/user_api/management/commands/email_opt_in_list.py b/openedx/core/djangoapps/user_api/management/commands/email_opt_in_list.py index ffe837e1e0..ebb8146990 100644 --- a/openedx/core/djangoapps/user_api/management/commands/email_opt_in_list.py +++ b/openedx/core/djangoapps/user_api/management/commands/email_opt_in_list.py @@ -19,7 +19,7 @@ When reports are generated, we need to handle: The command will always use the read replica database if one is configured. """ -from __future__ import absolute_import, unicode_literals + import contextlib import csv diff --git a/openedx/core/djangoapps/user_api/management/commands/migrate_user_profile_langs.py b/openedx/core/djangoapps/user_api/management/commands/migrate_user_profile_langs.py index d14fae397e..e25617afbd 100644 --- a/openedx/core/djangoapps/user_api/management/commands/migrate_user_profile_langs.py +++ b/openedx/core/djangoapps/user_api/management/commands/migrate_user_profile_langs.py @@ -1,7 +1,7 @@ """ Migrates user preferences from one language code to another in batches. Dark lang preferences are not affected. """ -from __future__ import absolute_import, print_function + import logging from time import sleep diff --git a/openedx/core/djangoapps/user_api/management/commands/populate_retirement_states.py b/openedx/core/djangoapps/user_api/management/commands/populate_retirement_states.py index 618c9343c8..0e6f575a0f 100644 --- a/openedx/core/djangoapps/user_api/management/commands/populate_retirement_states.py +++ b/openedx/core/djangoapps/user_api/management/commands/populate_retirement_states.py @@ -9,7 +9,7 @@ need to be configurable by open source partners and modifying the with a variety of unpleasant follow-on effects for the partner when upgrading the model at a later date. """ -from __future__ import absolute_import, print_function + import copy import logging diff --git a/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py b/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py index 91262877dd..7dcb7bd47b 100644 --- a/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py +++ b/openedx/core/djangoapps/user_api/management/commands/sync_hubspot_contacts.py @@ -3,7 +3,7 @@ Management command to sync platform users with hubspot ./manage.py lms sync_hubspot_contacts ./manage.py lms sync_hubspot_contacts --initial-sync-days=7 --batch-size=20 """ -from __future__ import absolute_import + import json import time diff --git a/openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py b/openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py index 7d492471c8..1b05fc1f06 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py @@ -1,7 +1,7 @@ """ Test the test_bulk_user_org_email_optout management command """ -from __future__ import absolute_import + import io import os diff --git a/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py b/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py index e11fe8d87e..b55da7368e 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_cancel_retirement.py @@ -1,7 +1,7 @@ """ Test the cancel_user_retirement_request management command """ -from __future__ import absolute_import + import pytest from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX diff --git a/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py b/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py index eb6a6c307a..f2fdc60c64 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for the email opt-in list management command. """ -from __future__ import absolute_import + import csv import os.path diff --git a/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py b/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py index 33c2ce103e..94d3eba39a 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_populate_retirement_states.py @@ -1,7 +1,7 @@ """ Test the populate_retirement_states management command """ -from __future__ import absolute_import + import copy diff --git a/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py b/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py index 49f6abb1ad..912a5e4fcf 100644 --- a/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py +++ b/openedx/core/djangoapps/user_api/management/tests/test_sync_hubspot_contacts.py @@ -1,7 +1,7 @@ """ Test the sync_hubspot_contacts management command """ -from __future__ import absolute_import + import json from datetime import timedelta diff --git a/openedx/core/djangoapps/user_api/message_types.py b/openedx/core/djangoapps/user_api/message_types.py index a92e857e4a..79ed08e14a 100644 --- a/openedx/core/djangoapps/user_api/message_types.py +++ b/openedx/core/djangoapps/user_api/message_types.py @@ -2,7 +2,7 @@ Message Types for user_api emails """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/core/djangoapps/user_api/middleware.py b/openedx/core/djangoapps/user_api/middleware.py index bd7c63b32d..b7998b3043 100644 --- a/openedx/core/djangoapps/user_api/middleware.py +++ b/openedx/core/djangoapps/user_api/middleware.py @@ -3,7 +3,7 @@ Middleware for user api. Adds user's tags to tracking event context. """ -from __future__ import absolute_import + from eventtracking import tracker from opaque_keys import InvalidKeyError diff --git a/openedx/core/djangoapps/user_api/migrations/0001_initial.py b/openedx/core/djangoapps/user_api/migrations/0001_initial.py index a5377ddc72..0f7c02ccab 100644 --- a/openedx/core/djangoapps/user_api/migrations/0001_initial.py +++ b/openedx/core/djangoapps/user_api/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import django.core.validators import django.utils.timezone diff --git a/openedx/core/djangoapps/user_api/migrations/0002_retirementstate_userretirementstatus.py b/openedx/core/djangoapps/user_api/migrations/0002_retirementstate_userretirementstatus.py index 34613c1ea8..272a9c4b7b 100644 --- a/openedx/core/djangoapps/user_api/migrations/0002_retirementstate_userretirementstatus.py +++ b/openedx/core/djangoapps/user_api/migrations/0002_retirementstate_userretirementstatus.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-19 17:55 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/openedx/core/djangoapps/user_api/migrations/0003_userretirementrequest.py b/openedx/core/djangoapps/user_api/migrations/0003_userretirementrequest.py index 7d014dee91..4a885470f0 100644 --- a/openedx/core/djangoapps/user_api/migrations/0003_userretirementrequest.py +++ b/openedx/core/djangoapps/user_api/migrations/0003_userretirementrequest.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-05-14 20:37 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/openedx/core/djangoapps/user_api/migrations/0004_userretirementpartnerreportingstatus.py b/openedx/core/djangoapps/user_api/migrations/0004_userretirementpartnerreportingstatus.py index 5cf194e39e..3fe78479be 100644 --- a/openedx/core/djangoapps/user_api/migrations/0004_userretirementpartnerreportingstatus.py +++ b/openedx/core/djangoapps/user_api/migrations/0004_userretirementpartnerreportingstatus.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-13 20:54 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion import django.utils.timezone diff --git a/openedx/core/djangoapps/user_api/models.py b/openedx/core/djangoapps/user_api/models.py index 8deec93f68..ab339b5277 100644 --- a/openedx/core/djangoapps/user_api/models.py +++ b/openedx/core/djangoapps/user_api/models.py @@ -1,7 +1,7 @@ """ Django ORM model specifications for the User API application """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/user_api/partition_schemes.py b/openedx/core/djangoapps/user_api/partition_schemes.py index 4eb4d13654..2ab42ffd57 100644 --- a/openedx/core/djangoapps/user_api/partition_schemes.py +++ b/openedx/core/djangoapps/user_api/partition_schemes.py @@ -1,7 +1,7 @@ """ Provides partition support to the user service. """ -from __future__ import absolute_import + import logging import random diff --git a/openedx/core/djangoapps/user_api/permissions.py b/openedx/core/djangoapps/user_api/permissions.py index dbcc6d078e..7301e60dbc 100644 --- a/openedx/core/djangoapps/user_api/permissions.py +++ b/openedx/core/djangoapps/user_api/permissions.py @@ -1,7 +1,7 @@ """ Permissions classes for User-API aware views. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.http import Http404 diff --git a/openedx/core/djangoapps/user_api/preferences/api.py b/openedx/core/djangoapps/user_api/preferences/api.py index a35d1ce7ec..1223bdde44 100644 --- a/openedx/core/djangoapps/user_api/preferences/api.py +++ b/openedx/core/djangoapps/user_api/preferences/api.py @@ -1,7 +1,7 @@ """ API for managing user preferences. """ -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/user_api/preferences/tests/test_api.py b/openedx/core/djangoapps/user_api/preferences/tests/test_api.py index 3689e3aaf6..2ed1de98b5 100644 --- a/openedx/core/djangoapps/user_api/preferences/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/preferences/tests/test_api.py @@ -2,7 +2,7 @@ """ Unit tests for preference APIs. """ -from __future__ import absolute_import + import datetime diff --git a/openedx/core/djangoapps/user_api/preferences/tests/test_views.py b/openedx/core/djangoapps/user_api/preferences/tests/test_views.py index 24f51e4806..3db3dec4b9 100644 --- a/openedx/core/djangoapps/user_api/preferences/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/preferences/tests/test_views.py @@ -3,7 +3,7 @@ Unit tests for preference APIs. """ -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/user_api/preferences/views.py b/openedx/core/djangoapps/user_api/preferences/views.py index e4ae2ee962..f0b9b366a5 100644 --- a/openedx/core/djangoapps/user_api/preferences/views.py +++ b/openedx/core/djangoapps/user_api/preferences/views.py @@ -4,7 +4,7 @@ An API for retrieving user preference information. For additional information and historical context, see: https://openedx.atlassian.net/wiki/display/TNL/User+API """ -from __future__ import absolute_import + from django.db import transaction from django.utils.translation import ugettext as _ diff --git a/openedx/core/djangoapps/user_api/rules.py b/openedx/core/djangoapps/user_api/rules.py index 0574ec7bb7..f39410827e 100644 --- a/openedx/core/djangoapps/user_api/rules.py +++ b/openedx/core/djangoapps/user_api/rules.py @@ -1,7 +1,7 @@ """ Django rules for accounts """ -from __future__ import absolute_import + import rules from django.conf import settings diff --git a/openedx/core/djangoapps/user_api/serializers.py b/openedx/core/djangoapps/user_api/serializers.py index 3156083359..6ddc05eba2 100644 --- a/openedx/core/djangoapps/user_api/serializers.py +++ b/openedx/core/djangoapps/user_api/serializers.py @@ -1,7 +1,7 @@ """ Django REST Framework serializers for the User API application """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.utils.timezone import now diff --git a/openedx/core/djangoapps/user_api/tests/factories.py b/openedx/core/djangoapps/user_api/tests/factories.py index 9adfc8fc48..b1413bd215 100644 --- a/openedx/core/djangoapps/user_api/tests/factories.py +++ b/openedx/core/djangoapps/user_api/tests/factories.py @@ -1,5 +1,5 @@ """Provides factories for User API models.""" -from __future__ import absolute_import + from factory import SubFactory from factory.django import DjangoModelFactory diff --git a/openedx/core/djangoapps/user_api/tests/test_helpers.py b/openedx/core/djangoapps/user_api/tests/test_helpers.py index 8f50dfa835..09753599e7 100644 --- a/openedx/core/djangoapps/user_api/tests/test_helpers.py +++ b/openedx/core/djangoapps/user_api/tests/test_helpers.py @@ -1,7 +1,7 @@ """ Tests for helper functions. """ -from __future__ import absolute_import + import json import re diff --git a/openedx/core/djangoapps/user_api/tests/test_middleware.py b/openedx/core/djangoapps/user_api/tests/test_middleware.py index b674edd00e..8eb9330c0b 100644 --- a/openedx/core/djangoapps/user_api/tests/test_middleware.py +++ b/openedx/core/djangoapps/user_api/tests/test_middleware.py @@ -1,5 +1,5 @@ """Tests for user API middleware""" -from __future__ import absolute_import + from django.http import HttpResponse from django.test import TestCase diff --git a/openedx/core/djangoapps/user_api/tests/test_models.py b/openedx/core/djangoapps/user_api/tests/test_models.py index 3c51bcb6b2..a45022ae45 100644 --- a/openedx/core/djangoapps/user_api/tests/test_models.py +++ b/openedx/core/djangoapps/user_api/tests/test_models.py @@ -1,7 +1,7 @@ """ Test UserPreferenceModel and UserPreference events """ -from __future__ import absolute_import + from django.db import IntegrityError from django.test import TestCase diff --git a/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py b/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py index 45761bb0e4..fd4935c5f2 100644 --- a/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py +++ b/openedx/core/djangoapps/user_api/tests/test_partition_schemes.py @@ -1,7 +1,7 @@ """ Test the user api's partition extensions. """ -from __future__ import absolute_import + from collections import defaultdict diff --git a/openedx/core/djangoapps/user_api/tests/test_views.py b/openedx/core/djangoapps/user_api/tests/test_views.py index a0c0c3b623..4ffe7047f8 100644 --- a/openedx/core/djangoapps/user_api/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/tests/test_views.py @@ -1,6 +1,6 @@ """Tests for the user API at the HTTP request level. """ -from __future__ import absolute_import + import json from unittest import skipUnless diff --git a/openedx/core/djangoapps/user_api/urls.py b/openedx/core/djangoapps/user_api/urls.py index e873b1e2c3..f57388ca97 100644 --- a/openedx/core/djangoapps/user_api/urls.py +++ b/openedx/core/djangoapps/user_api/urls.py @@ -2,7 +2,7 @@ Defines the URL routes for this app. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py b/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py index 0125d2e401..dbfc8aa8fc 100644 --- a/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/verification_api/tests/test_views.py @@ -1,5 +1,5 @@ """ Tests for API endpoints. """ -from __future__ import absolute_import, unicode_literals + import datetime import json diff --git a/openedx/core/djangoapps/user_api/verification_api/views.py b/openedx/core/djangoapps/user_api/verification_api/views.py index d77599ae79..0a9810593b 100644 --- a/openedx/core/djangoapps/user_api/verification_api/views.py +++ b/openedx/core/djangoapps/user_api/verification_api/views.py @@ -1,5 +1,5 @@ """ Verification API v1 views. """ -from __future__ import absolute_import + from django.http import Http404 from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication diff --git a/openedx/core/djangoapps/user_api/views.py b/openedx/core/djangoapps/user_api/views.py index 4404f3e3f6..905dbe65c7 100644 --- a/openedx/core/djangoapps/user_api/views.py +++ b/openedx/core/djangoapps/user_api/views.py @@ -1,6 +1,6 @@ """HTTP end-points for the User API. """ -from __future__ import absolute_import + from django.contrib.auth.models import User from django.core.exceptions import NON_FIELD_ERRORS, PermissionDenied, ValidationError diff --git a/openedx/core/djangoapps/user_authn/apps.py b/openedx/core/djangoapps/user_authn/apps.py index 9e01559dfd..65c80411bd 100644 --- a/openedx/core/djangoapps/user_authn/apps.py +++ b/openedx/core/djangoapps/user_authn/apps.py @@ -2,7 +2,7 @@ User Authentication Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/user_authn/config/waffle.py b/openedx/core/djangoapps/user_authn/config/waffle.py index ece17d749b..9339f001ad 100644 --- a/openedx/core/djangoapps/user_authn/config/waffle.py +++ b/openedx/core/djangoapps/user_authn/config/waffle.py @@ -1,7 +1,7 @@ """ Waffle flags and switches for user authn. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitch, WaffleSwitchNamespace diff --git a/openedx/core/djangoapps/user_authn/cookies.py b/openedx/core/djangoapps/user_authn/cookies.py index b2e207683d..f6a6ffe7b5 100644 --- a/openedx/core/djangoapps/user_authn/cookies.py +++ b/openedx/core/djangoapps/user_authn/cookies.py @@ -1,7 +1,7 @@ """ Utility functions for setting "logged in" cookies used by subdomains. """ -from __future__ import absolute_import, unicode_literals + import json import logging diff --git a/openedx/core/djangoapps/user_authn/exceptions.py b/openedx/core/djangoapps/user_authn/exceptions.py index b25cdf0e82..62be3f1852 100644 --- a/openedx/core/djangoapps/user_authn/exceptions.py +++ b/openedx/core/djangoapps/user_authn/exceptions.py @@ -1,6 +1,6 @@ """ User Authn related Exceptions. """ -from __future__ import absolute_import + from openedx.core.djangolib.markup import Text diff --git a/openedx/core/djangoapps/user_authn/message_types.py b/openedx/core/djangoapps/user_authn/message_types.py index ec2fa667c4..50e463b6a6 100644 --- a/openedx/core/djangoapps/user_authn/message_types.py +++ b/openedx/core/djangoapps/user_authn/message_types.py @@ -2,7 +2,7 @@ ACE message types for user_authn-related emails. """ -from __future__ import absolute_import + from openedx.core.djangoapps.ace_common.message import BaseMessageType diff --git a/openedx/core/djangoapps/user_authn/migrations/0001_data__add_login_service.py b/openedx/core/djangoapps/user_authn/migrations/0001_data__add_login_service.py index 130882f4a7..d17f2ea75b 100644 --- a/openedx/core/djangoapps/user_authn/migrations/0001_data__add_login_service.py +++ b/openedx/core/djangoapps/user_authn/migrations/0001_data__add_login_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations diff --git a/openedx/core/djangoapps/user_authn/tests/test_cookies.py b/openedx/core/djangoapps/user_authn/tests/test_cookies.py index 73bdc4b5c2..ed34799ed3 100644 --- a/openedx/core/djangoapps/user_authn/tests/test_cookies.py +++ b/openedx/core/djangoapps/user_authn/tests/test_cookies.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring -from __future__ import absolute_import, unicode_literals + import six from django.conf import settings diff --git a/openedx/core/djangoapps/user_authn/tests/test_exceptions.py b/openedx/core/djangoapps/user_authn/tests/test_exceptions.py index cb7c1c7caf..b14b0d55af 100644 --- a/openedx/core/djangoapps/user_authn/tests/test_exceptions.py +++ b/openedx/core/djangoapps/user_authn/tests/test_exceptions.py @@ -1,6 +1,6 @@ """ Test Authn related exception. """ -from __future__ import absolute_import + from unittest import TestCase diff --git a/openedx/core/djangoapps/user_authn/tests/test_utils.py b/openedx/core/djangoapps/user_authn/tests/test_utils.py index 048c317789..67a7a48888 100644 --- a/openedx/core/djangoapps/user_authn/tests/test_utils.py +++ b/openedx/core/djangoapps/user_authn/tests/test_utils.py @@ -1,6 +1,6 @@ """ Test User Authentication utilities """ -from __future__ import absolute_import + from collections import namedtuple diff --git a/openedx/core/djangoapps/user_authn/tests/utils.py b/openedx/core/djangoapps/user_authn/tests/utils.py index 31aaed2ea5..c9d1ed6158 100644 --- a/openedx/core/djangoapps/user_authn/tests/utils.py +++ b/openedx/core/djangoapps/user_authn/tests/utils.py @@ -1,5 +1,5 @@ """ Common utilities for tests in the user_authn app. """ -from __future__ import absolute_import + from datetime import datetime, timedelta from enum import Enum diff --git a/openedx/core/djangoapps/user_authn/urls.py b/openedx/core/djangoapps/user_authn/urls.py index 0a53adcb5e..6b15b052ca 100644 --- a/openedx/core/djangoapps/user_authn/urls.py +++ b/openedx/core/djangoapps/user_authn/urls.py @@ -1,5 +1,5 @@ """ URLs for User Authentication """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import include, url diff --git a/openedx/core/djangoapps/user_authn/urls_common.py b/openedx/core/djangoapps/user_authn/urls_common.py index 81e424338e..02a0c0d4b1 100644 --- a/openedx/core/djangoapps/user_authn/urls_common.py +++ b/openedx/core/djangoapps/user_authn/urls_common.py @@ -9,7 +9,7 @@ This is also home to urls for endpoints that have been consolidated from other d which leads to inconsistent prefixing. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/core/djangoapps/user_authn/utils.py b/openedx/core/djangoapps/user_authn/utils.py index 7c47cabba9..bce494f0bf 100644 --- a/openedx/core/djangoapps/user_authn/utils.py +++ b/openedx/core/djangoapps/user_authn/utils.py @@ -1,7 +1,7 @@ """ Utility functions used during user authentication. """ -from __future__ import absolute_import + import random import string diff --git a/openedx/core/djangoapps/user_authn/views/auto_auth.py b/openedx/core/djangoapps/user_authn/views/auto_auth.py index 3db0f87cf2..4e24e3389f 100644 --- a/openedx/core/djangoapps/user_authn/views/auto_auth.py +++ b/openedx/core/djangoapps/user_authn/views/auto_auth.py @@ -1,5 +1,5 @@ """ Views related to auto auth. """ -from __future__ import absolute_import + import datetime import uuid diff --git a/openedx/core/djangoapps/user_authn/views/login.py b/openedx/core/djangoapps/user_authn/views/login.py index efabd7d571..d5b8e028f9 100644 --- a/openedx/core/djangoapps/user_authn/views/login.py +++ b/openedx/core/djangoapps/user_authn/views/login.py @@ -4,7 +4,7 @@ Views for login / logout and associated functionality Much of this file was broken out from views.py, previous history can be found there. """ -from __future__ import absolute_import + from functools import wraps import json diff --git a/openedx/core/djangoapps/user_authn/views/login_form.py b/openedx/core/djangoapps/user_authn/views/login_form.py index 6397103850..1d216ffc82 100644 --- a/openedx/core/djangoapps/user_authn/views/login_form.py +++ b/openedx/core/djangoapps/user_authn/views/login_form.py @@ -1,6 +1,6 @@ """ Login related views """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/user_authn/views/logout.py b/openedx/core/djangoapps/user_authn/views/logout.py index 1dc51d5744..466fb91ee7 100644 --- a/openedx/core/djangoapps/user_authn/views/logout.py +++ b/openedx/core/djangoapps/user_authn/views/logout.py @@ -1,5 +1,5 @@ """ Views related to logout. """ -from __future__ import absolute_import + import re diff --git a/openedx/core/djangoapps/user_authn/views/register.py b/openedx/core/djangoapps/user_authn/views/register.py index 6a3446e6d1..96c59e5372 100644 --- a/openedx/core/djangoapps/user_authn/views/register.py +++ b/openedx/core/djangoapps/user_authn/views/register.py @@ -2,7 +2,7 @@ Registration related views. """ -from __future__ import absolute_import + import datetime import json diff --git a/openedx/core/djangoapps/user_authn/views/registration_form.py b/openedx/core/djangoapps/user_authn/views/registration_form.py index 8d2bc5805a..76409659ab 100644 --- a/openedx/core/djangoapps/user_authn/views/registration_form.py +++ b/openedx/core/djangoapps/user_authn/views/registration_form.py @@ -1,7 +1,7 @@ """ Objects and utilities used to construct registration forms. """ -from __future__ import absolute_import + import copy from importlib import import_module diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py b/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py index 7e6527b350..d7020e55dc 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_auto_auth.py @@ -1,5 +1,5 @@ """ Tests for auto auth. """ -from __future__ import absolute_import + import json diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_login.py b/openedx/core/djangoapps/user_authn/views/tests/test_login.py index fc0fe5c6fb..1ecf325e7d 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_login.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_login.py @@ -2,7 +2,7 @@ """ Tests for student activation and login """ -from __future__ import absolute_import + import datetime import json diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py b/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py index d918cc2eb2..c09305e41c 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_logistration.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ Tests for Logistration views. """ -from __future__ import absolute_import + from http.cookies import SimpleCookie diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_logout.py b/openedx/core/djangoapps/user_authn/views/tests/test_logout.py index 5edd571a9c..dcbc92afe8 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_logout.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_logout.py @@ -1,7 +1,7 @@ """ Tests for logout """ -from __future__ import absolute_import + import unittest diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_register.py b/openedx/core/djangoapps/user_authn/views/tests/test_register.py index b4e8cce991..b810dd19db 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_register.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_register.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """Tests for account creation""" -from __future__ import absolute_import + import json from unittest import skipIf, skipUnless diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py index cca7a87a06..6ecf27ec64 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py @@ -1,7 +1,7 @@ """ Test the various password reset flows """ -from __future__ import absolute_import + import json import re diff --git a/openedx/core/djangoapps/util/apps.py b/openedx/core/djangoapps/util/apps.py index 83ecfe3905..51dac3287c 100644 --- a/openedx/core/djangoapps/util/apps.py +++ b/openedx/core/djangoapps/util/apps.py @@ -1,7 +1,7 @@ """ Configuration for the openedx.core.djangoapps.util Django application """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/core/djangoapps/util/forms.py b/openedx/core/djangoapps/util/forms.py index 8425e665e2..a98bfdc514 100644 --- a/openedx/core/djangoapps/util/forms.py +++ b/openedx/core/djangoapps/util/forms.py @@ -1,7 +1,7 @@ """ Custom forms-related types """ -from __future__ import absolute_import + from django.core.exceptions import ValidationError from django.forms import Field, MultipleHiddenInput, NullBooleanField, Select diff --git a/openedx/core/djangoapps/util/log_utils.py b/openedx/core/djangoapps/util/log_utils.py index 1d71b11f63..2ee2e6af8e 100644 --- a/openedx/core/djangoapps/util/log_utils.py +++ b/openedx/core/djangoapps/util/log_utils.py @@ -3,7 +3,7 @@ Django-based logging utilities UserIdFilter: A logging.Filter that adds userid to the logging context """ -from __future__ import absolute_import + from logging import Filter diff --git a/openedx/core/djangoapps/util/maintenance_banner.py b/openedx/core/djangoapps/util/maintenance_banner.py index e4eb9bbae4..f6be2769a7 100644 --- a/openedx/core/djangoapps/util/maintenance_banner.py +++ b/openedx/core/djangoapps/util/maintenance_banner.py @@ -1,7 +1,7 @@ """ View decorator to add a maintenance banner configured in settings. """ -from __future__ import absolute_import + from functools import wraps diff --git a/openedx/core/djangoapps/util/management/commands/print_setting.py b/openedx/core/djangoapps/util/management/commands/print_setting.py index d973e2ed4c..0938a037e9 100644 --- a/openedx/core/djangoapps/util/management/commands/print_setting.py +++ b/openedx/core/djangoapps/util/management/commands/print_setting.py @@ -9,7 +9,7 @@ Useful when paver or a shell script needs such a value. This handles the one specific use case of the "print_settings" command from django-extensions that we were actually using. """ -from __future__ import absolute_import, print_function + from django.conf import settings from django.core.management.base import BaseCommand, CommandError diff --git a/openedx/core/djangoapps/util/management/commands/reset_db.py b/openedx/core/djangoapps/util/management/commands/reset_db.py index da0e13308a..feea1cc7f2 100644 --- a/openedx/core/djangoapps/util/management/commands/reset_db.py +++ b/openedx/core/djangoapps/util/management/commands/reset_db.py @@ -12,7 +12,7 @@ django-extensions that we were actually using. originally from http://www.djangosnippets.org/snippets/828/ by dnordberg """ -from __future__ import absolute_import, print_function + import logging diff --git a/openedx/core/djangoapps/util/management/commands/update_fixtures.py b/openedx/core/djangoapps/util/management/commands/update_fixtures.py index de6c4ba58e..677621eee7 100644 --- a/openedx/core/djangoapps/util/management/commands/update_fixtures.py +++ b/openedx/core/djangoapps/util/management/commands/update_fixtures.py @@ -4,7 +4,7 @@ Django management command to update the loaded test fixtures as necessary for the current test environment. Currently just sets an appropriate domain for each Site fixture. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import os diff --git a/openedx/core/djangoapps/util/ratelimit.py b/openedx/core/djangoapps/util/ratelimit.py index 11a8d7bab5..9639d6e618 100644 --- a/openedx/core/djangoapps/util/ratelimit.py +++ b/openedx/core/djangoapps/util/ratelimit.py @@ -1,7 +1,7 @@ """ Code to get ip from request. """ -from __future__ import absolute_import + from ipware.ip import get_ip diff --git a/openedx/core/djangoapps/util/row_delete.py b/openedx/core/djangoapps/util/row_delete.py index c813e42cb2..b593a17880 100644 --- a/openedx/core/djangoapps/util/row_delete.py +++ b/openedx/core/djangoapps/util/row_delete.py @@ -1,7 +1,7 @@ """ Code to delete rows from a table within a Django mgmt command using best practices. """ -from __future__ import absolute_import + import logging import time diff --git a/openedx/core/djangoapps/util/signals.py b/openedx/core/djangoapps/util/signals.py index 71cfbeb050..17d0444da6 100644 --- a/openedx/core/djangoapps/util/signals.py +++ b/openedx/core/djangoapps/util/signals.py @@ -2,7 +2,7 @@ Signal handler for exceptions. """ # pylint: disable=unused-argument -from __future__ import absolute_import + import logging diff --git a/openedx/core/djangoapps/util/testing.py b/openedx/core/djangoapps/util/testing.py index fbba29c400..42e397d103 100644 --- a/openedx/core/djangoapps/util/testing.py +++ b/openedx/core/djangoapps/util/testing.py @@ -1,5 +1,5 @@ """ Mixins for setting up particular course structures (such as split tests or cohorted content) """ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/core/djangoapps/util/tests/test_print_setting.py b/openedx/core/djangoapps/util/tests/test_print_setting.py index 7ed62bff34..f7a3fc683c 100644 --- a/openedx/core/djangoapps/util/tests/test_print_setting.py +++ b/openedx/core/djangoapps/util/tests/test_print_setting.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + import pytest from django.core.management import CommandError, call_command diff --git a/openedx/core/djangoapps/util/tests/test_signals.py b/openedx/core/djangoapps/util/tests/test_signals.py index 25662a6412..4f8ff7abe3 100644 --- a/openedx/core/djangoapps/util/tests/test_signals.py +++ b/openedx/core/djangoapps/util/tests/test_signals.py @@ -1,5 +1,5 @@ # pylint: disable=no-member, missing-docstring -from __future__ import absolute_import + from unittest import TestCase from pytest import mark diff --git a/openedx/core/djangoapps/util/tests/test_update_fixtures.py b/openedx/core/djangoapps/util/tests/test_update_fixtures.py index d29d9997a1..b949033083 100644 --- a/openedx/core/djangoapps/util/tests/test_update_fixtures.py +++ b/openedx/core/djangoapps/util/tests/test_update_fixtures.py @@ -3,7 +3,7 @@ Tests of the update_fixtures management command for bok-choy test database initialization. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import os diff --git a/openedx/core/djangoapps/util/tests/test_user_messages.py b/openedx/core/djangoapps/util/tests/test_user_messages.py index 7eef9853b4..bfa08b9bf8 100644 --- a/openedx/core/djangoapps/util/tests/test_user_messages.py +++ b/openedx/core/djangoapps/util/tests/test_user_messages.py @@ -2,7 +2,7 @@ Unit tests for user messages. """ -from __future__ import absolute_import + import ddt from django.contrib.messages.middleware import MessageMiddleware diff --git a/openedx/core/djangoapps/util/tests/test_user_utils.py b/openedx/core/djangoapps/util/tests/test_user_utils.py index bdc9897fd8..f69cf63e03 100644 --- a/openedx/core/djangoapps/util/tests/test_user_utils.py +++ b/openedx/core/djangoapps/util/tests/test_user_utils.py @@ -1,6 +1,6 @@ """Tests for util.user_utils module.""" -from __future__ import absolute_import + import unittest diff --git a/openedx/core/djangoapps/util/user_messages.py b/openedx/core/djangoapps/util/user_messages.py index 271d755688..a40f031a93 100644 --- a/openedx/core/djangoapps/util/user_messages.py +++ b/openedx/core/djangoapps/util/user_messages.py @@ -13,7 +13,7 @@ There are two common use cases: the message will be shown on the subsequent page. This is typically used to show a success message to the use. """ -from __future__ import absolute_import + from abc import abstractmethod from enum import Enum diff --git a/openedx/core/djangoapps/util/user_utils.py b/openedx/core/djangoapps/util/user_utils.py index 0ac4c39f6c..e41e94a417 100644 --- a/openedx/core/djangoapps/util/user_utils.py +++ b/openedx/core/djangoapps/util/user_utils.py @@ -1,7 +1,7 @@ """ Custom user-related utility code. """ -from __future__ import absolute_import + from django.utils.encoding import python_2_unicode_compatible from django.contrib.auth.models import AnonymousUser diff --git a/openedx/core/djangoapps/util/waffle.py b/openedx/core/djangoapps/util/waffle.py index 1823041fdc..4d90de31fd 100644 --- a/openedx/core/djangoapps/util/waffle.py +++ b/openedx/core/djangoapps/util/waffle.py @@ -1,7 +1,7 @@ """ Waffle flags and switches """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace diff --git a/openedx/core/djangoapps/verified_track_content/admin.py b/openedx/core/djangoapps/verified_track_content/admin.py index b606c153df..65b124defc 100644 --- a/openedx/core/djangoapps/verified_track_content/admin.py +++ b/openedx/core/djangoapps/verified_track_content/admin.py @@ -1,7 +1,7 @@ """ Django admin page for verified track configuration """ -from __future__ import absolute_import + from django.contrib import admin diff --git a/openedx/core/djangoapps/verified_track_content/forms.py b/openedx/core/djangoapps/verified_track_content/forms.py index 76410c5239..4c342e0739 100644 --- a/openedx/core/djangoapps/verified_track_content/forms.py +++ b/openedx/core/djangoapps/verified_track_content/forms.py @@ -1,7 +1,7 @@ """ Forms for configuring courses for verified track cohorting """ -from __future__ import absolute_import + from django import forms from django.utils.translation import ugettext as _ diff --git a/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py b/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py index 50300c8efc..3aa1d08a6a 100644 --- a/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py +++ b/openedx/core/djangoapps/verified_track_content/management/commands/swap_from_auto_track_cohort_pilot.py @@ -1,5 +1,5 @@ """Management command to migrate a course's xblock's group_access from Verified Track Cohorts to Enrollment Tracks""" -from __future__ import absolute_import, print_function + from textwrap import dedent diff --git a/openedx/core/djangoapps/verified_track_content/migrations/0001_initial.py b/openedx/core/djangoapps/verified_track_content/migrations/0001_initial.py index 93c0fac551..261ae6cb19 100644 --- a/openedx/core/djangoapps/verified_track_content/migrations/0001_initial.py +++ b/openedx/core/djangoapps/verified_track_content/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField diff --git a/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py b/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py index 4d35148d7a..4c913996d4 100644 --- a/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py +++ b/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py b/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py index d69b6d29ee..72c6633e49 100644 --- a/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py +++ b/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/verified_track_content/models.py b/openedx/core/djangoapps/verified_track_content/models.py index 4472e5162c..0960106d06 100644 --- a/openedx/core/djangoapps/verified_track_content/models.py +++ b/openedx/core/djangoapps/verified_track_content/models.py @@ -1,7 +1,7 @@ """ Models for verified track selections. """ -from __future__ import absolute_import + import logging import six diff --git a/openedx/core/djangoapps/verified_track_content/partition_scheme.py b/openedx/core/djangoapps/verified_track_content/partition_scheme.py index c0579f7154..d106ff35ad 100644 --- a/openedx/core/djangoapps/verified_track_content/partition_scheme.py +++ b/openedx/core/djangoapps/verified_track_content/partition_scheme.py @@ -1,7 +1,7 @@ """ UserPartitionScheme for enrollment tracks. """ -from __future__ import absolute_import + import logging import six diff --git a/openedx/core/djangoapps/verified_track_content/tasks.py b/openedx/core/djangoapps/verified_track_content/tasks.py index 0c313de44e..7666494ccf 100644 --- a/openedx/core/djangoapps/verified_track_content/tasks.py +++ b/openedx/core/djangoapps/verified_track_content/tasks.py @@ -1,7 +1,7 @@ """ Celery task for Automatic Verifed Track Cohorting MVP feature. """ -from __future__ import absolute_import + import six diff --git a/openedx/core/djangoapps/verified_track_content/tests/test_forms.py b/openedx/core/djangoapps/verified_track_content/tests/test_forms.py index 313ea51198..c9b4d02bd5 100644 --- a/openedx/core/djangoapps/verified_track_content/tests/test_forms.py +++ b/openedx/core/djangoapps/verified_track_content/tests/test_forms.py @@ -1,7 +1,7 @@ """ Test for forms helpers. """ -from __future__ import absolute_import + from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase diff --git a/openedx/core/djangoapps/verified_track_content/tests/test_models.py b/openedx/core/djangoapps/verified_track_content/tests/test_models.py index 8db4994ae6..df076d28f3 100644 --- a/openedx/core/djangoapps/verified_track_content/tests/test_models.py +++ b/openedx/core/djangoapps/verified_track_content/tests/test_models.py @@ -3,7 +3,7 @@ Tests for Verified Track Cohorting models """ # pylint: disable=attribute-defined-outside-init -from __future__ import absolute_import + import ddt import mock diff --git a/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py b/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py index f030146da2..a6213454cf 100644 --- a/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py +++ b/openedx/core/djangoapps/verified_track_content/tests/test_partition_scheme.py @@ -1,7 +1,7 @@ """ Tests for verified_track_content/partition_scheme.py. """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/core/djangoapps/verified_track_content/tests/test_views.py b/openedx/core/djangoapps/verified_track_content/tests/test_views.py index 82c52ff1e7..303e6a64e9 100644 --- a/openedx/core/djangoapps/verified_track_content/tests/test_views.py +++ b/openedx/core/djangoapps/verified_track_content/tests/test_views.py @@ -2,7 +2,7 @@ Tests for verified track content views. """ -from __future__ import absolute_import + import json import six diff --git a/openedx/core/djangoapps/verified_track_content/views.py b/openedx/core/djangoapps/verified_track_content/views.py index 1a76c2711e..cf555456ff 100644 --- a/openedx/core/djangoapps/verified_track_content/views.py +++ b/openedx/core/djangoapps/verified_track_content/views.py @@ -2,7 +2,7 @@ View methods for verified track content. """ -from __future__ import absolute_import + from django.contrib.auth.decorators import login_required from opaque_keys.edx.keys import CourseKey diff --git a/openedx/core/djangoapps/video_config/admin.py b/openedx/core/djangoapps/video_config/admin.py index e34439048c..49de9c4b18 100644 --- a/openedx/core/djangoapps/video_config/admin.py +++ b/openedx/core/djangoapps/video_config/admin.py @@ -2,7 +2,7 @@ Django admin dashboard configuration for Video XModule. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/video_config/forms.py b/openedx/core/djangoapps/video_config/forms.py index a5d634f566..44bb835476 100644 --- a/openedx/core/djangoapps/video_config/forms.py +++ b/openedx/core/djangoapps/video_config/forms.py @@ -1,7 +1,7 @@ """ Defines a form for providing validation of HLS Playback course-specific configuration. """ -from __future__ import absolute_import + import logging from django import forms diff --git a/openedx/core/djangoapps/video_config/migrations/0001_initial.py b/openedx/core/djangoapps/video_config/migrations/0001_initial.py index d6b53c00d5..1403910119 100644 --- a/openedx/core/djangoapps/video_config/migrations/0001_initial.py +++ b/openedx/core/djangoapps/video_config/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from django.conf import settings diff --git a/openedx/core/djangoapps/video_config/migrations/0002_coursevideotranscriptenabledflag_videotranscriptenabledflag.py b/openedx/core/djangoapps/video_config/migrations/0002_coursevideotranscriptenabledflag_videotranscriptenabledflag.py index 032e540d55..f02f6f1d52 100644 --- a/openedx/core/djangoapps/video_config/migrations/0002_coursevideotranscriptenabledflag_videotranscriptenabledflag.py +++ b/openedx/core/djangoapps/video_config/migrations/0002_coursevideotranscriptenabledflag_videotranscriptenabledflag.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models from django.conf import settings diff --git a/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py b/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py index a47200a165..136ec8f245 100644 --- a/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py +++ b/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.db.models.deletion diff --git a/openedx/core/djangoapps/video_config/migrations/0004_transcriptmigrationsetting_command_run.py b/openedx/core/djangoapps/video_config/migrations/0004_transcriptmigrationsetting_command_run.py index 8be346620e..f454bfe987 100644 --- a/openedx/core/djangoapps/video_config/migrations/0004_transcriptmigrationsetting_command_run.py +++ b/openedx/core/djangoapps/video_config/migrations/0004_transcriptmigrationsetting_command_run.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-25 12:54 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/video_config/migrations/0005_auto_20180719_0752.py b/openedx/core/djangoapps/video_config/migrations/0005_auto_20180719_0752.py index 7002e9f1d4..ede5378049 100644 --- a/openedx/core/djangoapps/video_config/migrations/0005_auto_20180719_0752.py +++ b/openedx/core/djangoapps/video_config/migrations/0005_auto_20180719_0752.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-19 07:52 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models import django.utils.timezone diff --git a/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py b/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py index cf29bbf9d8..efd2a767a6 100644 --- a/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py +++ b/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 19:13 -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/video_config/migrations/0007_videothumbnailsetting_offset.py b/openedx/core/djangoapps/video_config/migrations/0007_videothumbnailsetting_offset.py index ee7eb17ca9..59e39443cd 100644 --- a/openedx/core/djangoapps/video_config/migrations/0007_videothumbnailsetting_offset.py +++ b/openedx/core/djangoapps/video_config/migrations/0007_videothumbnailsetting_offset.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-09-25 13:41 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/core/djangoapps/video_config/migrations/0008_courseyoutubeblockedflag.py b/openedx/core/djangoapps/video_config/migrations/0008_courseyoutubeblockedflag.py index 6047011c02..edff02f447 100644 --- a/openedx/core/djangoapps/video_config/migrations/0008_courseyoutubeblockedflag.py +++ b/openedx/core/djangoapps/video_config/migrations/0008_courseyoutubeblockedflag.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-08-25 16:11 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/video_config/models.py b/openedx/core/djangoapps/video_config/models.py index f77aad6e8d..fad795d61b 100644 --- a/openedx/core/djangoapps/video_config/models.py +++ b/openedx/core/djangoapps/video_config/models.py @@ -1,7 +1,7 @@ """ Configuration models for Video XModule """ -from __future__ import absolute_import + import six from config_models.models import ConfigurationModel diff --git a/openedx/core/djangoapps/video_config/tests/test_models.py b/openedx/core/djangoapps/video_config/tests/test_models.py index 28caeaaebe..fb63d0afad 100644 --- a/openedx/core/djangoapps/video_config/tests/test_models.py +++ b/openedx/core/djangoapps/video_config/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the models that configures HLS Playback feature. """ -from __future__ import absolute_import + import ddt import itertools diff --git a/openedx/core/djangoapps/video_pipeline/admin.py b/openedx/core/djangoapps/video_pipeline/admin.py index 2f97b4170d..8871157061 100644 --- a/openedx/core/djangoapps/video_pipeline/admin.py +++ b/openedx/core/djangoapps/video_pipeline/admin.py @@ -1,7 +1,7 @@ """ Django admin for Video Pipeline models. """ -from __future__ import absolute_import + from config_models.admin import ConfigurationModelAdmin from django.contrib import admin diff --git a/openedx/core/djangoapps/video_pipeline/api.py b/openedx/core/djangoapps/video_pipeline/api.py index 89d1fd08f2..81083bbee6 100644 --- a/openedx/core/djangoapps/video_pipeline/api.py +++ b/openedx/core/djangoapps/video_pipeline/api.py @@ -1,7 +1,7 @@ """ API utils in order to communicate to edx-video-pipeline. """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/video_pipeline/config/waffle.py b/openedx/core/djangoapps/video_pipeline/config/waffle.py index f7118fdf09..022ce38de9 100644 --- a/openedx/core/djangoapps/video_pipeline/config/waffle.py +++ b/openedx/core/djangoapps/video_pipeline/config/waffle.py @@ -2,7 +2,7 @@ This module contains configuration settings via waffle flags for the Video Pipeline app. """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleFlagNamespace, CourseWaffleFlag # Videos Namespace diff --git a/openedx/core/djangoapps/video_pipeline/forms.py b/openedx/core/djangoapps/video_pipeline/forms.py index 13a1887fb4..b35d16b9df 100644 --- a/openedx/core/djangoapps/video_pipeline/forms.py +++ b/openedx/core/djangoapps/video_pipeline/forms.py @@ -1,7 +1,7 @@ """ Defines a form to provide validations for course-specific configuration. """ -from __future__ import absolute_import + from openedx.core.djangoapps.video_config.forms import CourseSpecificFlagAdminBaseForm from openedx.core.djangoapps.video_pipeline.models import CourseVideoUploadsEnabledByDefault diff --git a/openedx/core/djangoapps/video_pipeline/management/commands/create_video_pipeline_integration.py b/openedx/core/djangoapps/video_pipeline/management/commands/create_video_pipeline_integration.py index 37f513f132..269f3f17d1 100644 --- a/openedx/core/djangoapps/video_pipeline/management/commands/create_video_pipeline_integration.py +++ b/openedx/core/djangoapps/video_pipeline/management/commands/create_video_pipeline_integration.py @@ -2,7 +2,7 @@ Management command `create_video_pipeline_integration` is used to create video pipeline integration record. """ -from __future__ import absolute_import + from openedx.core.djangoapps.video_pipeline.models import VideoPipelineIntegration from django.core.management.base import BaseCommand diff --git a/openedx/core/djangoapps/video_pipeline/management/commands/tests/test_create_video_pipeline_integration.py b/openedx/core/djangoapps/video_pipeline/management/commands/tests/test_create_video_pipeline_integration.py index fe2b425869..c7876b94d5 100644 --- a/openedx/core/djangoapps/video_pipeline/management/commands/tests/test_create_video_pipeline_integration.py +++ b/openedx/core/djangoapps/video_pipeline/management/commands/tests/test_create_video_pipeline_integration.py @@ -2,7 +2,7 @@ Tests for create_video_pipeline_integration management command. """ -from __future__ import absolute_import + import ddt from django.core.management import call_command from django.test import TestCase diff --git a/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py b/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py index 0966beb8c8..d1d747809c 100644 --- a/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py +++ b/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import django.db.models.deletion from django.conf import settings diff --git a/openedx/core/djangoapps/video_pipeline/migrations/0002_auto_20171114_0704.py b/openedx/core/djangoapps/video_pipeline/migrations/0002_auto_20171114_0704.py index 18e120c640..de05e13da9 100644 --- a/openedx/core/djangoapps/video_pipeline/migrations/0002_auto_20171114_0704.py +++ b/openedx/core/djangoapps/video_pipeline/migrations/0002_auto_20171114_0704.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models diff --git a/openedx/core/djangoapps/video_pipeline/migrations/0003_coursevideouploadsenabledbydefault_videouploadsenabledbydefault.py b/openedx/core/djangoapps/video_pipeline/migrations/0003_coursevideouploadsenabledbydefault_videouploadsenabledbydefault.py index d8294c18df..846a3f5a46 100644 --- a/openedx/core/djangoapps/video_pipeline/migrations/0003_coursevideouploadsenabledbydefault_videouploadsenabledbydefault.py +++ b/openedx/core/djangoapps/video_pipeline/migrations/0003_coursevideouploadsenabledbydefault_videouploadsenabledbydefault.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models from django.conf import settings import django.db.models.deletion diff --git a/openedx/core/djangoapps/video_pipeline/models.py b/openedx/core/djangoapps/video_pipeline/models.py index 6048ecd2dc..fb312c3c42 100644 --- a/openedx/core/djangoapps/video_pipeline/models.py +++ b/openedx/core/djangoapps/video_pipeline/models.py @@ -1,7 +1,7 @@ """ Model to hold edx-video-pipeline configurations. """ -from __future__ import absolute_import + from config_models.models import ConfigurationModel from django.contrib.auth import get_user_model from django.db import models diff --git a/openedx/core/djangoapps/video_pipeline/tests/mixins.py b/openedx/core/djangoapps/video_pipeline/tests/mixins.py index c5efa24aee..46cb01ec99 100644 --- a/openedx/core/djangoapps/video_pipeline/tests/mixins.py +++ b/openedx/core/djangoapps/video_pipeline/tests/mixins.py @@ -1,7 +1,7 @@ """ Mixins to test video pipeline integration. """ -from __future__ import absolute_import + from provider.constants import CONFIDENTIAL from provider.oauth2.models import Client diff --git a/openedx/core/djangoapps/video_pipeline/tests/test_api.py b/openedx/core/djangoapps/video_pipeline/tests/test_api.py index ae0840ab49..d93ea3df30 100644 --- a/openedx/core/djangoapps/video_pipeline/tests/test_api.py +++ b/openedx/core/djangoapps/video_pipeline/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests for Video Pipeline api utils. """ -from __future__ import absolute_import + import ddt import json from mock import Mock, patch diff --git a/openedx/core/djangoapps/video_pipeline/tests/test_models.py b/openedx/core/djangoapps/video_pipeline/tests/test_models.py index eab7e93bab..313c78e97a 100644 --- a/openedx/core/djangoapps/video_pipeline/tests/test_models.py +++ b/openedx/core/djangoapps/video_pipeline/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for the models that configures 'VideoUploadsEnabledByDefault' feature. """ -from __future__ import absolute_import + import ddt import itertools diff --git a/openedx/core/djangoapps/video_pipeline/utils.py b/openedx/core/djangoapps/video_pipeline/utils.py index 21dac665a7..72850943fd 100644 --- a/openedx/core/djangoapps/video_pipeline/utils.py +++ b/openedx/core/djangoapps/video_pipeline/utils.py @@ -1,7 +1,7 @@ """ Utils for video_pipeline app. """ -from __future__ import absolute_import + from edx_rest_api_client.client import EdxRestApiClient from openedx.core.djangoapps.oauth_dispatch.jwt import create_jwt_for_user diff --git a/openedx/core/djangoapps/waffle_utils/__init__.py b/openedx/core/djangoapps/waffle_utils/__init__.py index 88531aaf87..6600502f41 100644 --- a/openedx/core/djangoapps/waffle_utils/__init__.py +++ b/openedx/core/djangoapps/waffle_utils/__init__.py @@ -60,7 +60,7 @@ can't yet be deleted, for example if there are straggling course overrides. than implicit. """ -from __future__ import absolute_import + import crum import logging from abc import ABCMeta diff --git a/openedx/core/djangoapps/waffle_utils/admin.py b/openedx/core/djangoapps/waffle_utils/admin.py index 59258f2c1e..e72e1ca64e 100644 --- a/openedx/core/djangoapps/waffle_utils/admin.py +++ b/openedx/core/djangoapps/waffle_utils/admin.py @@ -1,7 +1,7 @@ """ Django admin page for waffle utils models """ -from __future__ import absolute_import + from django.contrib import admin from config_models.admin import KeyedConfigurationModelAdmin diff --git a/openedx/core/djangoapps/waffle_utils/forms.py b/openedx/core/djangoapps/waffle_utils/forms.py index bed1101baa..e8472fb32b 100644 --- a/openedx/core/djangoapps/waffle_utils/forms.py +++ b/openedx/core/djangoapps/waffle_utils/forms.py @@ -1,7 +1,7 @@ """ Defines a form for providing validation of subsection grade templates. """ -from __future__ import absolute_import + from django import forms from openedx.core.lib.courses import clean_course_id diff --git a/openedx/core/djangoapps/waffle_utils/migrations/0001_initial.py b/openedx/core/djangoapps/waffle_utils/migrations/0001_initial.py index 5c87be81ea..64b3f3671e 100644 --- a/openedx/core/djangoapps/waffle_utils/migrations/0001_initial.py +++ b/openedx/core/djangoapps/waffle_utils/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + import django.db.models.deletion from django.conf import settings from django.db import migrations, models diff --git a/openedx/core/djangoapps/waffle_utils/models.py b/openedx/core/djangoapps/waffle_utils/models.py index e1a2321cac..1d2c3e942e 100644 --- a/openedx/core/djangoapps/waffle_utils/models.py +++ b/openedx/core/djangoapps/waffle_utils/models.py @@ -1,7 +1,7 @@ """ Models for configuring waffle utils. """ -from __future__ import absolute_import + from django.db.models import CharField from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/core/djangoapps/waffle_utils/tests/test_init.py b/openedx/core/djangoapps/waffle_utils/tests/test_init.py index 8d005c0dca..3cc1d6c6e2 100644 --- a/openedx/core/djangoapps/waffle_utils/tests/test_init.py +++ b/openedx/core/djangoapps/waffle_utils/tests/test_init.py @@ -1,7 +1,7 @@ """ Tests for waffle utils features. """ -from __future__ import absolute_import + import crum import ddt from django.test import TestCase diff --git a/openedx/core/djangoapps/waffle_utils/tests/test_models.py b/openedx/core/djangoapps/waffle_utils/tests/test_models.py index 965eea16f3..33919c3d0d 100644 --- a/openedx/core/djangoapps/waffle_utils/tests/test_models.py +++ b/openedx/core/djangoapps/waffle_utils/tests/test_models.py @@ -1,7 +1,7 @@ """ Tests for waffle utils models. """ -from __future__ import absolute_import + from ddt import data, ddt, unpack from django.test import TestCase from edx_django_utils.cache import RequestCache diff --git a/openedx/core/djangoapps/waffle_utils/tests/test_testutils.py b/openedx/core/djangoapps/waffle_utils/tests/test_testutils.py index 8a307b0286..e26c1ecc22 100644 --- a/openedx/core/djangoapps/waffle_utils/tests/test_testutils.py +++ b/openedx/core/djangoapps/waffle_utils/tests/test_testutils.py @@ -2,7 +2,7 @@ Tests for waffle utils test utilities. """ -from __future__ import absolute_import + import crum from django.test import TestCase from django.test.client import RequestFactory diff --git a/openedx/core/djangoapps/waffle_utils/testutils.py b/openedx/core/djangoapps/waffle_utils/testutils.py index 03487dc4f0..0f52fd6992 100644 --- a/openedx/core/djangoapps/waffle_utils/testutils.py +++ b/openedx/core/djangoapps/waffle_utils/testutils.py @@ -2,7 +2,7 @@ Test utilities for waffle utilities. """ -from __future__ import absolute_import + from waffle.testutils import override_flag # Can be used with FilteredQueryCountMixin.assertNumQueries() to blacklist diff --git a/openedx/core/djangoapps/xblock/api.py b/openedx/core/djangoapps/xblock/api.py index 22b11f5184..000477e4fa 100644 --- a/openedx/core/djangoapps/xblock/api.py +++ b/openedx/core/djangoapps/xblock/api.py @@ -7,7 +7,7 @@ the older runtime. Note that these views are only for interacting with existing blocks. Other Studio APIs cover use cases like adding/deleting/editing blocks. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging from django.urls import reverse diff --git a/openedx/core/djangoapps/xblock/apps.py b/openedx/core/djangoapps/xblock/apps.py index 3490aabae1..5a4f72be43 100644 --- a/openedx/core/djangoapps/xblock/apps.py +++ b/openedx/core/djangoapps/xblock/apps.py @@ -1,7 +1,7 @@ """ Django app configuration for the XBlock Runtime django app """ -from __future__ import absolute_import, division, print_function, unicode_literals + from django.apps import AppConfig, apps from django.conf import settings diff --git a/openedx/core/djangoapps/xblock/learning_context/learning_context.py b/openedx/core/djangoapps/xblock/learning_context/learning_context.py index b4e275e13e..9cd6300490 100644 --- a/openedx/core/djangoapps/xblock/learning_context/learning_context.py +++ b/openedx/core/djangoapps/xblock/learning_context/learning_context.py @@ -2,7 +2,7 @@ A "Learning Context" is a course, a library, a program, or some other collection of content where learning happens. """ -from __future__ import absolute_import, division, print_function, unicode_literals + class LearningContext(object): diff --git a/openedx/core/djangoapps/xblock/learning_context/manager.py b/openedx/core/djangoapps/xblock/learning_context/manager.py index f6eb3c701f..03a0837463 100644 --- a/openedx/core/djangoapps/xblock/learning_context/manager.py +++ b/openedx/core/djangoapps/xblock/learning_context/manager.py @@ -1,7 +1,7 @@ """ Helper methods for working with learning contexts """ -from __future__ import absolute_import, division, print_function, unicode_literals + from opaque_keys.edx.keys import LearningContextKey, UsageKeyV2 diff --git a/openedx/core/djangoapps/xblock/rest_api/views.py b/openedx/core/djangoapps/xblock/rest_api/views.py index 070656f264..939c663b7b 100644 --- a/openedx/core/djangoapps/xblock/rest_api/views.py +++ b/openedx/core/djangoapps/xblock/rest_api/views.py @@ -4,7 +4,7 @@ Views that implement a RESTful API for interacting with XBlocks. Note that these views are only for interacting with existing blocks. Other Studio APIs cover use cases like adding/deleting/editing blocks. """ -from __future__ import absolute_import, division, print_function, unicode_literals + from django.contrib.auth import get_user_model from django.views.decorators.clickjacking import xframe_options_exempt diff --git a/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py b/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py index 64f706420d..4b35abc687 100644 --- a/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py +++ b/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py @@ -1,7 +1,7 @@ """ Key-value store that holds XBlock field data read out of Blockstore """ -from __future__ import absolute_import, division, print_function, unicode_literals + from collections import namedtuple from weakref import WeakKeyDictionary import logging diff --git a/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py b/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py index 4e75bd489b..e49b48b7c0 100644 --- a/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py +++ b/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py @@ -2,7 +2,7 @@ A runtime designed to work with Blockstore, reading and writing XBlock field data directly from Blockstore. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging import os.path diff --git a/openedx/core/djangoapps/xblock/runtime/ephemeral_field_data.py b/openedx/core/djangoapps/xblock/runtime/ephemeral_field_data.py index 1863fa357a..bda64dde0e 100644 --- a/openedx/core/djangoapps/xblock/runtime/ephemeral_field_data.py +++ b/openedx/core/djangoapps/xblock/runtime/ephemeral_field_data.py @@ -15,7 +15,7 @@ personally identifiable information (PII) so if some security bug results in one user accessing a different user's entries in this particular store, it's not a big deal. """ -from __future__ import absolute_import, division, print_function, unicode_literals + from django.conf import settings from django.core.cache import caches diff --git a/openedx/core/djangoapps/xblock/runtime/id_managers.py b/openedx/core/djangoapps/xblock/runtime/id_managers.py index 2ba498eef3..53891c4fa9 100644 --- a/openedx/core/djangoapps/xblock/runtime/id_managers.py +++ b/openedx/core/djangoapps/xblock/runtime/id_managers.py @@ -2,7 +2,7 @@ Implementation of the APIs required for XBlock runtimes to work with our newer Open edX-specific opaque key formats. """ -from __future__ import absolute_import, division, print_function, unicode_literals + from opaque_keys.edx.keys import UsageKeyV2 from xblock.runtime import IdReader diff --git a/openedx/core/djangoapps/xblock/runtime/mixin.py b/openedx/core/djangoapps/xblock/runtime/mixin.py index 00499e884b..7bc14de1ea 100644 --- a/openedx/core/djangoapps/xblock/runtime/mixin.py +++ b/openedx/core/djangoapps/xblock/runtime/mixin.py @@ -2,7 +2,7 @@ A mixin that provides functionality and default attributes for all XBlocks in the new XBlock runtime. """ -from __future__ import absolute_import, division, print_function, unicode_literals + from django.utils.translation import ugettext as _ from xblock.core import XBlock, XBlockMixin diff --git a/openedx/core/djangoapps/xblock/runtime/olx_parsing.py b/openedx/core/djangoapps/xblock/runtime/olx_parsing.py index edb1e75963..e4a27e996b 100644 --- a/openedx/core/djangoapps/xblock/runtime/olx_parsing.py +++ b/openedx/core/djangoapps/xblock/runtime/olx_parsing.py @@ -1,7 +1,7 @@ """ Helpful methods to use when parsing OLX (XBlock XML) """ -from __future__ import absolute_import, division, print_function, unicode_literals + from collections import namedtuple from opaque_keys.edx.locator import BundleDefinitionLocator diff --git a/openedx/core/djangoapps/xblock/runtime/runtime.py b/openedx/core/djangoapps/xblock/runtime/runtime.py index baf0796746..10186ebc9f 100644 --- a/openedx/core/djangoapps/xblock/runtime/runtime.py +++ b/openedx/core/djangoapps/xblock/runtime/runtime.py @@ -1,7 +1,7 @@ """ Common base classes for all new XBlock runtimes. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import logging from completion import waffle as completion_waffle diff --git a/openedx/core/djangoapps/xblock/runtime/serializer.py b/openedx/core/djangoapps/xblock/runtime/serializer.py index edbddf4b42..4a6489c831 100644 --- a/openedx/core/djangoapps/xblock/runtime/serializer.py +++ b/openedx/core/djangoapps/xblock/runtime/serializer.py @@ -1,7 +1,7 @@ """ Code to serialize an XBlock to OLX """ -from __future__ import absolute_import, division, print_function, unicode_literals + from collections import namedtuple from contextlib import contextmanager import logging diff --git a/openedx/core/djangoapps/xblock/runtime/shims.py b/openedx/core/djangoapps/xblock/runtime/shims.py index 21b818a3ec..c9c172b4d9 100644 --- a/openedx/core/djangoapps/xblock/runtime/shims.py +++ b/openedx/core/djangoapps/xblock/runtime/shims.py @@ -2,7 +2,7 @@ Code to implement backwards compatibility """ # pylint: disable=no-member -from __future__ import absolute_import, division, print_function, unicode_literals + import hashlib import warnings diff --git a/openedx/core/djangoapps/xblock/utils.py b/openedx/core/djangoapps/xblock/utils.py index e3b535de22..359433774f 100644 --- a/openedx/core/djangoapps/xblock/utils.py +++ b/openedx/core/djangoapps/xblock/utils.py @@ -1,7 +1,7 @@ """ Useful helper methods related to the XBlock runtime """ -from __future__ import absolute_import, division, print_function, unicode_literals + import hashlib import hmac import math diff --git a/openedx/core/djangoapps/xmodule_django/models.py b/openedx/core/djangoapps/xmodule_django/models.py index 0899b95f2a..047fc86578 100644 --- a/openedx/core/djangoapps/xmodule_django/models.py +++ b/openedx/core/djangoapps/xmodule_django/models.py @@ -1,7 +1,7 @@ """ Useful django models for implementing XBlock infrastructure in django. """ -from __future__ import absolute_import + import logging import warnings diff --git a/openedx/core/djangoapps/zendesk_proxy/apps.py b/openedx/core/djangoapps/zendesk_proxy/apps.py index 373622c862..5043ee8635 100644 --- a/openedx/core/djangoapps/zendesk_proxy/apps.py +++ b/openedx/core/djangoapps/zendesk_proxy/apps.py @@ -3,7 +3,7 @@ Zendesk Proxy Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType, PluginURLs, PluginSettings diff --git a/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py b/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py index 16bc039e36..963fc2bd11 100644 --- a/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py +++ b/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py @@ -2,7 +2,7 @@ Tests of Zendesk interaction utility functions """ -from __future__ import absolute_import + import json from collections import OrderedDict diff --git a/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py b/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py index 69a648e084..26dd2644d3 100644 --- a/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py +++ b/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py @@ -1,5 +1,5 @@ """Tests for zendesk_proxy views.""" -from __future__ import absolute_import + from copy import deepcopy import json diff --git a/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py b/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py index d7f5525a45..e6a69b5caa 100644 --- a/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py +++ b/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py @@ -1,6 +1,6 @@ """Tests for zendesk_proxy views.""" -from __future__ import absolute_import + from copy import deepcopy import json diff --git a/openedx/core/djangoapps/zendesk_proxy/urls.py b/openedx/core/djangoapps/zendesk_proxy/urls.py index bb7712467a..751ec0071b 100644 --- a/openedx/core/djangoapps/zendesk_proxy/urls.py +++ b/openedx/core/djangoapps/zendesk_proxy/urls.py @@ -2,7 +2,7 @@ Map urls to the relevant view handlers """ -from __future__ import absolute_import + from django.conf.urls import url from openedx.core.djangoapps.zendesk_proxy.v0.views import ZendeskPassthroughView as v0_view diff --git a/openedx/core/djangoapps/zendesk_proxy/utils.py b/openedx/core/djangoapps/zendesk_proxy/utils.py index 5f0c50ef89..01b4c2c334 100644 --- a/openedx/core/djangoapps/zendesk_proxy/utils.py +++ b/openedx/core/djangoapps/zendesk_proxy/utils.py @@ -2,7 +2,7 @@ Utility functions for zendesk interaction. """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/djangoapps/zendesk_proxy/v0/views.py b/openedx/core/djangoapps/zendesk_proxy/v0/views.py index 82426226d2..cbec063975 100644 --- a/openedx/core/djangoapps/zendesk_proxy/v0/views.py +++ b/openedx/core/djangoapps/zendesk_proxy/v0/views.py @@ -1,7 +1,7 @@ """ Define request handlers used by the zendesk_proxy djangoapp """ -from __future__ import absolute_import + from rest_framework import status from rest_framework.parsers import JSONParser from rest_framework.response import Response diff --git a/openedx/core/djangoapps/zendesk_proxy/v1/views.py b/openedx/core/djangoapps/zendesk_proxy/v1/views.py index 156b0996a8..0899a3a797 100644 --- a/openedx/core/djangoapps/zendesk_proxy/v1/views.py +++ b/openedx/core/djangoapps/zendesk_proxy/v1/views.py @@ -1,7 +1,7 @@ """ Define request handlers used by the zendesk_proxy djangoapp """ -from __future__ import absolute_import + from rest_framework import status from rest_framework.parsers import JSONParser from rest_framework.response import Response diff --git a/openedx/core/djangolib/blockstore_cache.py b/openedx/core/djangolib/blockstore_cache.py index 87fb303c9e..c1d12d99c3 100644 --- a/openedx/core/djangolib/blockstore_cache.py +++ b/openedx/core/djangolib/blockstore_cache.py @@ -8,7 +8,7 @@ This cache prefixes all keys with the bundle/draft version number, so that when any change is made to the bundle/draft, we will look up entries using a new key and won't find the now-invalid cached data. """ -from __future__ import absolute_import, division, print_function, unicode_literals + from datetime import datetime from uuid import UUID diff --git a/openedx/core/djangolib/fields.py b/openedx/core/djangolib/fields.py index a15bcd1a21..6745925191 100644 --- a/openedx/core/djangolib/fields.py +++ b/openedx/core/djangolib/fields.py @@ -1,7 +1,7 @@ """ Custom Django fields. """ -from __future__ import absolute_import + from django.db import models diff --git a/openedx/core/djangolib/js_utils.py b/openedx/core/djangolib/js_utils.py index aa43451133..66e42cb326 100644 --- a/openedx/core/djangolib/js_utils.py +++ b/openedx/core/djangolib/js_utils.py @@ -1,7 +1,7 @@ """ Utilities for dealing with Javascript and JSON. """ -from __future__ import absolute_import + import json from django.utils.html import escapejs diff --git a/openedx/core/djangolib/markup.py b/openedx/core/djangolib/markup.py index b99fdd3991..c214728d89 100644 --- a/openedx/core/djangolib/markup.py +++ b/openedx/core/djangolib/markup.py @@ -2,7 +2,7 @@ Utilities for use in Mako markup. """ -from __future__ import absolute_import + import markupsafe import bleach from lxml.html.clean import Cleaner diff --git a/openedx/core/djangolib/oauth2_retirement_utils.py b/openedx/core/djangolib/oauth2_retirement_utils.py index 6e2ee15672..f1577695f6 100644 --- a/openedx/core/djangolib/oauth2_retirement_utils.py +++ b/openedx/core/djangolib/oauth2_retirement_utils.py @@ -2,7 +2,7 @@ Removes user PII from OAuth2 models. """ -from __future__ import absolute_import + from oauth2_provider.models import ( AccessToken as DOTAccessToken, Application as DOTApplication, diff --git a/openedx/core/djangolib/testing/tests/test_utils.py b/openedx/core/djangolib/testing/tests/test_utils.py index 951bba414e..30b33f8f91 100644 --- a/openedx/core/djangolib/testing/tests/test_utils.py +++ b/openedx/core/djangolib/testing/tests/test_utils.py @@ -1,7 +1,7 @@ """ Test that testing utils do what they say. """ -from __future__ import absolute_import + from crum import set_current_request from django.contrib.auth import get_user_model diff --git a/openedx/core/djangolib/testing/utils.py b/openedx/core/djangolib/testing/utils.py index e194768225..b2cb8fb155 100644 --- a/openedx/core/djangolib/testing/utils.py +++ b/openedx/core/djangolib/testing/utils.py @@ -8,7 +8,7 @@ Utility classes for testing django applications. A TestCase baseclass that has per-test isolated caches. """ -from __future__ import absolute_import + import copy import re from unittest import skipUnless diff --git a/openedx/core/djangolib/tests/test_blockstore_cache.py b/openedx/core/djangolib/tests/test_blockstore_cache.py index d35040aa93..59b3f19e7c 100644 --- a/openedx/core/djangolib/tests/test_blockstore_cache.py +++ b/openedx/core/djangolib/tests/test_blockstore_cache.py @@ -2,7 +2,7 @@ """ Tests for BundleCache """ -from __future__ import absolute_import, division, print_function, unicode_literals + import unittest from django.conf import settings diff --git a/openedx/core/djangolib/tests/test_js_utils.py b/openedx/core/djangolib/tests/test_js_utils.py index 7ab333d577..0f45752abb 100644 --- a/openedx/core/djangolib/tests/test_js_utils.py +++ b/openedx/core/djangolib/tests/test_js_utils.py @@ -3,7 +3,7 @@ """ Tests for js_utils.py """ -from __future__ import absolute_import + import re import six.moves.html_parser # pylint: disable=import-error import json diff --git a/openedx/core/djangolib/tests/test_markup.py b/openedx/core/djangolib/tests/test_markup.py index d3c2453dfa..b985a28827 100644 --- a/openedx/core/djangolib/tests/test_markup.py +++ b/openedx/core/djangolib/tests/test_markup.py @@ -3,7 +3,7 @@ Tests for openedx.core.djangolib.markup """ -from __future__ import absolute_import + import unittest import ddt diff --git a/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py b/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py index aa150ec77e..8316bc98e4 100644 --- a/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py +++ b/openedx/core/djangolib/tests/test_oauth2_retirement_utils.py @@ -2,7 +2,7 @@ Contains tests for OAuth2 model-retirement methods. """ -from __future__ import absolute_import + import datetime from django.test import TestCase diff --git a/openedx/core/djangolib/tests/test_translation_utils.py b/openedx/core/djangolib/tests/test_translation_utils.py index af88277c28..a2eb4a769f 100644 --- a/openedx/core/djangolib/tests/test_translation_utils.py +++ b/openedx/core/djangolib/tests/test_translation_utils.py @@ -3,7 +3,7 @@ Tests for openedx.core.djangolib.translation_utils """ -from __future__ import absolute_import + import unittest import datetime diff --git a/openedx/core/djangolib/translation_utils.py b/openedx/core/djangolib/translation_utils.py index 9f8a8b6ac1..23f635ce2c 100644 --- a/openedx/core/djangolib/translation_utils.py +++ b/openedx/core/djangolib/translation_utils.py @@ -2,7 +2,7 @@ i18n utility functions """ -from __future__ import absolute_import + from django.utils.translation import ugettext as _, override from django.utils.formats import dateformat, get_format diff --git a/openedx/core/lib/api/authentication.py b/openedx/core/lib/api/authentication.py index 12374ca7f6..50ed39f661 100644 --- a/openedx/core/lib/api/authentication.py +++ b/openedx/core/lib/api/authentication.py @@ -1,6 +1,6 @@ """ Common Authentication Handlers used across projects. """ -from __future__ import absolute_import + import logging import django.utils.timezone diff --git a/openedx/core/lib/api/fields.py b/openedx/core/lib/api/fields.py index 85f18b8da0..c18ecf6eb5 100644 --- a/openedx/core/lib/api/fields.py +++ b/openedx/core/lib/api/fields.py @@ -1,5 +1,5 @@ """Fields useful for edX API implementations.""" -from __future__ import absolute_import + from rest_framework.serializers import Field, URLField diff --git a/openedx/core/lib/api/mixins.py b/openedx/core/lib/api/mixins.py index e4b10c8311..93521f5902 100644 --- a/openedx/core/lib/api/mixins.py +++ b/openedx/core/lib/api/mixins.py @@ -1,7 +1,7 @@ """ Django Rest Framework view mixins. """ -from __future__ import absolute_import + from django.core.exceptions import ValidationError from django.http import Http404 from rest_framework import status diff --git a/openedx/core/lib/api/parsers.py b/openedx/core/lib/api/parsers.py index 92139ebce6..6ffb5cc23f 100644 --- a/openedx/core/lib/api/parsers.py +++ b/openedx/core/lib/api/parsers.py @@ -7,7 +7,7 @@ desired parsers. See http://www.django-rest-framework.org/api-guide/parsers/ for details. """ -from __future__ import absolute_import + from rest_framework.exceptions import ParseError, UnsupportedMediaType from rest_framework.parsers import FileUploadParser, JSONParser diff --git a/openedx/core/lib/api/permissions.py b/openedx/core/lib/api/permissions.py index a97a59747f..7b0ec63aa9 100644 --- a/openedx/core/lib/api/permissions.py +++ b/openedx/core/lib/api/permissions.py @@ -2,7 +2,7 @@ API library for Django REST Framework permissions-oriented workflows """ -from __future__ import absolute_import + from django.conf import settings from django.http import Http404 from opaque_keys import InvalidKeyError diff --git a/openedx/core/lib/api/serializers.py b/openedx/core/lib/api/serializers.py index 06984dbb95..a4a16396c3 100644 --- a/openedx/core/lib/api/serializers.py +++ b/openedx/core/lib/api/serializers.py @@ -2,7 +2,7 @@ Serializers to be used in APIs. """ -from __future__ import absolute_import + from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey, UsageKey from rest_framework import serializers diff --git a/openedx/core/lib/api/test_utils.py b/openedx/core/lib/api/test_utils.py index 6a684f834b..78cf8959da 100644 --- a/openedx/core/lib/api/test_utils.py +++ b/openedx/core/lib/api/test_utils.py @@ -1,7 +1,7 @@ """ Helpers for API tests. """ -from __future__ import absolute_import + import base64 import json import re diff --git a/openedx/core/lib/api/tests/mixins.py b/openedx/core/lib/api/tests/mixins.py index b2457cbc09..c1018bd004 100644 --- a/openedx/core/lib/api/tests/mixins.py +++ b/openedx/core/lib/api/tests/mixins.py @@ -1,7 +1,7 @@ """ Mixins for JWT auth tests. """ -from __future__ import absolute_import + from time import time from django.conf import settings diff --git a/openedx/core/lib/api/tests/test_authentication.py b/openedx/core/lib/api/tests/test_authentication.py index 83112a13e4..9d0bc7f012 100644 --- a/openedx/core/lib/api/tests/test_authentication.py +++ b/openedx/core/lib/api/tests/test_authentication.py @@ -3,9 +3,9 @@ Tests for OAuth2. This module is copied from django-rest-framework-oauth (tests/test_authentication.py) and updated to use our subclass of OAuth2Authentication. """ -from __future__ import unicode_literals -from __future__ import absolute_import + + import itertools import json import unittest diff --git a/openedx/core/lib/api/tests/test_exceptions.py b/openedx/core/lib/api/tests/test_exceptions.py index 904c5674b6..fbfd7d432f 100644 --- a/openedx/core/lib/api/tests/test_exceptions.py +++ b/openedx/core/lib/api/tests/test_exceptions.py @@ -1,7 +1,7 @@ """ Test Custom Exceptions """ -from __future__ import absolute_import + import ddt from django.test import TestCase from rest_framework import exceptions as drf_exceptions diff --git a/openedx/core/lib/api/tests/test_fields.py b/openedx/core/lib/api/tests/test_fields.py index ef031341f7..ae7647559d 100644 --- a/openedx/core/lib/api/tests/test_fields.py +++ b/openedx/core/lib/api/tests/test_fields.py @@ -1,5 +1,5 @@ """ Tests for custom DRF fields. """ -from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/openedx/core/lib/api/tests/test_parsers.py b/openedx/core/lib/api/tests/test_parsers.py index a6a9a4907f..152e811b16 100644 --- a/openedx/core/lib/api/tests/test_parsers.py +++ b/openedx/core/lib/api/tests/test_parsers.py @@ -2,7 +2,7 @@ TestCases verifying proper behavior of custom DRF request parsers. """ -from __future__ import absolute_import + from collections import namedtuple from io import BytesIO diff --git a/openedx/core/lib/api/tests/test_permissions.py b/openedx/core/lib/api/tests/test_permissions.py index 10e72c6ad7..df1af3b123 100644 --- a/openedx/core/lib/api/tests/test_permissions.py +++ b/openedx/core/lib/api/tests/test_permissions.py @@ -1,6 +1,6 @@ """ Tests for API permissions classes. """ -from __future__ import absolute_import + import ddt from django.contrib.auth.models import AnonymousUser from django.http import Http404 diff --git a/openedx/core/lib/api/view_utils.py b/openedx/core/lib/api/view_utils.py index 9644f434e3..9067d878dc 100644 --- a/openedx/core/lib/api/view_utils.py +++ b/openedx/core/lib/api/view_utils.py @@ -1,7 +1,7 @@ """ Utilities related to API views """ -from __future__ import absolute_import + from collections import Sequence from functools import wraps diff --git a/openedx/core/lib/blockstore_api/exceptions.py b/openedx/core/lib/blockstore_api/exceptions.py index dd63753ad8..9d3d74542b 100644 --- a/openedx/core/lib/blockstore_api/exceptions.py +++ b/openedx/core/lib/blockstore_api/exceptions.py @@ -1,7 +1,7 @@ """ Exceptions that may be raised by the Blockstore API """ -from __future__ import absolute_import, division, print_function, unicode_literals + class BlockstoreException(Exception): diff --git a/openedx/core/lib/blockstore_api/methods.py b/openedx/core/lib/blockstore_api/methods.py index fa1e4eedc2..7a3fa49ecf 100644 --- a/openedx/core/lib/blockstore_api/methods.py +++ b/openedx/core/lib/blockstore_api/methods.py @@ -1,7 +1,7 @@ """ API Client methods for working with Blockstore bundles and drafts """ -from __future__ import absolute_import, division, print_function, unicode_literals + import base64 from uuid import UUID diff --git a/openedx/core/lib/blockstore_api/models.py b/openedx/core/lib/blockstore_api/models.py index b591093ff7..995571e2ca 100644 --- a/openedx/core/lib/blockstore_api/models.py +++ b/openedx/core/lib/blockstore_api/models.py @@ -1,7 +1,7 @@ """ Data models used for Blockstore API Client """ -from __future__ import absolute_import, division, print_function, unicode_literals + from datetime import datetime from uuid import UUID diff --git a/openedx/core/lib/blockstore_api/tests/test_blockstore_api.py b/openedx/core/lib/blockstore_api/tests/test_blockstore_api.py index 4a4a2b1f08..fc773d3b1e 100644 --- a/openedx/core/lib/blockstore_api/tests/test_blockstore_api.py +++ b/openedx/core/lib/blockstore_api/tests/test_blockstore_api.py @@ -2,7 +2,7 @@ """ Tests for xblock_utils.py """ -from __future__ import absolute_import, division, print_function, unicode_literals + import unittest from uuid import UUID diff --git a/openedx/core/lib/cache_utils.py b/openedx/core/lib/cache_utils.py index 272b96c6f2..b7d016fee7 100644 --- a/openedx/core/lib/cache_utils.py +++ b/openedx/core/lib/cache_utils.py @@ -1,7 +1,7 @@ """ Utilities related to caching. """ -from __future__ import absolute_import + import collections import functools diff --git a/openedx/core/lib/celery/routers.py b/openedx/core/lib/celery/routers.py index bc14f764a1..50fef96f52 100644 --- a/openedx/core/lib/celery/routers.py +++ b/openedx/core/lib/celery/routers.py @@ -3,7 +3,7 @@ Custom routers used by both lms and cms when routing tasks to worker queues. For more, see https://celery.readthedocs.io/en/latest/userguide/routing.html#routers """ -from __future__ import absolute_import + import logging from abc import ABCMeta, abstractproperty diff --git a/openedx/core/lib/celery/task_utils.py b/openedx/core/lib/celery/task_utils.py index 694764e964..121c28dc63 100644 --- a/openedx/core/lib/celery/task_utils.py +++ b/openedx/core/lib/celery/task_utils.py @@ -1,7 +1,7 @@ """ Middleware utilities """ -from __future__ import absolute_import + from contextlib import contextmanager from crum import CurrentRequestUserMiddleware diff --git a/openedx/core/lib/command_utils.py b/openedx/core/lib/command_utils.py index 452cc951c4..83574bd08e 100644 --- a/openedx/core/lib/command_utils.py +++ b/openedx/core/lib/command_utils.py @@ -2,7 +2,7 @@ Useful utilities for management commands. """ -from __future__ import absolute_import + from django.core.management.base import CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey diff --git a/openedx/core/lib/course_tabs.py b/openedx/core/lib/course_tabs.py index d8b86974f7..569543192a 100644 --- a/openedx/core/lib/course_tabs.py +++ b/openedx/core/lib/course_tabs.py @@ -1,7 +1,7 @@ """ Tabs for courseware. """ -from __future__ import absolute_import + from functools import cmp_to_key from openedx.core.lib.plugins import PluginManager diff --git a/openedx/core/lib/courses.py b/openedx/core/lib/courses.py index c3e366bf22..1f00d529f1 100644 --- a/openedx/core/lib/courses.py +++ b/openedx/core/lib/courses.py @@ -1,7 +1,7 @@ """ Common utility functions related to courses. """ -from __future__ import absolute_import + from django import forms from django.conf import settings diff --git a/openedx/core/lib/derived.py b/openedx/core/lib/derived.py index 73358abd74..a8578853d8 100644 --- a/openedx/core/lib/derived.py +++ b/openedx/core/lib/derived.py @@ -4,7 +4,7 @@ via callable methods/lambdas. The derivation time can be controlled to happen af other settings have been set. The derived setting can also be overridden by setting the derived setting to an actual value. """ -from __future__ import absolute_import + import six import sys diff --git a/openedx/core/lib/django_require/staticstorage.py b/openedx/core/lib/django_require/staticstorage.py index 24d3968210..ee2321e894 100644 --- a/openedx/core/lib/django_require/staticstorage.py +++ b/openedx/core/lib/django_require/staticstorage.py @@ -2,7 +2,7 @@ :class:`~django_require.staticstorage.OptimizedCachedRequireJsStorage` """ -from __future__ import absolute_import + from openedx.core.storage import PipelineForgivingStorage from require.storage import OptimizedFilesMixin diff --git a/openedx/core/lib/edx_api_utils.py b/openedx/core/lib/edx_api_utils.py index 237c7b5ac5..b16ee249f7 100644 --- a/openedx/core/lib/edx_api_utils.py +++ b/openedx/core/lib/edx_api_utils.py @@ -1,7 +1,7 @@ """Helper functions to get data from APIs""" -from __future__ import unicode_literals -from __future__ import absolute_import + + import logging from django.core.cache import cache diff --git a/openedx/core/lib/exceptions.py b/openedx/core/lib/exceptions.py index f1a714a696..c9a539c41e 100644 --- a/openedx/core/lib/exceptions.py +++ b/openedx/core/lib/exceptions.py @@ -1,7 +1,7 @@ """ Common Purpose Errors """ -from __future__ import absolute_import + from django.core.exceptions import ObjectDoesNotExist diff --git a/openedx/core/lib/extract_tar.py b/openedx/core/lib/extract_tar.py index 74dd72eb60..a432352560 100644 --- a/openedx/core/lib/extract_tar.py +++ b/openedx/core/lib/extract_tar.py @@ -5,7 +5,7 @@ be, or symlink to a file that is, outside of the directory extracted in. Adapted from: http://stackoverflow.com/questions/10060069/safely-extract-zip-or-tar-using-python """ -from __future__ import absolute_import + import logging from os.path import join as joinpath from os.path import abspath, dirname, realpath diff --git a/openedx/core/lib/gating/api.py b/openedx/core/lib/gating/api.py index 85b5a522a7..80e4f621ef 100644 --- a/openedx/core/lib/gating/api.py +++ b/openedx/core/lib/gating/api.py @@ -1,7 +1,7 @@ """ API for the gating djangoapp """ -from __future__ import absolute_import + import json import logging diff --git a/openedx/core/lib/gating/services.py b/openedx/core/lib/gating/services.py index 86b30720e6..a1f7392ad3 100644 --- a/openedx/core/lib/gating/services.py +++ b/openedx/core/lib/gating/services.py @@ -1,7 +1,7 @@ """ A wrapper class to communicate with Gating api """ -from __future__ import absolute_import + from . import api as gating_api diff --git a/openedx/core/lib/gating/tests/test_api.py b/openedx/core/lib/gating/tests/test_api.py index c7fbf7de00..6f2499b6d1 100644 --- a/openedx/core/lib/gating/tests/test_api.py +++ b/openedx/core/lib/gating/tests/test_api.py @@ -1,7 +1,7 @@ """ Tests for the gating API """ -from __future__ import absolute_import, unicode_literals + import unittest diff --git a/openedx/core/lib/graph_traversals.py b/openedx/core/lib/graph_traversals.py index d7810567de..a19a6afa90 100644 --- a/openedx/core/lib/graph_traversals.py +++ b/openedx/core/lib/graph_traversals.py @@ -109,7 +109,7 @@ to each node's parents. This requires additional storage space, which could be eliminated if DAGs are not supported. """ -from __future__ import absolute_import + from collections import deque diff --git a/openedx/core/lib/html_to_text.py b/openedx/core/lib/html_to_text.py index 3094ab1042..e2c199c6ae 100644 --- a/openedx/core/lib/html_to_text.py +++ b/openedx/core/lib/html_to_text.py @@ -1,5 +1,5 @@ """Provides a function to convert html to plaintext.""" -from __future__ import absolute_import + import logging from subprocess import PIPE, Popen diff --git a/openedx/core/lib/json_utils.py b/openedx/core/lib/json_utils.py index 93ad921a9d..ff862a19f9 100644 --- a/openedx/core/lib/json_utils.py +++ b/openedx/core/lib/json_utils.py @@ -2,7 +2,7 @@ Helpers for json serialization """ -from __future__ import absolute_import + import datetime from django.core.serializers.json import DjangoJSONEncoder from opaque_keys.edx.keys import CourseKey, UsageKey diff --git a/openedx/core/lib/license/mixin.py b/openedx/core/lib/license/mixin.py index 4069b1d3d2..22bfc5ff51 100644 --- a/openedx/core/lib/license/mixin.py +++ b/openedx/core/lib/license/mixin.py @@ -1,7 +1,7 @@ """ License mixin for XBlocks and XModules """ -from __future__ import absolute_import + from xblock.core import XBlockMixin from xblock.fields import Scope, String diff --git a/openedx/core/lib/log_utils.py b/openedx/core/lib/log_utils.py index b46c633474..7d8f458dec 100644 --- a/openedx/core/lib/log_utils.py +++ b/openedx/core/lib/log_utils.py @@ -1,7 +1,7 @@ """ Helper functions for logging. """ -from __future__ import absolute_import + import logging log = logging.getLogger(__name__) diff --git a/openedx/core/lib/logsettings.py b/openedx/core/lib/logsettings.py index c34c4d80d9..5c530c3785 100644 --- a/openedx/core/lib/logsettings.py +++ b/openedx/core/lib/logsettings.py @@ -1,6 +1,6 @@ """Get log settings.""" -from __future__ import absolute_import + import logging import platform import sys diff --git a/openedx/core/lib/mail_utils.py b/openedx/core/lib/mail_utils.py index 07da8a532a..500f84f614 100644 --- a/openedx/core/lib/mail_utils.py +++ b/openedx/core/lib/mail_utils.py @@ -2,7 +2,7 @@ Utilities related to mailing. """ -from __future__ import absolute_import + import textwrap MAX_LINE_LENGTH = 900 diff --git a/openedx/core/lib/mobile_utils.py b/openedx/core/lib/mobile_utils.py index 3aca2e228e..e2b110a01c 100644 --- a/openedx/core/lib/mobile_utils.py +++ b/openedx/core/lib/mobile_utils.py @@ -2,7 +2,7 @@ Common utilities related to the mobile apps. """ -from __future__ import absolute_import + import re from django.conf import settings diff --git a/openedx/core/lib/plugins.py b/openedx/core/lib/plugins.py index 3ac70b5c7c..23a292da90 100644 --- a/openedx/core/lib/plugins.py +++ b/openedx/core/lib/plugins.py @@ -1,7 +1,7 @@ """ Adds support for first class plugins that can be added to the edX platform. """ -from __future__ import absolute_import + from collections import OrderedDict from stevedore.extension import ExtensionManager diff --git a/openedx/core/lib/request_utils.py b/openedx/core/lib/request_utils.py index 805c62f6ab..2398f90f66 100644 --- a/openedx/core/lib/request_utils.py +++ b/openedx/core/lib/request_utils.py @@ -1,5 +1,5 @@ """ Utility functions related to HTTP requests """ -from __future__ import absolute_import + import logging import re from six.moves.urllib.parse import urlparse # pylint: disable=import-error diff --git a/openedx/core/lib/rooted_paths.py b/openedx/core/lib/rooted_paths.py index 97506d6042..82c8be1d23 100644 --- a/openedx/core/lib/rooted_paths.py +++ b/openedx/core/lib/rooted_paths.py @@ -1,6 +1,6 @@ """Provides rooted_glob, for finding relative glob paths in another director.""" -from __future__ import absolute_import + import glob2 diff --git a/openedx/core/lib/teams_config.py b/openedx/core/lib/teams_config.py index 4257153701..95d4fa2f5e 100644 --- a/openedx/core/lib/teams_config.py +++ b/openedx/core/lib/teams_config.py @@ -1,7 +1,7 @@ """ Safe configuration wrapper for Course Teams feature. """ -from __future__ import absolute_import, unicode_literals + import re from enum import Enum diff --git a/openedx/core/lib/tempdir.py b/openedx/core/lib/tempdir.py index 444dd5d727..ad1229916f 100644 --- a/openedx/core/lib/tempdir.py +++ b/openedx/core/lib/tempdir.py @@ -1,6 +1,6 @@ """Make temporary directories nicely.""" -from __future__ import absolute_import + import atexit import os.path import shutil diff --git a/openedx/core/lib/tests/__init__.py b/openedx/core/lib/tests/__init__.py index a79e53e7ef..0094c2cc36 100644 --- a/openedx/core/lib/tests/__init__.py +++ b/openedx/core/lib/tests/__init__.py @@ -2,7 +2,7 @@ Utility functions for the edx-platform test suite. """ -from __future__ import absolute_import + def attr(*args, **kwargs): diff --git a/openedx/core/lib/tests/assertions/events.py b/openedx/core/lib/tests/assertions/events.py index 32c5e89a5e..f8f113ff25 100644 --- a/openedx/core/lib/tests/assertions/events.py +++ b/openedx/core/lib/tests/assertions/events.py @@ -1,6 +1,6 @@ """Assertions related to event validation""" -from __future__ import absolute_import + import json import pprint import six diff --git a/openedx/core/lib/tests/test_cache_utils.py b/openedx/core/lib/tests/test_cache_utils.py index 4a69a06032..77b1403f96 100644 --- a/openedx/core/lib/tests/test_cache_utils.py +++ b/openedx/core/lib/tests/test_cache_utils.py @@ -2,7 +2,7 @@ """ Tests for cache_utils.py """ -from __future__ import absolute_import + from unittest import TestCase import ddt diff --git a/openedx/core/lib/tests/test_command_utils.py b/openedx/core/lib/tests/test_command_utils.py index 2306aa3696..f3ddb9ab5d 100644 --- a/openedx/core/lib/tests/test_command_utils.py +++ b/openedx/core/lib/tests/test_command_utils.py @@ -2,7 +2,7 @@ Tests of management command utility code """ -from __future__ import absolute_import + from unittest import TestCase import ddt diff --git a/openedx/core/lib/tests/test_course_tab_api.py b/openedx/core/lib/tests/test_course_tab_api.py index f98b9337e5..28749d2d84 100644 --- a/openedx/core/lib/tests/test_course_tab_api.py +++ b/openedx/core/lib/tests/test_course_tab_api.py @@ -2,7 +2,7 @@ Tests for the plugin API """ -from __future__ import absolute_import + from django.test import TestCase from openedx.core.lib.plugins import PluginError diff --git a/openedx/core/lib/tests/test_course_tabs.py b/openedx/core/lib/tests/test_course_tabs.py index f4bf8fff5a..4257fe53c1 100644 --- a/openedx/core/lib/tests/test_course_tabs.py +++ b/openedx/core/lib/tests/test_course_tabs.py @@ -1,6 +1,6 @@ """ Tests of specific tabs. """ -from __future__ import absolute_import + from unittest import TestCase from mock import Mock, patch diff --git a/openedx/core/lib/tests/test_courses.py b/openedx/core/lib/tests/test_courses.py index a8aa1f9902..d32396f1c0 100644 --- a/openedx/core/lib/tests/test_courses.py +++ b/openedx/core/lib/tests/test_courses.py @@ -2,7 +2,7 @@ Tests for functionality in openedx/core/lib/courses.py. """ -from __future__ import absolute_import + import ddt from django.test.utils import override_settings diff --git a/openedx/core/lib/tests/test_derived.py b/openedx/core/lib/tests/test_derived.py index a5fb5f70c8..7d3baee6f8 100644 --- a/openedx/core/lib/tests/test_derived.py +++ b/openedx/core/lib/tests/test_derived.py @@ -2,7 +2,7 @@ Tests for derived.py """ -from __future__ import absolute_import + import sys from unittest import TestCase from openedx.core.lib.derived import derived, derived_collection_entry, derive_settings, clear_for_tests diff --git a/openedx/core/lib/tests/test_edx_api_utils.py b/openedx/core/lib/tests/test_edx_api_utils.py index e3f32063ad..dfd54b1dd3 100644 --- a/openedx/core/lib/tests/test_edx_api_utils.py +++ b/openedx/core/lib/tests/test_edx_api_utils.py @@ -1,6 +1,6 @@ """Tests covering edX API utilities.""" # pylint: disable=missing-docstring -from __future__ import absolute_import + import json import httpretty diff --git a/openedx/core/lib/tests/test_grade_utils.py b/openedx/core/lib/tests/test_grade_utils.py index 34c86d6bc0..f4f45e5610 100644 --- a/openedx/core/lib/tests/test_grade_utils.py +++ b/openedx/core/lib/tests/test_grade_utils.py @@ -2,7 +2,7 @@ Tests for graph traversal generator functions. """ -from __future__ import absolute_import + from unittest import TestCase import ddt diff --git a/openedx/core/lib/tests/test_graph_traversals.py b/openedx/core/lib/tests/test_graph_traversals.py index 3d044f14d7..623983006e 100644 --- a/openedx/core/lib/tests/test_graph_traversals.py +++ b/openedx/core/lib/tests/test_graph_traversals.py @@ -2,7 +2,7 @@ Tests for graph traversal generator functions. """ -from __future__ import absolute_import + from collections import defaultdict from unittest import TestCase diff --git a/openedx/core/lib/tests/test_request_utils.py b/openedx/core/lib/tests/test_request_utils.py index b5f3b596b8..b091dfd790 100644 --- a/openedx/core/lib/tests/test_request_utils.py +++ b/openedx/core/lib/tests/test_request_utils.py @@ -1,6 +1,6 @@ """Tests for request_utils module.""" -from __future__ import absolute_import + import unittest from django.conf import settings diff --git a/openedx/core/lib/tests/test_teams_config.py b/openedx/core/lib/tests/test_teams_config.py index 70ce37b5c5..b643220b83 100644 --- a/openedx/core/lib/tests/test_teams_config.py +++ b/openedx/core/lib/tests/test_teams_config.py @@ -1,7 +1,7 @@ """ Tests for Course Teams configuration. """ -from __future__ import absolute_import, unicode_literals + import ddt import six diff --git a/openedx/core/lib/tests/test_time_zone_utils.py b/openedx/core/lib/tests/test_time_zone_utils.py index 6939ae1e3b..796a237bf9 100644 --- a/openedx/core/lib/tests/test_time_zone_utils.py +++ b/openedx/core/lib/tests/test_time_zone_utils.py @@ -1,6 +1,6 @@ """Tests covering time zone utilities.""" -from __future__ import absolute_import + from django.test import TestCase from freezegun import freeze_time from pytz import timezone diff --git a/openedx/core/lib/tests/test_url_utils.py b/openedx/core/lib/tests/test_url_utils.py index fd7f23b775..90c08c9d96 100644 --- a/openedx/core/lib/tests/test_url_utils.py +++ b/openedx/core/lib/tests/test_url_utils.py @@ -1,7 +1,7 @@ """ Tests for url_utils module. """ -from __future__ import absolute_import + from ddt import data, ddt from django.test import TestCase diff --git a/openedx/core/lib/tests/test_xblock_utils.py b/openedx/core/lib/tests/test_xblock_utils.py index bc910cb607..bb15d02c95 100644 --- a/openedx/core/lib/tests/test_xblock_utils.py +++ b/openedx/core/lib/tests/test_xblock_utils.py @@ -1,7 +1,7 @@ """ Tests for xblock_utils.py """ -from __future__ import absolute_import, unicode_literals + import uuid diff --git a/openedx/core/lib/time_zone_utils.py b/openedx/core/lib/time_zone_utils.py index af486749d3..54f76c1929 100644 --- a/openedx/core/lib/time_zone_utils.py +++ b/openedx/core/lib/time_zone_utils.py @@ -1,7 +1,7 @@ """ Utilities related to timezones """ -from __future__ import absolute_import + from datetime import datetime from pytz import common_timezones, timezone, utc diff --git a/openedx/core/lib/url_utils.py b/openedx/core/lib/url_utils.py index 5c9342faf8..0cfde65af1 100644 --- a/openedx/core/lib/url_utils.py +++ b/openedx/core/lib/url_utils.py @@ -1,7 +1,7 @@ """ Contains common utilities for URL escaping. """ -from __future__ import absolute_import + import re diff --git a/openedx/core/lib/xblock_builtin/__init__.py b/openedx/core/lib/xblock_builtin/__init__.py index 5414ba2740..3cf995763c 100644 --- a/openedx/core/lib/xblock_builtin/__init__.py +++ b/openedx/core/lib/xblock_builtin/__init__.py @@ -4,7 +4,7 @@ Helper functions shared by built-in XBlocks. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/core/lib/xblock_builtin/xblock_discussion/setup.py b/openedx/core/lib/xblock_builtin/xblock_discussion/setup.py index d38057ab07..10ffbce40b 100644 --- a/openedx/core/lib/xblock_builtin/xblock_discussion/setup.py +++ b/openedx/core/lib/xblock_builtin/xblock_discussion/setup.py @@ -2,7 +2,7 @@ Setup for discussion-forum XBlock. """ -from __future__ import absolute_import + import os from setuptools import find_packages, setup diff --git a/openedx/core/lib/xblock_builtin/xblock_discussion/tests.py b/openedx/core/lib/xblock_builtin/xblock_discussion/tests.py index b1eab56fd3..8d67f99c65 100644 --- a/openedx/core/lib/xblock_builtin/xblock_discussion/tests.py +++ b/openedx/core/lib/xblock_builtin/xblock_discussion/tests.py @@ -1,6 +1,6 @@ """ Tests for DiscussionXBLock""" -from __future__ import print_function -from __future__ import absolute_import + + from collections import namedtuple import ddt import itertools diff --git a/openedx/core/lib/xblock_builtin/xblock_discussion/xblock_discussion/__init__.py b/openedx/core/lib/xblock_builtin/xblock_discussion/xblock_discussion/__init__.py index fe8512c0a8..c2dccc7cd6 100644 --- a/openedx/core/lib/xblock_builtin/xblock_discussion/xblock_discussion/__init__.py +++ b/openedx/core/lib/xblock_builtin/xblock_discussion/xblock_discussion/__init__.py @@ -2,7 +2,7 @@ """ Discussion XBlock """ -from __future__ import absolute_import + import logging import six from six.moves import urllib diff --git a/openedx/core/lib/xblock_pipeline/finder.py b/openedx/core/lib/xblock_pipeline/finder.py index 92f4d02727..5bcf58dcc3 100644 --- a/openedx/core/lib/xblock_pipeline/finder.py +++ b/openedx/core/lib/xblock_pipeline/finder.py @@ -1,7 +1,7 @@ """ Django pipeline finder for handling static assets required by XBlocks. """ -from __future__ import absolute_import + import os from datetime import datetime diff --git a/openedx/core/lib/xblock_utils/__init__.py b/openedx/core/lib/xblock_utils/__init__.py index 6efcc3a973..905aaab5dd 100644 --- a/openedx/core/lib/xblock_utils/__init__.py +++ b/openedx/core/lib/xblock_utils/__init__.py @@ -2,7 +2,7 @@ Functions that can are used to modify XBlock fragments for use in the LMS and Studio """ -from __future__ import absolute_import + import datetime import hashlib import json diff --git a/openedx/core/release.py b/openedx/core/release.py index 20c237978a..a3fb2e824c 100644 --- a/openedx/core/release.py +++ b/openedx/core/release.py @@ -2,7 +2,7 @@ Information about the release line of this Open edX code. """ -from __future__ import absolute_import + import unittest diff --git a/openedx/core/storage.py b/openedx/core/storage.py index bfd18d47a9..3c60bb0949 100644 --- a/openedx/core/storage.py +++ b/openedx/core/storage.py @@ -1,7 +1,7 @@ """ Django storage backends for Open edX. """ -from __future__ import absolute_import + from django.contrib.staticfiles.storage import StaticFilesStorage from django.core.files.storage import get_storage_class, FileSystemStorage diff --git a/openedx/features/announcements/apps.py b/openedx/features/announcements/apps.py index 62f7bad628..cb0ed53e53 100644 --- a/openedx/features/announcements/apps.py +++ b/openedx/features/announcements/apps.py @@ -1,7 +1,7 @@ """ Announcements Application Configuration """ -from __future__ import absolute_import + from django.apps import AppConfig from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType, PluginURLs, PluginSettings diff --git a/openedx/features/announcements/forms.py b/openedx/features/announcements/forms.py index b97fe57189..bc404ee838 100644 --- a/openedx/features/announcements/forms.py +++ b/openedx/features/announcements/forms.py @@ -2,7 +2,7 @@ Forms for the Announcement Editor """ -from __future__ import absolute_import + from django import forms diff --git a/openedx/features/announcements/migrations/0001_initial.py b/openedx/features/announcements/migrations/0001_initial.py index 3c33bcede9..79b46ba04b 100644 --- a/openedx/features/announcements/migrations/0001_initial.py +++ b/openedx/features/announcements/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/announcements/models.py b/openedx/features/announcements/models.py index 375c8816fa..291093c96e 100644 --- a/openedx/features/announcements/models.py +++ b/openedx/features/announcements/models.py @@ -2,7 +2,7 @@ Models for Announcements """ -from __future__ import absolute_import + from django.db import models from django.utils.encoding import python_2_unicode_compatible diff --git a/openedx/features/announcements/tests/test_announcements.py b/openedx/features/announcements/tests/test_announcements.py index 1195187610..a709e2eedc 100644 --- a/openedx/features/announcements/tests/test_announcements.py +++ b/openedx/features/announcements/tests/test_announcements.py @@ -2,7 +2,7 @@ Unit tests for the announcements feature. """ -from __future__ import absolute_import + import json import unittest diff --git a/openedx/features/announcements/urls.py b/openedx/features/announcements/urls.py index ed22befa78..1c898bb5bb 100644 --- a/openedx/features/announcements/urls.py +++ b/openedx/features/announcements/urls.py @@ -2,7 +2,7 @@ Defines URLs for announcements in the LMS. """ -from __future__ import absolute_import + from django.conf.urls import url from django.contrib.auth.decorators import login_required diff --git a/openedx/features/announcements/views.py b/openedx/features/announcements/views.py index 0b91db6fad..b0cbbcd620 100644 --- a/openedx/features/announcements/views.py +++ b/openedx/features/announcements/views.py @@ -2,7 +2,7 @@ Views to show announcements. """ -from __future__ import absolute_import + from django.conf import settings from django.http import JsonResponse diff --git a/openedx/features/content_type_gating/admin.py b/openedx/features/content_type_gating/admin.py index 2af443bbb8..7f20cdc69d 100644 --- a/openedx/features/content_type_gating/admin.py +++ b/openedx/features/content_type_gating/admin.py @@ -3,7 +3,7 @@ Django Admin pages for ContentTypeGatingConfig. """ -from __future__ import absolute_import, unicode_literals + from django.contrib import admin from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/features/content_type_gating/apps.py b/openedx/features/content_type_gating/apps.py index 5f082c7373..d8bba65b5b 100644 --- a/openedx/features/content_type_gating/apps.py +++ b/openedx/features/content_type_gating/apps.py @@ -3,7 +3,7 @@ Define the content_type_gating Django App. """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.apps import AppConfig diff --git a/openedx/features/content_type_gating/block_transformers.py b/openedx/features/content_type_gating/block_transformers.py index 9abf210305..ffec502345 100644 --- a/openedx/features/content_type_gating/block_transformers.py +++ b/openedx/features/content_type_gating/block_transformers.py @@ -2,7 +2,7 @@ Content Type Gate Transformer implementation. Limits access for certain users to certain types of content. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/features/content_type_gating/field_override.py b/openedx/features/content_type_gating/field_override.py index 23a101620a..eb71a509a0 100644 --- a/openedx/features/content_type_gating/field_override.py +++ b/openedx/features/content_type_gating/field_override.py @@ -2,7 +2,7 @@ FieldOverride that forces graded components to be only accessible to students in the Unlocked Group of the ContentTypeGating partition. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/features/content_type_gating/helpers.py b/openedx/features/content_type_gating/helpers.py index a3bf1072c2..d1a6705327 100644 --- a/openedx/features/content_type_gating/helpers.py +++ b/openedx/features/content_type_gating/helpers.py @@ -1,7 +1,7 @@ """ Helper functions used by both content_type_gating and course_duration_limits. """ -from __future__ import absolute_import + import logging diff --git a/openedx/features/content_type_gating/migrations/0001_initial.py b/openedx/features/content_type_gating/migrations/0001_initial.py index 99b8ba81e1..6b1013663a 100644 --- a/openedx/features/content_type_gating/migrations/0001_initial.py +++ b/openedx/features/content_type_gating/migrations/0001_initial.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-08 19:43 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/features/content_type_gating/migrations/0002_auto_20181119_0959.py b/openedx/features/content_type_gating/migrations/0002_auto_20181119_0959.py index 0d1f852d64..e8013d967d 100644 --- a/openedx/features/content_type_gating/migrations/0002_auto_20181119_0959.py +++ b/openedx/features/content_type_gating/migrations/0002_auto_20181119_0959.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-19 14:59 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/content_type_gating/migrations/0003_auto_20181128_1407.py b/openedx/features/content_type_gating/migrations/0003_auto_20181128_1407.py index d3238b15d1..963b20e40d 100644 --- a/openedx/features/content_type_gating/migrations/0003_auto_20181128_1407.py +++ b/openedx/features/content_type_gating/migrations/0003_auto_20181128_1407.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-28 19:07 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/content_type_gating/migrations/0004_auto_20181128_1521.py b/openedx/features/content_type_gating/migrations/0004_auto_20181128_1521.py index c3ced64ef9..6f131e7f17 100644 --- a/openedx/features/content_type_gating/migrations/0004_auto_20181128_1521.py +++ b/openedx/features/content_type_gating/migrations/0004_auto_20181128_1521.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-28 20:21 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/content_type_gating/migrations/0005_auto_20190306_1547.py b/openedx/features/content_type_gating/migrations/0005_auto_20190306_1547.py index 849fd29dc7..07d67c9dfa 100644 --- a/openedx/features/content_type_gating/migrations/0005_auto_20190306_1547.py +++ b/openedx/features/content_type_gating/migrations/0005_auto_20190306_1547.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-06 15:47 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/content_type_gating/migrations/0006_auto_20190308_1447.py b/openedx/features/content_type_gating/migrations/0006_auto_20190308_1447.py index 040d343e66..55af9e4937 100644 --- a/openedx/features/content_type_gating/migrations/0006_auto_20190308_1447.py +++ b/openedx/features/content_type_gating/migrations/0006_auto_20190308_1447.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-08 14:47 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/content_type_gating/migrations/0007_auto_20190311_1919.py b/openedx/features/content_type_gating/migrations/0007_auto_20190311_1919.py index e124fe7879..af96dee217 100644 --- a/openedx/features/content_type_gating/migrations/0007_auto_20190311_1919.py +++ b/openedx/features/content_type_gating/migrations/0007_auto_20190311_1919.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-11 19:19 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/openedx/features/content_type_gating/migrations/0008_auto_20190313_1634.py b/openedx/features/content_type_gating/migrations/0008_auto_20190313_1634.py index 69ae7282f0..4b1af6cd33 100644 --- a/openedx/features/content_type_gating/migrations/0008_auto_20190313_1634.py +++ b/openedx/features/content_type_gating/migrations/0008_auto_20190313_1634.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-13 16:34 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/content_type_gating/models.py b/openedx/features/content_type_gating/models.py index cd7bd1336f..ce6026c505 100644 --- a/openedx/features/content_type_gating/models.py +++ b/openedx/features/content_type_gating/models.py @@ -3,7 +3,7 @@ Content Type Gating Configuration Models """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.core.exceptions import ValidationError diff --git a/openedx/features/content_type_gating/partitions.py b/openedx/features/content_type_gating/partitions.py index 5cb91df794..666babd084 100644 --- a/openedx/features/content_type_gating/partitions.py +++ b/openedx/features/content_type_gating/partitions.py @@ -5,7 +5,7 @@ These are used together to allow course content to be blocked for a subset of audit learners. """ -from __future__ import absolute_import + import datetime import logging diff --git a/openedx/features/content_type_gating/tests/test_access.py b/openedx/features/content_type_gating/tests/test_access.py index e69230a929..c449129550 100644 --- a/openedx/features/content_type_gating/tests/test_access.py +++ b/openedx/features/content_type_gating/tests/test_access.py @@ -1,7 +1,7 @@ """ Test audit user's access to various content based on content-gating features. """ -from __future__ import absolute_import + import json import os diff --git a/openedx/features/content_type_gating/tests/test_models.py b/openedx/features/content_type_gating/tests/test_models.py index 6951bc3f86..a13c6bf756 100644 --- a/openedx/features/content_type_gating/tests/test_models.py +++ b/openedx/features/content_type_gating/tests/test_models.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + import itertools from datetime import datetime, timedelta diff --git a/openedx/features/content_type_gating/tests/test_partitions.py b/openedx/features/content_type_gating/tests/test_partitions.py index b05b4d76f3..658f050b98 100644 --- a/openedx/features/content_type_gating/tests/test_partitions.py +++ b/openedx/features/content_type_gating/tests/test_partitions.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/features/course_bookmarks/plugins.py b/openedx/features/course_bookmarks/plugins.py index 7a73a7ac9d..6a9131ef6b 100644 --- a/openedx/features/course_bookmarks/plugins.py +++ b/openedx/features/course_bookmarks/plugins.py @@ -2,7 +2,7 @@ Platform plugins to support course bookmarks. """ -from __future__ import absolute_import + from django.urls import reverse from django.utils.translation import ugettext as _ diff --git a/openedx/features/course_bookmarks/tests/test_course_bookmarks.py b/openedx/features/course_bookmarks/tests/test_course_bookmarks.py index 1282c89ae9..2cb29509c0 100644 --- a/openedx/features/course_bookmarks/tests/test_course_bookmarks.py +++ b/openedx/features/course_bookmarks/tests/test_course_bookmarks.py @@ -2,7 +2,7 @@ Unit tests for the course bookmarks feature. """ -from __future__ import absolute_import + import ddt from django.test import RequestFactory diff --git a/openedx/features/course_bookmarks/urls.py b/openedx/features/course_bookmarks/urls.py index f28a5f6130..6f84eac46d 100644 --- a/openedx/features/course_bookmarks/urls.py +++ b/openedx/features/course_bookmarks/urls.py @@ -2,7 +2,7 @@ Defines URLs for course bookmarks. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/openedx/features/course_bookmarks/views/course_bookmarks.py b/openedx/features/course_bookmarks/views/course_bookmarks.py index 6d27e99a2d..2f537f6aa5 100644 --- a/openedx/features/course_bookmarks/views/course_bookmarks.py +++ b/openedx/features/course_bookmarks/views/course_bookmarks.py @@ -2,7 +2,7 @@ Views to show a course's bookmarks. """ -from __future__ import absolute_import + import six from django.contrib.auth.decorators import login_required diff --git a/openedx/features/course_duration_limits/access.py b/openedx/features/course_duration_limits/access.py index 07a5c6310f..9a86b0d9ef 100644 --- a/openedx/features/course_duration_limits/access.py +++ b/openedx/features/course_duration_limits/access.py @@ -3,7 +3,7 @@ Contains code related to computing content gating course duration limits and course access based on these limits. """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/openedx/features/course_duration_limits/admin.py b/openedx/features/course_duration_limits/admin.py index 8da2910b60..24f22a25ea 100644 --- a/openedx/features/course_duration_limits/admin.py +++ b/openedx/features/course_duration_limits/admin.py @@ -3,7 +3,7 @@ Django Admin pages for CourseDurationLimitConfig. """ -from __future__ import absolute_import, unicode_literals + from django.contrib import admin from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/features/course_duration_limits/apps.py b/openedx/features/course_duration_limits/apps.py index a07f2d56ba..b91838c5a4 100644 --- a/openedx/features/course_duration_limits/apps.py +++ b/openedx/features/course_duration_limits/apps.py @@ -2,7 +2,7 @@ Course duration limits application configuration """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.apps import AppConfig diff --git a/openedx/features/course_duration_limits/migrations/0001_initial.py b/openedx/features/course_duration_limits/migrations/0001_initial.py index 5fa37061c3..9d4eda696b 100644 --- a/openedx/features/course_duration_limits/migrations/0001_initial.py +++ b/openedx/features/course_duration_limits/migrations/0001_initial.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-08 19:43 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/features/course_duration_limits/migrations/0002_auto_20181119_0959.py b/openedx/features/course_duration_limits/migrations/0002_auto_20181119_0959.py index 29facef49a..fc13db3c63 100644 --- a/openedx/features/course_duration_limits/migrations/0002_auto_20181119_0959.py +++ b/openedx/features/course_duration_limits/migrations/0002_auto_20181119_0959.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-19 14:59 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/course_duration_limits/migrations/0003_auto_20181128_1407.py b/openedx/features/course_duration_limits/migrations/0003_auto_20181128_1407.py index d8d2603e88..f656e43987 100644 --- a/openedx/features/course_duration_limits/migrations/0003_auto_20181128_1407.py +++ b/openedx/features/course_duration_limits/migrations/0003_auto_20181128_1407.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-28 19:07 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/course_duration_limits/migrations/0004_auto_20181128_1521.py b/openedx/features/course_duration_limits/migrations/0004_auto_20181128_1521.py index 1975017ca4..94f97f6f69 100644 --- a/openedx/features/course_duration_limits/migrations/0004_auto_20181128_1521.py +++ b/openedx/features/course_duration_limits/migrations/0004_auto_20181128_1521.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-28 20:21 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/course_duration_limits/migrations/0005_auto_20190306_1546.py b/openedx/features/course_duration_limits/migrations/0005_auto_20190306_1546.py index e873901f06..ca7748e500 100644 --- a/openedx/features/course_duration_limits/migrations/0005_auto_20190306_1546.py +++ b/openedx/features/course_duration_limits/migrations/0005_auto_20190306_1546.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-06 15:46 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/course_duration_limits/migrations/0006_auto_20190308_1447.py b/openedx/features/course_duration_limits/migrations/0006_auto_20190308_1447.py index c890bd1eb8..d0e0b26204 100644 --- a/openedx/features/course_duration_limits/migrations/0006_auto_20190308_1447.py +++ b/openedx/features/course_duration_limits/migrations/0006_auto_20190308_1447.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-08 14:47 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/course_duration_limits/migrations/0007_auto_20190311_1919.py b/openedx/features/course_duration_limits/migrations/0007_auto_20190311_1919.py index d810dbac0e..d06d18cb43 100644 --- a/openedx/features/course_duration_limits/migrations/0007_auto_20190311_1919.py +++ b/openedx/features/course_duration_limits/migrations/0007_auto_20190311_1919.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-11 19:19 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.db import migrations, models diff --git a/openedx/features/course_duration_limits/migrations/0008_auto_20190313_1634.py b/openedx/features/course_duration_limits/migrations/0008_auto_20190313_1634.py index 2b58fedfa7..60f357de12 100644 --- a/openedx/features/course_duration_limits/migrations/0008_auto_20190313_1634.py +++ b/openedx/features/course_duration_limits/migrations/0008_auto_20190313_1634.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-13 16:34 -from __future__ import absolute_import, unicode_literals + from django.db import migrations, models diff --git a/openedx/features/course_duration_limits/models.py b/openedx/features/course_duration_limits/models.py index a19a52f933..12b0f93d78 100644 --- a/openedx/features/course_duration_limits/models.py +++ b/openedx/features/course_duration_limits/models.py @@ -3,7 +3,7 @@ Course Duration Limit Configuration Models """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.conf import settings from django.core.exceptions import ValidationError diff --git a/openedx/features/course_duration_limits/tests/test_access.py b/openedx/features/course_duration_limits/tests/test_access.py index e870888ea2..2547a22987 100644 --- a/openedx/features/course_duration_limits/tests/test_access.py +++ b/openedx/features/course_duration_limits/tests/test_access.py @@ -1,6 +1,6 @@ """Tests of openedx.features.course_duration_limits.access""" -from __future__ import absolute_import + import itertools from datetime import datetime, timedelta diff --git a/openedx/features/course_duration_limits/tests/test_course_expiration.py b/openedx/features/course_duration_limits/tests/test_course_expiration.py index bff04bf91c..fb8496278a 100644 --- a/openedx/features/course_duration_limits/tests/test_course_expiration.py +++ b/openedx/features/course_duration_limits/tests/test_course_expiration.py @@ -1,7 +1,7 @@ """ Contains tests to verify correctness of course expiration functionality """ -from __future__ import absolute_import + import json from datetime import timedelta diff --git a/openedx/features/course_duration_limits/tests/test_models.py b/openedx/features/course_duration_limits/tests/test_models.py index a842151e89..39c18f7f3f 100644 --- a/openedx/features/course_duration_limits/tests/test_models.py +++ b/openedx/features/course_duration_limits/tests/test_models.py @@ -2,7 +2,7 @@ Tests of CourseDurationLimitConfig. """ -from __future__ import absolute_import + import itertools from datetime import datetime, timedelta diff --git a/openedx/features/course_experience/__init__.py b/openedx/features/course_experience/__init__.py index 3ffd568745..47ed099333 100644 --- a/openedx/features/course_experience/__init__.py +++ b/openedx/features/course_experience/__init__.py @@ -1,7 +1,7 @@ """ Unified course experience settings and helper methods. """ -from __future__ import absolute_import + from django.utils.translation import ugettext as _ diff --git a/openedx/features/course_experience/course_tools.py b/openedx/features/course_experience/course_tools.py index 23d1bb0135..03c5c5df4c 100644 --- a/openedx/features/course_experience/course_tools.py +++ b/openedx/features/course_experience/course_tools.py @@ -1,7 +1,7 @@ """ Support for course tool plugins. """ -from __future__ import absolute_import + from openedx.core.lib.plugins import PluginManager diff --git a/openedx/features/course_experience/plugins.py b/openedx/features/course_experience/plugins.py index e53d70a199..ac277ba9ee 100644 --- a/openedx/features/course_experience/plugins.py +++ b/openedx/features/course_experience/plugins.py @@ -3,7 +3,7 @@ Platform plugins to support the course experience. This includes any locally defined CourseTools. """ -from __future__ import absolute_import + from django.urls import reverse from django.utils.translation import ugettext as _ diff --git a/openedx/features/course_experience/tests/views/helpers.py b/openedx/features/course_experience/tests/views/helpers.py index 7faa9a9a70..5c02e87cca 100644 --- a/openedx/features/course_experience/tests/views/helpers.py +++ b/openedx/features/course_experience/tests/views/helpers.py @@ -1,7 +1,7 @@ """ Test helpers for the course experience. """ -from __future__ import absolute_import + from datetime import timedelta diff --git a/openedx/features/course_experience/tests/views/test_course_dates.py b/openedx/features/course_experience/tests/views/test_course_dates.py index 36f0f9e577..35a6905416 100644 --- a/openedx/features/course_experience/tests/views/test_course_dates.py +++ b/openedx/features/course_experience/tests/views/test_course_dates.py @@ -1,7 +1,7 @@ """ Tests for course dates fragment. """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/features/course_experience/tests/views/test_course_home.py b/openedx/features/course_experience/tests/views/test_course_home.py index 5ccc1bd6e5..151f726344 100644 --- a/openedx/features/course_experience/tests/views/test_course_home.py +++ b/openedx/features/course_experience/tests/views/test_course_home.py @@ -2,7 +2,7 @@ """ Tests for the course home page. """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/features/course_experience/tests/views/test_course_outline.py b/openedx/features/course_experience/tests/views/test_course_outline.py index 66017ca6c3..68ff1c47a2 100644 --- a/openedx/features/course_experience/tests/views/test_course_outline.py +++ b/openedx/features/course_experience/tests/views/test_course_outline.py @@ -1,7 +1,7 @@ """ Tests for the Course Outline view and supporting views. """ -from __future__ import absolute_import + import datetime import json diff --git a/openedx/features/course_experience/tests/views/test_course_sock.py b/openedx/features/course_experience/tests/views/test_course_sock.py index 470c98e26e..bce7a4ab2b 100644 --- a/openedx/features/course_experience/tests/views/test_course_sock.py +++ b/openedx/features/course_experience/tests/views/test_course_sock.py @@ -2,7 +2,7 @@ Tests for course verification sock """ -from __future__ import absolute_import + import mock import ddt diff --git a/openedx/features/course_experience/tests/views/test_course_updates.py b/openedx/features/course_experience/tests/views/test_course_updates.py index 3f76daa366..0f184f3860 100644 --- a/openedx/features/course_experience/tests/views/test_course_updates.py +++ b/openedx/features/course_experience/tests/views/test_course_updates.py @@ -1,7 +1,7 @@ """ Tests for the course updates page. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/features/course_experience/tests/views/test_welcome_message.py b/openedx/features/course_experience/tests/views/test_welcome_message.py index 5253444bf6..a3e4d4389d 100644 --- a/openedx/features/course_experience/tests/views/test_welcome_message.py +++ b/openedx/features/course_experience/tests/views/test_welcome_message.py @@ -1,7 +1,7 @@ """ Tests for course welcome messages. """ -from __future__ import absolute_import + import ddt import six diff --git a/openedx/features/course_experience/urls.py b/openedx/features/course_experience/urls.py index f764e918e8..eb5d8ec230 100644 --- a/openedx/features/course_experience/urls.py +++ b/openedx/features/course_experience/urls.py @@ -2,7 +2,7 @@ Defines URLs for the course experience. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/openedx/features/course_experience/utils.py b/openedx/features/course_experience/utils.py index 17108ce54a..9f3452c01e 100644 --- a/openedx/features/course_experience/utils.py +++ b/openedx/features/course_experience/utils.py @@ -1,7 +1,7 @@ """ Common utilities for the course experience, including course outline. """ -from __future__ import absolute_import + import logging diff --git a/openedx/features/course_experience/views/course_dates.py b/openedx/features/course_experience/views/course_dates.py index 3fdd70d6c8..72dca8fa61 100644 --- a/openedx/features/course_experience/views/course_dates.py +++ b/openedx/features/course_experience/views/course_dates.py @@ -1,7 +1,7 @@ """ Fragment for rendering the course dates sidebar. """ -from __future__ import absolute_import + from django.http import Http404 from django.template.loader import render_to_string diff --git a/openedx/features/course_experience/views/course_home.py b/openedx/features/course_experience/views/course_home.py index 83c70eb224..b545b3fe2f 100644 --- a/openedx/features/course_experience/views/course_home.py +++ b/openedx/features/course_experience/views/course_home.py @@ -2,7 +2,7 @@ Views for the course home page. """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/openedx/features/course_experience/views/course_home_messages.py b/openedx/features/course_experience/views/course_home_messages.py index e89bfd3619..af6b6edac8 100644 --- a/openedx/features/course_experience/views/course_home_messages.py +++ b/openedx/features/course_experience/views/course_home_messages.py @@ -2,7 +2,7 @@ View logic for handling course messages. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/features/course_experience/views/course_outline.py b/openedx/features/course_experience/views/course_outline.py index 7c524bf034..111000cf5e 100644 --- a/openedx/features/course_experience/views/course_outline.py +++ b/openedx/features/course_experience/views/course_outline.py @@ -1,7 +1,7 @@ """ Views to show a course outline. """ -from __future__ import absolute_import + import datetime import re diff --git a/openedx/features/course_experience/views/course_reviews.py b/openedx/features/course_experience/views/course_reviews.py index 6a78e5817c..8428a834fa 100644 --- a/openedx/features/course_experience/views/course_reviews.py +++ b/openedx/features/course_experience/views/course_reviews.py @@ -1,7 +1,7 @@ """ Fragment for rendering the course reviews panel """ -from __future__ import absolute_import + import six from django.conf import settings diff --git a/openedx/features/course_experience/views/course_sock.py b/openedx/features/course_experience/views/course_sock.py index 0961521ed5..695aef426b 100644 --- a/openedx/features/course_experience/views/course_sock.py +++ b/openedx/features/course_experience/views/course_sock.py @@ -1,7 +1,7 @@ """ Fragment for rendering the course's sock and associated toggle button. """ -from __future__ import absolute_import + from django.template.loader import render_to_string from web_fragments.fragment import Fragment diff --git a/openedx/features/course_experience/views/course_updates.py b/openedx/features/course_experience/views/course_updates.py index 58dcb8108e..7ce5779ddd 100644 --- a/openedx/features/course_experience/views/course_updates.py +++ b/openedx/features/course_experience/views/course_updates.py @@ -1,7 +1,7 @@ """ Views that handle course updates. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/features/course_experience/views/latest_update.py b/openedx/features/course_experience/views/latest_update.py index b12e8b600f..c2a6bb46e8 100644 --- a/openedx/features/course_experience/views/latest_update.py +++ b/openedx/features/course_experience/views/latest_update.py @@ -6,7 +6,7 @@ this fragment dismisses the message for a limited time so new updates will continue to appear, where the welcome message gets permanently dismissed. """ -from __future__ import absolute_import + from django.template.loader import render_to_string from opaque_keys.edx.keys import CourseKey diff --git a/openedx/features/course_experience/views/welcome_message.py b/openedx/features/course_experience/views/welcome_message.py index 2dc4d102f1..6c6831414b 100644 --- a/openedx/features/course_experience/views/welcome_message.py +++ b/openedx/features/course_experience/views/welcome_message.py @@ -2,7 +2,7 @@ View logic for handling course welcome messages. """ -from __future__ import absolute_import + import six from django.http import HttpResponse diff --git a/openedx/features/course_experience/waffle.py b/openedx/features/course_experience/waffle.py index d6dd553dfb..e8258fc887 100644 --- a/openedx/features/course_experience/waffle.py +++ b/openedx/features/course_experience/waffle.py @@ -1,7 +1,7 @@ """ Miscellaneous waffle switches that both LMS and Studio need to access """ -from __future__ import absolute_import + from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace diff --git a/openedx/features/course_search/urls.py b/openedx/features/course_search/urls.py index 0c9ae379e9..8970e9886f 100644 --- a/openedx/features/course_search/urls.py +++ b/openedx/features/course_search/urls.py @@ -2,7 +2,7 @@ Defines URLs for course search. """ -from __future__ import absolute_import + from django.conf.urls import url diff --git a/openedx/features/course_search/views/course_search.py b/openedx/features/course_search/views/course_search.py index 2d0414e7da..39d5a5cf25 100644 --- a/openedx/features/course_search/views/course_search.py +++ b/openedx/features/course_search/views/course_search.py @@ -2,7 +2,7 @@ Views for the course search page. """ -from __future__ import absolute_import + import six from django.contrib.auth.decorators import login_required diff --git a/openedx/features/coursetalk/migrations/0001_initial.py b/openedx/features/coursetalk/migrations/0001_initial.py index b1d7139df0..a5d376a63c 100644 --- a/openedx/features/coursetalk/migrations/0001_initial.py +++ b/openedx/features/coursetalk/migrations/0001_initial.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models import django.db.models.deletion from django.conf import settings diff --git a/openedx/features/coursetalk/migrations/0002_auto_20160325_0631.py b/openedx/features/coursetalk/migrations/0002_auto_20160325_0631.py index e17f9c1283..44312cd9c5 100644 --- a/openedx/features/coursetalk/migrations/0002_auto_20160325_0631.py +++ b/openedx/features/coursetalk/migrations/0002_auto_20160325_0631.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals -from __future__ import absolute_import + + from django.db import migrations, models diff --git a/openedx/features/discounts/admin.py b/openedx/features/discounts/admin.py index e3a6569263..8cf719fe59 100644 --- a/openedx/features/discounts/admin.py +++ b/openedx/features/discounts/admin.py @@ -3,7 +3,7 @@ Django Admin pages for DiscountRestrictionConfig. """ -from __future__ import absolute_import, unicode_literals + from django.contrib import admin from django.utils.translation import ugettext_lazy as _ diff --git a/openedx/features/discounts/applicability.py b/openedx/features/discounts/applicability.py index e35eadddbb..c8f894cd0c 100644 --- a/openedx/features/discounts/applicability.py +++ b/openedx/features/discounts/applicability.py @@ -8,7 +8,7 @@ Keep in mind that the code in this file only applies to discounts controlled in not other discounts like coupons or enterprise/program offers configured in ecommerce. """ -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/features/discounts/apps.py b/openedx/features/discounts/apps.py index d5acbde250..79709e0b42 100644 --- a/openedx/features/discounts/apps.py +++ b/openedx/features/discounts/apps.py @@ -4,7 +4,7 @@ Discounts application configuration """ # -*- coding: utf-8 -*- -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/features/discounts/migrations/0001_initial.py b/openedx/features/discounts/migrations/0001_initial.py index e22e4ffc61..113d939304 100644 --- a/openedx/features/discounts/migrations/0001_initial.py +++ b/openedx/features/discounts/migrations/0001_initial.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-31 20:08 -from __future__ import absolute_import, unicode_literals + import django.db.models.deletion from django.conf import settings diff --git a/openedx/features/discounts/migrations/0002_auto_20191022_1720.py b/openedx/features/discounts/migrations/0002_auto_20191022_1720.py index 8de17c5717..0364d5ab8a 100644 --- a/openedx/features/discounts/migrations/0002_auto_20191022_1720.py +++ b/openedx/features/discounts/migrations/0002_auto_20191022_1720.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-10-22 17:20 -from __future__ import unicode_literals + from django.conf import settings from django.db import migrations, models diff --git a/openedx/features/discounts/models.py b/openedx/features/discounts/models.py index bd2ff87c89..f7a93b711b 100644 --- a/openedx/features/discounts/models.py +++ b/openedx/features/discounts/models.py @@ -3,7 +3,7 @@ DiscountRestrictionConfig Models """ # -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals + from django.db import models from django.utils.encoding import python_2_unicode_compatible diff --git a/openedx/features/discounts/tests/test_applicability.py b/openedx/features/discounts/tests/test_applicability.py index 13a340f3f1..eb3a802bd9 100644 --- a/openedx/features/discounts/tests/test_applicability.py +++ b/openedx/features/discounts/tests/test_applicability.py @@ -1,7 +1,7 @@ """Tests of openedx.features.discounts.applicability""" # -*- coding: utf-8 -*- -from __future__ import absolute_import + from datetime import datetime, timedelta diff --git a/openedx/features/discounts/tests/test_discount_restriction_models.py b/openedx/features/discounts/tests/test_discount_restriction_models.py index 8a1146d4b2..60343d052a 100644 --- a/openedx/features/discounts/tests/test_discount_restriction_models.py +++ b/openedx/features/discounts/tests/test_discount_restriction_models.py @@ -1,7 +1,7 @@ """ Test discount restriction config """ -from __future__ import absolute_import + import itertools diff --git a/openedx/features/discounts/tests/test_views.py b/openedx/features/discounts/tests/test_views.py index 19a37c7938..da29f4200e 100644 --- a/openedx/features/discounts/tests/test_views.py +++ b/openedx/features/discounts/tests/test_views.py @@ -1,6 +1,6 @@ """Tests of openedx.features.discounts.views""" # -*- coding: utf-8 -*- -from __future__ import absolute_import + import jwt import six diff --git a/openedx/features/discounts/urls.py b/openedx/features/discounts/urls.py index 73113f117d..52e12f7024 100644 --- a/openedx/features/discounts/urls.py +++ b/openedx/features/discounts/urls.py @@ -1,7 +1,7 @@ """ Discount API URLs """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/features/discounts/views.py b/openedx/features/discounts/views.py index 5229b199ba..e6eff05fc7 100644 --- a/openedx/features/discounts/views.py +++ b/openedx/features/discounts/views.py @@ -4,7 +4,7 @@ The Discount API Views should return information about discounts that apply to t """ # -*- coding: utf-8 -*- -from __future__ import absolute_import + from django.contrib.auth.models import User from django.utils.decorators import method_decorator diff --git a/openedx/features/enterprise_support/api.py b/openedx/features/enterprise_support/api.py index 52aa426955..801347cf4c 100644 --- a/openedx/features/enterprise_support/api.py +++ b/openedx/features/enterprise_support/api.py @@ -1,7 +1,7 @@ """ APIs providing support for enterprise functionality. """ -from __future__ import absolute_import + import logging from functools import wraps diff --git a/openedx/features/enterprise_support/apps.py b/openedx/features/enterprise_support/apps.py index eff7c48d08..515f931173 100644 --- a/openedx/features/enterprise_support/apps.py +++ b/openedx/features/enterprise_support/apps.py @@ -1,7 +1,7 @@ """ Configuration for enterprise_support """ -from __future__ import absolute_import + from django.apps import AppConfig diff --git a/openedx/features/enterprise_support/signals.py b/openedx/features/enterprise_support/signals.py index 4b17e2ac4a..cbbd7ebe69 100644 --- a/openedx/features/enterprise_support/signals.py +++ b/openedx/features/enterprise_support/signals.py @@ -2,7 +2,7 @@ This module contains signals related to enterprise. """ -from __future__ import absolute_import + import logging import six diff --git a/openedx/features/enterprise_support/tasks.py b/openedx/features/enterprise_support/tasks.py index 7261d6df79..875dc6bb91 100644 --- a/openedx/features/enterprise_support/tasks.py +++ b/openedx/features/enterprise_support/tasks.py @@ -1,7 +1,7 @@ """ Tasks for Enterprise. """ -from __future__ import absolute_import + import logging diff --git a/openedx/features/enterprise_support/tests/__init__.py b/openedx/features/enterprise_support/tests/__init__.py index f705a1942b..a85ec014e6 100644 --- a/openedx/features/enterprise_support/tests/__init__.py +++ b/openedx/features/enterprise_support/tests/__init__.py @@ -2,7 +2,7 @@ Things commonly needed in Enterprise tests. """ -from __future__ import absolute_import + from django.conf import settings diff --git a/openedx/features/enterprise_support/tests/factories.py b/openedx/features/enterprise_support/tests/factories.py index 0270663541..582ca316d7 100644 --- a/openedx/features/enterprise_support/tests/factories.py +++ b/openedx/features/enterprise_support/tests/factories.py @@ -1,7 +1,7 @@ """ Factoryboy factories. """ -from __future__ import absolute_import, unicode_literals + from uuid import UUID diff --git a/openedx/features/enterprise_support/tests/mixins/enterprise.py b/openedx/features/enterprise_support/tests/mixins/enterprise.py index d17d56e254..4924ff3bc7 100644 --- a/openedx/features/enterprise_support/tests/mixins/enterprise.py +++ b/openedx/features/enterprise_support/tests/mixins/enterprise.py @@ -1,7 +1,7 @@ """ Mixins for the EnterpriseApiClient. """ -from __future__ import absolute_import + import json diff --git a/openedx/features/enterprise_support/tests/test_api.py b/openedx/features/enterprise_support/tests/test_api.py index b8dfa8ea79..d383a4fb69 100644 --- a/openedx/features/enterprise_support/tests/test_api.py +++ b/openedx/features/enterprise_support/tests/test_api.py @@ -2,7 +2,7 @@ Test the enterprise support APIs. """ -from __future__ import absolute_import + import mock diff --git a/openedx/features/enterprise_support/tests/test_logout.py b/openedx/features/enterprise_support/tests/test_logout.py index 41ea58ebb3..c4c0510c69 100644 --- a/openedx/features/enterprise_support/tests/test_logout.py +++ b/openedx/features/enterprise_support/tests/test_logout.py @@ -1,7 +1,7 @@ """ Tests for logout for enterprise flow """ -from __future__ import absolute_import + import ddt import mock diff --git a/openedx/features/enterprise_support/tests/test_signals.py b/openedx/features/enterprise_support/tests/test_signals.py index ca016b65ed..8b8e9a2f89 100644 --- a/openedx/features/enterprise_support/tests/test_signals.py +++ b/openedx/features/enterprise_support/tests/test_signals.py @@ -1,5 +1,5 @@ """Tests of email marketing signal handlers.""" -from __future__ import absolute_import + import logging diff --git a/openedx/features/enterprise_support/utils.py b/openedx/features/enterprise_support/utils.py index 604e489a44..12ac3c9623 100644 --- a/openedx/features/enterprise_support/utils.py +++ b/openedx/features/enterprise_support/utils.py @@ -1,7 +1,7 @@ """ Utility methods for Enterprise """ -from __future__ import absolute_import, unicode_literals + import hashlib import json diff --git a/openedx/features/learner_profile/tests/views/test_learner_profile.py b/openedx/features/learner_profile/tests/views/test_learner_profile.py index f1a8ce37fb..e2eb0517de 100644 --- a/openedx/features/learner_profile/tests/views/test_learner_profile.py +++ b/openedx/features/learner_profile/tests/views/test_learner_profile.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ Tests for student profile views. """ -from __future__ import absolute_import + import datetime import ddt import mock diff --git a/openedx/features/learner_profile/toggles.py b/openedx/features/learner_profile/toggles.py index a451798d50..d31d503760 100644 --- a/openedx/features/learner_profile/toggles.py +++ b/openedx/features/learner_profile/toggles.py @@ -2,7 +2,7 @@ Toggles for Learner Profile page. """ -from __future__ import absolute_import + from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace diff --git a/openedx/features/learner_profile/urls.py b/openedx/features/learner_profile/urls.py index d3f56e867a..e3f6dfba52 100644 --- a/openedx/features/learner_profile/urls.py +++ b/openedx/features/learner_profile/urls.py @@ -2,7 +2,7 @@ Defines URLs for the learner profile. """ -from __future__ import absolute_import + from django.conf import settings from django.conf.urls import url diff --git a/openedx/features/learner_profile/views/learner_achievements.py b/openedx/features/learner_profile/views/learner_achievements.py index d4e9a99c22..d53947a294 100644 --- a/openedx/features/learner_profile/views/learner_achievements.py +++ b/openedx/features/learner_profile/views/learner_achievements.py @@ -2,7 +2,7 @@ Views to render a learner's achievements. """ -from __future__ import absolute_import + from django.template.loader import render_to_string from lms.djangoapps.certificates import api as certificate_api from openedx.core.djangoapps.certificates.api import certificates_viewable_for_course diff --git a/openedx/features/learner_profile/views/learner_profile.py b/openedx/features/learner_profile/views/learner_profile.py index b7516da050..0066206bf3 100644 --- a/openedx/features/learner_profile/views/learner_profile.py +++ b/openedx/features/learner_profile/views/learner_profile.py @@ -1,6 +1,6 @@ """ Views for a student's profile information. """ -from __future__ import absolute_import + from badges.utils import badges_enabled from django.conf import settings from django.contrib.auth.decorators import login_required diff --git a/openedx/tests/completion_integration/test_handlers.py b/openedx/tests/completion_integration/test_handlers.py index f6cf616831..9c9c579ab1 100644 --- a/openedx/tests/completion_integration/test_handlers.py +++ b/openedx/tests/completion_integration/test_handlers.py @@ -2,7 +2,7 @@ Test signal handlers for completion. """ -from __future__ import absolute_import + from datetime import datetime diff --git a/openedx/tests/completion_integration/test_models.py b/openedx/tests/completion_integration/test_models.py index f5d725f855..cd927c3175 100644 --- a/openedx/tests/completion_integration/test_models.py +++ b/openedx/tests/completion_integration/test_models.py @@ -2,7 +2,7 @@ Test models, managers, and validators. """ -from __future__ import absolute_import, division, unicode_literals + import six from completion import models, waffle diff --git a/openedx/tests/completion_integration/test_services.py b/openedx/tests/completion_integration/test_services.py index 166850ae93..60b97fc6e3 100644 --- a/openedx/tests/completion_integration/test_services.py +++ b/openedx/tests/completion_integration/test_services.py @@ -1,7 +1,7 @@ """ Tests of completion xblock runtime services """ -from __future__ import absolute_import + import ddt from completion.models import BlockCompletion diff --git a/openedx/tests/completion_integration/test_views.py b/openedx/tests/completion_integration/test_views.py index dd9076466f..15be7248f3 100644 --- a/openedx/tests/completion_integration/test_views.py +++ b/openedx/tests/completion_integration/test_views.py @@ -2,7 +2,7 @@ """ Test models, managers, and validators. """ -from __future__ import absolute_import + import ddt from completion import waffle diff --git a/openedx/tests/settings.py b/openedx/tests/settings.py index c8923e151c..02ebd1f2e3 100644 --- a/openedx/tests/settings.py +++ b/openedx/tests/settings.py @@ -3,7 +3,7 @@ Minimal Django settings for tests of common/lib. Required in Django 1.9+ due to imports of models in stock Django apps. """ -from __future__ import absolute_import, unicode_literals + import sys import tempfile diff --git a/openedx/tests/xblock_integration/test_crowdsource_hinter.py b/openedx/tests/xblock_integration/test_crowdsource_hinter.py index 5fa5bcef1b..26aaee512d 100644 --- a/openedx/tests/xblock_integration/test_crowdsource_hinter.py +++ b/openedx/tests/xblock_integration/test_crowdsource_hinter.py @@ -1,7 +1,7 @@ """ Test scenarios for the crowdsource hinter xblock. """ -from __future__ import absolute_import + import unittest diff --git a/openedx/tests/xblock_integration/test_done.py b/openedx/tests/xblock_integration/test_done.py index e81871dd10..5f3973837c 100644 --- a/openedx/tests/xblock_integration/test_done.py +++ b/openedx/tests/xblock_integration/test_done.py @@ -4,7 +4,7 @@ Tests for the DoneXBlock. This is nice as a simple example of the edX XBlock test framework. ''' -from __future__ import absolute_import + from openedx.tests.xblock_integration.xblock_testcase import XBlockTestCase diff --git a/openedx/tests/xblock_integration/test_external_xblocks.py b/openedx/tests/xblock_integration/test_external_xblocks.py index 664a6776a3..d3fa7f08a0 100644 --- a/openedx/tests/xblock_integration/test_external_xblocks.py +++ b/openedx/tests/xblock_integration/test_external_xblocks.py @@ -7,7 +7,7 @@ run v1 tests only. That be the dragon here. """ -from __future__ import absolute_import, print_function + import pkg_resources diff --git a/openedx/tests/xblock_integration/test_recommender.py b/openedx/tests/xblock_integration/test_recommender.py index 60677641b8..873a61ea4d 100644 --- a/openedx/tests/xblock_integration/test_recommender.py +++ b/openedx/tests/xblock_integration/test_recommender.py @@ -3,7 +3,7 @@ This test file will run through some XBlock test scenarios regarding the recommender system """ -from __future__ import absolute_import + import codecs from io import BytesIO diff --git a/openedx/tests/xblock_integration/xblock_testcase.py b/openedx/tests/xblock_integration/xblock_testcase.py index d3476b652b..c25bf7cf26 100644 --- a/openedx/tests/xblock_integration/xblock_testcase.py +++ b/openedx/tests/xblock_integration/xblock_testcase.py @@ -34,7 +34,7 @@ Our next steps would be to: * Move more blocks out of the platform, and more tests into the blocks themselves. """ -from __future__ import absolute_import, print_function + import collections import json diff --git a/pavelib/__init__.py b/pavelib/__init__.py index a6b26be9ca..da9c28a354 100644 --- a/pavelib/__init__.py +++ b/pavelib/__init__.py @@ -1,6 +1,6 @@ """ paver commands """ -from __future__ import absolute_import + from . import assets, bok_choy, database, docs, i18n, js_test, prereqs, quality, servers, tests diff --git a/pavelib/assets.py b/pavelib/assets.py index f1a5b67c77..abc0a066c7 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -2,7 +2,7 @@ Asset compilation and collection. """ -from __future__ import absolute_import, print_function + import argparse import glob diff --git a/pavelib/bok_choy.py b/pavelib/bok_choy.py index eacef701e2..fd5cd6436a 100644 --- a/pavelib/bok_choy.py +++ b/pavelib/bok_choy.py @@ -2,7 +2,7 @@ Run acceptance tests that use the bok-choy framework https://bok-choy.readthedocs.org/en/latest/ """ -from __future__ import absolute_import, print_function + import os diff --git a/pavelib/database.py b/pavelib/database.py index bfee5cb2d3..30938e91a7 100644 --- a/pavelib/database.py +++ b/pavelib/database.py @@ -1,7 +1,7 @@ """ Tasks for controlling the databases used in tests """ -from __future__ import absolute_import, print_function + from paver.easy import cmdopts, needs, task diff --git a/pavelib/docs.py b/pavelib/docs.py index f009b2d59a..f7db8d510d 100644 --- a/pavelib/docs.py +++ b/pavelib/docs.py @@ -2,7 +2,7 @@ Open edX Documentation Builder Ties into Sphinx to generate files at the specified location(s) """ -from __future__ import absolute_import, print_function + import sys diff --git a/pavelib/i18n.py b/pavelib/i18n.py index 4f22f705e0..41d33a54cf 100644 --- a/pavelib/i18n.py +++ b/pavelib/i18n.py @@ -1,7 +1,7 @@ """ Internationalization tasks """ -from __future__ import absolute_import, print_function + import re import subprocess diff --git a/pavelib/js_test.py b/pavelib/js_test.py index 3271b553fe..3de8fcf076 100644 --- a/pavelib/js_test.py +++ b/pavelib/js_test.py @@ -1,7 +1,7 @@ """ Javascript test tasks """ -from __future__ import absolute_import + import sys diff --git a/pavelib/paver_tests/conftest.py b/pavelib/paver_tests/conftest.py index cf78174567..222ddf0690 100644 --- a/pavelib/paver_tests/conftest.py +++ b/pavelib/paver_tests/conftest.py @@ -2,7 +2,7 @@ Pytest fixtures for the pavelib unit tests. """ -from __future__ import absolute_import, division, print_function, unicode_literals + import os from shutil import rmtree diff --git a/pavelib/paver_tests/test_assets.py b/pavelib/paver_tests/test_assets.py index fc89499a66..337ff61771 100644 --- a/pavelib/paver_tests/test_assets.py +++ b/pavelib/paver_tests/test_assets.py @@ -1,6 +1,6 @@ """Unit tests for the Paver asset tasks.""" -from __future__ import absolute_import + import os from unittest import TestCase diff --git a/pavelib/paver_tests/test_database.py b/pavelib/paver_tests/test_database.py index 5009f8e292..128eda6c33 100644 --- a/pavelib/paver_tests/test_database.py +++ b/pavelib/paver_tests/test_database.py @@ -1,7 +1,7 @@ """ Tests for the Paver commands for updating test databases and its utility methods """ -from __future__ import absolute_import + import os import shutil diff --git a/pavelib/paver_tests/test_eslint.py b/pavelib/paver_tests/test_eslint.py index b87b86a656..06433e0aa1 100644 --- a/pavelib/paver_tests/test_eslint.py +++ b/pavelib/paver_tests/test_eslint.py @@ -1,7 +1,7 @@ """ Tests for Paver's Stylelint tasks. """ -from __future__ import absolute_import + import unittest diff --git a/pavelib/paver_tests/test_extract_and_generate.py b/pavelib/paver_tests/test_extract_and_generate.py index b94ccb6151..88c784b40c 100644 --- a/pavelib/paver_tests/test_extract_and_generate.py +++ b/pavelib/paver_tests/test_extract_and_generate.py @@ -1,7 +1,7 @@ """ This test tests that i18n extraction (`paver i18n_extract -v`) works properly. """ -from __future__ import absolute_import + import os import random diff --git a/pavelib/paver_tests/test_i18n.py b/pavelib/paver_tests/test_i18n.py index c80e1c1f04..87dde716d4 100644 --- a/pavelib/paver_tests/test_i18n.py +++ b/pavelib/paver_tests/test_i18n.py @@ -2,7 +2,7 @@ Tests for pavelib/i18n.py. """ -from __future__ import absolute_import + import os import textwrap diff --git a/pavelib/paver_tests/test_js_test.py b/pavelib/paver_tests/test_js_test.py index f7b9730eba..bf6f3ce2ea 100644 --- a/pavelib/paver_tests/test_js_test.py +++ b/pavelib/paver_tests/test_js_test.py @@ -1,6 +1,6 @@ """Unit tests for the Paver JavaScript testing tasks.""" -from __future__ import absolute_import + import ddt from mock import patch diff --git a/pavelib/paver_tests/test_paver_bok_choy_cmds.py b/pavelib/paver_tests/test_paver_bok_choy_cmds.py index d971e2299b..07a9274809 100644 --- a/pavelib/paver_tests/test_paver_bok_choy_cmds.py +++ b/pavelib/paver_tests/test_paver_bok_choy_cmds.py @@ -2,7 +2,7 @@ Tests for the bok-choy paver commands themselves. Run just this test with: paver test_lib -t pavelib/paver_tests/test_paver_bok_choy_cmds.py """ -from __future__ import absolute_import + import os import unittest diff --git a/pavelib/paver_tests/test_paver_get_quality_reports.py b/pavelib/paver_tests/test_paver_get_quality_reports.py index a92b0b9d0b..5fed110af4 100644 --- a/pavelib/paver_tests/test_paver_get_quality_reports.py +++ b/pavelib/paver_tests/test_paver_get_quality_reports.py @@ -1,7 +1,7 @@ """ Tests to ensure only the report files we want are returned as part of run_quality. """ -from __future__ import absolute_import + import unittest diff --git a/pavelib/paver_tests/test_paver_quality.py b/pavelib/paver_tests/test_paver_quality.py index 0d558dd0ff..9615990ccd 100644 --- a/pavelib/paver_tests/test_paver_quality.py +++ b/pavelib/paver_tests/test_paver_quality.py @@ -1,7 +1,7 @@ """ Tests for paver quality tasks """ -from __future__ import absolute_import, print_function + import os import shutil diff --git a/pavelib/paver_tests/test_pii_check.py b/pavelib/paver_tests/test_pii_check.py index 477c1a868d..7fb1a8c26f 100644 --- a/pavelib/paver_tests/test_pii_check.py +++ b/pavelib/paver_tests/test_pii_check.py @@ -1,7 +1,7 @@ """ Tests for Paver's PII checker task. """ -from __future__ import absolute_import + import io import shutil diff --git a/pavelib/paver_tests/test_prereqs.py b/pavelib/paver_tests/test_prereqs.py index 4d527db2c1..93da23e331 100644 --- a/pavelib/paver_tests/test_prereqs.py +++ b/pavelib/paver_tests/test_prereqs.py @@ -2,7 +2,7 @@ Tests covering the Open edX Paver prequisites installation workflow """ -from __future__ import absolute_import + import os import unittest diff --git a/pavelib/paver_tests/test_servers.py b/pavelib/paver_tests/test_servers.py index c6b4a23ad1..8c6afbe1e7 100644 --- a/pavelib/paver_tests/test_servers.py +++ b/pavelib/paver_tests/test_servers.py @@ -1,6 +1,6 @@ """Unit tests for the Paver server tasks.""" -from __future__ import absolute_import + import ddt from paver.easy import call_task diff --git a/pavelib/paver_tests/test_stylelint.py b/pavelib/paver_tests/test_stylelint.py index 6fab162593..a234060182 100644 --- a/pavelib/paver_tests/test_stylelint.py +++ b/pavelib/paver_tests/test_stylelint.py @@ -1,7 +1,7 @@ """ Tests for Paver's Stylelint tasks. """ -from __future__ import absolute_import + import ddt from mock import MagicMock, patch diff --git a/pavelib/paver_tests/test_timer.py b/pavelib/paver_tests/test_timer.py index 02c148cbdd..5cf3f7b405 100644 --- a/pavelib/paver_tests/test_timer.py +++ b/pavelib/paver_tests/test_timer.py @@ -2,7 +2,7 @@ Tests of the pavelib.utils.timer module. """ -from __future__ import absolute_import + from datetime import datetime, timedelta from unittest import TestCase diff --git a/pavelib/paver_tests/test_utils.py b/pavelib/paver_tests/test_utils.py index 1aa846a412..eb73d68a52 100644 --- a/pavelib/paver_tests/test_utils.py +++ b/pavelib/paver_tests/test_utils.py @@ -2,7 +2,7 @@ Tests for pavelib/utils/test/utils """ -from __future__ import absolute_import + import unittest diff --git a/pavelib/paver_tests/test_xsscommitlint.py b/pavelib/paver_tests/test_xsscommitlint.py index e8e2e15038..4e504428ac 100644 --- a/pavelib/paver_tests/test_xsscommitlint.py +++ b/pavelib/paver_tests/test_xsscommitlint.py @@ -1,7 +1,7 @@ """ Tests for paver xsscommitlint quality tasks """ -from __future__ import absolute_import + from mock import patch from paver.easy import call_task diff --git a/pavelib/paver_tests/test_xsslint.py b/pavelib/paver_tests/test_xsslint.py index 634d479871..ded36433d6 100644 --- a/pavelib/paver_tests/test_xsslint.py +++ b/pavelib/paver_tests/test_xsslint.py @@ -1,7 +1,7 @@ """ Tests for paver xsslint quality tasks """ -from __future__ import absolute_import + from mock import patch from paver.easy import call_task diff --git a/pavelib/paver_tests/utils.py b/pavelib/paver_tests/utils.py index a318e4668c..ef3f20b146 100644 --- a/pavelib/paver_tests/utils.py +++ b/pavelib/paver_tests/utils.py @@ -1,6 +1,6 @@ """Unit tests for the Paver server tasks.""" -from __future__ import absolute_import + import os from unittest import TestCase diff --git a/pavelib/prereqs.py b/pavelib/prereqs.py index cc376f9f60..b7eec051e4 100644 --- a/pavelib/prereqs.py +++ b/pavelib/prereqs.py @@ -1,7 +1,7 @@ """ Install Python and Node prerequisites. """ -from __future__ import absolute_import, print_function + import hashlib import io diff --git a/pavelib/quality.py b/pavelib/quality.py index 0570cb646f..4d25c41c59 100644 --- a/pavelib/quality.py +++ b/pavelib/quality.py @@ -4,7 +4,7 @@ """ Check code quality using pycodestyle, pylint, and diff_quality. """ -from __future__ import absolute_import, print_function + import io import json diff --git a/pavelib/servers.py b/pavelib/servers.py index fbdd1863b1..7eacd27592 100644 --- a/pavelib/servers.py +++ b/pavelib/servers.py @@ -1,7 +1,7 @@ """ Run and manage servers for local development. """ -from __future__ import absolute_import, print_function + import argparse import sys diff --git a/pavelib/tests.py b/pavelib/tests.py index 3dfc43cfb9..04fb0bacc9 100644 --- a/pavelib/tests.py +++ b/pavelib/tests.py @@ -1,7 +1,7 @@ """ Unit test tasks """ -from __future__ import absolute_import, print_function + import os import re diff --git a/pavelib/utils/db_utils.py b/pavelib/utils/db_utils.py index c82459704b..bed0f0f074 100644 --- a/pavelib/utils/db_utils.py +++ b/pavelib/utils/db_utils.py @@ -1,7 +1,7 @@ """ Utility methods for bokchoy database manipulation. """ -from __future__ import absolute_import, print_function + import os import tarfile diff --git a/pavelib/utils/envs.py b/pavelib/utils/envs.py index 2d775c0998..54e371bb0a 100644 --- a/pavelib/utils/envs.py +++ b/pavelib/utils/envs.py @@ -1,7 +1,7 @@ """ Helper functions for loading environment settings. """ -from __future__ import absolute_import, print_function + import io import json diff --git a/pavelib/utils/passthrough_opts.py b/pavelib/utils/passthrough_opts.py index f5117e98e3..6632bbcda1 100644 --- a/pavelib/utils/passthrough_opts.py +++ b/pavelib/utils/passthrough_opts.py @@ -8,7 +8,7 @@ Provides: as the `passthrough_options` argument to the decorated function """ -from __future__ import absolute_import + from optparse import BadOptionError, OptionParser diff --git a/pavelib/utils/process.py b/pavelib/utils/process.py index 7c34db9c9d..95868b3daa 100644 --- a/pavelib/utils/process.py +++ b/pavelib/utils/process.py @@ -1,7 +1,7 @@ """ Helper functions for managing processes. """ -from __future__ import absolute_import, print_function + import atexit import os diff --git a/pavelib/utils/test/bokchoy_options.py b/pavelib/utils/test/bokchoy_options.py index fd46cab74a..2a856d964d 100644 --- a/pavelib/utils/test/bokchoy_options.py +++ b/pavelib/utils/test/bokchoy_options.py @@ -2,7 +2,7 @@ Definitions of all options used by the various bok_choy tasks. """ -from __future__ import absolute_import + import os from optparse import make_option diff --git a/pavelib/utils/test/bokchoy_utils.py b/pavelib/utils/test/bokchoy_utils.py index b7f76f42ef..44705ff90f 100644 --- a/pavelib/utils/test/bokchoy_utils.py +++ b/pavelib/utils/test/bokchoy_utils.py @@ -1,7 +1,7 @@ """ Helper functions for bok_choy test tasks """ -from __future__ import absolute_import, print_function + import os import subprocess diff --git a/pavelib/utils/test/suites/bokchoy_suite.py b/pavelib/utils/test/suites/bokchoy_suite.py index 822457615b..5ca9c97e22 100644 --- a/pavelib/utils/test/suites/bokchoy_suite.py +++ b/pavelib/utils/test/suites/bokchoy_suite.py @@ -2,7 +2,7 @@ """ Class used for defining and running Bok Choy acceptance test suite """ -from __future__ import absolute_import, print_function + import os from time import sleep diff --git a/pavelib/utils/test/suites/js_suite.py b/pavelib/utils/test/suites/js_suite.py index 4c43150185..9f772ff621 100644 --- a/pavelib/utils/test/suites/js_suite.py +++ b/pavelib/utils/test/suites/js_suite.py @@ -2,7 +2,7 @@ Javascript test tasks """ -from __future__ import absolute_import + from paver import tasks diff --git a/pavelib/utils/test/suites/pytest_suite.py b/pavelib/utils/test/suites/pytest_suite.py index fa3d86c73a..1e96ec2ec2 100644 --- a/pavelib/utils/test/suites/pytest_suite.py +++ b/pavelib/utils/test/suites/pytest_suite.py @@ -2,7 +2,7 @@ """ Classes used for defining and running pytest test suites """ -from __future__ import absolute_import + import os from glob import glob diff --git a/pavelib/utils/test/suites/python_suite.py b/pavelib/utils/test/suites/python_suite.py index 33093f2aef..bcd4b0c716 100644 --- a/pavelib/utils/test/suites/python_suite.py +++ b/pavelib/utils/test/suites/python_suite.py @@ -1,7 +1,7 @@ """ Classes used for defining and running python test suites """ -from __future__ import absolute_import + import os diff --git a/pavelib/utils/test/suites/suite.py b/pavelib/utils/test/suites/suite.py index f23e371057..c343074a37 100644 --- a/pavelib/utils/test/suites/suite.py +++ b/pavelib/utils/test/suites/suite.py @@ -2,7 +2,7 @@ """ A class used for defining and running test suites """ -from __future__ import absolute_import, print_function + import os import subprocess diff --git a/pavelib/utils/test/utils.py b/pavelib/utils/test/utils.py index 1a53c46e45..8b562660b6 100644 --- a/pavelib/utils/test/utils.py +++ b/pavelib/utils/test/utils.py @@ -1,7 +1,7 @@ """ Helper functions for test tasks """ -from __future__ import absolute_import, print_function + import os import re diff --git a/pavelib/utils/timer.py b/pavelib/utils/timer.py index dd65768574..21b31b2091 100644 --- a/pavelib/utils/timer.py +++ b/pavelib/utils/timer.py @@ -2,7 +2,7 @@ Tools for timing paver tasks """ -from __future__ import absolute_import + import json import logging diff --git a/scripts/show_events.py b/scripts/show_events.py index e03d42c44c..7b3570e3d5 100644 --- a/scripts/show_events.py +++ b/scripts/show_events.py @@ -1,7 +1,7 @@ """ Show Event outputs. """ -from __future__ import absolute_import, print_function + import json import sys diff --git a/scripts/vulture/whitelist.py b/scripts/vulture/whitelist.py index d0c03e650d..02fbfac4bd 100644 --- a/scripts/vulture/whitelist.py +++ b/scripts/vulture/whitelist.py @@ -5,7 +5,7 @@ # add them below. This file is consumed by # scripts/dead_code/find-dead-code.sh -from __future__ import absolute_import + from vulture.whitelist_utils import Whitelist diff --git a/scripts/xblock/xblock_counts.py b/scripts/xblock/xblock_counts.py index 0fd4aec45a..5f80e4a56e 100644 --- a/scripts/xblock/xblock_counts.py +++ b/scripts/xblock/xblock_counts.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import, print_function + import argparse import csv diff --git a/scripts/xdist/get_worker_test_list.py b/scripts/xdist/get_worker_test_list.py index 4123b4dc3f..6800b4f371 100644 --- a/scripts/xdist/get_worker_test_list.py +++ b/scripts/xdist/get_worker_test_list.py @@ -4,7 +4,7 @@ lists of each pytest worker. Assumes the following format: [test-suite] [worker] RESULT test """ -from __future__ import absolute_import + import io import os diff --git a/scripts/xdist/pytest_worker_manager.py b/scripts/xdist/pytest_worker_manager.py index 87b60df5d6..bccd03e0be 100644 --- a/scripts/xdist/pytest_worker_manager.py +++ b/scripts/xdist/pytest_worker_manager.py @@ -2,7 +2,7 @@ Manages the creation and termination of EC2 workers, to be used with pytest-xdist as part of the CI process on Jenkins. """ -from __future__ import absolute_import + import argparse import logging import time diff --git a/scripts/xsslint/tests/test_linters.py b/scripts/xsslint/tests/test_linters.py index 420852640d..ce18bfea13 100644 --- a/scripts/xsslint/tests/test_linters.py +++ b/scripts/xsslint/tests/test_linters.py @@ -2,7 +2,7 @@ """ Tests for linters.py """ -from __future__ import absolute_import, print_function + import textwrap from unittest import TestCase diff --git a/scripts/xsslint/tests/test_main.py b/scripts/xsslint/tests/test_main.py index ecdf3b854c..a584e137df 100644 --- a/scripts/xsslint/tests/test_main.py +++ b/scripts/xsslint/tests/test_main.py @@ -2,7 +2,7 @@ """ Tests for main.py """ -from __future__ import absolute_import + import re from six import StringIO diff --git a/scripts/xsslint/tests/test_utils.py b/scripts/xsslint/tests/test_utils.py index b9e983cea3..a82edf4fa7 100644 --- a/scripts/xsslint/tests/test_utils.py +++ b/scripts/xsslint/tests/test_utils.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from unittest import TestCase diff --git a/scripts/xsslint/xss_linter.py b/scripts/xsslint/xss_linter.py index a1aced7a14..7ed14f73a7 100755 --- a/scripts/xsslint/xss_linter.py +++ b/scripts/xsslint/xss_linter.py @@ -4,7 +4,7 @@ A linting tool to check for xss vulnerabilities. """ -from __future__ import absolute_import + if __name__ == "__main__": from xsslint.main import main diff --git a/scripts/xsslint/xsslint/default_config.py b/scripts/xsslint/xsslint/default_config.py index 865d7a23ac..e5075785e1 100644 --- a/scripts/xsslint/xsslint/default_config.py +++ b/scripts/xsslint/xsslint/default_config.py @@ -1,5 +1,5 @@ # Default xsslint config module. -from __future__ import absolute_import + from xsslint.linters import ( JavaScriptLinter, MakoTemplateLinter, diff --git a/scripts/xsslint/xsslint/linters.py b/scripts/xsslint/xsslint/linters.py index b32f8d27ac..d345483f0d 100644 --- a/scripts/xsslint/xsslint/linters.py +++ b/scripts/xsslint/xsslint/linters.py @@ -1,7 +1,7 @@ """ Linter classes containing logic for checking various filetypes. """ -from __future__ import absolute_import + import ast import io diff --git a/scripts/xsslint/xsslint/main.py b/scripts/xsslint/xsslint/main.py index d8632056da..5f8b9c65ef 100644 --- a/scripts/xsslint/xsslint/main.py +++ b/scripts/xsslint/xsslint/main.py @@ -1,7 +1,7 @@ """ The main function for the XSS linter. """ -from __future__ import absolute_import + import argparse import importlib diff --git a/scripts/xsslint/xsslint/reporting.py b/scripts/xsslint/xsslint/reporting.py index adeac80c4f..b50fe76d90 100644 --- a/scripts/xsslint/xsslint/reporting.py +++ b/scripts/xsslint/xsslint/reporting.py @@ -1,7 +1,7 @@ """ Utility classes for reporting linter results. """ -from __future__ import absolute_import, print_function + import os import re diff --git a/scripts/xsslint/xsslint/utils.py b/scripts/xsslint/xsslint/utils.py index 46740a775f..7cacf2b90a 100644 --- a/scripts/xsslint/xsslint/utils.py +++ b/scripts/xsslint/xsslint/utils.py @@ -1,7 +1,7 @@ """ Utility classes/functions for the XSS Linter. """ -from __future__ import absolute_import + import re diff --git a/scripts/xsslint/xsslint/visitors.py b/scripts/xsslint/xsslint/visitors.py index 3abf85aabb..0cfae3cdf1 100644 --- a/scripts/xsslint/xsslint/visitors.py +++ b/scripts/xsslint/xsslint/visitors.py @@ -1,7 +1,7 @@ """ Custom AST NodeVisitor classes uses for Python xss linting. """ -from __future__ import absolute_import + import ast import re diff --git a/scripts/xsslint_config.py b/scripts/xsslint_config.py index 2cb5e408ed..beb11e55d6 100644 --- a/scripts/xsslint_config.py +++ b/scripts/xsslint_config.py @@ -1,5 +1,5 @@ # xsslint config module for edx-platform -from __future__ import absolute_import + import os import sys