Skip to content

Commit b629542

Browse files
authored
Hue - Upgrade Apache Thrift to 0.16.0, Thrift SASL 0.4.3, due to high CVEs (#3057)
1 parent 85ee523 commit b629542

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+591
-180
lines changed

desktop/core/ext-py/thrift-0.13.0/LICENSE

Lines changed: 0 additions & 16 deletions
This file was deleted.

desktop/core/ext-py/thrift-0.13.0/MANIFEST.in

Lines changed: 0 additions & 5 deletions
This file was deleted.

desktop/core/ext-py/thrift-0.13.0/README.md

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include src/ext/*

desktop/core/ext-py/thrift-0.13.0/PKG-INFO renamed to desktop/core/ext-py/thrift-0.16.0/PKG-INFO

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
Metadata-Version: 2.1
22
Name: thrift
3-
Version: 0.13.0
3+
Version: 0.16.0
44
Summary: Python bindings for the Apache Thrift RPC system
5-
Home-page: https://thrift.apache.org
5+
Home-page: http://thrift.apache.org
66
Author: Apache Thrift Developers
77
Author-email: [email protected]
8-
License: Apache Software License, Version 2
8+
License: Apache License 2.0
99
Description: Thrift Python Software Library
1010

11-
Thrift is a lightweight, language-independent software stack for
12-
point-to-point RPC implementation.
13-
Thrift provides clean abstractions and implementations for data transport,
14-
data serialization, and application level processing. The code generation
15-
system takes a simple definition language as input and generates code
16-
across programming languages that uses the abstracted stack to build
17-
interoperable RPC clients and servers.
11+
License
12+
=======
13+
14+
Licensed to the Apache Software Foundation (ASF) under one
15+
or more contributor license agreements. See the NOTICE file
16+
distributed with this work for additional information
17+
regarding copyright ownership. The ASF licenses this file
18+
to you under the Apache License, Version 2.0 (the
19+
"License"); you may not use this file except in compliance
20+
with the License. You may obtain a copy of the License at
21+
22+
http://www.apache.org/licenses/LICENSE-2.0
23+
24+
Unless required by applicable law or agreed to in writing,
25+
software distributed under the License is distributed on an
26+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
27+
KIND, either express or implied. See the License for the
28+
specific language governing permissions and limitations
29+
under the License.
30+
31+
Using Thrift with Python
32+
========================
1833

1934
Thrift is provided as a set of Python packages. The top level package is
2035
thrift, and there are subpackages for the protocol, transport, and server
@@ -26,24 +41,17 @@ Description: Thrift Python Software Library
2641
The Python libraries can be installed manually using the provided setup.py
2742
file, or automatically using the install hook provided via autoconf/automake.
2843
To use the latter, become superuser and do make install.
29-
30-
For more information:
31-
32-
https://thrift.apache.org/
33-
https://www.github.com/apache/thrift/
3444
Platform: UNKNOWN
3545
Classifier: Development Status :: 5 - Production/Stable
3646
Classifier: Environment :: Console
3747
Classifier: Intended Audience :: Developers
38-
Classifier: License :: OSI Approved :: Apache Software License
3948
Classifier: Programming Language :: Python
4049
Classifier: Programming Language :: Python :: 2
4150
Classifier: Programming Language :: Python :: 3
42-
Classifier: Topic :: Software Development :: Code Generators
4351
Classifier: Topic :: Software Development :: Libraries
4452
Classifier: Topic :: System :: Networking
4553
Description-Content-Type: text/markdown
54+
Provides-Extra: all
4655
Provides-Extra: ssl
4756
Provides-Extra: tornado
4857
Provides-Extra: twisted
49-
Provides-Extra: all
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Thrift Python Software Library
2+
3+
License
4+
=======
5+
6+
Licensed to the Apache Software Foundation (ASF) under one
7+
or more contributor license agreements. See the NOTICE file
8+
distributed with this work for additional information
9+
regarding copyright ownership. The ASF licenses this file
10+
to you under the Apache License, Version 2.0 (the
11+
"License"); you may not use this file except in compliance
12+
with the License. You may obtain a copy of the License at
13+
14+
http://www.apache.org/licenses/LICENSE-2.0
15+
16+
Unless required by applicable law or agreed to in writing,
17+
software distributed under the License is distributed on an
18+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19+
KIND, either express or implied. See the License for the
20+
specific language governing permissions and limitations
21+
under the License.
22+
23+
Using Thrift with Python
24+
========================
25+
26+
Thrift is provided as a set of Python packages. The top level package is
27+
thrift, and there are subpackages for the protocol, transport, and server
28+
code. Each package contains modules using standard Thrift naming conventions
29+
(i.e. TProtocol, TTransport) and implementations in corresponding modules
30+
(i.e. TSocket). There is also a subpackage reflection, which contains
31+
the generated code for the reflection structures.
32+
33+
The Python libraries can be installed manually using the provided setup.py
34+
file, or automatically using the install hook provided via autoconf/automake.
35+
To use the latter, become superuser and do make install.

desktop/core/ext-py/thrift-0.13.0/setup.cfg renamed to desktop/core/ext-py/thrift-0.16.0/setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[install]
22
optimize = 1
33

4+
[metadata]
5+
description_file = README.md
6+
47
[flake8]
58
max-line-length = 100
69

desktop/core/ext-py/thrift-0.13.0/setup.py renamed to desktop/core/ext-py/thrift-0.16.0/setup.py

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
# specific language governing permissions and limitations
1919
# under the License.
2020
#
21-
import os
22-
import sys
2321

22+
import sys
2423
try:
2524
from setuptools import setup, Extension
2625
except Exception:
@@ -30,6 +29,7 @@
3029
from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
3130

3231
# Fix to build sdist under vagrant
32+
import os
3333
if 'vagrant' in str(os.environ):
3434
try:
3535
del os.link
@@ -48,20 +48,6 @@ class BuildFailed(Exception):
4848
pass
4949

5050

51-
def read_file(path):
52-
"""
53-
Return the contents of a file
54-
55-
Arguments:
56-
- path: path to the file
57-
58-
Returns:
59-
- contents of the file
60-
"""
61-
with open(path, 'r') as desc_file:
62-
return desc_file.read().rstrip()
63-
64-
6551
class ve_build_ext(build_ext):
6652
def run(self):
6753
try:
@@ -76,11 +62,26 @@ def build_extension(self, ext):
7662
raise BuildFailed()
7763

7864

65+
def read_file(path):
66+
"""
67+
Return the contents of a file
68+
69+
Arguments:
70+
- path: path to the file
71+
72+
Returns:
73+
- contents of the file
74+
"""
75+
with open(path, "r") as desc_file:
76+
return desc_file.read().rstrip()
77+
78+
7979
def run_setup(with_binary):
8080
if with_binary:
8181
extensions = dict(
8282
ext_modules=[
8383
Extension('thrift.protocol.fastbinary',
84+
extra_compile_args=['-std=c++11'],
8485
sources=[
8586
'src/ext/module.cpp',
8687
'src/ext/types.cpp',
@@ -104,17 +105,15 @@ def run_setup(with_binary):
104105
twisted_deps = ['twisted']
105106

106107
setup(name='thrift',
107-
version='0.13.0',
108+
version='0.16.0',
108109
description='Python bindings for the Apache Thrift RPC system',
109-
# causes problems publishing
110-
# license=read_file("LICENSE"),
111110
long_description=read_file("README.md"),
112111
long_description_content_type="text/markdown",
113112
author='Apache Thrift Developers',
114113
author_email='[email protected]',
115-
url='https://thrift.apache.org',
114+
url='http://thrift.apache.org',
115+
license='Apache License 2.0',
116116
install_requires=['six>=1.7.2'],
117-
license='Apache Software License, Version 2',
118117
extras_require={
119118
'ssl': ssl_deps,
120119
'tornado': tornado_deps,
@@ -132,11 +131,9 @@ def run_setup(with_binary):
132131
'Development Status :: 5 - Production/Stable',
133132
'Environment :: Console',
134133
'Intended Audience :: Developers',
135-
'License :: OSI Approved :: Apache Software License',
136134
'Programming Language :: Python',
137135
'Programming Language :: Python :: 2',
138136
'Programming Language :: Python :: 3',
139-
'Topic :: Software Development :: Code Generators',
140137
'Topic :: Software Development :: Libraries',
141138
'Topic :: System :: Networking'
142139
],

0 commit comments

Comments
 (0)