Re: [Django] #26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows

2021-06-02 Thread Django
#26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows
-+-
 Reporter:  David Sanders|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.staticfiles  |  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  staticfiles  | Triage Stage:  Accepted
  manifest   |
  manifeststaticfileststorage|
  windows|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jacob Walls):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Fixed in 53bffe8d03f01bd3214a5404998cb965fb28cd0b. The attached test case
 became `assertPostCondition()`. The author explained in PR comments
 finding, reporting, and fixing the issue in the same PR.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.dbdfccbb82f51a01c2958d7e7a210f3f%40djangoproject.com.


Re: [Django] #26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows

2016-05-06 Thread Django
#26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows
-+-
 Reporter:  dsanders11   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  staticfiles  | Triage Stage:  Accepted
  manifest   |
  manifeststaticfileststorage|
  windows|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by dsanders11):

 Yea, it's not a 'correct' place to put assertions, but it was the best
 spot to put the assertion to run the code after all test cases, short of a
 much more intrusive patch. The nice bit about putting it there is that it
 automatically is run for all new test cases added.

 The alternative would be to add it to the end of each of the test cases (I
 think it's a couple dozen), or to think of a clever way to get a 'post-
 test pre-tearDown' hook in place.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.92eb47092ead9beb95f8fef7667fb833%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows

2016-05-06 Thread Django
#26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows
-+-
 Reporter:  dsanders11   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  staticfiles  | Triage Stage:  Accepted
  manifest   |
  manifeststaticfileststorage|
  windows|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Old description:

> The manifest created by `ManifestStaticFilesStorage` on Windows has some
> incorrect keys (haven't determined the pattern yet) where slashes are
> '\\' instead of '/'.
>
> This silently 'succeeds' because `HashedFilesMixin` will hash the
> original file on a 'cache miss' (in the case of
> `ManifestStaticFilesStorage` it's a manifest miss) and insert the result
> into the in-memory hashed files map.
>
> I've attached a patch for staticfiles_tests which checks that the
> manifest is the same in memory and on disk after the manifest tests
> finish (unless it was a test which cleared the in-memory version). It
> passes for the Linux build but fails on the Windows build, nicely
> illustrating the problem.

New description:

 The manifest created by `ManifestStaticFilesStorage` on Windows has some
 incorrect keys (haven't determined the pattern yet) where slashes are
 `'\\'` instead of '/'.

 This silently 'succeeds' because `HashedFilesMixin` will hash the original
 file on a 'cache miss' (in the case of `ManifestStaticFilesStorage` it's a
 manifest miss) and insert the result into the in-memory hashed files map.

 I've attached a patch for staticfiles_tests which checks that the manifest
 is the same in memory and on disk after the manifest tests finish (unless
 it was a test which cleared the in-memory version). It passes for the
 Linux build but fails on the Windows build, nicely illustrating the
 problem.

--

Comment:

 The final version of the patch shouldn't put the assertions in
 `tearDown()`, if possible.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.db833c6b6c2a267f09cac6b98d3ec6e0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows

2016-05-06 Thread Django
#26591: Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows
-+-
 Reporter:  dsanders11   |  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  contrib.staticfiles  |Version:  master
 Severity:  Normal   | Resolution:
 Keywords:  staticfiles manifest |   Triage Stage:
  manifeststaticfileststorage windows|  Unreviewed
Has patch:  0|  Easy pickings:  0
UI/UX:  0|
-+-
Changes (by dsanders11):

 * Attachment "manifeststaticfilesstorage_test.patch" added.

 Test coverage patch

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.4a3c637e2350567ae9bc1e5600da8063%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.