Title: msg.walk memory leak?
Type: resource usage Stage: resolved
Components: email Versions: Python 3.6
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: barry, falon, maxking, r.david.murray
Priority: normal Keywords:

Created on 2020-02-13 15:05 by falon, last changed 2020-02-21 10:08 by falon. This issue is now closed.

Messages (2)
msg361959 - (view) Author: Marco (falon) Date: 2020-02-13 15:05

 if I write

msg = email.message_from_bytes(...)
for part in msg.walk():
  content_type = part.get_content_type()
  if not part.get_content_maintype() == 'multipart':
     filename = part.get_filename(None)
     attachment = part.get_payload(decode=True)

if the mime parts are more than one, then the memory increases at each iteration and will never be released.
msg362401 - (view) Author: Marco (falon) Date: 2020-02-21 10:08
uhm, no.
I can no more reproduce this. I was wrong. Sorry for the noise.
Date User Action Args
2020-02-21 10:08:22falonsetstatus: open -> closed
resolution: not a bug
messages: + msg362401

stage: resolved
2020-02-18 00:10:35maxkingsetnosy: + maxking
2020-02-13 15:05:28faloncreate