commit python-vcrpy for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-vcrpy for openSUSE:Factory checked in at 2024-10-30 17:34:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-vcrpy (Old) and /work/SRC/openSUSE:Factory/.python-vcrpy.new.2020 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-vcrpy" Wed Oct 30 17:34:46 2024 rev:17 rq:1219096 version:6.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-vcrpy/python-vcrpy.changes 2024-02-07 18:52:43.612057964 +0100 +++ /work/SRC/openSUSE:Factory/.python-vcrpy.new.2020/python-vcrpy.changes 2024-10-30 17:35:21.210562404 +0100 @@ -1,0 +2,9 @@ +Tue Oct 29 12:01:26 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> + +- Update to 6.0.2 + * Ensure body is consumed only once (#846) - thanks @sathieu + * Permit urllib3 2.x for non-PyPy Python >=3.10 + * Fix typos in test commands - thanks @chuckwondo + * Several test and workflow improvements - thanks @hartwork and @graingert + +------------------------------------------------------------------- Old: ---- vcrpy-6.0.1.tar.gz New: ---- vcrpy-6.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-vcrpy.spec ++++++ --- /var/tmp/diff_new_pack.VE359j/_old 2024-10-30 17:35:22.098599601 +0100 +++ /var/tmp/diff_new_pack.VE359j/_new 2024-10-30 17:35:22.098599601 +0100 @@ -19,7 +19,7 @@ %{?sle15_python_module_pythons} Name: python-vcrpy -Version: 6.0.1 +Version: 6.0.2 Release: 0 Summary: Python module to mock and replay HTTP interactions License: MIT ++++++ vcrpy-6.0.1.tar.gz -> vcrpy-6.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/PKG-INFO new/vcrpy-6.0.2/PKG-INFO --- old/vcrpy-6.0.1/PKG-INFO 2024-01-25 17:15:27.667013000 +0100 +++ new/vcrpy-6.0.2/PKG-INFO 2024-10-07 15:02:37.405501400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vcrpy -Version: 6.0.1 +Version: 6.0.2 Summary: Automatically mock your HTTP interactions to simplify and speed up testing Home-page: https://github.com/kevin1024/vcrpy Author: Kevin McCarthy @@ -24,8 +24,27 @@ Classifier: License :: OSI Approved :: MIT License Requires-Python: >=3.8 Description-Content-Type: text/x-rst -Provides-Extra: tests License-File: LICENSE.txt +Requires-Dist: PyYAML +Requires-Dist: wrapt +Requires-Dist: yarl +Requires-Dist: urllib3<2; python_version < "3.10" +Requires-Dist: urllib3<2; platform_python_implementation == "PyPy" +Requires-Dist: urllib3; platform_python_implementation != "PyPy" and python_version >= "3.10" +Provides-Extra: tests +Requires-Dist: aiohttp; extra == "tests" +Requires-Dist: boto3; extra == "tests" +Requires-Dist: httplib2; extra == "tests" +Requires-Dist: httpx; extra == "tests" +Requires-Dist: pytest-aiohttp; extra == "tests" +Requires-Dist: pytest-asyncio; extra == "tests" +Requires-Dist: pytest-cov; extra == "tests" +Requires-Dist: pytest-httpbin; extra == "tests" +Requires-Dist: pytest; extra == "tests" +Requires-Dist: requests>=2.22.0; extra == "tests" +Requires-Dist: tornado; extra == "tests" +Requires-Dist: urllib3; extra == "tests" +Requires-Dist: Werkzeug==2.0.3; extra == "tests" ########### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/setup.py new/vcrpy-6.0.2/setup.py --- old/vcrpy-6.0.1/setup.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/setup.py 2024-10-07 14:48:24.000000000 +0200 @@ -3,10 +3,8 @@ import codecs import os import re -import sys from setuptools import find_packages, setup -from setuptools.command.test import test as TestCommand long_description = open("README.rst").read() here = os.path.abspath(os.path.dirname(__file__)) @@ -28,20 +26,6 @@ raise RuntimeError("Unable to find version string.") -class PyTest(TestCommand): - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_tests(self): - # import here, cause outside the eggs aren't loaded - import pytest - - errno = pytest.main(self.test_args) - sys.exit(errno) - - install_requires = [ "PyYAML", "wrapt", @@ -55,6 +39,9 @@ "urllib3 <2; python_version <'3.10'", # https://github.com/kevin1024/vcrpy/pull/775#issuecomment-1847849962 "urllib3 <2; platform_python_implementation =='PyPy'", + # Workaround for Poetry with CPython >= 3.10, problem description at: + # https://github.com/kevin1024/vcrpy/pull/826 + "urllib3; platform_python_implementation !='PyPy' and python_version >='3.10'", ] extras_require = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/integration/conftest.py new/vcrpy-6.0.2/tests/integration/conftest.py --- old/vcrpy-6.0.1/tests/integration/conftest.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/integration/conftest.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -import os -import ssl - -import pytest - - -@pytest.fixture -def httpbin_ssl_context(): - ssl_ca_location = os.environ["REQUESTS_CA_BUNDLE"] - ssl_cert_location = os.environ["REQUESTS_CA_BUNDLE"].replace("cacert.pem", "cert.pem") - ssl_key_location = os.environ["REQUESTS_CA_BUNDLE"].replace("cacert.pem", "key.pem") - - ssl_context = ssl.create_default_context(cafile=ssl_ca_location) - ssl_context.load_cert_chain(ssl_cert_location, ssl_key_location) - - return ssl_context diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/integration/test_aiohttp.py new/vcrpy-6.0.2/tests/integration/test_aiohttp.py --- old/vcrpy-6.0.1/tests/integration/test_aiohttp.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/integration/test_aiohttp.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,7 +1,9 @@ import logging +import ssl import urllib.parse import pytest +import pytest_httpbin.certs import vcr @@ -11,6 +13,8 @@ from .aiohttp_utils import aiohttp_app, aiohttp_request # noqa: E402 +HTTPBIN_SSL_CONTEXT = ssl.create_default_context(cafile=pytest_httpbin.certs.where()) + def run_in_loop(fn): async def wrapper(): @@ -338,7 +342,7 @@ assert cassette.play_count == 2 -def test_cookies(httpbin_both, httpbin_ssl_context, tmpdir): +def test_cookies(httpbin_both, tmpdir): async def run(loop): cookies_url = httpbin_both.url + ( "/response-headers?" @@ -353,12 +357,12 @@ # ------------------------- Record -------------------------- # with vcr.use_cassette(tmp) as cassette: async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: - cookies_resp = await session.get(cookies_url, ssl=httpbin_ssl_context) + cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) home_resp = await session.get( home_url, cookies=req_cookies, headers=req_headers, - ssl=httpbin_ssl_context, + ssl=HTTPBIN_SSL_CONTEXT, ) assert cassette.play_count == 0 assert_responses(cookies_resp, home_resp) @@ -366,12 +370,12 @@ # -------------------------- Play --------------------------- # with vcr.use_cassette(tmp, record_mode=vcr.mode.NONE) as cassette: async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: - cookies_resp = await session.get(cookies_url, ssl=httpbin_ssl_context) + cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) home_resp = await session.get( home_url, cookies=req_cookies, headers=req_headers, - ssl=httpbin_ssl_context, + ssl=HTTPBIN_SSL_CONTEXT, ) assert cassette.play_count == 2 assert_responses(cookies_resp, home_resp) @@ -388,7 +392,7 @@ run_in_loop(run) -def test_cookies_redirect(httpbin_both, httpbin_ssl_context, tmpdir): +def test_cookies_redirect(httpbin_both, tmpdir): async def run(loop): # Sets cookie as provided by the query string and redirects cookies_url = httpbin_both.url + "/cookies/set?Cookie_1=Val_1" @@ -397,7 +401,7 @@ # ------------------------- Record -------------------------- # with vcr.use_cassette(tmp) as cassette: async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: - cookies_resp = await session.get(cookies_url, ssl=httpbin_ssl_context) + cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) assert not cookies_resp.cookies cookies = session.cookie_jar.filter_cookies(cookies_url) assert cookies["Cookie_1"].value == "Val_1" @@ -408,7 +412,7 @@ # -------------------------- Play --------------------------- # with vcr.use_cassette(tmp, record_mode=vcr.mode.NONE) as cassette: async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: - cookies_resp = await session.get(cookies_url, ssl=httpbin_ssl_context) + cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) assert not cookies_resp.cookies cookies = session.cookie_jar.filter_cookies(cookies_url) assert cookies["Cookie_1"].value == "Val_1" @@ -422,7 +426,7 @@ "Cookie_1=Val_1; Expires=Wed, 21 Oct 2015 07:28:00 GMT", ] async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: - cookies_resp = await session.get(cookies_url, ssl=httpbin_ssl_context) + cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) assert not cookies_resp.cookies cookies = session.cookie_jar.filter_cookies(cookies_url) assert cookies["Cookie_1"].value == "Val_1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/integration/test_basic.py new/vcrpy-6.0.2/tests/integration/test_basic.py --- old/vcrpy-6.0.1/tests/integration/test_basic.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/integration/test_basic.py 2024-10-07 14:48:24.000000000 +0200 @@ -39,7 +39,7 @@ test_fixture = str(tmpdir.join("synopsis.json")) with vcr.use_cassette(test_fixture, serializer="json"): response = urlopen(httpbin.url).read() - assert b"A simple HTTP Request & Response Service." in response + assert b"HTTP Request & Response Service" in response def test_patched_content(tmpdir, httpbin): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/integration/test_httplib2.py new/vcrpy-6.0.2/tests/integration/test_httplib2.py --- old/vcrpy-6.0.1/tests/integration/test_httplib2.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/integration/test_httplib2.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,4 +1,5 @@ """Integration tests with httplib2""" + from urllib.parse import urlencode import pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/integration/test_register_persister.py new/vcrpy-6.0.2/tests/integration/test_register_persister.py --- old/vcrpy-6.0.1/tests/integration/test_register_persister.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/integration/test_register_persister.py 2024-10-07 14:48:24.000000000 +0200 @@ -66,7 +66,7 @@ with my_vcr.use_cassette(test_fixture, serializer="json"): response = urlopen(httpbin.url).read() - assert b"A simple HTTP Request & Response Service." in response + assert b"HTTP Request & Response Service" in response def test_load_cassette_persister_exception_handling(tmpdir, httpbin): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/integration/test_requests.py new/vcrpy-6.0.2/tests/integration/test_requests.py --- old/vcrpy-6.0.1/tests/integration/test_requests.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/integration/test_requests.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,4 +1,5 @@ """Test requests' interaction with vcr""" + import pytest import vcr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/integration/test_tornado.py new/vcrpy-6.0.2/tests/integration/test_tornado.py --- old/vcrpy-6.0.1/tests/integration/test_tornado.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/integration/test_tornado.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,4 +1,5 @@ """Test requests' interaction with vcr""" + import asyncio import functools import inspect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/unit/test_stubs.py new/vcrpy-6.0.2/tests/unit/test_stubs.py --- old/vcrpy-6.0.1/tests/unit/test_stubs.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/tests/unit/test_stubs.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,9 +1,12 @@ import contextlib +import http.client as httplib +from io import BytesIO +from tempfile import NamedTemporaryFile from unittest import mock from pytest import mark -from vcr import mode +from vcr import mode, use_cassette from vcr.cassette import Cassette from vcr.stubs import VCRHTTPSConnection @@ -21,3 +24,52 @@ vcr_connection.cassette = Cassette("test", record_mode=mode.ALL) vcr_connection.real_connection.connect() assert vcr_connection.real_connection.sock is not None + + def test_body_consumed_once_stream(self, tmpdir, httpbin): + self._test_body_consumed_once( + tmpdir, + httpbin, + BytesIO(b"1234567890"), + BytesIO(b"9876543210"), + BytesIO(b"9876543210"), + ) + + def test_body_consumed_once_iterator(self, tmpdir, httpbin): + self._test_body_consumed_once( + tmpdir, + httpbin, + iter([b"1234567890"]), + iter([b"9876543210"]), + iter([b"9876543210"]), + ) + + # data2 and data3 should serve the same data, potentially as iterators + def _test_body_consumed_once( + self, + tmpdir, + httpbin, + data1, + data2, + data3, + ): + with NamedTemporaryFile(dir=tmpdir, suffix=".yml") as f: + testpath = f.name + # NOTE: ``use_cassette`` is not okay with the file existing + # already. So we using ``.close()`` to not only + # close but also delete the empty file, before we start. + f.close() + host, port = httpbin.host, httpbin.port + match_on = ["method", "uri", "body"] + with use_cassette(testpath, match_on=match_on): + conn1 = httplib.HTTPConnection(host, port) + conn1.request("POST", "/anything", body=data1) + conn1.getresponse() + conn2 = httplib.HTTPConnection(host, port) + conn2.request("POST", "/anything", body=data2) + conn2.getresponse() + with use_cassette(testpath, match_on=match_on) as cass: + conn3 = httplib.HTTPConnection(host, port) + conn3.request("POST", "/anything", body=data3) + conn3.getresponse() + assert cass.play_counts[0] == 0 + assert cass.play_counts[1] == 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/tests/unit/test_util.py new/vcrpy-6.0.2/tests/unit/test_util.py --- old/vcrpy-6.0.1/tests/unit/test_util.py 1970-01-01 01:00:00.000000000 +0100 +++ new/vcrpy-6.0.2/tests/unit/test_util.py 2024-10-07 14:48:24.000000000 +0200 @@ -0,0 +1,33 @@ +from io import BytesIO, StringIO + +import pytest + +from vcr import request +from vcr.util import read_body + + +@pytest.mark.parametrize( + "input_, expected_output", + [ + (BytesIO(b"Stream"), b"Stream"), + (StringIO("Stream"), b"Stream"), + (iter(["StringIter"]), b"StringIter"), + (iter(["String", "Iter"]), b"StringIter"), + (iter([b"BytesIter"]), b"BytesIter"), + (iter([b"Bytes", b"Iter"]), b"BytesIter"), + (iter([70, 111, 111]), b"Foo"), + (iter([]), b""), + ("String", b"String"), + (b"Bytes", b"Bytes"), + ], +) +def test_read_body(input_, expected_output): + r = request.Request("POST", "http://host.com/", input_, {}) + assert read_body(r) == expected_output + + +def test_unsupported_read_body(): + r = request.Request("POST", "http://host.com/", iter([[]]), {}) + with pytest.raises(ValueError) as excinfo: + assert read_body(r) + assert excinfo.value.args == ("Body type <class 'list'> not supported",) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcr/__init__.py new/vcrpy-6.0.2/vcr/__init__.py --- old/vcrpy-6.0.1/vcr/__init__.py 2024-01-25 17:13:56.000000000 +0100 +++ new/vcrpy-6.0.2/vcr/__init__.py 2024-10-07 14:55:37.000000000 +0200 @@ -4,7 +4,7 @@ from .config import VCR from .record_mode import RecordMode as mode # noqa: F401 -__version__ = "6.0.1" +__version__ = "6.0.2" logging.getLogger(__name__).addHandler(NullHandler()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcr/patch.py new/vcrpy-6.0.2/vcr/patch.py --- old/vcrpy-6.0.1/vcr/patch.py 2024-01-23 16:34:28.000000000 +0100 +++ new/vcrpy-6.0.2/vcr/patch.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,4 +1,5 @@ """Utilities for patching in cassettes""" + import contextlib import functools import http.client as httplib diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcr/request.py new/vcrpy-6.0.2/vcr/request.py --- old/vcrpy-6.0.1/vcr/request.py 2023-06-29 00:11:37.000000000 +0200 +++ new/vcrpy-6.0.2/vcr/request.py 2024-10-07 14:48:24.000000000 +0200 @@ -3,7 +3,7 @@ from io import BytesIO from urllib.parse import parse_qsl, urlparse -from .util import CaseInsensitiveDict +from .util import CaseInsensitiveDict, _is_nonsequence_iterator log = logging.getLogger(__name__) @@ -17,8 +17,11 @@ self.method = method self.uri = uri self._was_file = hasattr(body, "read") + self._was_iter = _is_nonsequence_iterator(body) if self._was_file: self.body = body.read() + elif self._was_iter: + self.body = list(body) else: self.body = body self.headers = headers @@ -36,7 +39,11 @@ @property def body(self): - return BytesIO(self._body) if self._was_file else self._body + if self._was_file: + return BytesIO(self._body) + if self._was_iter: + return iter(self._body) + return self._body @body.setter def body(self, value): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcr/stubs/aiohttp_stubs.py new/vcrpy-6.0.2/vcr/stubs/aiohttp_stubs.py --- old/vcrpy-6.0.1/vcr/stubs/aiohttp_stubs.py 2023-07-31 05:04:00.000000000 +0200 +++ new/vcrpy-6.0.2/vcr/stubs/aiohttp_stubs.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,4 +1,5 @@ """Stubs for aiohttp HTTP clients""" + import asyncio import functools import json diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcr/stubs/boto3_stubs.py new/vcrpy-6.0.2/vcr/stubs/boto3_stubs.py --- old/vcrpy-6.0.1/vcr/stubs/boto3_stubs.py 2023-05-24 20:36:09.000000000 +0200 +++ new/vcrpy-6.0.2/vcr/stubs/boto3_stubs.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,4 +1,5 @@ """Stubs for boto3""" + from botocore.awsrequest import AWSHTTPConnection as HTTPConnection from botocore.awsrequest import AWSHTTPSConnection as VerifiedHTTPSConnection diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcr/stubs/tornado_stubs.py new/vcrpy-6.0.2/vcr/stubs/tornado_stubs.py --- old/vcrpy-6.0.1/vcr/stubs/tornado_stubs.py 2023-06-29 00:11:37.000000000 +0200 +++ new/vcrpy-6.0.2/vcr/stubs/tornado_stubs.py 2024-10-07 14:48:24.000000000 +0200 @@ -1,4 +1,5 @@ """Stubs for tornado HTTP clients""" + import functools from io import BytesIO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcr/util.py new/vcrpy-6.0.2/vcr/util.py --- old/vcrpy-6.0.1/vcr/util.py 2023-06-29 00:11:37.000000000 +0200 +++ new/vcrpy-6.0.2/vcr/util.py 2024-10-07 14:48:24.000000000 +0200 @@ -89,9 +89,28 @@ return composed +def _is_nonsequence_iterator(obj): + return hasattr(obj, "__iter__") and not isinstance( + obj, + (bytearray, bytes, dict, list, str), + ) + + def read_body(request): if hasattr(request.body, "read"): return request.body.read() + if _is_nonsequence_iterator(request.body): + body = list(request.body) + if body: + if isinstance(body[0], str): + return "".join(body).encode("utf-8") + elif isinstance(body[0], (bytes, bytearray)): + return b"".join(body) + elif isinstance(body[0], int): + return bytes(body) + else: + raise ValueError(f"Body type {type(body[0])} not supported") + return b"" return request.body diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcrpy.egg-info/PKG-INFO new/vcrpy-6.0.2/vcrpy.egg-info/PKG-INFO --- old/vcrpy-6.0.1/vcrpy.egg-info/PKG-INFO 2024-01-25 17:15:27.000000000 +0100 +++ new/vcrpy-6.0.2/vcrpy.egg-info/PKG-INFO 2024-10-07 15:02:37.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vcrpy -Version: 6.0.1 +Version: 6.0.2 Summary: Automatically mock your HTTP interactions to simplify and speed up testing Home-page: https://github.com/kevin1024/vcrpy Author: Kevin McCarthy @@ -24,8 +24,27 @@ Classifier: License :: OSI Approved :: MIT License Requires-Python: >=3.8 Description-Content-Type: text/x-rst -Provides-Extra: tests License-File: LICENSE.txt +Requires-Dist: PyYAML +Requires-Dist: wrapt +Requires-Dist: yarl +Requires-Dist: urllib3<2; python_version < "3.10" +Requires-Dist: urllib3<2; platform_python_implementation == "PyPy" +Requires-Dist: urllib3; platform_python_implementation != "PyPy" and python_version >= "3.10" +Provides-Extra: tests +Requires-Dist: aiohttp; extra == "tests" +Requires-Dist: boto3; extra == "tests" +Requires-Dist: httplib2; extra == "tests" +Requires-Dist: httpx; extra == "tests" +Requires-Dist: pytest-aiohttp; extra == "tests" +Requires-Dist: pytest-asyncio; extra == "tests" +Requires-Dist: pytest-cov; extra == "tests" +Requires-Dist: pytest-httpbin; extra == "tests" +Requires-Dist: pytest; extra == "tests" +Requires-Dist: requests>=2.22.0; extra == "tests" +Requires-Dist: tornado; extra == "tests" +Requires-Dist: urllib3; extra == "tests" +Requires-Dist: Werkzeug==2.0.3; extra == "tests" ########### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcrpy.egg-info/SOURCES.txt new/vcrpy-6.0.2/vcrpy.egg-info/SOURCES.txt --- old/vcrpy-6.0.1/vcrpy.egg-info/SOURCES.txt 2024-01-25 17:15:27.000000000 +0100 +++ new/vcrpy-6.0.2/vcrpy.egg-info/SOURCES.txt 2024-10-07 15:02:37.000000000 +0200 @@ -14,7 +14,6 @@ tests/fixtures/wild/domain_redirect.yaml tests/integration/__init__.py tests/integration/aiohttp_utils.py -tests/integration/conftest.py tests/integration/test_aiohttp.py tests/integration/test_basic.py tests/integration/test_boto3.py @@ -56,6 +55,7 @@ tests/unit/test_serialize.py tests/unit/test_stubs.py tests/unit/test_unittest.py +tests/unit/test_util.py tests/unit/test_vcr.py tests/unit/test_vcr_import.py vcr/__init__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.1/vcrpy.egg-info/requires.txt new/vcrpy-6.0.2/vcrpy.egg-info/requires.txt --- old/vcrpy-6.0.1/vcrpy.egg-info/requires.txt 2024-01-25 17:15:27.000000000 +0100 +++ new/vcrpy-6.0.2/vcrpy.egg-info/requires.txt 2024-10-07 15:02:37.000000000 +0200 @@ -2,6 +2,9 @@ wrapt yarl +[:platform_python_implementation != "PyPy" and python_version >= "3.10"] +urllib3 + [:platform_python_implementation == "PyPy"] urllib3<2
participants (1)
-
Source-Sync