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 2024-03-22 15:21:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-requests-file (Old) and /work/SRC/openSUSE:Factory/.python-requests-file.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-requests-file" Fri Mar 22 15:21:17 2024 rev:7 rq:1160512 version:2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-requests-file/python-requests-file.changes 2023-07-01 23:18:24.510388797 +0200 +++ /work/SRC/openSUSE:Factory/.python-requests-file.new.1905/python-requests-file.changes 2024-03-22 15:33:40.941753315 +0100 @@ -1,0 +2,13 @@ +Fri Mar 22 05:37:11 UTC 2024 - Steve Kowalik <steven.kowa...@suse.com> + +- Update to 2.0.0: + * Correct a typo in requests_file.py + * Remove dependency on six + * Move metadata to pyproject.toml + + Remove support for Python 2 + + Remove support for raw distutils + * Correct homepage link in pyproject.toml + * Fix black formatting +- Switch to pyproject macros. + +------------------------------------------------------------------- Old: ---- requests-file-1.5.1.tar.gz New: ---- requests-file-2.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-requests-file.spec ++++++ --- /var/tmp/diff_new_pack.sAJ5q3/_old 2024-03-22 15:33:41.437771549 +0100 +++ /var/tmp/diff_new_pack.sAJ5q3/_new 2024-03-22 15:33:41.437771549 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-requests-file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?sle15_python_module_pythons} Name: python-requests-file -Version: 1.5.1 +Version: 2.0.0 Release: 0 Summary: File transport adapter for Requests License: Apache-2.0 URL: https://github.com/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 six} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-requests @@ -42,10 +43,10 @@ %setup -q -n requests-file-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -56,5 +57,5 @@ %doc README.rst %{python_sitelib}/requests_file.py %pycache_only %{python_sitelib}/__pycache__/requests_file.*.py* -%{python_sitelib}/requests_file-%{version}*info +%{python_sitelib}/requests_file-%{version}.dist-info ++++++ requests-file-1.5.1.tar.gz -> requests-file-2.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/.github/workflows/test.yml new/requests-file-2.0.0/.github/workflows/test.yml --- old/requests-file-1.5.1/.github/workflows/test.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/requests-file-2.0.0/.github/workflows/test.yml 2024-01-29 19:14:36.000000000 +0100 @@ -0,0 +1,45 @@ +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-1.5.1/.gitignore new/requests-file-2.0.0/.gitignore --- old/requests-file-1.5.1/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/requests-file-2.0.0/.gitignore 2024-01-29 19:08:04.000000000 +0100 @@ -0,0 +1,8 @@ +*.pyc +__pycache__ +build +dist +.eggs +*.egg-info +.*.swp +.DS_Store diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/CHANGES.rst new/requests-file-2.0.0/CHANGES.rst --- old/requests-file-1.5.1/CHANGES.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/requests-file-2.0.0/CHANGES.rst 2024-01-29 19:27:18.000000000 +0100 @@ -0,0 +1,67 @@ +2.0.0 (29 Jan 2024) +=================== +- Correct a typo in requests_file.py (github PR #21) +- Remove dependency on six (github PR #23) +- Move metadata to pyproject.toml (github PR #26) + - Remove support for Python 2 + - Remove support for raw distutils +- Correct homepage link in pyproject.toml (github PR #28) +- Fix black formatting (github PR #27) + +1.5.1 (25 Apr 2020) +=================== +- Fix python 2.7 compatibility +- Rename test file for pytest +- Add tests via github actions +- Format code with black + +1.5.0 (23 Apr 2020) +================== +- Add set_content_length flag to disable on demand setting Content-Length + +1.4.3 (2 Jan 2018) +================== +- Skip the permissions test when running as root +- Handle missing locale in tests + +1.4.2 (28 Apr 2017) +=================== +- Set the response URL to the request URL + +1.4.1 (13 Oct 2016) +=================== +- Add a wheel distribution + +1.4 (24 Aug 2015) +================= + +- Use getprerredencoding instead of nl_langinfo (github issue #1) +- Handle files with a drive component (github issue #2) +- Fix some issues with running the tests on Windows + +1.3.1 (18 May 2015) +================== + +- Add python version classifiers to the package info + +1.3 (18 May 2015) +================= + +- Fix a crash when closing a file response. +- Use named aliases instead of integers for status codes. + +1.2 (8 May 2015) +================= + +- Added support for HEAD requests + +1.1 (12 Mar 2015) +================= + +- Added handling for % escapes in URLs +- Proofread the README + +1.0 (10 Mar 2015) +================= + +- Initial release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/PKG-INFO new/requests-file-2.0.0/PKG-INFO --- old/requests-file-1.5.1/PKG-INFO 2020-04-25 15:55:08.913671000 +0200 +++ new/requests-file-2.0.0/PKG-INFO 2024-01-29 19:50:18.400350000 +0100 @@ -1,16 +1,61 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: requests-file -Version: 1.5.1 +Version: 2.0.0 Summary: File transport adapter for Requests -Home-page: http://github.com/dashea/requests-file -Author: David Shea -Author-email: reallylongw...@gmail.com +Author-email: David Shea <reallylongw...@gmail.com> License: Apache 2.0 -Description: UNKNOWN -Platform: UNKNOWN +Project-URL: Homepage, https://github.com/dashea/requests-file Classifier: Development Status :: 3 - Alpha Classifier: Environment :: Plugins Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: requests>=1.0.0 + +Requests-File +============= + +Requests-File is a transport adapter for use with the `Requests`_ Python +library to allow local filesystem access via file:\/\/ URLs. + +To use: + +.. code-block:: python + + import requests + from requests_file import FileAdapter + + s = requests.Session() + s.mount('file://', FileAdapter()) + + resp = s.get('file:///path/to/file') + +Features +-------- + +- Will open and read local files +- Might set a Content-Length header +- That's about it + +No encoding information is set in the response object, so be careful using +Response.text: the chardet library will be used to convert the file to a +unicode type and it may not detect what you actually want. + +EACCES is converted to a 403 status code, and ENOENT is converted to a +404. All other IOError types are converted to a 400. + +Contributing +------------ + +Contributions welcome! Feel free to open a pull request against +https://github.com/dashea/requests-file + +License +------- + +To maximise compatibility with Requests, this code is licensed under the Apache +license. See LICENSE for more details. + +.. _`Requests`: https://github.com/kennethreitz/requests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/pyproject.toml new/requests-file-2.0.0/pyproject.toml --- old/requests-file-1.5.1/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/requests-file-2.0.0/pyproject.toml 2024-01-29 19:14:36.000000000 +0100 @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.3"] +build-backend = "setuptools.build_meta" + +[project] +name = "requests-file" +authors = [{name = "David Shea", email = "reallylongw...@gmail.com"}] +license = {text = "Apache 2.0"} +description = "File transport adapter for Requests" +readme = "README.rst" +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Plugins", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3", +] +urls = {Homepage = "https://github.com/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_scm] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/requests_file.egg-info/PKG-INFO new/requests-file-2.0.0/requests_file.egg-info/PKG-INFO --- old/requests-file-1.5.1/requests_file.egg-info/PKG-INFO 2020-04-25 15:55:08.000000000 +0200 +++ new/requests-file-2.0.0/requests_file.egg-info/PKG-INFO 2024-01-29 19:50:18.000000000 +0100 @@ -1,16 +1,61 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: requests-file -Version: 1.5.1 +Version: 2.0.0 Summary: File transport adapter for Requests -Home-page: http://github.com/dashea/requests-file -Author: David Shea -Author-email: reallylongw...@gmail.com +Author-email: David Shea <reallylongw...@gmail.com> License: Apache 2.0 -Description: UNKNOWN -Platform: UNKNOWN +Project-URL: Homepage, https://github.com/dashea/requests-file Classifier: Development Status :: 3 - Alpha Classifier: Environment :: Plugins Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: requests>=1.0.0 + +Requests-File +============= + +Requests-File is a transport adapter for use with the `Requests`_ Python +library to allow local filesystem access via file:\/\/ URLs. + +To use: + +.. code-block:: python + + import requests + from requests_file import FileAdapter + + s = requests.Session() + s.mount('file://', FileAdapter()) + + resp = s.get('file:///path/to/file') + +Features +-------- + +- Will open and read local files +- Might set a Content-Length header +- That's about it + +No encoding information is set in the response object, so be careful using +Response.text: the chardet library will be used to convert the file to a +unicode type and it may not detect what you actually want. + +EACCES is converted to a 403 status code, and ENOENT is converted to a +404. All other IOError types are converted to a 400. + +Contributing +------------ + +Contributions welcome! Feel free to open a pull request against +https://github.com/dashea/requests-file + +License +------- + +To maximise compatibility with Requests, this code is licensed under the Apache +license. See LICENSE for more details. + +.. _`Requests`: https://github.com/kennethreitz/requests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/requests_file.egg-info/SOURCES.txt new/requests-file-2.0.0/requests_file.egg-info/SOURCES.txt --- old/requests-file-1.5.1/requests_file.egg-info/SOURCES.txt 2020-04-25 15:55:08.000000000 +0200 +++ new/requests-file-2.0.0/requests_file.egg-info/SOURCES.txt 2024-01-29 19:50:18.000000000 +0100 @@ -1,10 +1,11 @@ +.gitignore +CHANGES.rst LICENSE MANIFEST.in README.rst +pyproject.toml requests_file.py -requirements.txt -setup.cfg -setup.py +.github/workflows/test.yml 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-1.5.1/requests_file.egg-info/requires.txt new/requests-file-2.0.0/requests_file.egg-info/requires.txt --- old/requests-file-1.5.1/requests_file.egg-info/requires.txt 2020-04-25 15:55:08.000000000 +0200 +++ new/requests-file-2.0.0/requests_file.egg-info/requires.txt 2024-01-29 19:50:18.000000000 +0100 @@ -1,2 +1 @@ requests>=1.0.0 -six diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/requests_file.py new/requests-file-2.0.0/requests_file.py --- old/requests-file-1.5.1/requests_file.py 2020-04-25 15:49:02.000000000 +0200 +++ new/requests-file-2.0.0/requests_file.py 2024-01-29 19:14:36.000000000 +0100 @@ -7,7 +7,10 @@ import locale import io -from six import BytesIO +try: + from io import BytesIO +except ImportError: + from StringIO import StringIO as BytesIO class FileAdapter(BaseAdapter): @@ -16,10 +19,10 @@ self._set_content_length = set_content_length def send(self, request, **kwargs): - """ Wraps a file, described in request, in a Response object. + """Wraps a file, described in request, in a Response object. - :param request: The PreparedRequest` being "sent". - :returns: a Response object containing the file + :param request: The PreparedRequest` being "sent". + :returns: a Response object containing the file """ # Check that the method makes sense. Only support GET @@ -75,7 +78,7 @@ # 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 - # reall a drive. Put the path together again treating path_drive + # 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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/requirements.txt new/requests-file-2.0.0/requirements.txt --- old/requests-file-1.5.1/requirements.txt 2020-04-24 04:20:08.000000000 +0200 +++ new/requests-file-2.0.0/requirements.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -requests>=1.0.0 -six diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/setup.cfg new/requests-file-2.0.0/setup.cfg --- old/requests-file-1.5.1/setup.cfg 2020-04-25 15:55:08.914673800 +0200 +++ new/requests-file-2.0.0/setup.cfg 2024-01-29 19:50:18.400350000 +0100 @@ -1,6 +1,3 @@ -[bdist_wheel] -universal = 1 - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-file-1.5.1/setup.py new/requests-file-2.0.0/setup.py --- old/requests-file-1.5.1/setup.py 2020-04-25 15:51:47.000000000 +0200 +++ new/requests-file-2.0.0/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -requires = [line.strip() for line in open("requirements.txt").readlines()] - -setup( - name="requests-file", - version="1.5.1", - description="File transport adapter for Requests", - author="David Shea", - author_email="reallylongw...@gmail.com", - url="http://github.com/dashea/requests-file", - py_modules=["requests_file"], - install_requires=requires, - license="Apache 2.0", - test_suite="tests", - classifiers=[ - "Development Status :: 3 - Alpha", - "Environment :: Plugins", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - ], -)