Sync from SUSE:SLFO:Main python-mocket revision eb32107bd9f4ce9114af1f044720f719

This commit is contained in:
Adrian Schröter 2024-09-25 17:15:08 +02:00
parent f56b23df32
commit 3e6bcf6aa2
4 changed files with 89 additions and 15 deletions

BIN
mocket-3.11.1.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
mocket-3.12.8.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,72 @@
-------------------------------------------------------------------
Tue Jun 4 08:17:14 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 3.12.8:
* Fix regression
* Begin mypy type-checking
* Make Mocket work with big requests
-------------------------------------------------------------------
Sun May 5 12:58:39 UTC 2024 - Sebastian Wagner <sebix@sebix.at>
- Update to version 3.12.6:
- Strict mode check should accept a location as str by @mindflayer in #230
- Update to version 3.12.5:
- Add getblocking() method by @mindflayer in #228
-------------------------------------------------------------------
Tue Feb 6 12:22:14 UTC 2024 - Sebastian Wagner <sebix@sebix.at>
- Update to version 3.12.4:
* When creating true socket connection, use host and port stored in instance variables, not in the Mocket class's variable by @ento in #222
* Switching to Compose v2 by @mindflayer in #223
* Add allowed locations (whitelist) for STRICT mode by @mindflayer (refactoring of #214 from @ento) in #224
-------------------------------------------------------------------
Mon Jan 22 08:43:05 UTC 2024 - Sebastian Wagner <sebix@sebix.at>
- add pytest-asyncio and psutil to test build requirements
- skip test_truesendall_with_dump_from_recording and test_no_dangling_fds as they require internet connection
-------------------------------------------------------------------
Sat Jan 20 19:40:29 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 3.12.3:
* Fixes for allowing making a mixture of unmocked and mocked
HTTPS requests using aiohttp
* Merging external contribution
* Adding testcase for proving #209 was fixed
-------------------------------------------------------------------
Sat Jan 13 20:23:20 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 3.12.2:
* Pook is now compatible with modern Python versions
* Excluding venvs from dist packages
-------------------------------------------------------------------
Fri Dec 29 16:14:00 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Fix check that was testing the version package of python3-httpx.
That's not available in SLE so we now use python311-httpx
instead which allows the package to build fine in SLE's Python
3.11 stack.
-------------------------------------------------------------------
Tue Dec 26 15:49:11 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Tue Oct 31 17:34:29 UTC 2023 - Sebastian Wagner <sebix@sebix.at>
- Update to version 3.12.0:
* Support for Python 3.12 (#204)
* Fix for Python 3.12
* Getting rid of Python 3.7, since it's not supported anymore.
* Precommit hooks' autoupdate.
* Disabling `aiohttp` for testing Python 3.12.
-------------------------------------------------------------------
Tue Oct 24 10:15:32 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
@ -341,7 +410,7 @@ Tue Aug 11 07:17:16 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
* This version ships the change to support the libmagic wrapper
distributed with file's command.
-------------------------------------------------------------------
-------------------------------------------------------------------
Tue Aug 11 07:08:04 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to multibuild as we create cycle with python-pook otherwise

View File

@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-mocket
#
# 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
@ -25,15 +25,18 @@
%bcond_with test
%endif
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-mocket%{psuffix}
Version: 3.11.1
Version: 3.12.8
Release: 0
Summary: Python socket mock framework
License: BSD-3-Clause
URL: https://github.com/mindflayer/python-mocket
Source0: https://files.pythonhosted.org/packages/source/m/mocket/mocket-%{version}.tar.gz
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-decorator >= 4
@ -51,6 +54,8 @@ BuildRequires: %{python_module gevent}
BuildRequires: %{python_module httptools}
BuildRequires: %{python_module mocket = %{version}}
BuildRequires: %{python_module pook >= 0.2.1}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module redis}
BuildRequires: %{python_module requests}
@ -67,19 +72,19 @@ included, with gevent/asyncio/SSL support.
%prep
%autosetup -p1 -n mocket-%{version}
sed -i '/cov/ d' setup.cfg
sed -i '/pipenv/ d' setup.py
#sed -i '/cov/ d' setup.cfg
#sed -i '/pipenv/ d' setup.py
%build
%if !%{with test}
export LANG=en_US.UTF-8
%python_build
%pyproject_wheel
%endif
%install
%if !%{with test}
export LANG=en_US.UTF-8
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@ -99,9 +104,9 @@ trap "kill $victims || true" EXIT
sleep 2
# Checks the ability to record a real request and response. Not available inside obs.
donttest="test_asyncio_record_replay"
donttest="test_asyncio_record_replay or test_truesendall_with_dump_from_recording or test_no_dangling_fds"
# The reference recording has different headers in this case
%if %{pkg_vcmp python3-httpx < 0.23}
%if %{pkg_vcmp python311-httpx < 0.23}
donttest="$donttest or test_truesendall_with_dump_from_recording"
%endif
# these fail after the python 3.11 patches
@ -114,7 +119,7 @@ donttest="$donttest or test_truesendall_with_dump_from_recording"
%doc README.rst
%license LICENSE
%{python_sitelib}/mocket
%{python_sitelib}/mocket-%{version}-py*.egg-info
%{python_sitelib}/mocket-%{version}.dist-info
%endif
%changelog