[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-03-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There are two ways of supporting an open file descriptor to a directory:

1. Accept a file descriptor as the dir argument.
2. Add a new parameter dir_fd; dir will then be a path relative to dir_fd.

The original proposition is option 2. PR 31785 implements option 1. I am going 
to play with the code, implement option 2, and see what is simpler and what is 
more convenient.

Any thoughts or suggestions?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-03-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +29890
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/31785

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Georg Brandl


Change by Georg Brandl :


--
nosy:  -georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Yassir Karroum


Yassir Karroum  added the comment:

Alright, I'll stop working on it then, thanks for the fix !

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I have also almost finished this issue (only needed to add some tests and docs).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Yassir Karroum


Change by Yassir Karroum :


--
versions: +Python 3.11 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-03 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
dependencies: +Add support for dir_fd in shutil.rmtree()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think it is better to not change posixpath for now. And it is not necessary. 
But shutil.rmtree() needs to support file descriptors, and it is not trivial 
issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-02 Thread Yassir Karroum


Yassir Karroum  added the comment:

I started looking at this issue.

I may need to propagate the change (adding dir_fd as a keyword argument) to 
multiple functions in posixpath module: Functions like abspath, join, isdir, 
etc. The alternative will be to have the logic in tempfile module which feels 
off to me.

Does anyone have an issue with that ?

--
nosy: +ukarroum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2015-12-28 Thread Марк Коренберг

Марк Коренберг added the comment:

Yes, can I do it on, say, github ?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2015-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See a guide: https://docs.python.org/devguide/.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2015-12-22 Thread Марк Коренберг

New submission from Марк Коренберг:

dir_fd support is good in `os` module. but tempfile module lack support of that 
great feature. Please add.

--
messages: 256856
nosy: mmarkk
priority: normal
severity: normal
status: open
title: add dir_fd for mkstemp, and also maybe to all tempfile.*
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2015-12-22 Thread Марк Коренберг

Changes by Марк Коренберг :


--
components: +Library (Lib)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2015-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Do you want to provide a patch Mark?

--
nosy: +georg.brandl, ncoghlan, serhiy.storchaka
stage:  -> needs patch
type:  -> enhancement
versions:  -Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com