Comments (2)
This is needed because the Python implementation of NamedTemporaryFile uses the
O_TEMPORARY flag under Windows, which prevents the file from being reopened
if the same flag is not provided [1][2]. Note that this does not address the
more general issue of opening a file for writing and reading in multiple
processes in a manner that works across platforms.
The custom version of NamedTemporaryFile doesn't support the same keyword
arguments available in tempfile.NamedTemporaryFile.
1: https://mail.python.org/pipermail/python-list/2005-December/336957.html
2: http://bugs.python.org/issue14243
sauce: https://github.com/django/django/blob/master/django/core/files/temp.py
It has the potential to cause problems, as not all keyword arguments are supported. However, in our use case it does not appear to cause any problems. I'll create a PR, and the maintainers can decide if they want to merge it.
from django-hardcopy.
A fix for this has been merged and will land in the next release.
from django-hardcopy.
Related Issues (15)
- Project Branching Strategy & Roadmap HOT 1
- Hide date, url and page count in pdf HOT 11
- Test Coverage Needed
- ImportError: No module named pathlib HOT 1
- [0709/070927.133352:ERROR:headless_shell.cc(605)] Open multiple tabs is only supported when remote debugging is enabled.
- Plans to deal with future deprecation of the --print-to-pdf command arg HOT 2
- How to create PDF in PDF-1.6 format instead of PDF-1.4
- Feature request/question - render video with ffmpeg
- cleanup of process
- No longer works without snap on Ubuntu OS.
- LICENSE INFO
- DRF Renderer Class
- Fails to create PDF in Docker container HOT 2
- Unable to run on linux if none of the LINUX_PATHS is present HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-hardcopy.