fix unclosed file ResourceWarning
fix unclosed file ResourceWarning

part of #2830

WinterNis/sqlalchemy,davidjb/sqlalchemy,epa/sqlalchemy,brianv0/sqlalchemy,bootandy/sqlalchemy,EvaSDK/sqlalchemy,monetate/sqlalchemy,bdupharm/sqlalchemy,monetate/sqlalchemy,j5int/sqlalchemy,wfxiang08/sqlalchemy,pdufour/sqlalchemy,bdupharm/sqlalchemy,brianv0/sqlalchemy,itkovian/sqlalchemy,itkovian/sqlalchemy,j5int/sqlalchemy,davidfraser/sqlalchemy,elelianghh/sqlalchemy,robin900/sqlalchemy,Akrog/sqlalchemy,sqlalchemy/sqlalchemy,276361270/sqlalchemy,sandan/sqlalchemy,ThiefMaster/sqlalchemy,graingert/sqlalchemy,Akrog/sqlalchemy,hsum/sqlalchemy,halfcrazy/sqlalchemy,276361270/sqlalchemy,epa/sqlalchemy,WinterNis/sqlalchemy,halfcrazy/sqlalchemy,inspirehep/sqlalchemy,dstufft/sqlalchemy,olemis/sqlalchemy,davidjb/sqlalchemy,inspirehep/sqlalchemy,wfxiang08/sqlalchemy,EvaSDK/sqlalchemy,robin900/sqlalchemy,hsum/sqlalchemy,sandan/sqlalchemy,elelianghh/sqlalchemy,olemis/sqlalchemy,zzzeek/sqlalchemy,bootandy/sqlalchemy,wujuguang/sqlalchemy,davidfraser/sqlalchemy,pdufour/sqlalchemy,dstufft/sqlalchemy,wujuguang/sqlalchemy,ThiefMaster/sqlalchemy,graingert/sqlalchemy