[Django] #32360: Add system check that FILE_UPLOAD_TEMP_DIR exists when set

21 views
Skip to first unread message

Django

unread,
Jan 17, 2021, 4:07:08 PM1/17/21
to django-...@googlegroups.com
#32360: Add system check that FILE_UPLOAD_TEMP_DIR exists when set
-------------------------------------+-------------------------------------
Reporter: Tim | Owner: Tim McCurrach
McCurrach |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: 3.1
Uncategorized |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Following discussion in this ticket
https://code.djangoproject.com/ticket/32329

Add a check that if `settings.FILE_UPLOAD_TEMP_DIR` is set, then the
directory actually exists. This is because if it doesn't exist it can lead
to an OSError when python attempts to create a `NamedTemporaryFile`.

My only question is how this check should be categorised. It doesn't fit
nicely into any of the existing tags. Would this merit a new tag? files?

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

Django

unread,
Jan 18, 2021, 12:27:06 AM1/18/21
to django-...@googlegroups.com
#32360: Add system check that FILE_UPLOAD_TEMP_DIR exists when set
-------------------------------------+-------------------------------------
Reporter: Tim McCurrach | Owner: Tim
Type: | McCurrach
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* version: 3.1 => 4.0
* component: Uncategorized => Core (Other)
* stage: Unreviewed => Accepted


Comment:

> My only question is how this check should be categorised. It doesn't fit
nicely into any of the existing tags. Would this merit a new tag? files?

`files` sounds good.

--
Ticket URL: <https://code.djangoproject.com/ticket/32360#comment:1>

Django

unread,
Jan 20, 2021, 3:38:50 PM1/20/21
to django-...@googlegroups.com
#32360: Add system check that FILE_UPLOAD_TEMP_DIR exists when set
-------------------------------------+-------------------------------------
Reporter: Tim McCurrach | Owner: Tim
Type: | McCurrach
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: 4.0
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 Tim McCurrach):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32360#comment:2>

Django

unread,
Jan 21, 2021, 2:17:46 AM1/21/21
to django-...@googlegroups.com
#32360: Add system check that FILE_UPLOAD_TEMP_DIR exists when set
-------------------------------------+-------------------------------------
Reporter: Tim McCurrach | Owner: Tim
Type: | McCurrach
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32360#comment:3>

Django

unread,
Jan 22, 2021, 1:52:00 AM1/22/21
to django-...@googlegroups.com
#32360: Add system check that FILE_UPLOAD_TEMP_DIR exists when set
-------------------------------------+-------------------------------------
Reporter: Tim McCurrach | Owner: Tim
Type: | McCurrach
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32360#comment:4>

Django

unread,
Jan 22, 2021, 3:18:47 AM1/22/21
to django-...@googlegroups.com
#32360: Add system check that FILE_UPLOAD_TEMP_DIR exists when set
-------------------------------------+-------------------------------------
Reporter: Tim McCurrach | Owner: Tim
Type: | McCurrach
Cleanup/optimization | Status: closed

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

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"b1821fbad5518c8ae56b7b5c2b1ea2afbbd25c7a" b1821fb]:
{{{
#!CommitTicketReference repository=""
revision="b1821fbad5518c8ae56b7b5c2b1ea2afbbd25c7a"
Fixed #32360 -- Added system check for FILE_UPLOAD_TEMP_DIR setting.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32360#comment:5>

Reply all
Reply to author
Forward
0 new messages