Re: [pylons-discuss] Re: tracking down a test issue - ResourceWarning: unclosed file <_io.BufferedRandom

2020-02-05 Thread Jonathan Vanasco
On Wednesday, February 5, 2020 at 1:15:23 PM UTC-5, Michael Merickel wrote: > > If you're opening files you should use the context manager - for example: > > with request.POST['file'] as field: > data = field.file.read() > Thanks, Michael. My application code did that... but somewhere in the

Re: [pylons-discuss] upgraded to 1.4.2 and requests got stuck (load 1.0)

2020-02-05 Thread 'Peter Lada' via pylons-discuss
Yeah, he sits right next to me :) On Monday, February 3, 2020 at 12:56:17 AM UTC-5, Bert JW Regeer wrote: > > Just quickly following up on this. > > Thanks to Fil Zembowicz an issue was found in the regular expression used > to parse incoming headers, which may lead to a denial of service. This

Re: [pylons-discuss] Re: tracking down a test issue - ResourceWarning: unclosed file <_io.BufferedRandom

2020-02-05 Thread Michael Merickel
If you're opening files you should use the context manager - for example: with request.POST['file'] as field: data = field.file.read() On Tue, Feb 4, 2020 at 3:53 PM Jonathan Vanasco wrote: > After even more testing (half my day!)... > > My app needed an `add_finished_callback` to close