1 Star 0 Fork 4

jeremiazhao/python-urllib3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-urllib3.spec 3.13 KB
一键复制 编辑 原始数据 按行查看 历史
jeremiazhao 提交于 2023-10-23 10:24 +08:00 . fixed CVE-2023-45803 and CVE-2023-43804
%global srcname urllib3
%bcond_with tests
Summary: Python HTTP library with thread-safe connection pooling and file post
Name: python-%{srcname}
Version: 1.26.18
Release: 1%{?dist}
License: MIT
URL: https://github.com/urllib3/urllib3
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
%description
Python HTTP library with thread-safe connection pooling, file post support,
user friendly, and more.
%package -n python3-%{srcname}
Summary: Python HTTP library with thread-safe connection pooling and file post
BuildRequires: python3-devel python3-setuptools
%if %{with tests}
BuildRequires: python3-dateutil python3-six python3-pysocks python3-pytest
BuildRequires: python3-pytest-freezegun python3-pytest-timeout
BuildRequires: python3-tornado python3-trustme python3-idna
%endif
Requires: ca-certificates python3-idna python3-pysocks
Requires: python3-six >= 1.16.0
%description -n python3-%{srcname}
Python HTTP library with thread-safe connection pooling, file post support,
user friendly, and more.
%prep
%autosetup -n %{srcname}-%{version}
recent_date=$(date --date "7 month ago" +"%Y, %_m, %_d")
sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_date)/" src/urllib3/connection.py
rm -rf test/with_dummyserver/
rm -rf test/appengine/
rm -rf test/contrib/
rm -f test/test_no_ssl.py
sed -i -e 's/^import mock/from unittest import mock/' \
-e 's/^from mock import /from unittest.mock import /' \
test/*.py docs/conf.py
%build
%py3_build
%install
%py3_install
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six.*
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
ln -s %{python3_sitelib}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
%if %{with tests}
%check
%pytest -v
%endif
%files -n python3-%{srcname}
%license LICENSE.txt
%doc CHANGES.rst README.rst
%{python3_sitelib}/urllib3/
%{python3_sitelib}/urllib3-*.egg-info/
%changelog
* Mon Oct 23 2023 Zhao Zhen <jeremiazhao@tencent.com> - 1.26.18-1
- fixed CVE-2023-45803 and CVE-2023-43804
* Tue Sep 26 2023 Wang Guodong <gordonwwang@tencent.com> - 1.26.16-1
- Upgrade to version 1.26.16
* Tue Sep 19 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.26.12-5
- Rebuilt for python 3.11
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.26.12-4
- Rebuilt for OpenCloudOS Stream 23.09
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.26.12-3
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 1.26.12-2
- Rebuilt for OpenCloudOS Stream 23
* Fri Sep 16 2022 Xiaojie Chen <jackxjchen@tencent.com> - 1.26.12-1
- Initial build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shouhuanxiaoji/python-urllib3.git
git@gitee.com:shouhuanxiaoji/python-urllib3.git
shouhuanxiaoji
python-urllib3
python-urllib3
master

搜索帮助