[New-bugs-announce] [issue39628] msg.walk memory leak?

Marco report at bugs.python.org
Thu Feb 13 10:05:28 EST 2020


New submission from Marco <m.faverof at gmail.com>:

Hello,

 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.

----------
components: email
messages: 361959
nosy: barry, falon, r.david.murray
priority: normal
severity: normal
status: open
title: msg.walk memory leak?
type: resource usage
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39628>
_______________________________________


More information about the New-bugs-announce mailing list