Skip to content

Commit 76a7ecc

Browse files
Upgrade: python-requests-toolbelt version to 1.0.0 (#12943)
1 parent d4ba312 commit 76a7ecc

5 files changed

Lines changed: 86 additions & 221 deletions

SPECS-EXTENDED/python-requests-toolbelt/SOURCES/python-requests-toolbelt-fix-unhandled-exception-from-tests.patch

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

SPECS-EXTENDED/python-requests-toolbelt/SOURCES/python-requests-toolbelt-pass-session-into-tests.patch

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Signatures": {
3-
"python-requests-toolbelt-0.9.1.tar.gz": "c8e68e537e87ae088e3a0eb6d80ed5b7cf5d6df503d0e843e0a5e47283db487b"
4-
}
2+
"Signatures": {
3+
"python-requests-toolbelt-1.0.0.tar.gz": "0a052d9b5595718b7ec79c201e45e123dd3b9c6d659561479f24b7a2a85bbe81"
4+
}
55
}

SPECS-EXTENDED/python-requests-toolbelt/python-requests-toolbelt.spec

Lines changed: 81 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
1-
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2-
%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
3-
%{!?__python3: %global __python3 /usr/bin/python3}
4-
51
%global srcname requests-toolbelt
62
%global altname requests_toolbelt
73

8-
Summary: Utility belt for advanced users of python-requests
94
Name: python-%{srcname}
10-
Version: 0.9.1
11-
Release: 13%{?dist}
12-
License: ASL 2.0
5+
Version: 1.0.0
6+
Release: 8%{?dist}
7+
Summary: Utility belt for advanced users of python-requests
8+
9+
License: Apache-2.0
10+
Vendor: Microsoft Corporation
11+
Distribution: Azure Linux
1312
URL: https://toolbelt.readthedocs.io
14-
#Source0: https://github.com/sigmavirus24/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
15-
Source0: https://github.com/sigmavirus24/%{srcname}/archive/%{version}/%{name}-%{version}.tar.gz
16-
# present in upstream master but not in a stable release yet
17-
Patch0: python-requests-toolbelt-fix-unhandled-exception-from-tests.patch
18-
# upstream PR 261, currently the upstream tests are broken as some network
19-
# resources vanished
20-
Patch1: python-requests-toolbelt-pass-session-into-tests.patch
13+
Source0: https://github.com/sigmavirus24/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz#/%{name}-%{version}.tar.gz
14+
2115
BuildArch: noarch
22-
%if 0%{?with_check}
23-
BuildRequires: python3-pip
24-
%endif
2516

2617
%global _description \
2718
This is just a collection of utilities for python-requests, but don’t really\
@@ -36,8 +27,8 @@ Summary: %{summary}
3627
BuildRequires: python3-devel
3728
BuildRequires: python3-setuptools
3829
BuildRequires: python3-betamax
39-
BuildRequires: python3-mock
4030
BuildRequires: python3-pyOpenSSL
31+
BuildRequires: python3-pytest
4132
BuildRequires: python3-requests
4233
Requires: python3-requests
4334

@@ -48,15 +39,24 @@ Python 3 version.
4839
%prep
4940
%autosetup -p1 -n toolbelt-%{version}
5041

42+
# https://fedoraproject.org/wiki/Changes/DeprecatePythonMock
43+
sed -i -E -e 's/^(\s*)import mock/\1from unittest import mock/' \
44+
-e 's/^(\s*)from mock import /\1from unittest.mock import /' \
45+
tests/*.py tests/*/*.py
46+
47+
5148
%build
5249
%py3_build
5350

5451
%install
5552
%py3_install
5653

5754
%check
58-
pip3 install pytest==7.1.2
59-
py.test -v --ignore=tests/test_x509_adapter.py
55+
# Some tests are disabled due to compatibility issues with Python 3.10, once it is fixed it
56+
# can be enabled again.
57+
# Downstream issue: https://bugzilla.redhat.com/show_bug.cgi?id=1926358
58+
59+
PYTHON=%{__python3} %{__python3} setup.py tests || :
6060

6161
%files -n python3-%{srcname}
6262
%license LICENSE
@@ -65,19 +65,74 @@ py.test -v --ignore=tests/test_x509_adapter.py
6565
%{python3_sitelib}/%{altname}-*.egg-info/
6666

6767
%changelog
68-
* Thu Apr 28 2022 Muhammad Falak <mwani@microsoft.com> - 0.9.1-13
69-
- Drop BR on pytest and pip install latest deps to enable ptest
68+
* Fri Mar 14 2025 Akhila Guruju <v-guakhila@microsoft.com> - 1.0.0-8
69+
- Initial Azure Linux import from Fedora 41 (license: MIT).
7070
- License verified
7171

72-
* Wed Dec 09 2020 Steve Laughman <steve.laughman@microsoft.com> - 0.9.1-12
73-
- Initial CBL-Mariner import from Fedora 33 (license: MIT)
72+
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-7
73+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
74+
75+
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1.0.0-6
76+
- Rebuilt for Python 3.13
77+
78+
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-5
79+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
80+
81+
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-4
82+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
83+
84+
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
85+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
86+
87+
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 1.0.0-2
88+
- Rebuilt for Python 3.12
89+
90+
* Mon May 08 2023 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
91+
- Update to 1.0.0 version (#2192400)
92+
93+
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.1-3
94+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
95+
96+
* Mon Dec 05 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.10.1-2
97+
- Update license tag to SPDX format
98+
99+
* Wed Oct 26 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.10.1-1
100+
- Update to 0.10.1 version (#2137927)
101+
102+
* Tue Oct 11 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.10.0-1
103+
- Update to 0.10.0 version (#2133011)
104+
105+
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-19
106+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
107+
108+
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 0.9.1-18
109+
- Rebuilt for Python 3.11
110+
111+
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-17
112+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
113+
114+
* Thu Jan 06 2022 Miro Hrončok <mhroncok@redhat.com> - 0.9.1-16
115+
- Drop build dependency on deprecated python3-mock
116+
117+
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-15
118+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
119+
120+
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.9.1-14
121+
- Rebuilt for Python 3.10
122+
123+
* Sat May 15 2021 Parag Nemade <pnemade AT redhat DOT com> - 0.9.1-13
124+
- Disable some tests for Python 3.10 bootstrap process
125+
126+
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-12
127+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
74128

75129
* Sun Oct 18 2020 Parag Nemade <pnemade AT redhat DOT com> - 0.9.1-11
76130
- Ignore failing tests (rh#1863713)
77131

78132
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-10
79133
- Second attempt - Rebuilt for
80134
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
135+
81136
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-9
82137
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
83138

@@ -170,3 +225,4 @@ py.test -v --ignore=tests/test_x509_adapter.py
170225

171226
* Mon Feb 02 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.3.1-1
172227
- Initial packaging
228+

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24503,8 +24503,8 @@
2450324503
"type": "other",
2450424504
"other": {
2450524505
"name": "python-requests-toolbelt",
24506-
"version": "0.9.1",
24507-
"downloadUrl": "https://github.com/sigmavirus24/requests-toolbelt/archive/0.9.1/python-requests-toolbelt-0.9.1.tar.gz"
24506+
"version": "1.0.0",
24507+
"downloadUrl": "https://github.com/sigmavirus24/requests-toolbelt/archive/1.0.0/requests-toolbelt-1.0.0.tar.gz"
2450824508
}
2450924509
}
2451024510
},

0 commit comments

Comments
 (0)