Commit Graph

126 Commits

Author SHA1 Message Date
Leonardo Martinez
b4fee68283 Fix the DeprecationWarning for unescape (#23936)
This PR solves the DeprecationWarning mentioned in:
https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

HTMLParser was renamed in html.parser in Python3:
https://docs.python.org/2/library/htmlparser.html#module-HTMLParser

* html_parser.HTMLParser().unescape from six.moves has been deprecated

* instead use html.unescape from Python3

Documentation for unescape in Python3:
https://docs.python.org/3/library/html.html#html.unescape

- html_parser from six.moves has been deprecated

- instead use html.parser from Python3

- Order imports using isort

- Delete unused import crum
2020-06-19 09:27:45 -04:00
Daniel Francis
82c0ca0da8 Fixing implicit parser name for Beautiful Soup (lms, openedx) (#24100)
Fixing 56 GuessedAtParserWarnings, in commit edx#24098

Background: BeautifulSoup automatically picks the fastest parser available. By default, it picks the "lxml" parser.

Per the [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser) documentation:

> Beautiful Soup supports the HTML parser included in Python’s standard library, but it also supports a number of third-party Python parsers. One is the lxml parser. Depending on your setup, you might install lxml with one of these commands.
> Another alternative is the pure-Python html5lib parser, which parses HTML the way a web browser does. 

Context: We changed two statements, one in lms and another in openedx. Both statements fire up BeautifulSoup. Now we explicitly ask for "lxml," following the recommendation on BeautifulSoup's documentation:

> If you can, I recommend you install and use lxml for speed. If you’re using a very old version of Python – earlier than 2.7.3 or 3.2.2 – it’s essential that you install lxml or html5lib. Python’s built-in HTML parser is just not very good in those old versions.

Before:
`soup = BeautifulSoup(content)`

After:
`soup = BeautifulSoup(markup=content, features="lxml")`

The warnings are gone, tests are passing in local.
2020-06-18 15:41:07 -04:00
Dave St.Germain
fbc18460ca Add support for external user ids to the xblock user service. 2020-04-29 08:55:40 -04:00
Awais Jibran
804fac9358 Adds retry logic for software secure 2020-04-13 14:14:11 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Waheed Ahmed
3dc3e10819 Revert "Adds retry logic for software secure." 2020-04-07 20:40:06 +05:00
Awais Jibran
4b22554411 Merge pull request #23514 from edx/aj/ss-retry-logic
Adds retry logic for software secure.
2020-04-07 10:59:57 +05:00
Awais Jibran
4ead215665 Adds retry logic for ss.
1. Created a new celery queue with key `SOFTWARE_SECURE_VERIFICATION_ROUTING_KEY`.
2. Added a celery task with retry logic.
3. sorted imports with isort.
4. Changed deprecated `log.warn` => `log.warning`.
2020-04-06 15:16:56 +05:00
Awais Qureshi
b55e8da882 BOM-1463
Adding missing aap.
2020-04-05 21:09:17 +05:00
Ayub-khan
3c1140dc49 BOM-1045
-Upgrade edx-drf-extensions
-settings-update
2020-03-10 16:06:02 +05:00
Awais Jibran
c6e0985812 Upgrade edx-when in edx-platform
Run `make upgrade` on edx-platform to update python packages.
PROD-1333
2020-03-03 20:01:09 +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
Braden MacDonald
5fc73468b3 Change completion API to work with any learning context 2019-10-22 14:04:31 -04:00
Ayub
f08a7e7268 Merge pull request #22032 from edx/BOM-xblock-recommender-tests-fix
BOM Project Xblock Recommber integration tests fix
2019-10-15 13:03:40 +05:00
Awais Qureshi
f7adc71c44 BOM-924
Fixing TypeError, the JSON object must be str, not 'bytes'.
2019-10-15 12:11:24 +05:00
Ayub khan
f0133d861d BOM Project Xblock Recommber integration tests fix
Python3 json can not work with bytes type input so used simplejson
instead of python json which works with both bytes and unicode
type input.
Previously we mistakenly updated StringIO to six.String io. which
caused the tests failure. Used io.BytesIO to fix the issues as
assci character bytes can not be converted to unicode.
2019-10-14 18:20:42 +05:00
asadazam93
7a43721f81 Upgrade python 3 decode error 2019-10-04 16:17:11 +05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Jeremy Bowman
553d35e53e Upgrade mock BOM-596 (#21717) 2019-09-24 10:14:17 -04:00
Feanil Patel
f2445cfe36 Turn off hash randomization on the xdist workers as well. 2019-09-06 17:04:17 -04:00
David Ormsbee
9a1385585f Convert response bytes to str before JSON parsing. (#21375)
Convert response bytes to str before JSON parsing.
2019-08-19 11:01:55 -04:00
Diana Huang
bf7dad15e4 Remove microsite djangoapp except migrations and configuration. 2019-08-16 09:42:57 -04:00
aarif
61800c619f replaced StringIO imports with import from six
replaced cStringIO and StringIO imports with import from six

fixed StringIO imports

fixed StringIO imports

fixed XSS python-wrap warning
2019-08-08 00:09:16 +05:00
Calen Pennington
ce058aa5ee Only allow users who have no entitlements to receive discounts 2019-06-25 12:04:59 -04:00
Calen Pennington
2901d5f810 Centralize the strike-out price formatting to make correct accessibility easier 2019-06-18 11:00:08 -04:00
Jeremy Bowman
ff7292538e More pylint fixes (#20692) 2019-05-28 09:19:31 -04:00
aliciaerwin
ddeb7c4204 INCR-237 Run python modernize on openedx/tests (#20494) 2019-05-24 15:46:18 -04:00
Nimisha Asthagiri
eb0791ec89 Inter-app API cleanup for Grades 2019-05-04 11:35:06 -04: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
Ned Batchelder
1113c4baec Merge pull request #20286 from edx/nedbat/sec-367
URL patterns should be anchored. SEC-367
2019-05-01 08:25:05 -04:00
Dave St.Germain
b4ccd03740 This adds a new django app -- edx-when -- that will copy start and due dates to mysql and allow per-learner overrides in the instructor dashboard, using the existing IDDE interface.
It adds a data migration for existing IDDE data.
2019-04-24 12:26:19 -04:00
Ned Batchelder
2171ddb9df URL patterns should be anchored. SEC-367
Some notes:

* The completion API was pulled out into a new repo, but left behind a
  url() entry.  That entry used a different namespace than the
  pulled-out repo, so I had to fix the one place we used the namespace.

* Two urls couldn't be anchored because they broke tests:

    url(r'users/(?P<user_id>\w+)/followed$', views.followed_threads, name='followed_threads'),
    url(r'users/(?P<user_id>\w+)$', views.user_profile, name='user_profile'),
2019-04-23 09:19:23 -04:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
Michael Youngstrom
4bbd1dee0b Remove shards from commonlib-unit tests 2019-02-12 14:28:35 -05:00
Dillon Dumesnil
dbd85410f8 Removing test file for removed review xblock 2019-01-31 10:19:54 -05:00
cclauss
8fca11b85c Use print() function in both Python 2 and Python 3 2019-01-13 17:16:37 +01:00
Michael Roytman
23fcb7e7bb Removed course-run exam rule configuration 2018-12-21 11:14:58 -05:00
Michael Roytman
ecabcf90dd Enable course run level overrides for proctoring configuration. 2018-12-21 10:54:51 -05:00
Nimisha Asthagiri
886bc4b20b Studio login/registration redirects to LMS 2018-12-17 20:50:57 -05:00
Matthew Piatetsky
14a899a65d REVE-104 & REVE-108: Ensure Course Roles' Access 2018-12-07 16:39:09 -05:00
Matthew Piatetsky
815acda002 Populate experiment data with holdback key post enrollment and check holdback key when setting user group 2018-11-28 13:40:57 -05:00
Calen Pennington
0cb48dfe1c Add StackedConfigurationModels for managing content_type_gating and course_duration_limits 2018-11-21 12:18:10 -05:00
Matt Tuchfarber
be472a8d52 Extract upsell into template, extract ecomm call, use mobile utils 2018-11-08 11:40:06 -05:00
Michael Youngstrom
5880fd36bc Add waffle to installed_apps for commonlib 2018-11-06 14:53:33 -05:00
J. Cliff Dyer
1f45a7e934 Fix query counts on completion tests and update requirements.
Update requirements
2018-09-19 11:16:12 -04:00
Farhanah Sheets
5c3c0f0fcb Edit test value to be valid URL format 2018-09-10 20:21:56 -04:00
Jeremy Bowman
3ff3eee2f2 TE-2689 Remove useless pylint suppressions part 4 2018-08-20 12:54:22 -04:00