Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-20 Thread Django
#29140: Exception sending EmailMessage with body=None
-+-
 Reporter:  Alex Schokking   |Owner:  Williams
 |  Mendez
 Type:  Bug  |   Status:  closed
Component:  Core (Mail)  |  Version:  1.11
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Alex Schokking):

 Replying to [comment:6 Herbert Fortes]:
 > Tests do not fail.
 >
 > EmailMessage does not raises errors
 >
 > I am not dealing with python2.7 right.

 We were using Python 2.7 on this project

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.6973def7b4e6dc957ef6cd873adf1b31%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-20 Thread Django
#29140: Exception sending EmailMessage with body=None
-+-
 Reporter:  Alex Schokking   |Owner:  Williams
 |  Mendez
 Type:  Bug  |   Status:  closed
Component:  Core (Mail)  |  Version:  1.11
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"2691ed7ba1a83c535acd4fe7f0864a279cec3c35" 2691ed7]:
 {{{
 #!CommitTicketReference repository=""
 revision="2691ed7ba1a83c535acd4fe7f0864a279cec3c35"
 Fixed #29140 -- Fixed EmailMessage crash when body is None.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.9b9c15de3cbcdbd4468acc902a7feb45%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-20 Thread Django
#29140: Exception sending EmailMessage with body=None
-+-
 Reporter:  Alex Schokking   |Owner:  Williams
 |  Mendez
 Type:  Bug  |   Status:  assigned
Component:  Core (Mail)  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Tim Graham):

 * has_patch:  0 => 1
 * stage:  Unreviewed => Ready for checkin


Comment:

 [https://github.com/django/django/pull/9707 PR]

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.c823b151fac19540c8c341dbabbba77d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-19 Thread Django
#29140: Exception sending EmailMessage with body=None
-+-
 Reporter:  Alex Schokking   |Owner:  Williams
 |  Mendez
 Type:  Bug  |   Status:  assigned
Component:  Core (Mail)  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Herbert Fortes):

 Tests do not fail.

 EmailMessage does not raises errors

 I am not dealing with python2.7 right.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.4c4d6cd567d41890ad866f8a4a3974cf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-19 Thread Django
#29140: Exception sending EmailMessage with body=None
-+-
 Reporter:  Alex Schokking   |Owner:  Williams
 |  Mendez
 Type:  Bug  |   Status:  assigned
Component:  Core (Mail)  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Herbert Fortes):

 It is just a curiosity.

 I got Django-1.9.13 put None in some tests.

 I found one test that fails: test_send() line 625. Three times.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.1891ea6ab898c8d2ab156e83c0bb4576%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-19 Thread Django
#29140: Exception sending EmailMessage with body=None
-+-
 Reporter:  Alex Schokking   |Owner:  Williams
 |  Mendez
 Type:  Bug  |   Status:  assigned
Component:  Core (Mail)  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Williams Mendez):

 * status:  new => assigned
 * owner:  nobody => Williams Mendez


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.fa27adca042abc4cd5a286dc0b04629c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-18 Thread Django
#29140: Exception sending EmailMessage with body=None
+--
 Reporter:  Alex Schokking  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Core (Mail) |  Version:  1.11
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--

Comment (by Herbert Fortes):

 Hi,

 Can you show how do you call EmailMessage?

 If body=None the AttributeError will change to - 'NonType' object has no
 attribute 'encode' at some point. A long time ago.

 My first hint is to set |self.body = body or ' ' (single_quotes_here)


 Regards,
 Herbert

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.88faa1c1af8f4bd00a21e7bdee92c778%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-18 Thread Django
#29140: Exception sending EmailMessage with body=None
+--
 Reporter:  Alex Schokking  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Core (Mail) |  Version:  1.11
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--

Comment (by Williams Mendez):

 I'd like to contribute to this ticket.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.22cb23555411b5b856bbd93342e9e6e7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29140: Exception sending EmailMessage with body=None

2018-02-16 Thread Django
#29140: Exception sending EmailMessage with body=None
+--
 Reporter:  Alex Schokking  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Core (Mail) |  Version:  1.11
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--
Changes (by Alex Schokking):

 * type:  Uncategorized => Bug


Old description:

> This had been working fine on 1.9 but when we upgraded to 1.11 instantly
> started hitting an exception when django tries to call splitlines on the
> None body without checking if there's a value there to split on.
>
> {{{
>  File "/usr/local/lib/python2.7/dist-
> packages/django/core/mail/message.py", line 348, in send
> return self.get_connection(fail_silently).send_messages([self])
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/mail/backends/smtp.py", line 111, in send_messages
> sent = self._send(message)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/mail/backends/smtp.py", line 125, in _send
> message = email_message.message()
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/mail/message.py", line 307, in message
> msg = SafeMIMEText(self.body, self.content_subtype, encoding)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/mail/message.py", line 214, in __init__
> MIMEText.__init__(self, _text, _subtype=_subtype, _charset=_charset)
>   File "/usr/lib/python2.7/email/mime/text.py", line 30, in __init__
> self.set_payload(_text, _charset)
>   File "/usr/local/lib/python2.7/dist-
> packages/django/core/mail/message.py", line 224, in set_payload
> for l in payload.splitlines()
> AttributeError: 'NoneType' object has no attribute 'splitlines'
> }}}
>

> We've hacked around it by passing in an empty string instead but would
> probably be more elegant for this `has_long_lines` logic to check if
> there's a value instead.
>
> For context we're not passing in a body because we're attaching the
> plaintext and html versions of the email as a SafeMIMEMultipart
> attachment.

New description:

 This had been working fine on 1.9 but when we upgraded to 1.11 instantly
 started hitting an exception when django tries to call splitlines() on the
 None body without checking if there's a value there to split on.

 {{{
  File "/usr/local/lib/python2.7/dist-
 packages/django/core/mail/message.py", line 348, in send
 return self.get_connection(fail_silently).send_messages([self])
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/mail/backends/smtp.py", line 111, in send_messages
 sent = self._send(message)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/mail/backends/smtp.py", line 125, in _send
 message = email_message.message()
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/mail/message.py", line 307, in message
 msg = SafeMIMEText(self.body, self.content_subtype, encoding)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/mail/message.py", line 214, in __init__
 MIMEText.__init__(self, _text, _subtype=_subtype, _charset=_charset)
   File "/usr/lib/python2.7/email/mime/text.py", line 30, in __init__
 self.set_payload(_text, _charset)
   File "/usr/local/lib/python2.7/dist-
 packages/django/core/mail/message.py", line 224, in set_payload
 for l in payload.splitlines()
 AttributeError: 'NoneType' object has no attribute 'splitlines'
 }}}


 We've hacked around it by passing in an empty string instead but would
 probably be more elegant for this `has_long_lines` logic to check if
 there's a value instead.

 For context we're not passing in a body because we're attaching the
 plaintext and html versions of the email as a SafeMIMEMultipart
 attachment.

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.8b516dda4911719645165b5b58d379c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.