Re: [Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-03-19 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
-+-
 Reporter:  topher86 |Owner:
 |  berkerpeksag
 Type:  Bug  |   Status:  closed
Component:  contrib.staticfiles  |  Version:  1.9
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  clear| Triage Stage:  Ready for
  notimplementederror path   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"b4bb2ad13d178dd2db484c7721fd47aa3d285908" b4bb2ad1]:
 {{{
 #!CommitTicketReference repository=""
 revision="b4bb2ad13d178dd2db484c7721fd47aa3d285908"
 [1.9.x] Fixed #26297 -- Fixed `collectstatic --clear` crash if storage
 doesn't implement path().

 Backport of 28bcff82c5ed4694f4761c303294ffafbd7096ce from master
 }}}

--
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/066.71259e22ebee629fd429840a9b134550%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-03-19 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
-+-
 Reporter:  topher86 |Owner:
 |  berkerpeksag
 Type:  Bug  |   Status:  closed
Component:  contrib.staticfiles  |  Version:  1.9
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  clear| Triage Stage:  Ready for
  notimplementederror path   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"28bcff82c5ed4694f4761c303294ffafbd7096ce" 28bcff82]:
 {{{
 #!CommitTicketReference repository=""
 revision="28bcff82c5ed4694f4761c303294ffafbd7096ce"
 Fixed #26297 -- Fixed `collectstatic --clear` crash if storage doesn't
 implement path().
 }}}

--
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/066.24c48b39818de55fde15d6ed62187617%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-03-15 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
-+-
 Reporter:  topher86 |Owner:
 |  berkerpeksag
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:  clear| Triage Stage:  Ready for
  notimplementederror path   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * stage:  Accepted => Ready for checkin


--
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/066.7a79835fe84a40b33c596d8724c8905e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-03-13 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
-+-
 Reporter:  topher86 |Owner:
 |  berkerpeksag
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:  clear| Triage Stage:  Accepted
  notimplementederror path   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by berkerpeksag):

 * owner:  nobody => berkerpeksag
 * status:  new => assigned
 * needs_tests:  1 => 0
 * cc: berker.peksag@… (added)


Comment:

 Pull request: https://github.com/django/django/pull/6288

--
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/066.9976b2d688238908cbfca15a6700b614%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-03-01 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
-+-
 Reporter:  topher86 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:  clear| Triage Stage:  Accepted
  notimplementederror path   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_tests:  0 => 1
 * easy:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 I can't think of a reason why creating a subclass of a storage backend
 that raises `NotImplementedError` to test this wouldn't be feasible, but I
 didn't look into the details.

 Maybe the symlink logic added in 0922bbf18d3ae8f37e1823df2dbc270d4548
 isn't ideal. Feel free to submit a patch if you feel it could be done
 better.

--
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/066.c5b6424bf255c5873d9cd11c43125c06%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-03-01 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
-+-
 Reporter:  topher86 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:  clear| Triage Stage:
  notimplementederror path   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by topher86):

 * easy:  0 => 1
 * needs_tests:  1 => 0
 * stage:  Accepted => Unreviewed


Comment:

 I may be wrong, I don't think a test would be feasible as  testing would
 require simulating multiple storage backends that aren't currently tested?

 Off topic, I'm starting to wonder why collectstatic has any symlink logic
 at all. Shouldn't staticfiles offer a symlink storage backend to be used,
 if the functionality was desired, instead?

--
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/066.f740eb015f386ac96bba03afff764669%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-03-01 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
-+-
 Reporter:  topher86 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:  clear| Triage Stage:  Accepted
  notimplementederror path   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

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


Old description:

> storage.py docstrings state of storage.path()
> >Storage systems that can't be accessed using open() should *not*
> implement this method.
>
> collectstatic.py does not catch this to use the implemented
> storage.delete() method on line 221
>

> {{{
> #!div style="font-size: 80%"
> Code highlighting:
>   {{{#!python
> full_path = self.storage.path(fpath)
> if not os.path.exists(full_path) and
> os.path.lexists(full_path):
> # Delete broken symlinks
> os.unlink(full_path)
> else:
> self.storage.delete(fpath)
>   }}}
> }}}
>
> Patch?:
>
> {{{
> #!div style="font-size: 80%"
> Code highlighting:
>   {{{#!python
> try:
> full_path = self.storage.path(fpath)
> if not os.path.exists(full_path) and
> os.path.lexists(full_path):
> # Delete broken symlinks
> os.unlink(full_path)
> else:
> self.storage.delete(fpath)
> except NotImplementedError:
> self.storage.delete(fpath)
>   }}}
> }}}

New description:

 storage.py docstrings state of storage.path()
 >Storage systems that can't be accessed using open() should *not*
 implement this method.

 collectstatic.py does not catch this to use the implemented
 storage.delete() method on line 221


 {{{#!python
 full_path = self.storage.path(fpath)
 if not os.path.exists(full_path) and os.path.lexists(full_path):
 # Delete broken symlinks
 os.unlink(full_path)
 else:
 self.storage.delete(fpath)
 }}}

 Patch?:

 {{{#!python
 try:
 full_path = self.storage.path(fpath)
 if not os.path.exists(full_path) and os.path.lexists(full_path):
 # Delete broken symlinks
 os.unlink(full_path)
 else:
 self.storage.delete(fpath)
 except NotImplementedError:
 self.storage.delete(fpath)
 }}}

--

Comment:

 I think something like this would make it more obvious where the exception
 is expected:
 {{{#!python
 try:
 full_path = self.storage.path(fpath)
 except NotImplementedError:
 self.storage.delete(fpath)
 else:
 if not os.path.exists(full_path) and os.path.lexists(full_path):
 # Delete broken symlinks
 os.unlink(full_path)
 else:
 self.storage.delete(fpath)
 }}}
 A test is also needed.

--
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/066.1fd6cd20aa8bac71dc65c53349829dd3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #26297: collectstatic --clear throws NotImplementedError, "This backend doesn't support absolute paths."

2016-02-29 Thread Django
#26297: collectstatic --clear throws NotImplementedError, "This backend doesn't
support absolute paths."
--+
 Reporter:  topher86  |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:|Version:  1.9
  contrib.staticfiles |
 Severity:  Normal|   Keywords:  clear notimplementederror path
 Triage Stage:  Unreviewed|  Has patch:  1
Easy pickings:  1 |  UI/UX:  0
--+
 storage.py docstrings state of storage.path()
 >Storage systems that can't be accessed using open() should *not*
 implement this method.

 collectstatic.py does not catch this to use the implemented
 storage.delete() method on line 221


 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
 full_path = self.storage.path(fpath)
 if not os.path.exists(full_path) and
 os.path.lexists(full_path):
 # Delete broken symlinks
 os.unlink(full_path)
 else:
 self.storage.delete(fpath)
   }}}
 }}}

 Patch?:

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
 try:
 full_path = self.storage.path(fpath)
 if not os.path.exists(full_path) and
 os.path.lexists(full_path):
 # Delete broken symlinks
 os.unlink(full_path)
 else:
 self.storage.delete(fpath)
 except NotImplementedError:
 self.storage.delete(fpath)
   }}}
 }}}

--
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/051.acb9c352a4e92476b7c90c0f27e38505%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.