Message205149
I can reproduce the issue with Python 2.7. The problem is that BZ2File.__init__() doesn't reset the object when __init__() is called twice.
For example, the following script fails with "too many open files" error, before the previous file is not called:
---
import bz2
obj = bz2.BZ2File('bla.bz2')
for loop in range(1024*10):
obj.__init__('bla.bz2')
---
By the way, why do you call __init__() twice? Why not creating a new object?
BZ2File was rewritten in pure Python in Python 3.3. Python 3.3+ is not affected by this issue. |
|
Date |
User |
Action |
Args |
2013-12-03 21:01:56 | vstinner | set | recipients:
+ vstinner, ned.deily, serhiy.storchaka, Level |
2013-12-03 21:01:56 | vstinner | set | messageid: <1386104516.79.0.679265265186.issue19878@psf.upfronthosting.co.za> |
2013-12-03 21:01:56 | vstinner | link | issue19878 messages |
2013-12-03 21:01:56 | vstinner | create | |
|