Commit Graph

73 Commits

Author SHA1 Message Date
Jawayria
bf9e498be7 Merge pull request #26536 from edx/jawayria/bom-2352-1
BOM-2352: Removed unused imports from lms/djangoapps/{badges, brandin…
2021-03-04 20:39:23 +05:00
usamasadiq
fb92051dee refac: ran pyupgrade on lms/djangoapps/badges 2021-02-25 18:15:27 +05:00
Jawayria
0491f72c1d BOM-2352: Removed unused imports from lms/djangoapps/{badges, branding, bulk_email, ccx} 2021-02-23 19:37:18 +05:00
Aarif
f35ff6a1eb replaced unittest assertions pytest assertions (#26540) 2021-02-18 19:13:47 +05:00
Jawayria
2bd28795ad Applied pylint-amnesty to lms/djangoapps/badges 2021-01-26 21:05:41 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
uzairr
fb9ba90efe PROD-1236: Do not expose user id with certificate URL. 2020-07-17 22:59:34 +05:00
Ned Batchelder
cca33732ba Correct markup mistakes in api docs 2020-05-12 13:36:14 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Nimisha Asthagiri
8a0d57eec3 Django2 Badges: fix course_id string 2020-03-31 14:23:53 -04:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 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
2019-12-30 10:35:30 -05:00
Manjinder Singh
a40f1d9bd6 BOM-933: Fix type mismatches in various migrations 2 (#22115)
* Fix type mismatches in track migrations

* Fix type mismatches in oauth_dispatch

* Fix type mismatches in badges migrations

* fix type mismatch in contentserver migrations

* Fix type mismatches in mobile_api migrations

* fix type mismatch in crawlers migrations

* fix type mismatch in dark_lang migrations

* fix type mismatch in branding  migrations
2019-10-23 13:04:36 -04:00
Ayub khan
5c47a3b425 BOM Project
Updated __unicode__ to __str__
2019-09-25 18:31:54 +05:00
aarif
9301ec38f3 python 3 fixes 2019-09-12 17:29:34 +05:00
Awais Qureshi
7986916524 BOM-137
python3 tests failures.
2019-09-06 12:11:23 +05:00
Awais Qureshi
3a61df0655 BOM-129
python3 tests failures.
2019-09-05 16:51:43 +05:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
Uzair Rasheed
d9e8713077 Merge pull request #21103 from edx/INCR-453/python-modernize-350-of-380
Python-modernize on edx-platform (350 of 380)
2019-07-15 13:39:04 +05:00
adeelehsan
b65601e023 Executed python-modernize and isort
on mentioned files in INCR-451
 Please enter the commit message for your changes. Lines starting
2019-07-12 16:15:19 +05:00
uzairr
32aa2273ab Python-modernize on edx-platform (350 of 380)
After executing python-modernize and isort, few changes
occurred in import sequence as well as unicode func is
replaced by six.text_type func.

INCR-453
2019-07-12 13:43:35 +05:00
Amit
9ecb771aa8 INCR-452: Updates on Python 3.x (#21058) 2019-07-11 10:19:53 -04:00
Stu Young
c101a613d9 INCR-274 Run python-modernize on lms/djangoapps/badges/events and lms/djangoapps/badges/tests (#20585)
* run python modernize

* run isort

* Fix quality
2019-05-21 11:30:40 -04:00
Stu Young
135f9ad998 incr-273 (#20566)
* run python modernize

* run isort
2019-05-16 09:51:45 -04:00
bmedx
7df1e05f49 Fix xxslint errors in touched files 2019-02-19 11:24:24 -05:00
Julia Eskew
368f221f0a Initial start on annotations. 2019-02-19 11:24:21 -05:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Robert Raposa
fbc59231fc Update edx-drf-extensions to 2.0.0.
Note: this version update is backward incompatible.

ARCH-255
2018-10-17 01:00:34 -04:00
Ahsan Ulhaq
ee7555e85f update usage of SessionAuthenticationAllowInactiveUser
LEARNER-6469
2018-10-01 17:52:52 +05:00
Ned Batchelder
93d4af35bd No need for superstitious kwargs 2018-09-17 17:01:11 -04:00
Jeremy Bowman
1a5bf35357 TE-2689 Remove useless pylint suppressions part 2 2018-08-14 17:39:02 -04:00
Jeremy Bowman
ca3316962d TE-2524 Stop using nose.plugins - LMS 1 2018-07-31 13:03:18 -04:00
Brian Mesick
832f6a7157 Merge pull request #18320 from edx/bmedx/remove_111_test_marks
Remove unused pytest markers for Django 1.11 upgrade
2018-06-06 11:15:26 -04:00
Tyler Hallada
1f42d1b384 Merge pull request #18316 from edx/thallada/PLAT-1524-on-delete
PLAT-1524: Add on_delete kwarg to ForeignKey & OneToOneFields
2018-06-06 10:38:15 -04:00
bmedx
c125ff6a57 Remove unused pytest markers for Django 1.11 upgrade 2018-06-06 09:58:38 -04:00
Tyler Hallada
1540f9ec72 Add on_delete kwarg to ForeignKey & OneToOneFields
Django 2.0 will make this field required for `ForeignKey` and `OneToOneFields`.
In previous versions the option defaulted to `models.CASCADE` when not
specified. This change should make the deprecation warnings in the current
Django version go away.

The migrations where also modified, but the changes should not cause a change in
the database schema since `models.CASCADE` was already the old default.
2018-06-05 17:05:12 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Jeremy Bowman
bf86b3da98 PLAT-1942 Handle xmodule_django field deprecations 2018-02-05 15:05:54 -05:00
Nimisha Asthagiri
2e9efe6472 Fix Certificates import and signals code 2018-01-19 15:12:28 -05:00
bmedx
95e76dcafe Small fixes to LMS unit 1 failures in Django 1.11 tests 2018-01-08 10:20:30 -05:00
bmedx
5fbbf4979a Tag LMS Unit 1 tests that fail in Django 1.11 2017-11-22 15:46:45 -05:00
bmedx
11a4030767 LMS urls cleanup for Django 1.11
- Remove usage of django.urls.patterns
- Change urls tuples to lists
- Make all string view names callables
- This is the second of several urls updates for LMS; a work in progress
2017-11-06 16:06:00 -05:00
Troy Sankey
e94d265fa7 Remove our copy of the slugify() implementation 2017-10-05 15:37:01 -04:00