Commit Graph

3219 Commits

Author SHA1 Message Date
Feanil Patel
05ab349c88 Merge pull request #22068 from edx/feanil/get_out_of_a_pickle
Create a custom Pickle Serializer
2019-10-18 14:48:24 -04:00
Feanil Patel
bfc02dc3ab Create custom pickle serializer.
We need to do this because when I tride to go to the JSON serializer a
bunch of tests started failing because various parts of our code are
putting things into the session that are not JSON serializable.

We can't keep using the default pickle serializer because it defaluts to
using the highest available protocol and that will cause issues with the
python 2 to 3 upgrade since both will be running in production at the
same time.  We need to use a version of the pickle protocol that both
can use interchangably.

We also need to make sure we read with latin1 encoding to make datetimes
work correctly between the two versions of python.
2019-10-18 13:46:47 -04:00
Feanil Patel
1b1d428630 Merge pull request #22069 from edx/feanil/lock_cache_pickles
Set cache pickle protocol to 2.
2019-10-18 13:41:35 -04:00
Feanil Patel
59b0554c37 Update encoding to be latin1 when loading pickled data to be able to read python 2 datettimes. 2019-10-18 13:04:19 -04:00
Ned Batchelder
855346e9e1 Merge pull request #22042 from mahyard/activation-email-to-ace
Activation email to ace
2019-10-18 12:10:20 -04:00
Feanil Patel
29cc071edd Set cache pickle protocol to 2.
HIGHEST_PROTOCOL will cause it to change when we move from python 2 to 3
and this may cause issues as older machines try to read objects pickeld
with a version of the protocol they don't know.

During deploys, and if we have to roll back are two examples.
2019-10-18 10:43:04 -04:00
Aarif
6e7f2f61ef Merge pull request #21994 from edx/BOM-914
Fixed all instances of "TypeError: a bytes-like object is required, not 'str" - BOM-914
2019-10-16 01:44:31 +05:00
Ned Batchelder
69255bee73 Merge pull request #21816 from regisb/regisb/simplify-swagger-auto-schema
Regisb/simplify swagger auto schema
2019-10-15 14:35:46 -04:00
Zia Fazal
ebe29d9303 Merge pull request #21943 from edx/ziafazal/ENT-1688
ENT-1688: Changed logout message on on logout screen for Enterprise SSO flow
2019-10-15 18:53:34 +05:00
Bill DeRusha
d9180b472d Merge pull request #22006 from edx/bderusha/remove-mailchimp
remove mailchimp tracking
2019-10-15 09:47:08 -04:00
Zia Fazal
c718c02d6e Show blank screen instead of logout message for Enterprise SSO flow
Changes to show blank screen instead of logout message for Enterprise SSO flow. It confuses learner when they are already signed in and access their course from B2B site.
ENT-1688

Fixed pep8 quality violation

use testserver as HOST instead of edx.org

assert enterprise app is enabled

added logging

Print different values

Reload django url config

assert all quote operations to see how they work on jenkins

debug url resolved values

login user in setup

added log to debug test on jenkins

Using UrlResetMixin

Using regex instead of resolve

Fixed quality violation

Fixed pylint quality violations

Fixed target interpolation syntax

Added developer's comment
2019-10-15 18:28:19 +05:00
Shadi Naif
7984c37a4f Convert Account Activation Emails to edx-ACE 2019-10-14 17:22:03 +03:30
aarif
d176957708 Updated the tests to fix the string/bytes input
changes made to pass tests with python 2 and other minor changes

Updated the tests to fix the string/bytes input

changes made to pass tests with python 2 and other minor changes

made some changes as suggested

made changes as suggested

changes made as suggested
2019-10-14 18:47:18 +05:00
aarif
6c98571bbd removed unnecessary encode method to fix input to csv write method
removed unnecessary encode method to fix input to csv write method
2019-10-14 16:17:11 +05:00
Régis Behmo
ae216c8584 Rename API decorators to "apidocs" to be provider-agnostic
The API documentation decorators do not have to leak which solution we
use to generate the docs. Here, and as discussed in PR #21820, we rename
the `openapi` module to `apidocs`, and we make sure that this module
includes all the right functions to document API Views without referring
to Open API.
2019-10-14 08:14:18 +02:00
Régis Behmo
1d9a5ab4e7 Rename swagger_auto_schema decorator 2019-10-14 08:14:08 +02:00
Régis Behmo
e78d69695d Ensure proper arguments in swagger decorator 2019-10-14 08:14:08 +02:00
Régis Behmo
59635b689e Simplify BookmarksListView.get docs
Instead of relying on a `method_decorator`, we explicitely declare the
`get` method.
2019-10-14 08:14:08 +02:00
Régis Behmo
dac393e9e7 Auto-document API endpoints using view function docstring
The `swagger_auto_schema` view function decorator allows us to
auto-document API endpoints. All swagger arguments are passed as kwargs
to the decorator, but this feels a bit unnatural: we would like to use
the function documentation as the endpoint summary and description. We
introduce this feature here by reading the `__doc_`_attribute of the
view function.
2019-10-14 08:14:08 +02:00
Awais Qureshi
14e8e782c9 Merge pull request #22013 from edx/awais786/BOM-917
BOM-917
2019-10-12 13:12:12 +05:00
Bill DeRusha
5a6b51bccf remove mailchimp tracking 2019-10-11 15:38:05 -04:00
Awais Qureshi
ae9dcdef8a BOM-917
Fix encoding issue.
2019-10-11 20:12:34 +05:00
Jeremy Bowman
9c92bd96ed Fix assertions failing under Python 3 BOM-668 (#21978) 2019-10-10 15:22:07 -04:00
Awais Qureshi
4387f753d5 BOM-912
Can't convert 'bytes' object to str implicitly
2019-10-10 16:06:17 +05:00
jinder1s
93dcd26118 quality fixes 2019-10-09 09:30:52 -04:00
jinder1s
d8b7a2e1fe quality fixes 2019-10-09 08:53:22 -04:00
jinder1s
075faede22 Modifying test to work in both py2 and 3 2019-10-09 08:53:22 -04:00
Manjinder Singh
00348ec0a9 Merge pull request #21898 from edx/msingh/python3_test_views_py
BOM-749: Explicity creating byte strings
2019-10-09 08:52:06 -04:00
aarif
91bed37922 Updated the expected error message to get assertion successful for both python versions
changes made as suggested
2019-10-09 16:03:50 +05:00
Aarif
6a2f3d6dbc Merge pull request #21866 from edx/BOM-831
Updated the string input to md5 to make output compatible with both python versions - BOM-831
2019-10-09 15:40:33 +05:00
Aarif
97452b31ae Merge pull request #21881 from edx/BOM-873
Updated the division operation to make the output compatible with both python versions - BOM-873
2019-10-08 13:41:15 +05:00
Braden MacDonald
b7d1827017 Fix minor unicode OLX bug 2019-10-07 16:43:47 -04:00
jinder1s
2c6b2f32dd converting unicode to byte where necessary 2019-10-04 11:13:11 -04:00
Calen Pennington
9a800fb180 Downgrade content-highlights mismatches to warnings, and add the course-key to the error message 2019-10-04 10:35:03 -04:00
Manjinder Singh
2213f524cf Merge pull request #21899 from edx/msingh/python3_test_parser_py
BOM-749: Explicity creating byte strings
2019-10-03 11:57:15 -04:00
Aarif
8cf25ea81a Merge pull request #21883 from edx/BOM-874
Updated the division operation to make the output compatible with both python versions - BOM-874
2019-10-03 12:40:19 +05:00
Adeel Khan
f11afb57a2 Adds migration for simulate publish command
A rewording of help text caused django to create
a new migration for config model and that was not
initially pushed to master.
2019-10-02 14:45:43 +05:00
aarif
86c7b9f809 updated the division operation to make the output compatible in python 2 and python 3
changes made to fix quality errors

changes made to fix issues on BOM-587

minor changes made to fix quality issues

minor changes

removed unused pylint supression
2019-10-02 14:01:08 +05:00
aarif
e6470fb970 python 3 fixes
changes made to fix quality errors

changes made to fix quality errors

minor changes
2019-10-02 12:13:45 +05:00
David J. Malan
680f62278c AccessTokenView: support for X-Token-Type in HTTP header (#21662)
* AccessTokenView: support for X-Token-Type in HTTP header
2019-10-01 15:57:21 -04:00
jinder1s
3dc35dc09c Explicity creating byte strings 2019-10-01 13:43:45 -04:00
aarif
b7ee87caba updated the division to make the output compatible in python2 and python3 2019-10-01 13:27:32 +05:00
Aarif
bc6821ce53 Merge pull request #21810 from edx/BOM-745
BOM-745
2019-10-01 11:58:09 +05:00
Ayub
df066afdf7 Merge pull request #21848 from edx/BOM-882
BOM-881, BOM-882
2019-10-01 10:39:53 +05:00
aarif
df2686dc63 updated input to md5 method to properly hash the input in both python versions 2019-09-30 19:55:15 +05:00
Nimisha Asthagiri
4914c42364 Python 3: resp.content regex searches 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
9bbc21ea8c Python 3: multi-lined assertIn, assertNotIn -> assertContains, assertNotContains 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
a6b219a9e9 Python-3: assertIn(..response.content) -> assertContains 2019-09-30 08:50:38 -04:00
Nimisha Asthagiri
95c2e49438 Merge pull request #21840 from edx/bom/block-structure-python-3
block_structure python-3 upgrade
2019-09-30 08:33:32 -04:00
Nimisha Asthagiri
468f1ad393 Merge pull request #21839 from edx/bom/course-overviews-python-3
course_overviews python-3 upgrade
2019-09-30 08:33:17 -04:00