Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-requests-file for 
openSUSE:Factory checked in at 2026-05-27 16:13:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests-file (Old)
 and      /work/SRC/openSUSE:Factory/.python-requests-file.new.1937 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-requests-file"

Wed May 27 16:13:16 2026 rev:9 rq:1355244 version:3.0.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-requests-file/python-requests-file.changes    
    2025-08-07 16:48:57.416653507 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-requests-file.new.1937/python-requests-file.changes
      2026-05-27 16:13:31.472445614 +0200
@@ -1,0 +2,9 @@
+Tue May 19 21:18:12 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 3.0.1:
+  * Add missing type annotations (codeberg PR #43)
+  * Add data needed for Response.raise_for_status (github PR #42)
+  * Add type annotations - Fix some type errors uncovered by mypy
+  * Change URLs to migrate to codeberg.org
+
+-------------------------------------------------------------------

Old:
----
  requests_file-2.1.0.tar.gz

New:
----
  requests_file-3.0.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-requests-file.spec ++++++
--- /var/tmp/diff_new_pack.nxSbuf/_old  2026-05-27 16:13:33.232518327 +0200
+++ /var/tmp/diff_new_pack.nxSbuf/_new  2026-05-27 16:13:33.236518492 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-requests-file
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,20 +18,20 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-requests-file
-Version:        2.1.0
+Version:        3.0.1
 Release:        0
 Summary:        File transport adapter for Requests
 License:        Apache-2.0
-URL:            https://github.com/dashea/requests-file
+URL:            https://codeberg.org/dashea/requests-file
 Source:         
https://files.pythonhosted.org/packages/source/r/requests_file/requests_file-%{version}.tar.gz
 BuildRequires:  %{python_module pip}
-BuildRequires:  %{python_module requests}
-BuildRequires:  %{python_module setuptools_scm}
-BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module requests >= 1.0.0}
+BuildRequires:  %{python_module setuptools >= 61.2}
+BuildRequires:  %{python_module setuptools_scm >= 3.4.3}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-requests
+Requires:       python-requests >= 1.0.0
 BuildArch:      noarch
 %python_subpackages
 
@@ -55,7 +55,6 @@
 %files %{python_files}
 %license LICENSE
 %doc README.rst
-%{python_sitelib}/requests_file.py
-%pycache_only %{python_sitelib}/__pycache__/requests_file.*.py*
+%{python_sitelib}/requests_file
 %{python_sitelib}/requests_file-%{version}.dist-info
 

++++++ requests_file-2.1.0.tar.gz -> requests_file-3.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/.github/workflows/test.yml 
new/requests_file-3.0.1/.github/workflows/test.yml
--- old/requests_file-2.1.0/.github/workflows/test.yml  2024-01-20 
14:36:07.000000000 +0100
+++ new/requests_file-3.0.1/.github/workflows/test.yml  1970-01-01 
01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-name: CI
-on: [push, pull_request]
-
-jobs:
-  pytest:
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        python-version: ["3.x"]
-    name: "pytest: Python ${{ matrix.python-version }}"
-    steps:
-      - uses: actions/checkout@v2
-      - name: Setup python
-        uses: actions/setup-python@v1
-        with:
-          python-version: ${{ matrix.python-version }}
-      - name: Install build dependencies
-        run: pip install --upgrade setuptools setuptools-scm wheel build
-      - name: Install package
-        run: pip install .
-      - name: Install test dependencies
-        run: pip install pytest pytest-cov
-
-      - name: Test with pytest
-        run: pytest --cov=. --cov-report=xml
-
-      - name: Upload coverage to Codecov
-        uses: codecov/codecov-action@v1
-        with:
-          file: ./coverage.xml
-          fail_ci_if_error: false
-
-  black:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
-      - name: Setup python
-        uses: actions/setup-python@v1
-        with:
-          python-version: "3.x"
-      - name: Install black
-        run: pip install black
-
-      - name: Run black
-        run: black --check .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/.gitignore 
new/requests_file-3.0.1/.gitignore
--- old/requests_file-2.1.0/.gitignore  2022-10-20 16:11:26.000000000 +0200
+++ new/requests_file-3.0.1/.gitignore  2025-10-16 15:50:17.000000000 +0200
@@ -6,3 +6,4 @@
 *.egg-info
 .*.swp
 .DS_Store
+.tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/CHANGES.rst 
new/requests_file-3.0.1/CHANGES.rst
--- old/requests_file-2.1.0/CHANGES.rst 2024-05-21 18:18:08.000000000 +0200
+++ new/requests_file-3.0.1/CHANGES.rst 2025-10-20 20:54:38.000000000 +0200
@@ -1,3 +1,14 @@
+3.0.1 (20 Oct 2025)
+==================
+- Add missing type annotations (codeberg PR #43)
+
+3.0.0 (16 Oct 2025)
+===================
+- Add data needed for Response.raise_for_status (github PR #42)
+- Add type annotations
+  - Fix some type errors uncovered by mypy
+- Change URLs to migrate to codeberg.org
+
 2.1.0 (21 May 2024)
 ===================
 - Set the request property in the returned Response object
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/MANIFEST.in 
new/requests_file-3.0.1/MANIFEST.in
--- old/requests_file-2.1.0/MANIFEST.in 2022-10-20 16:11:26.000000000 +0200
+++ new/requests_file-3.0.1/MANIFEST.in 2025-10-16 15:50:17.000000000 +0200
@@ -2,3 +2,4 @@
 include README.rst
 include requirements.txt
 include tests/*.py
+include requests_file/py.typed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/PKG-INFO 
new/requests_file-3.0.1/PKG-INFO
--- old/requests_file-2.1.0/PKG-INFO    2024-05-21 18:20:14.997106600 +0200
+++ new/requests_file-3.0.1/PKG-INFO    2025-10-20 20:55:45.020290900 +0200
@@ -1,10 +1,10 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
 Name: requests-file
-Version: 2.1.0
+Version: 3.0.1
 Summary: File transport adapter for Requests
 Author-email: David Shea <[email protected]>
 License: Apache 2.0
-Project-URL: Homepage, https://github.com/dashea/requests-file
+Project-URL: Homepage, https://codeberg.org/dashea/requests-file
 Classifier: Development Status :: 3 - Alpha
 Classifier: Environment :: Plugins
 Classifier: Intended Audience :: Developers
@@ -13,6 +13,7 @@
 Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: requests>=1.0.0
+Dynamic: license-file
 
 Requests-File
 =============
@@ -50,7 +51,7 @@
 ------------
 
 Contributions welcome! Feel free to open a pull request against
-https://github.com/dashea/requests-file
+https://codeberg.org/dashea/requests-file
 
 License
 -------
@@ -58,4 +59,4 @@
 To maximise compatibility with Requests, this code is licensed under the Apache
 license. See LICENSE for more details.
 
-.. _`Requests`: https://github.com/kennethreitz/requests
+.. _`Requests`: https://github.com/psf/requests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/README.rst 
new/requests_file-3.0.1/README.rst
--- old/requests_file-2.1.0/README.rst  2022-10-20 16:11:26.000000000 +0200
+++ new/requests_file-3.0.1/README.rst  2025-10-15 19:53:06.000000000 +0200
@@ -34,7 +34,7 @@
 ------------
 
 Contributions welcome! Feel free to open a pull request against
-https://github.com/dashea/requests-file
+https://codeberg.org/dashea/requests-file
 
 License
 -------
@@ -42,4 +42,4 @@
 To maximise compatibility with Requests, this code is licensed under the Apache
 license. See LICENSE for more details.
 
-.. _`Requests`: https://github.com/kennethreitz/requests
+.. _`Requests`: https://github.com/psf/requests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/pyproject.toml 
new/requests_file-3.0.1/pyproject.toml
--- old/requests_file-2.1.0/pyproject.toml      2024-05-21 18:18:08.000000000 
+0200
+++ new/requests_file-3.0.1/pyproject.toml      2025-10-16 15:50:17.000000000 
+0200
@@ -15,15 +15,17 @@
     "License :: OSI Approved :: Apache Software License",
     "Programming Language :: Python :: 3",
 ]
-urls = {Homepage = "https://github.com/dashea/requests-file"}
+urls = {Homepage = "https://codeberg.org/dashea/requests-file"}
 dependencies = ["requests>=1.0.0"]
 dynamic = ["version"]
 
 [tool.distutils.bdist_wheel]
 universal = 1
 
-[tool.setuptools]
-py-modules = ["requests_file"]
-include-package-data = false
+[tool.setuptools.packages.find]
+include = ["requests_file"]
+
+[tool.setuptools.package-data]
+"requests_files" = ["py.typed"]
 
 [tool.setuptools_scm]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/requests_file/__init__.py 
new/requests_file-3.0.1/requests_file/__init__.py
--- old/requests_file-2.1.0/requests_file/__init__.py   1970-01-01 
01:00:00.000000000 +0100
+++ new/requests_file-3.0.1/requests_file/__init__.py   2025-10-20 
20:54:38.000000000 +0200
@@ -0,0 +1,126 @@
+from io import BytesIO
+from requests.adapters import BaseAdapter
+from requests import PreparedRequest, Response, codes
+from typing import Any
+from urllib.parse import urlparse, unquote
+import errno
+import os
+import stat
+import locale
+import io
+
+
+class FileAdapter(BaseAdapter):
+    def __init__(self, set_content_length: bool = True) -> None:
+        super(FileAdapter, self).__init__()
+        self._set_content_length = set_content_length
+
+    def send(self, request: PreparedRequest, *args: Any, **kwargs: Any) -> 
Response:
+        """Wraps a file, described in request, in a Response object.
+
+        :param request: The PreparedRequest` being "sent".
+        :returns: a Response object containing the file
+        """
+
+        # Check that the method makes sense. Only support GET
+        if request.method not in ("GET", "HEAD"):
+            raise ValueError("Invalid request method %s" % request.method)
+
+        resp = Response()
+
+        # Open the file, translate certain errors into HTTP responses
+        # Use urllib's unquote to translate percent escapes into whatever
+        # they actually need to be
+        try:
+            # Reject None URLs the same as a missing file
+            if request.url is None:
+                raise IOError(errno.ENOENT, os.strerror(errno.ENOENT), "None")
+
+            # Parse the URL
+            url_parts = urlparse(request.url)
+
+            # Reject URLs with a hostname component
+            if url_parts.netloc and url_parts.netloc != "localhost":
+                raise ValueError("file: URLs with hostname components are not 
permitted")
+
+            resp.request = request
+
+            if request.url is not None:
+                resp.url = request.url
+
+            # Split the path on / (the URL directory separator) and decode any
+            # % escapes in the parts
+            path_parts = [unquote(p) for p in url_parts.path.split("/")]
+
+            # Strip out the leading empty parts created from the leading /'s
+            while path_parts and not path_parts[0]:
+                path_parts.pop(0)
+
+            # If os.sep is in any of the parts, someone fed us some 
shenanigans.
+            # Treat is like a missing file.
+            if any(os.sep in p for p in path_parts):
+                raise IOError(errno.ENOENT, os.strerror(errno.ENOENT))
+
+            # Look for a drive component. If one is present, store it 
separately
+            # so that a directory separator can correctly be added to the real
+            # path, and remove any empty path parts between the drive and the 
path.
+            # Assume that a part ending with : or | (legacy) is a drive.
+            if path_parts and (
+                path_parts[0].endswith("|") or path_parts[0].endswith(":")
+            ):
+                path_drive = path_parts.pop(0)
+                if path_drive.endswith("|"):
+                    path_drive = path_drive[:-1] + ":"
+
+                while path_parts and not path_parts[0]:
+                    path_parts.pop(0)
+            else:
+                path_drive = ""
+
+            # Try to put the path back together
+            # Join the drive back in, and stick os.sep in front of the path to
+            # make it absolute.
+            path = path_drive + os.sep + os.path.join(*path_parts)
+
+            # Check if the drive assumptions above were correct. If path_drive
+            # is set, and os.path.splitdrive does not return a drive, it wasn't
+            # really a drive. Put the path together again treating path_drive
+            # as a normal path component.
+            if path_drive and not os.path.splitdrive(path):
+                path = os.sep + os.path.join(path_drive, *path_parts)
+
+            # Use io.open since we need to add a release_conn method, and
+            # methods can't be added to file objects in python 2.
+            resp.raw = io.open(path, "rb")
+            resp.raw.release_conn = resp.raw.close
+        except IOError as e:
+            if e.errno == errno.EACCES:
+                resp.status_code = codes.forbidden
+            elif e.errno == errno.ENOENT:
+                resp.status_code = codes.not_found
+            else:
+                resp.status_code = codes.bad_request
+
+            # Wrap the error message in a file-like object
+            # The error message will be localized, try to convert the string
+            # representation of the exception into a byte stream
+            resp_str = str(e).encode(locale.getpreferredencoding(False))
+            resp.raw = BytesIO(resp_str)
+            resp.reason = str(e)
+            if self._set_content_length:
+                resp.headers["Content-Length"] = str(len(resp_str))
+
+            # Add release_conn to the BytesIO object
+            resp.raw.release_conn = resp.raw.close
+        else:
+            resp.status_code = codes.ok
+
+            # If it's a regular file, set the Content-Length
+            resp_stat = os.fstat(resp.raw.fileno())
+            if stat.S_ISREG(resp_stat.st_mode) and self._set_content_length:
+                resp.headers["Content-Length"] = str(resp_stat.st_size)
+
+        return resp
+
+    def close(self) -> None:
+        pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/requests_file.egg-info/PKG-INFO 
new/requests_file-3.0.1/requests_file.egg-info/PKG-INFO
--- old/requests_file-2.1.0/requests_file.egg-info/PKG-INFO     2024-05-21 
18:20:14.000000000 +0200
+++ new/requests_file-3.0.1/requests_file.egg-info/PKG-INFO     2025-10-20 
20:55:45.000000000 +0200
@@ -1,10 +1,10 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
 Name: requests-file
-Version: 2.1.0
+Version: 3.0.1
 Summary: File transport adapter for Requests
 Author-email: David Shea <[email protected]>
 License: Apache 2.0
-Project-URL: Homepage, https://github.com/dashea/requests-file
+Project-URL: Homepage, https://codeberg.org/dashea/requests-file
 Classifier: Development Status :: 3 - Alpha
 Classifier: Environment :: Plugins
 Classifier: Intended Audience :: Developers
@@ -13,6 +13,7 @@
 Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: requests>=1.0.0
+Dynamic: license-file
 
 Requests-File
 =============
@@ -50,7 +51,7 @@
 ------------
 
 Contributions welcome! Feel free to open a pull request against
-https://github.com/dashea/requests-file
+https://codeberg.org/dashea/requests-file
 
 License
 -------
@@ -58,4 +59,4 @@
 To maximise compatibility with Requests, this code is licensed under the Apache
 license. See LICENSE for more details.
 
-.. _`Requests`: https://github.com/kennethreitz/requests
+.. _`Requests`: https://github.com/psf/requests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests_file-2.1.0/requests_file.egg-info/SOURCES.txt 
new/requests_file-3.0.1/requests_file.egg-info/SOURCES.txt
--- old/requests_file-2.1.0/requests_file.egg-info/SOURCES.txt  2024-05-21 
18:20:14.000000000 +0200
+++ new/requests_file-3.0.1/requests_file.egg-info/SOURCES.txt  2025-10-20 
20:55:45.000000000 +0200
@@ -4,8 +4,9 @@
 MANIFEST.in
 README.rst
 pyproject.toml
-requests_file.py
-.github/workflows/test.yml
+tox.ini
+requests_file/__init__.py
+requests_file/py.typed
 requests_file.egg-info/PKG-INFO
 requests_file.egg-info/SOURCES.txt
 requests_file.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/requests_file.py 
new/requests_file-3.0.1/requests_file.py
--- old/requests_file-2.1.0/requests_file.py    2024-05-21 18:18:08.000000000 
+0200
+++ new/requests_file-3.0.1/requests_file.py    1970-01-01 01:00:00.000000000 
+0100
@@ -1,121 +0,0 @@
-from requests.adapters import BaseAdapter
-from requests.compat import urlparse, unquote
-from requests import Response, codes
-import errno
-import os
-import stat
-import locale
-import io
-
-try:
-    from io import BytesIO
-except ImportError:
-    from StringIO import StringIO as BytesIO
-
-
-class FileAdapter(BaseAdapter):
-    def __init__(self, set_content_length=True):
-        super(FileAdapter, self).__init__()
-        self._set_content_length = set_content_length
-
-    def send(self, request, **kwargs):
-        """Wraps a file, described in request, in a Response object.
-
-        :param request: The PreparedRequest` being "sent".
-        :returns: a Response object containing the file
-        """
-
-        # Check that the method makes sense. Only support GET
-        if request.method not in ("GET", "HEAD"):
-            raise ValueError("Invalid request method %s" % request.method)
-
-        # Parse the URL
-        url_parts = urlparse(request.url)
-
-        # Reject URLs with a hostname component
-        if url_parts.netloc and url_parts.netloc != "localhost":
-            raise ValueError("file: URLs with hostname components are not 
permitted")
-
-        resp = Response()
-        resp.request = request
-
-        # Open the file, translate certain errors into HTTP responses
-        # Use urllib's unquote to translate percent escapes into whatever
-        # they actually need to be
-        try:
-            # Split the path on / (the URL directory separator) and decode any
-            # % escapes in the parts
-            path_parts = [unquote(p) for p in url_parts.path.split("/")]
-
-            # Strip out the leading empty parts created from the leading /'s
-            while path_parts and not path_parts[0]:
-                path_parts.pop(0)
-
-            # If os.sep is in any of the parts, someone fed us some 
shenanigans.
-            # Treat is like a missing file.
-            if any(os.sep in p for p in path_parts):
-                raise IOError(errno.ENOENT, os.strerror(errno.ENOENT))
-
-            # Look for a drive component. If one is present, store it 
separately
-            # so that a directory separator can correctly be added to the real
-            # path, and remove any empty path parts between the drive and the 
path.
-            # Assume that a part ending with : or | (legacy) is a drive.
-            if path_parts and (
-                path_parts[0].endswith("|") or path_parts[0].endswith(":")
-            ):
-                path_drive = path_parts.pop(0)
-                if path_drive.endswith("|"):
-                    path_drive = path_drive[:-1] + ":"
-
-                while path_parts and not path_parts[0]:
-                    path_parts.pop(0)
-            else:
-                path_drive = ""
-
-            # Try to put the path back together
-            # Join the drive back in, and stick os.sep in front of the path to
-            # make it absolute.
-            path = path_drive + os.sep + os.path.join(*path_parts)
-
-            # Check if the drive assumptions above were correct. If path_drive
-            # is set, and os.path.splitdrive does not return a drive, it wasn't
-            # really a drive. Put the path together again treating path_drive
-            # as a normal path component.
-            if path_drive and not os.path.splitdrive(path):
-                path = os.sep + os.path.join(path_drive, *path_parts)
-
-            # Use io.open since we need to add a release_conn method, and
-            # methods can't be added to file objects in python 2.
-            resp.raw = io.open(path, "rb")
-            resp.raw.release_conn = resp.raw.close
-        except IOError as e:
-            if e.errno == errno.EACCES:
-                resp.status_code = codes.forbidden
-            elif e.errno == errno.ENOENT:
-                resp.status_code = codes.not_found
-            else:
-                resp.status_code = codes.bad_request
-
-            # Wrap the error message in a file-like object
-            # The error message will be localized, try to convert the string
-            # representation of the exception into a byte stream
-            resp_str = str(e).encode(locale.getpreferredencoding(False))
-            resp.raw = BytesIO(resp_str)
-            if self._set_content_length:
-                resp.headers["Content-Length"] = len(resp_str)
-
-            # Add release_conn to the BytesIO object
-            resp.raw.release_conn = resp.raw.close
-        else:
-            resp.status_code = codes.ok
-            resp.url = request.url
-
-            # If it's a regular file, set the Content-Length
-            resp_stat = os.fstat(resp.raw.fileno())
-            if stat.S_ISREG(resp_stat.st_mode) and self._set_content_length:
-                resp.headers["Content-Length"] = resp_stat.st_size
-
-        return resp
-
-    def close(self):
-        pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/tests/test_requests_file.py 
new/requests_file-3.0.1/tests/test_requests_file.py
--- old/requests_file-2.1.0/tests/test_requests_file.py 2022-10-20 
16:11:26.000000000 +0200
+++ new/requests_file-3.0.1/tests/test_requests_file.py 2025-10-16 
15:50:17.000000000 +0200
@@ -41,8 +41,10 @@
         )
 
         self.assertEqual(response.status_code, requests.codes.ok)
-        self.assertEqual(response.headers["Content-Length"], len(testdata))
+        self.assertEqual(response.headers["Content-Length"], 
str(len(testdata)))
         self.assertEqual(response.content, testdata)
+        self.assertEqual(response.url, "file://%s" % 
self._pathToURL(os.path.abspath(__file__)))
+        self.assertIsInstance(response.request, requests.PreparedRequest)
 
         response.close()
 
@@ -51,6 +53,12 @@
         response = self._session.get("file:///no/such/path")
         self.assertEqual(response.status_code, requests.codes.not_found)
         self.assertTrue(response.text)
+        self.assertEqual(response.url, "file:///no/such/path")
+        self.assertIsInstance(response.request, requests.PreparedRequest)
+
+        # Ensure the missing file's path is in the response reason
+        self.assertIn("/no/such/path", response.reason)
+
         response.close()
 
     @unittest.skipIf(
@@ -68,6 +76,8 @@
 
             self.assertEqual(response.status_code, requests.codes.forbidden)
             self.assertTrue(response.text)
+            self.assertEqual(response.url, "file://%s" % 
self._pathToURL(os.path.abspath(tmp.name)))
+            self.assertIn(os.path.abspath(tmp.name), response.reason)
 
             response.close()
 
@@ -82,6 +92,8 @@
             response = self._session.get("file:///no/such/path")
             self.assertEqual(response.status_code, requests.codes.not_found)
             self.assertTrue(response.text)
+            self.assertEqual(response.url, "file:///no/such/path")
+            self.assertIn("/no/such/path", response.reason)
             response.close()
         except locale.Error:
             unittest.SkipTest("ru_RU.UTF-8 locale not available")
@@ -96,7 +108,8 @@
         )
 
         self.assertEqual(response.status_code, requests.codes.ok)
-        self.assertEqual(response.headers["Content-Length"], testlen)
+        self.assertEqual(response.headers["Content-Length"], str(testlen))
+        self.assertEqual(response.url, "file://%s" % 
self._pathToURL(os.path.abspath(__file__)))
 
         response.close()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests_file-2.1.0/tox.ini 
new/requests_file-3.0.1/tox.ini
--- old/requests_file-2.1.0/tox.ini     1970-01-01 01:00:00.000000000 +0100
+++ new/requests_file-3.0.1/tox.ini     2025-10-16 15:50:17.000000000 +0200
@@ -0,0 +1,6 @@
+[tox]
+envlist = py{39,310,311,312,313,314,315}
+
+[testenv]
+deps = pytest
+commands = pytest {posargs}

Reply via email to