You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xy...@apache.org on 2022/05/06 03:18:09 UTC

[pulsar] branch master updated: [Python] Removed dependencies only need by Python2 (#15460)

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

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ea9a62b0f6 [Python] Removed dependencies only need by Python2 (#15460)
4ea9a62b0f6 is described below

commit 4ea9a62b0f6bb65b8c1222ef6cf48a69879845c7
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Thu May 5 20:18:02 2022 -0700

    [Python] Removed dependencies only need by Python2 (#15460)
    
    ### Motivation
    
    Since we have set the min python version to 3.7, we can get rid of some dependencies that were only related to Python2
---
 pulsar-client-cpp/docker/manylinux1/Dockerfile       | 3 +--
 pulsar-client-cpp/docker/manylinux2014/Dockerfile    | 2 --
 pulsar-client-cpp/docker/manylinux_musl/Dockerfile   | 2 --
 pulsar-client-cpp/python/pulsar/schema/definition.py | 3 +--
 pulsar-client-cpp/python/setup.py                    | 6 +++---
 5 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/pulsar-client-cpp/docker/manylinux1/Dockerfile b/pulsar-client-cpp/docker/manylinux1/Dockerfile
index 502c6f6fe77..d54bc38e526 100644
--- a/pulsar-client-cpp/docker/manylinux1/Dockerfile
+++ b/pulsar-client-cpp/docker/manylinux1/Dockerfile
@@ -1,3 +1,4 @@
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -152,8 +153,6 @@ RUN curl -O -L  https://github.com/curl/curl/releases/download/curl-7_61_0/curl-
 
 RUN pip install twine
 RUN pip install fastavro
-RUN pip install six
-RUN pip install enum34
 
 
 ENV PYTHON_INCLUDE_DIR /opt/python/${PYTHON_SPEC}/include
diff --git a/pulsar-client-cpp/docker/manylinux2014/Dockerfile b/pulsar-client-cpp/docker/manylinux2014/Dockerfile
index 5bc1b0315ed..b0b5093a0f5 100644
--- a/pulsar-client-cpp/docker/manylinux2014/Dockerfile
+++ b/pulsar-client-cpp/docker/manylinux2014/Dockerfile
@@ -121,8 +121,6 @@ RUN curl -O -L  https://github.com/curl/curl/releases/download/curl-7_61_0/curl-
 
 RUN pip install twine
 RUN pip install fastavro
-RUN pip install six
-RUN pip install enum34
 
 
 ENV PYTHON_INCLUDE_DIR /opt/python/${PYTHON_SPEC}/include
diff --git a/pulsar-client-cpp/docker/manylinux_musl/Dockerfile b/pulsar-client-cpp/docker/manylinux_musl/Dockerfile
index 89dd2d10755..2c9ec058976 100644
--- a/pulsar-client-cpp/docker/manylinux_musl/Dockerfile
+++ b/pulsar-client-cpp/docker/manylinux_musl/Dockerfile
@@ -107,8 +107,6 @@ RUN curl -O -L  https://github.com/curl/curl/releases/download/curl-7_61_0/curl-
 
 RUN pip install twine
 RUN pip install fastavro
-RUN pip install six
-RUN pip install enum34
 
 
 ENV PYTHON_INCLUDE_DIR /opt/python/${PYTHON_SPEC}/include
diff --git a/pulsar-client-cpp/python/pulsar/schema/definition.py b/pulsar-client-cpp/python/pulsar/schema/definition.py
index a7a235b25a6..291909b97cd 100644
--- a/pulsar-client-cpp/python/pulsar/schema/definition.py
+++ b/pulsar-client-cpp/python/pulsar/schema/definition.py
@@ -21,7 +21,6 @@ import copy
 from abc import abstractmethod
 from collections import OrderedDict
 from enum import Enum, EnumMeta
-from six import with_metaclass
 
 
 def _check_record_or_field(x):
@@ -54,7 +53,7 @@ class RecordMeta(type):
         return fields
 
 
-class Record(with_metaclass(RecordMeta, object)):
+class Record(metaclass=RecordMeta):
 
     # This field is used to set namespace for Avro Record schema.
     _avro_namespace = None
diff --git a/pulsar-client-cpp/python/setup.py b/pulsar-client-cpp/python/setup.py
index d012dfc13df..99f1f983236 100644
--- a/pulsar-client-cpp/python/setup.py
+++ b/pulsar-client-cpp/python/setup.py
@@ -21,7 +21,6 @@ from setuptools import setup
 from distutils.core import Extension
 from distutils.util import strtobool
 from os import environ
-import subprocess
 
 from distutils.command import build_ext
 
@@ -50,12 +49,14 @@ def get_name():
     base = 'pulsar-client'
     return base + postfix
 
+
 VERSION = get_version()
 NAME = get_name()
 
 print(VERSION)
 print(NAME)
 
+
 # This is a workaround to have setuptools to include
 # the already compiled _pulsar.so library
 class my_build_ext(build_ext.build_ext):
@@ -70,11 +71,10 @@ class my_build_ext(build_ext.build_ext):
                 raise
         shutil.copyfile('_pulsar.so', self.get_ext_fullpath(ext.name))
 
+
 # Core Client dependencies
 dependencies = [
-    'six',
     'certifi',
-    'enum34>=1.1.9; python_version < "3.4"'
 ]
 
 extras_require = {}