#34821: Syncing DEFAULT_FILE_STORAGE/STATICFILES_STORAGE settings with STORAGES 
can
mutate user settings.
-------------------------------------+-------------------------------------
               Reporter:  Mariusz    |          Owner:  Mariusz Felisiak
  Felisiak                           |
                   Type:  Bug        |         Status:  assigned
              Component:             |        Version:  4.2
  contrib.staticfiles                |
               Severity:  Release    |       Keywords:
  blocker                            |
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Syncing DEFAULT_FILE_STORAGE/STATICFILES_STORAGE settings with STORAGES
 can mutate user settings. An isolation issue can be observed by running
 tests in the specific order, e.g.
 {{{
 ./runtests.py deprecation staticfiles_tests --shuffle=1352276316
 --parallel=1

 ...

 ======================================================================
 ERROR: test_no_warning_when_staticdir_does_not_exist
 (staticfiles_tests.test_management.TestInteractiveMessages)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/django/tests/staticfiles_tests/cases.py", line 77, in setUp
     self.run_collectstatic()
   File "/django/tests/staticfiles_tests/cases.py", line 89, in
 run_collectstatic
     call_command(
   File "/django/django/core/management/__init__.py", line 194, in
 call_command
     return command.execute(*args, **defaults)
   File "/django/django/core/management/base.py", line 458, in execute
     output = self.handle(*args, **options)
   File
 "/django/django/contrib/staticfiles/management/commands/collectstatic.py",
 line 209, in handle
     collected = self.collect()
   File
 "/django/django/contrib/staticfiles/management/commands/collectstatic.py",
 line 126, in collect
     for path, storage in finder.list(self.ignore_patterns):
   File "/django/django/contrib/staticfiles/finders.py", line 266, in list
     for path in utils.get_files(self.storage, ignore_patterns):
   File "/django/django/contrib/staticfiles/utils.py", line 23, in
 get_files
     directories, files = storage.listdir(location)
   File "/django/django/core/files/storage/base.py", line 148, in listdir
     raise NotImplementedError(
 NotImplementedError: subclasses of Storage must provide a listdir() method

 ======================================================================
 FAIL: test_location_empty (staticfiles_tests.test_finders.TestMiscFinder)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/django/django/test/utils.py", line 443, in inner
     return func(*args, **kwargs)
   File "/django/tests/staticfiles_tests/test_finders.py", line 124, in
 test_location_empty
     with self.assertRaisesMessage(ImproperlyConfigured, msg):
   File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
     next(self.gen)
   File "/django/django/test/testcases.py", line 739, in
 _assert_raises_or_warns_cm
     with func(expected_exception) as cm:
 AssertionError: ImproperlyConfigured not raised


 ----------------------------------------------------------------------
 Ran 203 tests in 3.158s

 FAILED (failures=1, errors=69)
 Used shuffle seed: 1352276316 (given)
 Destroying test database for alias 'default'...
 }}}


 Regression in 6b965c600054f970bdf94017ecf2e0e6e0a4326b (check out #34773).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34821>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018a73b38f14-ece55f7b-97fd-479b-b468-e1b561146c21-000000%40eu-central-1.amazonses.com.

Reply via email to