[Scons-dev] Closing files (patch)

Evan Driscoll driscoll at cs.wisc.edu
Tue Jul 4 22:47:10 EDT 2017


I recently gave running SCons under PyPy a shot. It actually worked, 
except for running out of file descriptors due to the GC not closing 
things immediately.

I went through and added some explicit close calls (actually, mostly 
'with's) and then it worked fine. It looks like you actually picked up 
most of them (probably all the important ones) in 8716da8, but in case 
you wanted, I thought I'd send a patch with a few more. (We're using 
2.5.0, and I'm not sure if the commit cited above landed in time for .1 
or after that.)

I don't know if the remainder matter though, or in the case of the MD5 
change, if it's in code that's even called. (Though if it is called, it 
may well matter.) I just did a search for 'open' and made replacements 
for ones where it looked easy to do and I didn't have to think too hard. :-)

Evan

P.S. On scons.org, Development -> Development, the "Developer's 
Guidelines" link is broken.

P.P.S. The FAQ still has the question "why is SCons written for Python 2.4"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: scons-open.patch
Type: text/x-patch
Size: 11800 bytes
Desc: not available
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170704/804af619/attachment.bin>


More information about the Scons-dev mailing list