[issue21567] cannot create multipart alternative message with us-ascii charset

2021-02-14 Thread Irit Katriel


Irit Katriel  added the comment:

Works for me:

Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 
64 bit (AMD64)] on win32
>>> from email.mime.multipart import MIMEMultipart
>>> new_msg = MIMEMultipart('alternative')
>>> new_msg.set_charset('us-ascii')
>>>

--
resolution:  -> out of date
stage:  -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21567] cannot create multipart alternative message with us-ascii charset

2020-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

I'm not seeing the problem in 3.7(linux) and 3.10(windows). Is this a python 
2-only issue?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21567] cannot create multipart alternative message with us-ascii charset

2018-07-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21567] cannot create multipart alternative message with us-ascii charset

2014-06-02 Thread R. David Murray

R. David Murray added the comment:

I suspect this is either related to or is a duplicate of issue 1823.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21567] cannot create multipart alternative message with us-ascii charset

2014-05-23 Thread Viktor Szépe

Viktor Szépe added the comment:

Sorry!

How come that
new_msg.set_charset('utf-8')
works?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21567] cannot create multipart alternative message with us-ascii charset

2014-05-23 Thread Viktor Szépe

New submission from Viktor Szépe:

Python 2.7.6 (default, May 22 2014, 00:19:36)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email.mime.multipart import MIMEMultipart
>>> new_msg = MIMEMultipart('alternative')
>>> new_msg.set_charset('us-ascii')
Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/python/lib/python2.7/email/message.py", line 268, in set_charset
cte(self)
  File "/opt/python/lib/python2.7/email/encoders.py", line 73, in encode_7or8bit
orig.encode('ascii')
AttributeError: 'list' object has no attribute 'encode'
>>>


I know it is not necessary.
How come that
new_msg.set_charset('us-ascii')
works?

--
components: email
messages: 219009
nosy: Viktor.Szépe, barry, r.david.murray
priority: normal
severity: normal
status: open
title: cannot create multipart alternative message with us-ascii charset
type: crash
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com