[issue26861] shutil.copyfile() doesn't close the opened files

2016-12-02 Thread Vukasin Felbab

Vukasin Felbab added the comment:

Okay, so the problem is that I have a command library instance which is 
containing a connection to a server and functions can be called to execute some 
queries. As I pass this instance as a parameter in a recursive chain, after a 
while the open files limit is reached, I got it a few times an error on file 
opening. It is sure that I don't leave connections and open files before 
calling the next recursion, only thing this command library has the connection 
open. Additionally, when I store the instance in a global variable and call it 
from there then there are no IO errors. So, it means that the python is not 
giving parameters by reference, but by value? Because according to the Python, 
if I pass a mutable object as an argument, an if I use that for querying and 
passing the same instance to the next recursion level it should work fine, 
because in this case it should pass by reference, but it is not obviously, it 
passes by value, the connections remain open and the io limit is reached.

--
status: pending -> open

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



[issue26861] shutil.copyfile() doesn't close the opened files

2016-04-26 Thread Vukasin Felbab

New submission from Vukasin Felbab:

shutil.copyfile() doesn't close the opened files, so it is vulnerable to IO 
Error 24: too many files open

actually, the src and dst files should be closed after copy

--
components: IO
messages: 264286
nosy: vocdetnojz
priority: normal
severity: normal
status: open
title: shutil.copyfile() doesn't close the opened files
type: behavior
versions: Python 2.7

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