[issue21091] EmailMessage.is_attachment should be a method

2014-09-20 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: -> behavior versions: +Python 3.4 ___ Python tracker ___ __

[issue21091] EmailMessage.is_attachment should be a method

2014-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3df1c24d586 by R David Murray in branch '3.4': #21091: make is_attachment a method. https://hg.python.org/cpython/rev/a3df1c24d586 New changeset f7aff40609e7 by R David Murray in branch 'default': Merge: #21091: make is_attachment a method. https:/

[issue21091] EmailMessage.is_attachment should be a method

2014-09-20 Thread R. David Murray
R. David Murray added the comment: Here is a patch. Sorry for leaving it until the last minute...maybe someone can review it, but it is simple enough I'll commit it soon regardless. -- Added file: http://bugs.python.org/file36670/is_attachment_as_method.patch _

[issue21091] EmailMessage.is_attachment should be a method

2014-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: commit review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue21091] EmailMessage.is_attachment should be a method

2014-08-05 Thread R. David Murray
R. David Murray added the comment: is_multipart is *not* part of the provisional API, though; only is_attachment is. So per my understanding of the provisional rules, we should either make is_attachment a method in both 3.4 maint and 3.5, or make is_multipart emit a deprecation warning in 3.5

[issue21091] EmailMessage.is_attachment should be a method

2014-08-04 Thread Nick Coghlan
Nick Coghlan added the comment: Based on the provisional API status, a faster deprecation plan could be to do Serhiy's patch in a 3.4 maintenance release and the hard break in 3.5 -- ___ Python tracker

[issue21091] EmailMessage.is_attachment should be a method

2014-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with more soft transition. Message.is_multipart() still works but emits deprecation warning. -- Added file: http://bugs.python.org/file36250/multipart_is_property_2.patch ___ Python tracker

[issue21091] EmailMessage.is_attachment should be a method

2014-08-04 Thread Joseph Godbehere
Joseph Godbehere added the comment: Very good point, Serhiy. Here is an alternative patch, which instead changes Message.is_multipart from a method to a property as per your suggestion. This way incorrect usage should fail noisily. This patch is against the relevant docs, tests, is_multipart

[issue21091] EmailMessage.is_attachment should be a method

2014-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The alternative is to make EmailMessage.is_multipart a property. -- ___ Python tracker ___ ___ Pyt

[issue21091] EmailMessage.is_attachment should be a method

2014-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unfortunately this will silently break existing code because msg.is_attachment will be always true. But it is possible to make EmailMessage.is_attachment a property which returns special callable with the __bool__() method which will emit deprecation warning

[issue21091] EmailMessage.is_attachment should be a method

2014-08-03 Thread Nick Coghlan
Nick Coghlan added the comment: This is your call David - I agree consistency is highly desirable, and having a chance to find and fix this kind of discrepancy is a large part of why we introduced provisional APIs. -- assignee: -> r.david.murray nosy: +ncoghlan stage: -> commit revie

[issue21091] EmailMessage.is_attachment should be a method

2014-08-03 Thread Joseph Godbehere
Joseph Godbehere added the comment: Patch to change message.is_attachment from a property to a normal method. I've updated the doc and all calls to is_attachment. -- keywords: +patch nosy: +joegod Added file: http://bugs.python.org/file36243/attach_not_property.patch __

[issue21091] EmailMessage.is_attachment should be a method

2014-04-04 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue21091] EmailMessage.is_attachment should be a method

2014-03-28 Thread Brandon Rhodes
New submission from Brandon Rhodes: I love properties and think they should be everywhere. But consistency is more important, so I suspect that EmailMessage.is_attachment should be demoted to a normal method. Why? Because if it remains a property then I am likely to first write: if msg.is