Commit Graph

81 Commits

Author SHA1 Message Date
M. Zulqarnain
43008723be feat: New codemods on OpenedX 3 (#28778) 2021-10-22 13:55:51 +05:00
Usama Sadiq
484cd536e2 fix: Fixed new pylint warnings (#28724) 2021-09-23 17:54:04 +05:00
Tim McCormack
035dfd8522 feat: Add feature to display a global maintenance banner (#28673)
This is intended for use in the Studio OAuth transition (ARCHBOM-1887) but
may be useful in the future as well.
2021-09-08 16:21:43 +00:00
Awais Qureshi
1f12ab186c chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
2021-07-29 18:22:22 +05:00
Aarif
58a54f8d0b BOM-2543: Remove the diff-quality step from quality checks (#27619)
* build: Removed the diff-quality step
Applied lint-amnesty on all the warnings
Removed pylint thresholds comparison code and related tests

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-06-07 18:37:06 +05:00
Usama Sadiq
2b55959a8e refactor: apply lint-amnesty on existing violations 2021-04-20 23:51:31 +05:00
Awais Qureshi
2be5184e38 BOM-2340
Testing pylint-pytest package
2021-04-14 17:40:18 +05:00
Usama Sadiq
ac8c3b6a03 refactor: Ran pyupgrade on openedx/core/djangoapps
Ran pyupgrade on openedx/core/djangoapps/{util, verified_track_content}
2021-04-07 18:57:12 +05:00
M. Zulqarnain
42fc6aef03 Upgrade django-ipware (#24827) 2021-02-23 18:14:17 +05:00
Aarif
4ef7d63211 replaced unittest assertions pytest assertions (#26571) 2021-02-22 20:03:33 +05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
Feanil Patel
6fb93463a8 refactor Replace django-ratelimit-backend with django-ratelimit
We use django-ratelimit to limit per IP login attempts, and then we use
django-ratelimit-backend to limit per username login attempts. This
change replaces the usage of django-ratelimit-backend with another
instance of django-ratelimit so that both limits can be managed by one
library.

This is the first step in being able to fully excise
django-ratelimit-backend from edx-platform. Note that we're still using
the `RateLimitMixin` in openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py
because studio and the admin UI still relies on that for rate limiting.
Those login paths will have to be updated before we can remove the mixin
from our auth backend.
2021-02-12 09:52:13 -05:00
Soban Javed
5199bf7acb Replace task decorator with shared_task in openedx 2021-02-04 18:35:38 +05:00
Jawayria
ff3e9995fc Merge pull request #26375 from edx/jawayria/bom-2330-pylint-amnesty
BOM-2330: Applied pylint-amnesty to util, verified_track_content, vid…
2021-02-04 18:30:55 +05:00
Jawayria
d37faa8270 BOM-2330: Applied pylint-amnesty to util, verified_track_content, video_config, video_pipeline 2021-02-04 17:52:58 +05:00
Nizar Mahmoud
4e16b92971 Documents maintenance banner setting and toggle and adds necessary unit tests 2021-02-02 23:04:53 +03:00
Nizar
1e872d4e10 Adds support for enabling custom tinymce plugins in Studio's HTML editor (#25695) 2021-01-11 11:28:20 -05:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01: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
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Mike OConnell
dbf6ef22df Using logging filters from edx-django-utils (#25492)
The UserIdFilter and RemoteIpFilter logging filter classes
were moved from edx-platform to edx-django-utils for more
distributed use. This updated removes those classes from
edx-platform, and references their counterparts in
edx-django-utils.

ENT-3494
2020-11-02 21:40:59 -05:00
Mike OConnell
11e4cab622 Added remote IP to logging (#24932)
* Add remote IP to logging config

Add a new filter to get the remote IP for the current
request and include it in log statements

SEG-34

* Added line for formatting

Added line for formatting

SEG-34
2020-09-14 11:22:11 -04:00
emzubair
169b82261a [BD-18] Optimize paver settings call 2020-08-21 21:23:29 +05:00
Awais Qureshi
fd6cb9e0d6 BOM-1890
Remove the context parameter from CourseKeyField.from_db_value()
2020-07-14 21:55:50 +05:00
Jansen Kantor
25baa93af9 EDUCATOR-4877: Implement stubbed API functions using new config values (#22913)
add stubbed api functions, tests
2020-01-24 15:54:32 -05:00
Mahyar Damavand
f1c5981fab Removing deprecated management commands which intended to clear historical data (#21522) 2020-01-08 12:50:34 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Jeremy Bowman
63574e12b8 Remove pytest version constraint (#22626)
Fix the issue that was preventing us from upgrading pytest.  pytest does some manipulation of test packages that prevents `pkg_resources` from loading resources from them, but used to contain a workaround for the problem.  That workaround was [removed](https://github.com/pytest-dev/pytest/issues/5392) in 4.6.0 as a performance enhancement when pytest switched from `pkg_resources` to `importlib-metadata` for its own entrypoint handling.  This tripped up one of our test modules which defined classes that loaded templates from inside a test package.  Moving these resources to the parent package fixes the problem.

More and more, `pkg_resources` is being abandoned in favor of `importlib-metadata` and `importlib_resources` as they have a simpler design with much better performance.  However, `importlib_resources` doesn't support loading files from any directory which isn't itself a Python package (and doesn't allow direct use of paths including directories within the package).  Jinja2 chose a [different approach](https://github.com/pallets/jinja/pull/1082) that we may want to emulate in our resource handling.

Also fixed usage of a removed `pytest.raises()` parameter and a bug in our configuration of the `common/lib` tests that became a problem after the upgrade.
2019-12-30 09:10:57 -05:00
aarif
70f51de25b python 3 fixes
quality fixes

python 3 fixes

quality fixes
2019-09-23 17:21:37 +05:00
Ayub khan
22916323a1 BOM-574 2019-09-19 18:18:49 +05:00
Brittney Exline
d35218a820 ENT-2230 Upgrade edx-enterprise to 1.9.12 2019-09-09 08:52:01 -06:00
Amit
13fc8a7dd5 INCR-240 (#20509)
* INCR-240: Run python-modernize and isort on openedx/core/djangoapps/util

* INCR-240: [ADD] Missing module docstring at ratelimit
2019-05-10 11:23:05 -04:00
Kyle Mulka
9221c2dfd1 ran modernize on openedx/core/djangoapps/util/tests and management 2019-05-06 16:41:25 +00:00
Nimisha Asthagiri
dfa3728edf Move django_comment_common from common to openedx 2019-05-03 12:10:18 -04:00
Nimisha Asthagiri
ef0e06cc0a Revert "Discussions consolidation" 2019-05-02 14:59:56 -04:00
Nimisha Asthagiri
df962a31b7 Move django_comment_common to openedx/core/djangoapps/discussion_common 2019-05-01 19:15:02 -04:00
Calen Pennington
b2d213ec08 fixup! Log current userid in all log messages 2019-03-12 15:13:57 -04:00
Calen Pennington
e6dada4b52 fixup! Log current userid in all log messages 2019-03-12 14:13:13 -04:00
Calen Pennington
721dd3bc8a Log current userid in all log messages
REVMI-60
2019-03-12 13:55:08 -04:00
Calen Pennington
78c8950ea3 Clean up a few remaining unicode format string errors 2019-02-20 15:28:14 -05:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
cclauss
8fca11b85c Use print() function in both Python 2 and Python 3 2019-01-13 17:16:37 +01:00
Matthew Piatetsky
5bb56fe45f add informational banners when masquerading as user who would not have access due to start date 2019-01-10 11:06:30 -05:00
rabiaiftikhar
aac430da34 EDUCATOR-3213 make Global EdX Staff able to view all forum posts 2018-10-10 12:01:23 +05:00
Nimisha Asthagiri
700a902b68 Cleanup and remove deprecated RequestCache Django app
ARCH-223
2018-09-12 14:39:11 -04:00
Jeremy Bowman
380a24f7ef TE-2689 Remove useless pylint suppressions part 6 2018-08-21 13:54:34 -04:00