git: 045d7ca28444 - main - www/py-proxpi: Require requests-file>=2.1.0 for FILE option

From: Michael Osipov <michaelo_at_FreeBSD.org>
Date: Tue, 29 Sep 2026 20:03:27 UTC
The branch main has been updated by michaelo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=045d7ca28444f3059da7e067e8039f2898dcee73

commit 045d7ca28444f3059da7e067e8039f2898dcee73
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-09-17 19:03:09 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-09-29 20:03:19 +0000

    www/py-proxpi: Require requests-file>=2.1.0 for FILE option
    
    requests-file < 2.1.0 doesn't set Response.request in
    FileAdapter.send(), causing AttributeError: 'NoneType' object
    has no attribute 'url' in _cache.py when proxpi is configured
    with a file:// index or extra index URL.
---
 www/py-proxpi/Makefile                      | 5 +++--
 www/py-proxpi/files/extra-patch-file-option | 7 ++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/www/py-proxpi/Makefile b/www/py-proxpi/Makefile
index d7157c0970bc..312e95848fb8 100644
--- a/www/py-proxpi/Makefile
+++ b/www/py-proxpi/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	proxpi
-PORTVERSION=	1.3.0
+DISTVERSION=	1.3.0
+PORTREVISION=	1
 CATEGORIES=	www python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -35,7 +36,7 @@ PORTSCOUT=	limit:^1\.[0-3]\.
 OPTIONS_DEFINE=	FILE
 FILE_DESC=	Support file:// index/package URLs
 
-FILE_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}requests-file>=0:www/py-requests-file@${PY_FLAVOR}
+FILE_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}requests-file>=2.1.0:www/py-requests-file@${PY_FLAVOR}
 FILE_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-file-option
 
 .include <bsd.port.mk>
diff --git a/www/py-proxpi/files/extra-patch-file-option b/www/py-proxpi/files/extra-patch-file-option
index 6bd4ba178e8a..d3adf78b653b 100644
--- a/www/py-proxpi/files/extra-patch-file-option
+++ b/www/py-proxpi/files/extra-patch-file-option
@@ -2,6 +2,11 @@ Add support for the file:// URL scheme via requests_file's FileAdapter,
 so the index/package URL can point at a local on-disk PyPI mirror
 instead of only a remote HTTP(S) index.
 
+requests_file >= 2.1.0 is required: earlier releases don't set
+Response.request in FileAdapter.send(), so _cache.py's use of
+response.request.url raises AttributeError: 'NoneType' object has
+no attribute 'url'.
+
 Obtained from: https://github.com/michael-o/proxpi/commit/14ea92360f051723f415e9c2d622d07a18946ff1
 
 --- pyproject.toml.orig
@@ -10,7 +15,7 @@ Obtained from: https://github.com/michael-o/proxpi/commit/14ea92360f051723f415e9
      "jinja2 ~= 3.0",
      "lxml >= 4.8, < 7.0",
      "requests ~= 2.27",
-+    "requests_file",
++    "requests_file >= 2.1.0",
  ]
  description = "PyPI caching mirror"
  keywords = ["pypi", "index", "mirror", "cache"]