www/py-requests: Update to 2.25.1

- Patches removed were incorporated upstream.
- Update WWW with current project's information.

Changelog:  https://github.com/psf/requests/blob/v2.25.1/HISTORY.md

PR:		250941
Approved by:	koobs (maintainer, implicit)
MFH:		2021Q2

Co-authored-by: Olivier Cochard <olivier@FreeBSD.org>
Co-authored-by: Danilo G. Baio <dbaio@FreeBSD.org>
This commit is contained in:
Charlie Li 2021-05-19 20:05:25 -03:00 committed by Danilo G. Baio
parent 42a018fec6
commit 7d02ece23c
6 changed files with 33 additions and 60 deletions

View file

@ -1,8 +1,7 @@
# Created by: Olivier Duchateau <duchateau.olivier@gmail.com>
PORTNAME= requests
PORTVERSION= 2.22.0
PORTREVISION= 2
PORTVERSION= 2.25.1
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -17,9 +16,14 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}certifi>=2017.4.17:security/py-certifi@${PY_
${PYTHON_PKGNAMEPREFIX}chardet>=3.0.2:textproc/py-chardet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}idna>=2.5:dns/py-idna@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}urllib3>=1.21.1:net/py-urllib3@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=2.8.0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-httpbin>0:devel/py-pytest-httpbin@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest>=2.8.0:devel/py-pytest@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}httpbin>0:www/py-httpbin@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}blinker>0:devel/py-blinker@${PY_FLAVOR}
USES= python:3.6+
USE_PYTHON= autoplist concurrent distutils
@ -27,6 +31,6 @@ USE_PYTHON= autoplist concurrent distutils
NO_ARCH= yes
do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
@cd ${WRKSRC} && pytest tests -v
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1572339862
SHA256 (requests-2.22.0.tar.gz) = 11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4
SIZE (requests-2.22.0.tar.gz) = 113406
TIMESTAMP = 1609030585
SHA256 (requests-2.25.1.tar.gz) = 27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804
SIZE (requests-2.25.1.tar.gz) = 102161

View file

@ -1,29 +0,0 @@
# pytest-cov and its dependencies are not compulsory
#
# Subject: [PATCH] Limit dependencies to major instead of minor (#5342
# From c46f55bd48dabc02f033d252f8c64e2011f37361 Mon Sep 17 00:00:00 2001
# From: Chris Withers <chris@withers.org>
# Date: Tue, 18 Feb 2020 14:58:27 +0000
--- setup.py.orig 2019-05-16 14:22:45 UTC
+++ setup.py
@@ -42,8 +42,8 @@ if sys.argv[-1] == 'publish':
packages = ['requests']
requires = [
- 'chardet>=3.0.2,<3.1.0',
- 'idna>=2.5,<2.9',
+ 'chardet>=3.0.2,<4',
+ 'idna>=2.5,<3',
'urllib3>=1.21.1,<1.26,!=1.25.0,!=1.25.1',
'certifi>=2017.4.17'
@@ -101,7 +101,7 @@ setup(
cmdclass={'test': PyTest},
tests_require=test_requirements,
extras_require={
- 'security': ['pyOpenSSL >= 0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],
+ 'security': ['pyOpenSSL >= 0.14', 'cryptography>=1.3.4'],
'socks': ['PySocks>=1.5.6, !=1.5.7'],
'socks:sys_platform == "win32" and python_version == "2.7"': ['win_inet_pton'],
},

View file

@ -0,0 +1,12 @@
# https://github.com/psf/requests/issues/5530
--- tests/test_requests.py.orig 2020-12-16 17:43:25 UTC
+++ tests/test_requests.py
@@ -838,7 +838,7 @@ class TestRequests:
def test_https_warnings(self, httpbin_secure, httpbin_ca_bundle):
"""warnings are emitted with requests.get"""
if HAS_MODERN_SSL or HAS_PYOPENSSL:
- warnings_expected = ('SubjectAltNameWarning', )
+ warnings_expected = ()
else:
warnings_expected = ('SNIMissingWarning',
'InsecurePlatformWarning',

View file

@ -1,17 +0,0 @@
Make tests work with devel/py-pytest >= 4
Obtained from:
https://github.com/psf/requests/commit/0fe6653eabc3e0a4b8c48e374fb7ee83a3bf829b
--- tests/test_utils.py.orig 2019-05-16 14:18:16 UTC
+++ tests/test_utils.py
@@ -33,7 +33,8 @@ class TestSuperLen:
'stream, value', (
(StringIO.StringIO, 'Test'),
(BytesIO, b'Test'),
- pytest.mark.skipif('cStringIO is None')((cStringIO, 'Test')),
+ pytest.param(cStringIO, 'Test',
+ marks=pytest.mark.skipif('cStringIO is None')),
))
def test_io_streams(self, stream, value):
"""Ensures that we properly deal with different kinds of IO streams."""

View file

@ -1,19 +1,22 @@
Requests is an ISC Licensed HTTP library, written in Python, for human beings.
Requests is an elegant and simple HTTP library for Python, built for human
beings.
Features:
* International Domains and URLs
* Keep-Alive & Connection Pooling
* International Domains and URLs
* Sessions with Cookie Persistence
* Browser-style SSL Verification
* Automatic Content Decoding
* Basic/Digest Authentication
* Elegant Key/Value Cookies
* Automatic Decompression
* Unicode Response Bodies
* HTTP(S) Proxy Support
* Multipart File Uploads
* Streaming Downloads
* Connection Timeouts
* .netrc support
* Python 2.6-3.4
* Thread-safe
* Chunked Requests
* .netrc Support
WWW: http://python-requests.org
WWW: https://docs.python-requests.org/en/master/