summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-01-09 23:07:16 -0500
committerJeff Forcier <jeff@bitprophet.org>2023-01-09 23:26:00 -0500
commit871408f80b00877975425fb3dab1602bc934fb1e (patch)
treedf921a967141228cd47e0a57dc59890d6e38c208
parent22b5c4c18c56ab642e05b9e44f5bd842968a523b (diff)
downloadparamiko-871408f80b00877975425fb3dab1602bc934fb1e.tar.gz
Remove sys.version_info checks
-rw-r--r--paramiko/_winapi.py5
-rw-r--r--paramiko/hostkeys.py5
-rw-r--r--tests/test_file.py9
3 files changed, 2 insertions, 17 deletions
diff --git a/paramiko/_winapi.py b/paramiko/_winapi.py
index 4cb5dff9..fcc18552 100644
--- a/paramiko/_winapi.py
+++ b/paramiko/_winapi.py
@@ -61,10 +61,7 @@ class WindowsError(builtins.WindowsError):
if value is None:
value = ctypes.windll.kernel32.GetLastError()
strerror = format_system_message(value)
- if sys.version_info > (3, 3):
- args = 0, strerror, None, value
- else:
- args = value, strerror
+ args = 0, strerror, None, value
super(WindowsError, self).__init__(*args)
@property
diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py
index 5ff15416..dc8fb8d0 100644
--- a/paramiko/hostkeys.py
+++ b/paramiko/hostkeys.py
@@ -22,10 +22,7 @@ import binascii
import os
import sys
-if sys.version_info[:2] >= (3, 3):
- from collections.abc import MutableMapping
-else:
- from collections import MutableMapping
+from collections.abc import MutableMapping
from hashlib import sha1
from hmac import HMAC
diff --git a/tests/test_file.py b/tests/test_file.py
index cbee62ef..b0147450 100644
--- a/tests/test_file.py
+++ b/tests/test_file.py
@@ -162,15 +162,6 @@ class BufferedFileTest(unittest.TestCase):
)
f.close()
- def test_buffering_writes(self):
- """
- verify that buffered objects can be written
- """
- if sys.version_info[0] == 2:
- f = LoopbackFile("r+", 16)
- f.write(buffer(b"Too small.")) # noqa
- f.close()
-
def test_readable(self):
f = LoopbackFile("r")
self.assertTrue(f.readable())