[issue30011] HTMLParser class is not thread safe

2017-04-15 Thread Alessandro Vesely
Alessandro Vesely added the comment: Serhiy's analysis is correct. If anything more than a comment is going to make its way to the code, I'd suggest to move dictionary building to its own function, so that it can be called either on first use --like now-- or before threading if t

[issue30011] HTMLParser class is not thread safe

2017-04-14 Thread Alessandro Vesely
Alessandro Vesely added the comment: On Fri 14/Apr/2017 19:44:29 +0200 Serhiy Storchaka wrote: > > Changes by Serhiy Storchaka : > > > -- > pull_requests: +1272 Thank you for your fix, Serhiy. It makes the class behave consistently. However, busy processes are goi

[issue30011] HTMLParser class is not thread safe

2017-04-07 Thread Alessandro Vesely
New submission from Alessandro Vesely: SYMPTOM: When used in a multithreaded program, instances of a class derived from HTMLParser may convert an entity or leave it alone, in an apparently random fashion. CAUSE: The class has a static attribute, entitydefs, which, on first use, is

[issue29462] RFC822-comments in email header fields can fool, e.g., get_filename()

2017-02-07 Thread Alessandro Vesely
Alessandro Vesely added the comment: We can close this, then. Let's hope migration to Python3 isn't going to last forever... Thank you for your cooperation -- resolution: -> wont fix stage: -> resolved status: open -> closed ___

[issue29462] RFC822-comments in email header fields can fool, e.g., get_filename()

2017-02-06 Thread Alessandro Vesely
Alessandro Vesely added the comment: Neither I found CFWS in rfc2231. In addition, rfc 2045 (Introduction) says that Content-Disposition —where filename is defined— cannot include comments. However, Content-Type can include RFC 822 comments, so the filename should be de-commented in case it

[issue29462] RFC822-comments in email header fields can fool, e.g., get_filename()

2017-02-06 Thread Alessandro Vesely
New submission from Alessandro Vesely: Comments are allowed almost everywhere in an email message, and should be eliminated before attributing any meaning to a field. In the words of RFC5322, any CRLF that appears in FWS is semantically "invisible". In particular, some note that co