You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2023/04/13 19:11:08 UTC
[qpid-python] 01/02: QPID-8631: conditionally fill-in types removed in Python 3, so that setup.py runs
This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-python.git
commit d6fc95a972f72e4ea0152669c950775172c1ac7c
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Thu Apr 13 20:18:59 2023 +0200
QPID-8631: conditionally fill-in types removed in Python 3, so that setup.py runs
---
mllib/dom.py | 5 +++++
qpid/codec010.py | 15 +++++++++++++++
qpid/generator.py | 5 +++++
3 files changed, 25 insertions(+)
diff --git a/mllib/dom.py b/mllib/dom.py
index 916f814..4762087 100644
--- a/mllib/dom.py
+++ b/mllib/dom.py
@@ -28,6 +28,11 @@ from __future__ import nested_scopes
import mllib.transforms
+try:
+ basestring
+except NameError:
+ basestring = str
+
class Container:
def __init__(self):
diff --git a/qpid/codec010.py b/qpid/codec010.py
index bd6a3aa..8f9eee0 100644
--- a/qpid/codec010.py
+++ b/qpid/codec010.py
@@ -23,6 +23,21 @@ from .packer import Packer
from .datatypes import serial, timestamp, RangedSet, Struct, UUID
from .ops import Compound, PRIMITIVE, COMPOUND
+try:
+ buffer
+except NameError:
+ buffer = memoryview
+
+try:
+ long
+except NameError:
+ long = int
+
+try:
+ unicode
+except NameError:
+ unicode = str
+
class CodecException(Exception): pass
def direct(t):
diff --git a/qpid/generator.py b/qpid/generator.py
index 8fb602e..e52bb75 100644
--- a/qpid/generator.py
+++ b/qpid/generator.py
@@ -22,6 +22,11 @@ import sys
from .ops import *
+try:
+ basestring
+except NameError:
+ basestring = str
+
def METHOD(module, op):
method = lambda self, *args, **kwargs: self.invoke(op, args, kwargs)
if sys.version_info[:2] > (2, 3):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org