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 2025-01-06 16:05:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-vcrpy (Old) and /work/SRC/openSUSE:Factory/.python-vcrpy.new.1881 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-vcrpy" Mon Jan 6 16:05:52 2025 rev:18 rq:1235176 version:7.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-vcrpy/python-vcrpy.changes 2024-10-30 17:35:21.210562404 +0100 +++ /work/SRC/openSUSE:Factory/.python-vcrpy.new.1881/python-vcrpy.changes 2025-01-06 16:06:32.073035376 +0100 @@ -1,0 +2,9 @@ +Mon Jan 6 10:53:19 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> + +- Update to 7.0.0 + * Drop support for python 3.8 (major version bump) - thanks @jairhenrique + * Various linting and test fixes - thanks @jairhenrique + * Bugfix for urllib2>=2.3.0 - missing version_string (#888) + * Bugfix for asyncio.run - thanks @alekeik1 + +------------------------------------------------------------------- Old: ---- vcrpy-6.0.2.tar.gz New: ---- vcrpy-7.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-vcrpy.spec ++++++ --- /var/tmp/diff_new_pack.cKvQXV/_old 2025-01-06 16:06:32.577056178 +0100 +++ /var/tmp/diff_new_pack.cKvQXV/_new 2025-01-06 16:06:32.577056178 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-vcrpy # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2015 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -19,7 +19,7 @@ %{?sle15_python_module_pythons} Name: python-vcrpy -Version: 6.0.2 +Version: 7.0.0 Release: 0 Summary: Python module to mock and replay HTTP interactions License: MIT ++++++ vcrpy-6.0.2.tar.gz -> vcrpy-7.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/PKG-INFO new/vcrpy-7.0.0/PKG-INFO --- old/vcrpy-6.0.2/PKG-INFO 2024-10-07 15:02:37.405501400 +0200 +++ new/vcrpy-7.0.0/PKG-INFO 2024-12-31 01:05:46.233796800 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vcrpy -Version: 6.0.2 +Version: 7.0.0 Summary: Automatically mock your HTTP interactions to simplify and speed up testing Home-page: https://github.com/kevin1024/vcrpy Author: Kevin McCarthy @@ -11,18 +11,18 @@ Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Testing Classifier: Topic :: Internet :: WWW/HTTP Classifier: License :: OSI Approved :: MIT License -Requires-Python: >=3.8 +Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE.txt Requires-Dist: PyYAML diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/pyproject.toml new/vcrpy-7.0.0/pyproject.toml --- old/vcrpy-6.0.2/pyproject.toml 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/pyproject.toml 2024-12-31 00:55:25.000000000 +0100 @@ -16,6 +16,10 @@ ] [tool.ruff] +line-length = 110 +target-version = "py39" + +[tool.ruff.lint] select = [ "B", # flake8-bugbear "C4", # flake8-comprehensions @@ -29,8 +33,6 @@ "UP", # pyupgrade "W", # pycodestyle warning ] -line-length = 110 -target-version = "py38" -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["vcr"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/setup.py new/vcrpy-7.0.0/setup.py --- old/vcrpy-6.0.2/setup.py 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/setup.py 2024-12-31 00:55:25.000000000 +0100 @@ -78,7 +78,7 @@ author_email="me@kevinmccarthy.org", url="https://github.com/kevin1024/vcrpy", packages=find_packages(exclude=["tests*"]), - python_requires=">=3.8", + python_requires=">=3.9", install_requires=install_requires, license="MIT", extras_require=extras_require, @@ -89,11 +89,11 @@ "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/tests/integration/test_aiohttp.py new/vcrpy-7.0.0/tests/integration/test_aiohttp.py --- old/vcrpy-6.0.2/tests/integration/test_aiohttp.py 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/tests/integration/test_aiohttp.py 2024-12-31 00:55:25.000000000 +0100 @@ -4,6 +4,7 @@ import pytest import pytest_httpbin.certs +import yarl import vcr @@ -403,7 +404,7 @@ 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) assert not cookies_resp.cookies - cookies = session.cookie_jar.filter_cookies(cookies_url) + cookies = session.cookie_jar.filter_cookies(yarl.URL(cookies_url)) assert cookies["Cookie_1"].value == "Val_1" assert cassette.play_count == 0 @@ -414,7 +415,7 @@ 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) assert not cookies_resp.cookies - cookies = session.cookie_jar.filter_cookies(cookies_url) + cookies = session.cookie_jar.filter_cookies(yarl.URL(cookies_url)) assert cookies["Cookie_1"].value == "Val_1" assert cassette.play_count == 2 @@ -428,7 +429,7 @@ 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) assert not cookies_resp.cookies - cookies = session.cookie_jar.filter_cookies(cookies_url) + cookies = session.cookie_jar.filter_cookies(yarl.URL(cookies_url)) assert cookies["Cookie_1"].value == "Val_1" run_in_loop(run) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/vcr/__init__.py new/vcrpy-7.0.0/vcr/__init__.py --- old/vcrpy-6.0.2/vcr/__init__.py 2024-10-07 14:55:37.000000000 +0200 +++ new/vcrpy-7.0.0/vcr/__init__.py 2024-12-31 00:59:08.000000000 +0100 @@ -4,7 +4,7 @@ from .config import VCR from .record_mode import RecordMode as mode # noqa: F401 -__version__ = "6.0.2" +__version__ = "7.0.0" logging.getLogger(__name__).addHandler(NullHandler()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/vcr/cassette.py new/vcrpy-7.0.0/vcr/cassette.py --- old/vcrpy-6.0.2/vcr/cassette.py 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/vcr/cassette.py 2024-12-31 00:55:25.000000000 +0100 @@ -215,7 +215,7 @@ @property def write_protected(self): - return self.rewound and self.record_mode == RecordMode.ONCE or self.record_mode == RecordMode.NONE + return (self.rewound and self.record_mode == RecordMode.ONCE) or self.record_mode == RecordMode.NONE def append(self, request, response): """Add a request, response pair to this cassette""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/vcr/matchers.py new/vcrpy-7.0.0/vcr/matchers.py --- old/vcrpy-6.0.2/vcr/matchers.py 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/vcr/matchers.py 2024-12-31 00:55:25.000000000 +0100 @@ -3,11 +3,10 @@ import urllib import xmlrpc.client from string import hexdigits -from typing import List, Set from .util import read_body -_HEXDIG_CODE_POINTS: Set[int] = {ord(s.encode("ascii")) for s in hexdigits} +_HEXDIG_CODE_POINTS: set[int] = {ord(s.encode("ascii")) for s in hexdigits} log = logging.getLogger(__name__) @@ -109,7 +108,7 @@ CHUNK_GAP = b"\r\n" BODY_LEN: int = len(body) - chunks: List[bytes] = [] + chunks: list[bytes] = [] pos: int = 0 while True: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/vcr/stubs/__init__.py new/vcrpy-7.0.0/vcr/stubs/__init__.py --- old/vcrpy-6.0.2/vcr/stubs/__init__.py 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/vcr/stubs/__init__.py 2024-12-31 00:55:25.000000000 +0100 @@ -66,6 +66,7 @@ self.reason = recorded_response["status"]["message"] self.status = self.code = recorded_response["status"]["code"] self.version = None + self.version_string = None self._content = BytesIO(self.recorded_response["body"]["string"]) self._closed = False self._original_response = self # for requests.session.Session cookie extraction diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/vcr/stubs/aiohttp_stubs.py new/vcrpy-7.0.0/vcr/stubs/aiohttp_stubs.py --- old/vcrpy-6.0.2/vcr/stubs/aiohttp_stubs.py 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/vcr/stubs/aiohttp_stubs.py 2024-12-31 00:55:25.000000000 +0100 @@ -4,8 +4,9 @@ import functools import json import logging +from collections.abc import Mapping from http.cookies import CookieError, Morsel, SimpleCookie -from typing import Mapping, Union +from typing import Union from aiohttp import ClientConnectionError, ClientResponse, CookieJar, RequestInfo, hdrs, streams from aiohttp.helpers import strip_auth_from_url diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/vcr/stubs/httpx_stubs.py new/vcrpy-7.0.0/vcr/stubs/httpx_stubs.py --- old/vcrpy-6.0.2/vcr/stubs/httpx_stubs.py 2024-10-07 14:48:24.000000000 +0200 +++ new/vcrpy-7.0.0/vcr/stubs/httpx_stubs.py 2024-12-31 00:55:25.000000000 +0100 @@ -166,6 +166,22 @@ return _inner_send +def _run_async_function(sync_func, *args, **kwargs): + """ + Safely run an asynchronous function from a synchronous context. + Handles both cases: + - An event loop is already running. + - No event loop exists yet. + """ + try: + asyncio.get_running_loop() + except RuntimeError: + return asyncio.run(sync_func(*args, **kwargs)) + else: + # If inside a running loop, create a task and wait for it + return asyncio.ensure_future(sync_func(*args, **kwargs)) + + def _sync_vcr_send(cassette, real_send, *args, **kwargs): vcr_request, response = _shared_vcr_send(cassette, real_send, *args, **kwargs) if response: @@ -174,7 +190,7 @@ return response real_response = real_send(*args, **kwargs) - asyncio.run(_record_responses(cassette, vcr_request, real_response, aread=False)) + _run_async_function(_record_responses, cassette, vcr_request, real_response, aread=False) return real_response diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vcrpy-6.0.2/vcrpy.egg-info/PKG-INFO new/vcrpy-7.0.0/vcrpy.egg-info/PKG-INFO --- old/vcrpy-6.0.2/vcrpy.egg-info/PKG-INFO 2024-10-07 15:02:37.000000000 +0200 +++ new/vcrpy-7.0.0/vcrpy.egg-info/PKG-INFO 2024-12-31 01:05:46.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vcrpy -Version: 6.0.2 +Version: 7.0.0 Summary: Automatically mock your HTTP interactions to simplify and speed up testing Home-page: https://github.com/kevin1024/vcrpy Author: Kevin McCarthy @@ -11,18 +11,18 @@ Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Testing Classifier: Topic :: Internet :: WWW/HTTP Classifier: License :: OSI Approved :: MIT License -Requires-Python: >=3.8 +Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE.txt Requires-Dist: PyYAML
participants (1)
-
Source-Sync