Commit Graph

1366 Commits

Author SHA1 Message Date
Ayub khan
8717510d35 BOM-805
python3 compatibility: Before comparison with unicode decode text if its type is bytes.
2019-10-14 15:15:28 +05:00
Ayub khan
e9c4c22e6a BOM fixed remaining capa module issues
BOM-898 fix test_responsetypes.py issues
Updated safe_exec to use random2 library instead of random.
As python3 random generates different results as compared to
python2, which causes a lot of test failures and if we use
python3 random and fix tests it will cause state invalidation
of capa problems, So random2 was uses to make the behaviour same
in python3.

BOM-899 name xrange is not defined
xrange is used in safe_exec and there might be old courses where
this is being used in capa problems. All those tests fail in python3
as this was renamed to range. Used six.moves.xrange so that code
works for python3 and if there is any old code using xrange it
works too.
2019-10-14 13:29:12 +05:00
Awais Qureshi
a231876493 BOM-799
\\n\\n was coming inside the html. Clean it.
2019-10-09 11:45:14 +05:00
Ayub
7537283048 Merge pull request #21935 from edx/BOM-capa-random-python3-combatibility
BOM Project Capa Module Python3 Compatibility
2019-10-08 11:11:02 +05:00
Jeremy Bowman
71e9c85dca Fix capa problem i18n BOM-775 (#21832) 2019-10-07 11:19:49 -04:00
Ayub khan
bb242c4b22 BOM Project Capa Module Python3 Compatibility
Python3 RNG produces different results as compared to python2
In capa problems we save seed value and generate random state
using the seed. Python3 random generates a different state as
compared to python2. Thats why using random2 library to make
state genration consistent in both python versions.
2019-10-07 16:39:47 +05:00
Ayub khan
277afeb85e BOM-788
python3 compatibility: etree returns a bytes type string so in py3 we need to decode it
to compare with a unicode string
2019-10-03 15:26:36 +05:00
Ayub khan
b5dc95a30d BOM-609
python3 compatibility
2019-10-01 11:33:37 +05:00
Ayub khan
a21604afdb BOM-613
Made all tests py3 compatible.
2019-09-30 12:07:49 +05:00
Ayub
12140e5b78 Merge pull request #21784 from edx/BOM-608
BOM-608
2019-09-30 10:34:58 +05:00
Feanil Patel
07df64eb8c Fix the rest of these. 2019-09-27 14:36:40 -04:00
Awais Jibran
007dfa5c55 Merge pull request #21750 from edx/aj/prevent-unicode-error
Prevent unicode error
2019-09-27 13:25:10 +05:00
Ayub
290caa4c8e Merge pull request #21788 from edx/BOM-612
BOM-612
2019-09-27 09:44:44 +05:00
Jeremy Bowman
1e3d6f6db3 Fix parsing of Unicode capa XML BOM-611 (#21803) 2019-09-26 16:34:35 -04:00
Manjinder Singh
61015ad840 Merge pull request #21779 from edx/msingh/python3_test_shuffle_custom_names
BOM-614: AssertionError: Lists differ Fix.
2019-09-26 13:13:53 -04:00
jinder1s
7a2aaa09c1 random.shuffle compatibility fix between python 2.7 and 3.5 2019-09-26 08:47:18 -04:00
Ayub khan
476da01f36 BOM-612
python3 compatibility
2019-09-26 15:22:22 +05:00
Aarif
37b08c5784 Merge pull request #21745 from edx/BOM-610
BOM-610
2019-09-26 12:35:24 +05:00
Ayub khan
1178384a52 BOM-608
python3 compatibility
2019-09-26 12:28:23 +05:00
Ayub khan
5c47a3b425 BOM Project
Updated __unicode__ to __str__
2019-09-25 18:31:54 +05:00
aarif
736001e7f1 python 3 fixes
quality fixes

python 3 fixes
2019-09-25 15:10:50 +05:00
Awais Jibran
c0e0318f08 Prevent unicode error
This PR prevents `UnicodeDecodeError` when replacing unicode with bytes string.

Example:

PROD-680
2019-09-24 13:12:40 +05:00
Feanil Patel
fb59752c75 Need to return a unicode string in the xml factory.
The underlying data is put into json documents that expect unicode
strings not byte strings.  In python2 lxml provided strings that were
auto coerced but in python3 it provides byte strings.
2019-09-16 11:30:05 -04:00
Awais Qureshi
68ecbc0432 BOM-477
Fixing python3
2019-09-13 17:31:02 +05:00
Jillian Vogel
fb981bfbbe Aids styleability of CAPA checkbox and radio problems
by making CAPA <input> elements siblings of their <label>s, instead of children.

Also:

* Moves radio submitted status block down below the problem
  to match the checkbox problem status blocks.
* Marks submitted choicegroup answers with a class
2019-09-11 13:54:07 +09:30
Ayub khan
df45007ce8 BOM-235
python3 compatibility
2019-09-05 16:32:57 +05:00
Ayub khan
8e71206312 BOM-96
-fixes all issues
2019-09-02 13:30:33 +05:00
Feanil Patel
f5f875401a Fix some of the common test collection issues. (#21340)
* Remove old  performance tests that we haven't been running.

As far as I can tell, these tests to capture HAR files were created 5
years ago and not being run as a part of our suite?  They capture HAR
data that we do nothing with so even if they were running we should
remove them until we're ready to care about consuming this kind of
information.

* Update password test unicode string.
* Add ugettext translation helper function.
* Fix lambda syntax that is not valid in python 3.
* Fix ur raw strings which his not valid in python 3
* Use edx_six.get_gettext instead of ugettext.
* Fix a few other encoding issues.
* Don't use old form of sorted funciton.

This form which uses a 'cmp' method is not available in python 3.
2019-08-16 11:31:36 -04:00
arbisoft
9b87cb0172 BOM-85
he builtin basestring abstract type was removed. Use str instead.
2019-08-09 22:08:57 +05: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
Muhammad Zaid Bamber
ffc2d9729b Revert "Added logs for XQueue Information" 2019-07-30 14:14:04 +05:00
aarif
86b810a23a ran python-modernize and isort on files mentioned in INCR-410
Updated the file as suggested

ran python-modernize and isort on files mentioned in INCR-410

Updated the file as suggested

changes made to comply with quality

ran python-modernize and isort on files mentioned in INCR-410

Updated the file as suggested

changes made to comply with quality
2019-07-24 09:50:13 +00:00
Feanil Patel
7ae8221a47 Merge pull request #21055 from amitvadhel/INCR-411
INCR-411: Updates on Python 3.x
2019-07-19 10:18:04 -04:00
amitvadhel
7d05a9666a INCR-411: Disable python-wrap-html for xss-lint 2019-07-18 21:29:32 +03:00
zaidbamber161
d4c41008b4 Updated logs information 2019-07-15 15:50:37 +05:00
zaidbamber161
f02b34c1a1 Updated logs information 2019-07-15 15:50:37 +05:00
zaidbamber161
f86d0c8e16 Fixed quality test 2019-07-15 15:50:37 +05:00
zaidbamber161
bc7e2a900c Added logs for XQueue 2019-07-15 15:50:37 +05:00
amitvadhel
182a177b4e INCR-411: Updates on Python 3.x 2019-07-11 00:15:33 +03:00
Amit
4fb5679987 INCR-245: Make compatible with Python 3.x without breaking Python 2.7… (#20530)
* INCR-245: Make compatible with Python 3.x without breaking Python 2.7 support > common/lib/capa/capa/safe_exec

* INCR-245: Add absolute_import to CODE_PROLOG
2019-06-20 15:38:33 -04:00
Jeremy Bowman
47292e5f92 Update StringIO usage for Python 3 (#20462) 2019-05-08 12:13:22 -04:00
Jolyon Bloomfield
932a76c958 INCR-162 Migrated and cleaned up imports on /common/lib/capa/capa/tests/ 2019-04-01 15:53:08 -04:00
cclauss
c0c935b685 Old style exceptions --> new style for Python 3 2019-02-19 13:09:23 +01:00
Awais Jibran
04d17d55a9 Fix csv of problem responses silent failure 2019-02-14 11:37:32 +05:00
Matthew Piatetsky
9681ca36b8 fix unicode strings in common/ 2019-02-05 10:57:00 -05:00
cclauss
8fca11b85c Use print() function in both Python 2 and Python 3 2019-01-13 17:16:37 +01:00
Diana Huang
6572d99e76 Remove all references to datadog from our code. 2019-01-08 15:41:24 -05:00
Ned Batchelder
2d438d8bb5 Fix 'W605 invalid escape sequence' errors from pycodestyle 2018-11-02 06:06:43 -04:00
Ahmed Jazzar
b16b4eb4e7 Upgrade bleach to 2.1.4
Update ORA2 repo version

Fix Python tests

Upgrade Recommender XBlock version

Remove unnecessary requirements and update bleacher usage

Keep html5lib unpinned

Upgrading requirements

Ignore python-interpolate-html for bleached html
2018-10-31 12:24:22 -07:00
Peter Pinch
b43f2242ad more descriptive error messages for UndefinedVariable 2018-09-17 17:14:25 -04:00