[qpid-proton] branch master updated: PROTON-2319: Some more leftovers from python 2.6

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[qpid-proton] branch master updated: PROTON-2319: Some more leftovers from python 2.6

Andrew Stitcher-2
This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new 34cfe52  PROTON-2319: Some more leftovers from python 2.6
34cfe52 is described below

commit 34cfe5238c1df84e72a3deb141366c5f512ced6b
Author: Andrew Stitcher <[hidden email]>
AuthorDate: Wed Jan 13 13:35:55 2021 -0500

    PROTON-2319: Some more leftovers from python 2.6
---
 INSTALL.md                         |  4 ++--
 python/proton/__init__.py          | 16 +---------------
 python/tests/proton_tests/codec.py |  6 +-----
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/INSTALL.md b/INSTALL.md
index 38fcc79..5cdeb2c 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -18,11 +18,11 @@ Cross-platform dependencies
 Linux dependencies
 
   - GNU Make 3.81+
-  - GCC 4.4+
+  - GCC 4.8.4+
   - Cyrus SASL 2.1+ (for SASL support)
   - OpenSSL 1.0+ (for SSL support)
   - JsonCpp 1.8+ for C++ connection configuration file support
-  - Python 2.6+ (for the Python binding)
+  - Python 2.7, 3.5+ (for the Python binding)
 
 Windows dependencies
 
diff --git a/python/proton/__init__.py b/python/proton/__init__.py
index 6c124c5..ddb41a4 100644
--- a/python/proton/__init__.py
+++ b/python/proton/__init__.py
@@ -114,21 +114,7 @@ API_LANGUAGE = "C"
 IMPLEMENTATION_LANGUAGE = "C"
 
 
-# This private NullHandler is required for Python 2.6,
-# when we no longer support 2.6 replace this NullHandler class definition and assignment with:
-#  handler = logging.NullHandler()
-class NullHandler(logging.Handler):
-    def handle(self, record):
-        pass
-
-    def emit(self, record):
-        pass
-
-    def createLock(self):
-        self.lock = None
-
-
-handler = NullHandler()
+handler = logging.NullHandler()
 
 logconfigfile = os.getenv('PNPY_LOGGER_CONFIG', None)
 if logconfigfile:
diff --git a/python/tests/proton_tests/codec.py b/python/tests/proton_tests/codec.py
index bc66463..e3bffe5 100644
--- a/python/tests/proton_tests/codec.py
+++ b/python/tests/proton_tests/codec.py
@@ -489,11 +489,7 @@ class DataTest(Test):
     assert data.get_object() == b"foo"
 
   def testMemoryView(self):
-    try:
-      self.data.put_object(memoryview(b"foo"))
-    except NameError:
-      # python <= 2.6 does not have `memoryview`
-      return
+    self.data.put_object(memoryview(b"foo"))
     data = Data()
     data.decode(self.data.encode())
     data.rewind()


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]