Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26772 closed Bug (fixed)

FileField should re-open closed files

Reported by: Paul J Stevens Owned by: Tim Graham
Component: File uploads/storage Version: 1.10
Severity: Release blocker Keywords: regression
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Refactoring of django.db.models.fields.files has introduced a regression that popped up while working on 1.10 compatibility for Wagtail-cms.

FieldFile._get_file should re-open a closed file as it did before 1.10.

I'll file a PR on GH.

Change History (11)

comment:1 by Baptiste Mispelon, 8 years ago

Hi,

I'm not familiar with the whole File system but the test you provided in your PR already fails on the 1.9 branch which indicates that this might not be a regression.

Can you craft or decribe a testcase that currently works on 1.9 but fails on 1.10?

Thanks.

Last edited 8 years ago by Baptiste Mispelon (previous) (diff)

comment:2 by Tim Graham, 8 years ago

Owner: changed from nobody to Tim Graham
Severity: NormalRelease blocker
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham <timograham@…>, 8 years ago

In 7def55c3:

Reverted "Fixed #26398 -- Made FieldFile.open() respect its mode argument."

This reverts commit a52a531a8b34f049fba11c3ee7b010af7534bf90 due to
regressions described in refs #26772.

comment:4 by Tim Graham <timograham@…>, 8 years ago

In bdc29b7:

[1.10.x] Reverted "Fixed #26398 -- Made FieldFile.open() respect its mode argument."

This reverts commit a52a531a8b34f049fba11c3ee7b010af7534bf90 due to
regressions described in refs #26772.

Backport of 7def55c3f6716fcfa40a3bd5d0fbb2090588d81e from master

comment:5 by Alexey Kotlyarov, 8 years ago

Should #26398 be reopened now? The reverted test fails.

comment:6 by Tim Graham, 8 years ago

Resolution: fixed
Status: assignedclosed

Yes. I created a new PR to add the tests for these regressions.

comment:7 by Tim Graham <timograham@…>, 8 years ago

In cd217de:

Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."

This reverts commit 1b407050dd53e56686fdd3e168f8cac4f9be8306 as it
introduces a regression in the test for refs #26772.

comment:8 by Tim Graham <timograham@…>, 8 years ago

In b45852c:

Refs #26772 -- Added a test for FileField reopening closed files.

Thanks Simon Charette for review.

comment:9 by Tim Graham <timograham@…>, 8 years ago

In 2ff72962:

Refs #26772 -- Added a test for FileField reopening closed files.

Thanks Simon Charette for review.

comment:10 by Tim Graham <timograham@…>, 8 years ago

In e2b266f:

[1.10.x] Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."

This reverts commit 1b407050dd53e56686fdd3e168f8cac4f9be8306 as it
introduces a regression in the test for refs #26772.

Backport of cd217de6100e0101fd921dd18bc2e706bac397c9 from master

comment:11 by Tim Graham <timograham@…>, 8 years ago

In d3b9c499:

[1.10.x] Refs #26772 -- Added a test for FileField reopening closed files.

Thanks Simon Charette for review.

Backport of b45852c2631d4f291fb22ef3348065f2a3c2e5e3 from master

Note: See TracTickets for help on using tickets.
Back to Top