Update to 4.2.0

This commit is contained in:
Orion Poplawski 2022-08-26 20:58:17 -06:00
parent 1367f75a95
commit 2b60337f90
4 changed files with 10 additions and 30 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@
/pymongo-3.7.2.tar.gz
/pymongo-3.8.0.tar.gz
/pymongo-3.10.1.tar.gz
/pymongo-4.2.0.tar.gz

View File

@ -1,14 +0,0 @@
diff --git a/pymongo/pool.py b/pymongo/pool.py
index 859d0e0..f55fd8e 100644
--- a/pymongo/pool.py
+++ b/pymongo/pool.py
@@ -49,8 +49,7 @@ from pymongo.network import (command,
SocketChecker)
from pymongo.read_preferences import ReadPreference
from pymongo.server_type import SERVER_TYPE
-# Always use our backport so we always have support for IP address matching
-from pymongo.ssl_match_hostname import match_hostname, CertificateError
+from ssl import match_hostname, CertificateError
# For SNI support. According to RFC6066, section 3, IPv4 and IPv6 literals are
# not permitted for SNI hostname.

View File

@ -1,21 +1,17 @@
%global bootstrap 0
Name: python-pymongo
Version: 3.10.1
Release: 10%{?dist}
Version: 4.2.0
Release: 1%{?dist}
# All code is ASL 2.0 except bson/time64*.{c,h} which is MIT
License: ASL 2.0 and MIT
Summary: Python driver for MongoDB
URL: http://api.mongodb.org/python
URL: https://pymongo.readthedocs.io/en/stable/
Source0: https://github.com/mongodb/mongo-python-driver/archive/%{version}/pymongo-%{version}.tar.gz
# This patch removes the bundled ssl.match_hostname library as it was vulnerable to CVE-2013-7440
# and CVE-2013-2099, and wasn't needed anyway since Fedora >= 22 has the needed module in the Python
# standard library. It also adjusts imports so that they exclusively use the code from Python.
Patch01: 0001-Use-ssl.match_hostname-from-the-Python-stdlib.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: make
%if 0%{!?bootstrap:1}
BuildRequires: python3-sphinx
%endif
@ -67,12 +63,6 @@ contains the python3 version of this module.
%prep
%setup -q -n mongo-python-driver-%{version}
%patch01 -p1 -b .ssl
# Remove the bundled ssl.match_hostname library as it was vulnerable to CVE-2013-7440
# and CVE-2013-2099, and isn't needed anyway since Fedora >= 22 has the needed module in the Python
# standard library.
rm pymongo/ssl_match_hostname.py
%build
@ -80,7 +70,7 @@ rm pymongo/ssl_match_hostname.py
%if 0%{!?bootstrap:1}
pushd doc
make %{?_smp_mflags} html
%make_build html
popd
%endif
@ -119,6 +109,9 @@ chmod 755 %{buildroot}%{python3_sitearch}/pymongo/*.so
%changelog
* Sat Aug 27 2022 Orion Poplawski <orion@nwra.com> - 4.2.0-1
- Update to 4.2.0
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (pymongo-3.10.1.tar.gz) = a86fc35521b5f74568cd877291dd2245f3f6df82c2d2d8fef8ec128715b8644aa653a7fd3c693fbf8eccc4b8401398fc2d0e21921d7c4d407d4b249d33583234
SHA512 (pymongo-4.2.0.tar.gz) = 4439149c35f897a61109b26f5e4c613682ca59727495377a3bbb49f9ff22273cd5a73f58fb55080d07c9403310d4ada59d3a5969d0f76f2f4d1081422fe2dfec