From 8d84a1513e369db3752217302254d4ea677df575 Mon Sep 17 00:00:00 2001 From: Hubert Kario Date: Thu, 26 Nov 2020 14:49:07 +0100 Subject: [PATCH 1/2] fix the imaplib error on py3.9 --- tlslite/integration/imap4_tls.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tlslite/integration/imap4_tls.py b/tlslite/integration/imap4_tls.py index 3254b543..272b7f75 100644 --- a/tlslite/integration/imap4_tls.py +++ b/tlslite/integration/imap4_tls.py @@ -82,8 +82,10 @@ def __init__(self, host = '', port = IMAP4_TLS_PORT, IMAP4.__init__(self, host, port) - - def open(self, host = '', port = IMAP4_TLS_PORT): + # the `timeout` is a new argument in python3.9, so checks with + # older python versions will complain about unmatched parameters + # pylint: disable=arguments-differ + def open(self, host='', port=IMAP4_TLS_PORT, timeout=None): """Setup connection to remote server on "host:port". This connection will be used by the routines: @@ -96,3 +98,4 @@ def open(self, host = '', port = IMAP4_TLS_PORT): self.sock = TLSConnection(self.sock) ClientHelper._handshake(self, self.sock) self.file = self.sock.makefile('rb') + # pylint: enable=arguments-differ From 026c50970b95b00c2e7d2cce0e15d52ed22d649a Mon Sep 17 00:00:00 2001 From: Hubert Kario Date: Thu, 26 Nov 2020 16:30:41 +0100 Subject: [PATCH 2/2] add 3.9 testing --- .travis.yml | 4 ++++ setup.py | 1 + 2 files changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index a513a5e2..abdf98a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,10 @@ jobs: dist: xenial sudo: true env: TACKPY=false + - python: 3.9 + dist: xenial + sudo: true + env: TACKPY=false - python: 2.7 env: TACKPY=true - python: 3.4 diff --git a/setup.py b/setup.py index dc5034cb..32df1a00 100755 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Security :: Cryptography', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Networking'