Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msg.walk memory leak? #83809

Closed
falon mannequin opened this issue Feb 13, 2020 · 2 comments
Closed

msg.walk memory leak? #83809

falon mannequin opened this issue Feb 13, 2020 · 2 comments
Labels
performance Performance or resource usage topic-email

Comments

@falon
Copy link
Mannequin

falon mannequin commented Feb 13, 2020

BPO 39628
Nosy @warsaw, @bitdancer, @maxking, @falon

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2020-02-21.10:08:22.769>
created_at = <Date 2020-02-13.15:05:28.453>
labels = ['invalid', 'expert-email', 'performance']
title = 'msg.walk memory leak?'
updated_at = <Date 2020-02-21.10:08:22.768>
user = 'https://github.com/falon'

bugs.python.org fields:

activity = <Date 2020-02-21.10:08:22.768>
actor = 'falon'
assignee = 'none'
closed = True
closed_date = <Date 2020-02-21.10:08:22.769>
closer = 'falon'
components = ['email']
creation = <Date 2020-02-13.15:05:28.453>
creator = 'falon'
dependencies = []
files = []
hgrepos = []
issue_num = 39628
keywords = []
message_count = 2.0
messages = ['361959', '362401']
nosy_count = 4.0
nosy_names = ['barry', 'r.david.murray', 'maxking', 'falon']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'resource usage'
url = 'https://bugs.python.org/issue39628'
versions = ['Python 3.6']

@falon
Copy link
Mannequin Author

falon mannequin commented Feb 13, 2020

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.

@falon falon mannequin added topic-email performance Performance or resource usage labels Feb 13, 2020
@falon
Copy link
Mannequin Author

falon mannequin commented Feb 21, 2020

uhm, no.
I can no more reproduce this. I was wrong. Sorry for the noise.

@falon falon mannequin closed this as completed Feb 21, 2020
@falon falon mannequin added the invalid label Feb 21, 2020
@falon falon mannequin closed this as completed Feb 21, 2020
@falon falon mannequin added the invalid label Feb 21, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage topic-email
Projects
None yet
Development

No branches or pull requests

0 participants