Commit Graph

20 Commits

Author SHA1 Message Date
M. Zulqarnain
42eacaf8de refactor: pyupgrade in common/util + xblock_django (#26724) 2021-03-09 16:49:51 +05:00
Jawayria
e4cff58bed BOM-2351: Removed unused imports from common/djangoapps/{track, util} 2021-02-23 19:31:57 +05:00
usamasadiq
240a8c2e1a Fix pep8 errors 2021-02-02 18:36:39 +05:00
Jawayria
9059dee397 Applied pylint-amnesty to util 2021-02-02 18:36:39 +05:00
Calen Pennington
9c4f746d8f Get rid of unused NoOpMigrationModules 2020-09-23 10:05:37 -04:00
usamasadiq
2cdc2e0d71 Removed unused commit_on_success decorator and its tests 2020-03-06 16:21:28 +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
Evans Dianga
391b91b99a Modernize common/djangoapps/util- INCR-203 (#20437) 2019-05-07 09:53:17 -04:00
Ned Batchelder
7d964b12db Context managers need to clean up properly
An @contextmanager will raise an exception from its yield statement if
an exception happens in the with-block that uses it.  If the context
manager needs to do clean up, it should do it even if an exception is
raised, so it needs to be done in a finally clause.
2019-04-17 13:14:48 -04:00
Nimisha Asthagiri
700a902b68 Cleanup and remove deprecated RequestCache Django app
ARCH-223
2018-09-12 14:39:11 -04:00
Amir Qayyum Khan
b6c6535f15 Fixed error: ImportError: No module named notmigrations 2018-04-02 17:44:59 +05:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Usman Khalid
781623205e Added a named outer_atomic option.
A named outer is suitable when dealing with IntegrityErrors. It only
checks that it is not nested under an atomic only if it is nested
under enable_outer_atomic(name=<name>). This way only the view which
is causing IntegrityErrors needs to have its automatic transaction
management disabled and other callers are not effected.
2016-06-16 14:18:21 +05:00
Usman Khalid
2586f09d7a Add option to disable migrations when running tests
By default, migrations are applied as they always have been. Exporting DISABLE_MIGRATIONS=1 or passing --disable-migrations to Paver commands will create tables directly from apps' models.
2016-02-29 11:47:32 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Daniel Friedman
fff84928fa Create and edit content groups in Studio 2015-01-15 10:37:24 -05:00
Usman Khalid
ae09573228 commit_on_success_with_read_committed should only work with atmost
1 level of transactions.

TNL-367
2014-10-01 19:45:38 +05:00
Usman Khalid
5ba236f405 Created commit_on_success_with_read_committed decorator.
This decorator executes the decorated function inside a
transaction with isolation level set to READ COMMITTED.

TNL-367
2014-10-01 19:42:47 +05:00