[Patchew-devel] [PATCH] tests: fix test_tags for Python < 3.6

Paolo Bonzini pbonzini at redhat.com
Tue Nov 27 18:46:59 UTC 2018


On 27/11/18 18:19, Caio Carrara wrote:
> So we need some help from Travis folks. I've built a fresh Python 3.3.7
> on my machine and the policy module is there. 
> 
> ➜  bin git:(master) ./python
> Python 3.3.7 (default, Nov 27 2018, 15:10:34)
> [GCC 8.2.1 20181105 (Red Hat 8.2.1-5)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> ... from email import policy
> ... dir(policy)
> ['Compat32', 'EmailPolicy', 'HTTP', 'HeaderRegistry', 'Policy', 'SMTP',
> '__all__', '__builtins__', '__cached__', '__doc__', '__file__',
> '__initializing__', '__loader__', '__name__', '__package__',
> '_extend_docstrings', '_has_surrogates', 'compat32', 'default',
> 'strict']
> ...
> 
> Should we open a ticket? I did a quick search and couldn't find
> anything related with that. It's pretty specific.

I found it, on older Python you must explicitly import email.parser and
email.policy.

Paolo




More information about the Patchew-devel mailing list