Mariusz Felisiak
074a2f7f58
Refs #28909 -- Simplifed code using unpacking generalizations.
2018-02-26 18:23:31 +01:00
Claude Paroz
23b21db31b
Fixed #28594 -- Removed Jython docs and specific code
...
Thanks Andrey Martyanov for the reporti, and Tim Graham for the review.
2017-12-23 10:26:32 +01:00
Nicolas Delaby
746caf3ef8
Fixed #28837 -- Fixed test client crash if an exception with more than one arg is raised.
...
Also removed usage of the problematic pattern elsewhere.
Regression in 6e55e1d88a
.
2017-11-28 18:55:23 -05:00
Yusuke Miyazaki
278d66b94b
Fixed #28501 -- Fixed "python -m django runserver" crash.
2017-11-06 09:58:15 -05:00
Tim Graham
6e4c6281db
Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
...
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Mads Jensen
550cb3a365
Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().
2017-06-28 14:07:55 -04:00
Anton Samarchyan
9718fa2e8a
Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.
2017-02-11 16:11:08 -05:00
Claude Paroz
6e55e1d88a
Refs #23919 -- Replaced six.reraise by raise
2017-01-22 20:08:04 +01:00
Tim Graham
4e729feaa6
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
...
These functions do nothing on Python 3.
2017-01-20 08:01:02 -05:00
Claude Paroz
2b281cc35e
Refs #23919 -- Removed most of remaining six usage
...
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Aleksi Häkli
f6671c5d78
Fixed #27647 -- Fixed Windows segmentation fault in runserver autoreload.
2016-12-28 08:04:09 -05:00
Aymeric Augustin
b79fc11d73
Made the autoreloader survive all exceptions.
...
Refs #24704 .
2015-08-29 20:50:00 +02:00
Aymeric Augustin
fe6ddb837d
Fixed #24704 -- Made the autoreloader survive SyntaxErrors.
...
With this change, it's expected to survive anything except errors
that make it impossible to import the settings. It's too complex
to fallback to a sensible behavior with a broken settings module.
Harcoding things about runserver in ManagementUtility.execute is
atrocious but it's the only way out of the chicken'n'egg problem:
the current implementation of the autoreloader primarily watches
imported Python modules -- and then a few other things that were
bolted on top of this design -- but we want it to kick in even if
the project contains import-time errors and django.setup() fails.
At some point we should throw away this code and replace it by an
off-the-shelf autoreloader that watches the working directory and
re-runs `django-admin runserver` whenever something changes.
2015-08-29 20:49:56 +02:00
Aymeric Augustin
c2fcba2ac7
Ensured gen_filenames() yields native strings.
...
This also fixes a test failure on Python 2 when Django is installed in a
non-ASCII path. This problem cannot happen on Python 3.
2015-08-29 20:49:25 +02:00
Aymeric Augustin
23620cb8e0
Accounted for error files in the autoreloader.
...
* When some old files contain errors, the second call to
gen_filenames() should return them.
* When some new files contain errors, the first call to
gen_filenames(only_new=True) should return them.
2015-08-29 20:47:38 +02:00
Chris Bainbridge
e5cfa394d7
Refs #23882 -- Added detection for moved files when using inotify polling
...
Commit 15f82c7
("used pyinotify as change detection system when
available") introduced a regression where editing a file in vim with
default settings (writebackup=auto) no longer causes the dev server
to be restarted. On a write, vim moves the monitored file to a backup
path and then creates a new file in the original. The new file is not
monitored as it has a different inode. Fixed this by also watching for
inotify events IN_DELETE_SELF and IN_MOVE_SELF.
2015-07-07 12:23:04 -04:00
Tim Graham
2ee9bce654
Removed some obsolete absolute_imports.
2015-02-09 13:37:23 -05:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Tim Graham
18f3e79b13
Removed threading fallback imports.
...
Django imports threading in many other places without fallback.
2015-01-28 10:23:25 -05:00
Tim Graham
b8cb5ba708
Fixed #23083 -- Fixed runserver reloading when deleting a file.
...
Thanks Collin Anderson for the report and hirokiky for the fix.
2014-07-25 13:23:52 -04:00
Claude Paroz
4e424084e6
Fixed #22991 -- Prevented *.pyc files in autoreload monitoring
...
This fixes a regression introduced in 6d302f639
.
Thanks lorinkoz at gmail.com for the report, Collin Anderson
for the initial patch and Simon Charette for the review.
2014-07-15 09:57:54 +02:00
Tim Graham
fddd95254e
Fixed flake8 errors.
2014-07-07 19:12:39 -04:00
Claude Paroz
6d302f6396
Fixed pyinotify performance regression in 15f82c7011
...
Refs #9722 . Thanks Tim Graham for the review.
2014-07-06 21:41:02 +02:00
Tim Graham
5e9773269a
Added newline to fix flake8 error.
2014-06-26 15:16:23 -04:00
Claude Paroz
0d363b25b8
Fixed #22857 -- Reset translations when only .mo file changed
...
No need to restart the server when a translation file changes.
Refs #9523 . Thanks artscoop for the report and Tim Graham for
the review.
2014-06-26 10:01:52 +02:00
Alex Gaynor
608e6eb295
Added an explanatory comment. Refs #22017
2014-04-02 09:47:18 -07:00
Alex Gaynor
666990a2a0
Revert "Merge pull request #2508 from tomwys/patch-1"
...
This reverts commit c45607e939
, reversing
changes made to 9769337ca8
.
2014-04-02 09:45:42 -07:00
Tomasz Wysocki
6eb891f57a
Don't copy list for iteration.
2014-04-02 17:28:09 +02:00
Claude Paroz
e0381cdf2e
Fixed #22017 -- Prevented RuntimeError on Python 3
...
Refs #21049 . Thanks quinox for the report.
2014-02-12 10:26:08 +01:00
Aymeric Augustin
1716b7ce5a
Renamed AppCache to Apps.
...
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin
2fef9e5375
Moved apps back in the toplevel django namespace.
...
Reverted 4a56a93cc4
.
2013-12-22 11:39:55 +01:00
Aymeric Augustin
65cd74be8e
Stopped iterating on INSTALLED_APPS.
...
Used the app cache's get_app_configs() method instead.
2013-12-22 11:39:18 +01:00
Aymeric Augustin
3beffea4b0
Fixed #21621 -- Removed kqueue autoreloader.
2013-12-15 14:43:52 +01:00
Aymeric Augustin
4d738fcc3b
Fixed #21546 -- Strengthened kqueue detection.
...
Thanks Loic Bistuer.
2013-12-04 10:11:42 +01:00
Loic Bistuer
9ccde8cfaf
Fixed #21545 -- autoreload kqueue events weren't cleared which caused an infinite loop.
2013-12-03 00:12:04 +07:00
Baptiste Mispelon
e681b2861d
Fixed #21500 -- Removed imports of deprecated utils.importlib
2013-11-24 16:45:01 +01:00
Alex Gaynor
bc742ca110
Flake8 fixes -- including not runnign flake8 over a backported file
2013-11-11 14:05:14 -08:00
Aymeric Augustin
f67cce0434
Fixed #21420 once more.
2013-11-11 15:48:48 +01:00
Bouke Haarsma
2397daab4a
Fixed #9523 -- Restart runserver after compiling apps translations
...
Django also uses locales provided by apps, which also might change. Also when
i18n is disabled, there is no need for watching translation files.
2013-11-11 11:43:09 +01:00
Aymeric Augustin
dbbd10e75f
Fixed #21420 -- Autoreloader on BSD with Python 3.
...
Thanks Bouke Haarsma for the report.
2013-11-11 10:46:24 +01:00
Alex Gaynor
8a0489221e
Flake8 fixes
2013-11-05 09:17:50 -08:00
Aymeric Augustin
37a2e70cec
Updated the set of watched files after each request.
...
Otherwise the kqueue-based autoreloader may not see changes to files
that weren't imported when the server started.
Thanks Bouke Haarsma for the report and Loïc Bistuer for locating the
problem.
2013-11-04 22:37:36 +01:00
Ray Ashman Jr
e2ae8b048e
Correct flake8 E302 violations
2013-11-02 19:53:29 -04:00
Alex Gaynor
7548aa8ffd
More attacking E302 violators
2013-11-02 13:12:09 -07:00
Alex Gaynor
ee48f4af99
Merge pull request #1848 from rayashmanjr/master
...
Correct flake8 violation E261
2013-11-02 12:34:34 -07:00
Ray Ashman Jr
dcfc8fa972
Correct flake8 violation E261
2013-11-02 15:27:47 -04:00
Tim Graham
36ded01527
Fixed #21302 -- Fixed unused imports and import *.
2013-11-02 15:24:56 -04:00
Bouke Haarsma
c3936c0d79
Fixed #9523 -- Restart runserver after translation MO files change
...
Thanks to Krzysztof Kulewski for the initial patch.
2013-11-02 10:29:07 +01:00
Aymeric Augustin
2bba0d275b
Improved resource limits handling in the kqueue autoreloader.
...
Refs #21356 . Thanks Loïc.
2013-11-01 10:31:01 +01:00
Aymeric Augustin
47217f2f29
Reduce the set of events that trigger a reload.
...
This seems to avoid multiple reloads.
2013-10-31 10:15:42 +01:00