Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backporting TemporaryFile, etc. #2

Open
bepetersn opened this issue Jun 1, 2016 · 11 comments
Open

Backporting TemporaryFile, etc. #2

bepetersn opened this issue Jun 1, 2016 · 11 comments

Comments

@bepetersn
Copy link

bepetersn commented Jun 1, 2016

Hello,

I noticed a tempfile backport has been started, but that it has only defined NamedDirectory. Kind of random, but -- I would really appreciate it if you (whoever is in charge of this backport) would consider backporting the TemporaryFile & its subclasses like NamedTemporaryFile, etc. The feature that I am really missing our in Python2.7 & and am wanting, is the ability to specify an encoding, as is possible in py2 with codecs.open, io.open, etc., and in py3 with all file-writing utilities, including tempfile.

Thanks much!

@PiDelport PiDelport added this to the 1.0 release milestone Jun 2, 2016
@PiDelport PiDelport modified the milestones: 1.0 release, 1.1 Oct 13, 2017
@kislyuk
Copy link

kislyuk commented Nov 19, 2017

Hi, I'd like to add to this bug report. Backports should provide new functionality while retaining compatibility with existing functionality. This module should provide the same API as tempfile itself.

@kislyuk
Copy link

kislyuk commented Dec 29, 2017

@pjdelport would you be open to a PR for this?

@PiDelport
Copy link
Owner

Sure!

@jayvdb
Copy link

jayvdb commented Mar 9, 2019

@techalchemy, perhaps you want to contribute your NamedTemporaryFile here ?

c.f. https://github.com/sarugaku/vistir/commits/master/src/vistir/backports/tempfile.py

@techalchemy
Copy link

Sure, it really just requires backports.weakref

@jayvdb
Copy link

jayvdb commented Mar 12, 2019

This package already depends on backports.weakref, so that wont be problem.

@kislyuk
Copy link

kislyuk commented Mar 12, 2019

Unfortunately, the maintainer of this package is unresponsive. I've had a fairly trivial PR (#4) open for 15 months and the maintainer has not responded.

@PiDelport, if you are reading this, I think the ideal solution would be if you could give someone else you trust access to PyPI packaging rights. Others will then be able to contribute. My PyPI username is the same as my github username, or you could transfer to someone who is known to maintain other useful backports packages (@jaraco?)

@PiDelport
Copy link
Owner

Apologies, and thanks for putting this back on my radar! I responded in PR #4.

@kislyuk
Copy link

kislyuk commented Mar 12, 2019

OK, thanks @PiDelport, we're back in business.

@jayvdb
Copy link

jayvdb commented Mar 27, 2019

See pypa/pipenv#3494 for a bug caused because it was assumed that this backport was reasonably complete.

@PiDelport
Copy link
Owner

@jayvdb: Thank you for the ping.

jayvdb added a commit to jayvdb/backports.tempfile that referenced this issue Apr 2, 2019
The Python 3.7 NamedTemporaryFile and TemporaryFile
are copied as-is with minor modifications in
_infer_return_type and _sanitize_params.

Closes PiDelport#2
jayvdb added a commit to jayvdb/backports.tempfile that referenced this issue Apr 2, 2019
The Python 3.7 NamedTemporaryFile and TemporaryFile
are copied as-is with minor modifications in
_infer_return_type and _sanitize_params.

Closes PiDelport#2
jayvdb added a commit to jayvdb/backports.tempfile that referenced this issue Apr 2, 2019
The Python 3.7 NamedTemporaryFile and TemporaryFile
are copied as-is with minor modifications in
_infer_return_type and _sanitize_params.

Closes PiDelport#2
jayvdb added a commit to jayvdb/backports.tempfile that referenced this issue Apr 2, 2019
The Python 3.7 NamedTemporaryFile and TemporaryFile
are copied as-is with minor modifications in
_infer_return_type and _sanitize_params.

Closes PiDelport#2
jayvdb added a commit to jayvdb/backports.tempfile that referenced this issue Apr 2, 2019
The Python 3.7 NamedTemporaryFile and TemporaryFile
are copied as-is with minor modifications in
_infer_return_type and _sanitize_params.

Closes PiDelport#2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants