From 717dc0cd1f859e3c88937d8700d05e48c3282b47 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 25 May 2014 03:25:06 +0300 Subject: [PATCH] email.header: MicroPython doesn't have str.isspace(). And the usecase here clear doesn't prompt for it to be added to core language. --- email.header/email/header.py | 2 +- email.header/metadata.txt | 2 +- email.header/setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/email.header/email/header.py b/email.header/email/header.py index 5bd06380..42bcc0c1 100644 --- a/email.header/email/header.py +++ b/email.header/email/header.py @@ -312,7 +312,7 @@ class Header: def _nonctext(self, s): """True if string s is not a ctext character of RFC822. """ - return s.isspace() or s in ('(', ')', '\\') + return s in (' ', '\t', '(', ')', '\\') def encode(self, splitchars=';, \t', maxlinelen=None, linesep='\n'): r"""Encode a message header into an RFC-compliant format. diff --git a/email.header/metadata.txt b/email.header/metadata.txt index fc4f58b3..045e08bd 100644 --- a/email.header/metadata.txt +++ b/email.header/metadata.txt @@ -1,4 +1,4 @@ srctype = cpython type = package -version = 0.5 +version = 0.5.1 depends = re-pcre, binascii, email.encoders, email.errors, email.charset diff --git a/email.header/setup.py b/email.header/setup.py index fad4fe23..225ea20b 100644 --- a/email.header/setup.py +++ b/email.header/setup.py @@ -6,7 +6,7 @@ from setuptools import setup setup(name='micropython-email.header', - version='0.5', + version='0.5.1', description='CPython email.header module ported to MicroPython', long_description='This is a module ported from CPython standard library to be compatible with\nMicroPython interpreter. Usually, this means applying small patches for\nfeatures not supported (yet, or at all) in MicroPython. Sometimes, heavier\nchanges are required. Note that CPython modules are written with availability\nof vast resources in mind, and may not work for MicroPython ports with\nlimited heap. If you are affected by such a case, please help reimplement\nthe module from scratch.', url='https://github.com/micropython/micropython/issues/405',