--
Ticket URL: <https://code.djangoproject.com/ticket/34679>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Jarosław Wygoda
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:1>
* status: assigned => closed
* resolution: => needsinfo
Comment:
Hello!
I'll be closing this ticket as `needsinfo` since there is no traceback nor
a reproducer was provided, but please re-open if you have more concrete
information (traceback, detailed steps to reproduce the bug, sample
project to exercise this issue, etc.).
You can also seek more help in the user forum. The best place to get
answers to your issue is using any of the user support channels from
[https://docs.djangoproject.com/en/dev/faq/help/#how-do-i-do-x-why-
doesn-t-y-work-where-can-i-go-to-get-help this link].
Thank you!
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:2>
* cc: Jarosław Wygoda (added)
* status: closed => new
* resolution: needsinfo =>
Comment:
Hi Natalia,
I've already figured out this issue. Please take a look at my pr:
https://github.com/django/django/pull/17015/files
You can reproduce it either by reverting my changes in
`django/contrib/staticfiles/storage.py` and running
`TestManifestStaticFilesStorageRollback` or by running `./manage.py
collectstatic` with `ManifestStaticFilesStorage` on Django 4.1 and then on
Django 4.2.
Please find the traceback below.
{{{
Traceback (most recent call last):
File "/tests/django/tests/staticfiles_tests/test_storage.py", line 912,
in test_collectstatic_with_unsupported_version
self.run_collectstatic()
File "/tests/django/tests/staticfiles_tests/cases.py", line 89, in
run_collectstatic
call_command(
File "/tests/django/django/core/management/__init__.py", line 194, in
call_command
return command.execute(*args, **defaults)
File "/tests/django/django/core/management/base.py", line 458, in
execute
output = self.handle(*args, **options)
File
"/tests/django/django/contrib/staticfiles/management/commands/collectstatic.py",
line 184, in handle
if self.is_local_storage() and self.storage.location:
File
"/tests/django/django/contrib/staticfiles/management/commands/collectstatic.py",
line 245, in is_local_storage
return isinstance(self.storage, FileSystemStorage)
File "/tests/django/django/utils/functional.py", line 280, in
__getattribute__
value = super().__getattribute__(name)
File "/tests/django/django/utils/functional.py", line 251, in inner
self._setup()
File "/tests/django/django/contrib/staticfiles/storage.py", line 540, in
_setup
self._wrapped = storages[STATICFILES_STORAGE_ALIAS]
File "/tests/django/django/core/files/storage/handler.py", line 43, in
__getitem__
storage = self.create_storage(params)
File "/tests/django/django/core/files/storage/handler.py", line 55, in
create_storage
return storage_cls(**options)
File "/tests/django/django/contrib/staticfiles/storage.py", line 463, in
__init__
self.hashed_files, self.manifest_hash = self.load_manifest()
File "/tests/django/django/contrib/staticfiles/storage.py", line 484, in
load_manifest
raise ValueError(
ValueError: Couldn't load manifest 'staticfiles.json' (version 1.0)
}}}
Regards,
Jarek
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:3>
Comment (by Mariusz Felisiak):
In general, we don't support downgrade paths, e.g. sessions created in
Django X may not work with Django < X etc.
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:4>
Comment (by Natalia Bidart):
Hello Jarek,
In addition to what Mariusz mentioned, I'm not being able to reproduce. I
set the STORAGES as instructed and ran `collectstatic` on Django 4.2. The
generated `staticfiles.json` has version `1.1` in it. I downgraded to
Django 4.1 and ran `collectstatic` again, no errors.
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:5>
* status: new => closed
* resolution: => needsinfo
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:6>
Comment (by Jarosław Wygoda):
I think this change will improve the developer experience. People finding
bugs after upgrading Django will have easier time reverting to previous
version. Some parts of Django support downgrade paths, e.g. migrations.
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:7>
Comment (by Natalia Bidart):
Hello,
In my last comment I mentioned that I can not even reproduce the reported
issue. Could you share a test project with clear steps to reproduce?
Thanks, Natalia.
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:8>
Comment (by Jarosław Wygoda):
Sorry I missed your comment. You can reproduce it by running
`./manifest/manage.py collectstatic` with django 3 here
https://github.com/jwygoda/manifest/tree/master. See
https://github.com/jwygoda/manifest/blob/master/test.sh for project setup.
I've also wrote a test reproducing this issue here:
https://github.com/django/django/pull/17015/files#diff-
5d0a445ee662a0619f13e7dfbc73f1de73b76ea5888e15bc0b1a20f32eccd8eaR904
--
Ticket URL: <https://code.djangoproject.com/ticket/34679#comment:9>