Stop mutating tempfile.tempdir as a side-effect of creating a Node #3052

Closed
opened 2019-06-13 14:09:57 +00:00 by exarkun · 4 comments

Node.init_tempdir sets tempfile.tempdir so that Twisted Web will write uploaded files to a node-specific directory.

tempfile.tempdir is global state and mutating it for a particular Node instance causes all kinds of problems (for example, it means you can't really have two Node instances in one process; it also wreaks havoc on the test suite).

Get a feature into Twisted so that Twisted Web doesn't rely on this global state for upload file location and then use that feature instead of mutating tempfile.tempdir.

`Node.init_tempdir` sets `tempfile.tempdir` so that Twisted Web will write uploaded files to a node-specific directory. `tempfile.tempdir` is global state and mutating it for a particular `Node` instance causes all kinds of problems (for example, it means you can't really have two Node instances in one process; it also wreaks havoc on the test suite). Get a feature into Twisted so that Twisted Web doesn't rely on this global state for upload file location and then use that feature instead of mutating `tempfile.tempdir`.
exarkun added the
code
normal
defect
n/a
labels 2019-06-13 14:09:57 +00:00
exarkun added this to the undecided milestone 2019-06-13 14:09:57 +00:00
Author
(https://twistedmatrix.com/trac/ticket/9655)
Author

The Twisted ticket is resolved but the change is not yet in a release.

The Twisted ticket is resolved but the change is not yet in a release.
Author

The Twisted change was included in the Twisted 19.10.0 release in Nov 2019

The Twisted change was included in the Twisted 19.10.0 release in Nov 2019
Author
Duplicate of [/tahoe-lafs/trac-2024-07-25/issues/6611](/tahoe-lafs/trac-2024-07-25/issues/6611)
exarkun added the
duplicate
label 2020-01-16 20:55:59 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#3052
No description provided.