Re: [Django] #6412: [patch] Check for file permissions for proper error messages

10 views
Skip to first unread message

Django

unread,
Sep 10, 2011, 10:17:42 PM9/10/11
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
---------------------------------------+------------------------------
Reporter: mbeachy@… | Owner: nobody
Type: New feature | Status: new
Milestone: | Component: Core (Other)
Version: SVN | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------------
Changes (by carljm):

* ui_ux: => 0
* easy: => 0
* stage: Design decision needed => Accepted


Comment:

This seems like a useful feature that can be added in just a few lines of
code.

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

Django

unread,
Oct 14, 2012, 7:01:29 PM10/14/12
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+------------------------------------

Reporter: mbeachy@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------
Changes (by lrekucki):

* easy: 0 => 1


Comment:

Updated patch: https://github.com/django/django/pull/443

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:6>

Django

unread,
Oct 15, 2012, 3:19:34 AM10/15/12
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+------------------------------------
Reporter: mbeachy@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------
Changes (by claudep):

* needs_tests: 0 => 1


Comment:

Looks good, but I still think that this should be tested.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:7>

Django

unread,
Oct 21, 2012, 10:46:34 AM10/21/12
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+------------------------------------
Reporter: mbeachy@… | Owner: lrekucki

Type: New feature | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------
Changes (by lrekucki):

* owner: nobody => lrekucki


Comment:

Eh, I have a hard time testing this on Windows (can't set a file
unreadable). Will update the patch next week.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:8>

Django

unread,
Feb 24, 2013, 10:44:56 AM2/24/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+-------------------------------------
Reporter: mbeachy@… | Owner: dokterbob
Type: New feature | Status: assigned

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by dokterbob):

* owner: lrekucki => dokterbob
* status: new => assigned


Comment:

Have merged with master and running tests right now.

https://github.com/dokterbob/django/tree/ticket6412

Note: Yes, Travis support will be rebased out in the definitive patch.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:9>

Django

unread,
Feb 24, 2013, 10:56:45 AM2/24/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+-------------------------------------
Reporter: mbeachy@… | Owner: dokterbob
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+-------------------------------------

Comment (by dokterbob):

Tests are failing on Python 3.x due to errors with StringIO. Attempting to
fix now.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:10>

Django

unread,
Feb 24, 2013, 11:10:17 AM2/24/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+-------------------------------------
Reporter: mbeachy@… | Owner: dokterbob
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+-------------------------------------

Comment (by dokterbob):

Waiting for https://travis-ci.org/dokterbob/django/builds/5021135

Todo: shorten commit line.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:11>

Django

unread,
Feb 24, 2013, 12:07:42 PM2/24/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
-------------------------------------+-------------------------------------

Reporter: mbeachy@… | Owner: dokterbob
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 1 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by dokterbob):

* stage: Accepted => Ready for checkin


Comment:

Build passed: https://travis-ci.org/dokterbob/django/builds/5021135

Fixed import issue in Python 3.x related to StringIO import in the
process.

https://github.com/django/django/pull/837

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:12>

Django

unread,
Feb 24, 2013, 12:09:45 PM2/24/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+-------------------------------------
Reporter: mbeachy@… | Owner: dokterbob
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by dokterbob):

* stage: Ready for checkin => Accepted


Comment:

Better have a review first.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:13>

Django

unread,
Mar 23, 2013, 11:24:46 AM3/23/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+-------------------------------------
Reporter: mbeachy@… | Owner: dokterbob
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by MarkusH):

* needs_tests: 1 => 0


Comment:

I tested the linked pull request
(https://github.com/django/django/pull/838) on Python 2.7.3 and Python
3.3.0 with Linux. The tests pass for both versions.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:14>

Django

unread,
Mar 23, 2013, 11:46:47 AM3/23/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+-------------------------------------
Reporter: mbeachy@… | Owner: dokterbob
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by jezdez):

* needs_better_patch: 0 => 1


Comment:

The patch looks almost good, although using a `NamedTemporaryFile` would
be better.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:15>

Django

unread,
Mar 23, 2013, 11:58:43 AM3/23/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+------------------------------------
Reporter: mbeachy@… | Owner: MarkusH

Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------
Changes (by MarkusH):

* owner: dokterbob => MarkusH


--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:16>

Django

unread,
Mar 23, 2013, 1:16:59 PM3/23/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+------------------------------------
Reporter: mbeachy@… | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------

Comment (by MarkusH):

I updated the patch to use the `NamedTemporaryFile` for the former two
tests. The latter works on a directory, hence there is no way to
automatically remove that directory.

https://github.com/django/django/pull/947

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:17>

Django

unread,
Mar 23, 2013, 1:18:07 PM3/23/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+------------------------------------
Reporter: mbeachy@… | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------
Changes (by MarkusH):

* cc: MarkusH (added)
* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:18>

Django

unread,
May 18, 2013, 4:50:11 AM5/18/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
------------------------------+------------------------------------
Reporter: mbeachy@… | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------

Comment (by MarkusH):

I updated the pull request to fix some PEP-8 issues.
https://github.com/django/django/pull/947

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:19>

Django

unread,
May 18, 2013, 11:36:01 AM5/18/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
-------------------------------------+-------------------------------------

Reporter: mbeachy@… | Owner: MarkusH
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0

Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by UloPe):

* stage: Accepted => Ready for checkin


Comment:

Patch looks good. I would prefer it if the messages were not defined in
the view. But since this is the debug view the template is included in the
same file anyway so this is no big deal.

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:20>

Django

unread,
May 21, 2013, 11:00:30 AM5/21/13
to django-...@googlegroups.com
#6412: [patch] Check for file permissions for proper error messages
-------------------------------------+-------------------------------------
Reporter: mbeachy@… | Owner: MarkusH
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

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


Comment:

In [changeset:"61a8de6f4f547518d217a5ff959cbd57bddf4bb0"]:
{{{
#!CommitTicketReference repository=""
revision="61a8de6f4f547518d217a5ff959cbd57bddf4bb0"
Fixed #6412 -- More details if a template file cannot be loaded

Report more details about template files in loader postmortem.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/6412#comment:21>

Reply all
Reply to author
Forward
0 new messages