commit ea4888d48f2fa187ab1473f264daf3a8e87aff61b8f6651b3dc555e75c5086b5 Author: Dirk Mueller Date: Sun Aug 18 17:18:39 2024 +0000 - update to 1.1.0: * Fixed an issue related to the leak of httpserver state between the tests when httpserver is destructed before the other fixtures. #352 * Fix pytest-httpserver's own tests related to log querying. No functional changes in pytest-httpserver code itself. #345 * New methods added to query for matching requests in the log. * Threading support to serve requests in parallel Optional[str], str], bool]`` will be accepted also. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-httpserver?expand=0&rev=28 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pytest_httpserver-1.0.10.tar.gz b/pytest_httpserver-1.0.10.tar.gz new file mode 100644 index 0000000..377e4eb --- /dev/null +++ b/pytest_httpserver-1.0.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77b9fbc2eb0a129cfbbacc8fe57e8cafe071d506489f31fe31e62f1b332d9905 +size 60446 diff --git a/pytest_httpserver-1.1.0.tar.gz b/pytest_httpserver-1.1.0.tar.gz new file mode 100644 index 0000000..37dbd6c --- /dev/null +++ b/pytest_httpserver-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b1cb0199e2ed551b1b94d43f096863bbf6ae5bcd7c75c2c06845e5ce2dc8701 +size 67210 diff --git a/python-pytest-httpserver.changes b/python-pytest-httpserver.changes new file mode 100644 index 0000000..ea28a27 --- /dev/null +++ b/python-pytest-httpserver.changes @@ -0,0 +1,151 @@ +------------------------------------------------------------------- +Sun Aug 18 17:18:13 UTC 2024 - Dirk Müller + +- update to 1.1.0: + * Fixed an issue related to the leak of httpserver state + between the tests when httpserver is destructed before the + other fixtures. #352 + * Fix pytest-httpserver's own tests related to log querying. No + functional changes in pytest-httpserver code itself. #345 + * New methods added to query for matching requests in the log. + * Threading support to serve requests in parallel + +------------------------------------------------------------------- +Fri Mar 1 10:19:34 UTC 2024 - Dirk Müller + +- update to 1.0.10: + * When there's no handler for the request, add more details to + the response sent by the server about the request to help + debugging. + * Use ruff for linting. It includes some source code changes + which should not introduce functional changes, or API + changes. + * Add __repr__ to RequestHandler object so when it is compared + (eg. with the log attribute of the server) it will show the + matcher parameters. + +------------------------------------------------------------------- +Wed May 31 19:41:54 UTC 2023 - Dirk Müller + +- update to 1.0.8: + * Bug Fixes + +------------------------------------------------------------------- +Mon May 22 21:17:53 UTC 2023 - Dirk Müller + +- update to 1.0.7: + * With werkzeug 2.3.x the headers type has been updated to not + allow integers as header values. This restriction followed up + in pytest-httpserver. + * Python versions earlier than 3.8 have been deprecated in + order to support the latest werkzeug. + * Type hinting for header_value_matcher has been fixed. From + now, specifying a callable as ``Callable[[str, + Optional[str], str], bool]`` will be accepted also. + Providing a ``HeaderValueMatcher`` object will be also + accepted as before, as it provides the same callable signature + * Fix Werkzeug deprecation warning about + ``parse_authorization_header`` call. + * Replace ``parse_authorization_header`` with + ``Authorization.from_header`` as suggested. This fix should + not introduce any functional change for the users. + * Fix Werkzeug deprecation warning about + ``werkzeug.urls.url_decode`` call. This call has been changed + to ``urllib.parse.parse_qsl`` in the implementation. + This fix should not introduce any functional change for the + users. + +------------------------------------------------------------------- +Thu May 4 22:25:29 UTC 2023 - Dirk Müller + +- update to 1.0.6: + * Add a new way of running tests with the blocking mode. In + this mode, the http server is synchronized to the main thread + and the client code is run in a separate thread. + * Python version classifier updated in pyproject.toml (which + updates pypi also) + +------------------------------------------------------------------- +Fri Apr 21 12:31:43 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:44:04 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Thu Aug 18 19:39:55 UTC 2022 - Ben Greiner + +- Clean specfile: remove code coverage checker + +------------------------------------------------------------------- +Mon Aug 15 15:50:47 UTC 2022 - Ben Greiner + +- Update to 1.0.5 + * Packaging of sdist and the wheel fixed by adding the extra + files only to the sdist and not to the wheel. +- Release 1.0.4 + * Fixed type hinting of HeaderValueMatcher.DEFAULT_MATCHERS, + which did not allow modifications, however it is explicitly + allowed in the documentation. + * Version of flake8 library updated to require 4.0.0+ at minimum. + This is required to make flake8 working on recent python + versions. +- Release 1.0.3 + * Additional type hints improvements to make the library more + mypy compliant. Imports in __init__.py have been updated to + indicate that this is a namespace package. + * Package deployment and CI has been migrated to poetry. + poetry.lock will be kept up to date. Make target "quick-test" + renamed to "test". Also, minor adjustments were made regarding + documentation generation. Make targets should be identical. + Build results like sdist, and wheel are almost identical to the + one which was made by setuptools. + +------------------------------------------------------------------- +Fri Dec 17 13:53:27 UTC 2021 - pgajdos@suse.com + +- pytest-runner is not required for build + +------------------------------------------------------------------- +Wed Dec 8 09:16:17 UTC 2021 - pgajdos@suse.com + +- version update to 1.0.2 + **Breaking change**: The scope of ``httpserver_listen_address`` fixture changed from **function** + to **session**. This is a requirement to implement the other features listed + in this release. See the `upgrade guide + `_ for the + details. + * many other changes, see CHANGES.rst + +------------------------------------------------------------------- +Thu Aug 29 04:48:45 UTC 2019 - Bernhard Wiedemann + +- Update to 0.3.4 + * renew certs expiring 2019-09-03 + +------------------------------------------------------------------- +Mon Aug 26 05:23:14 UTC 2019 - Jan Engelhardt + +- Use slightly more detailed description. + +------------------------------------------------------------------- +Thu Aug 1 09:06:38 UTC 2019 - Tomáš Chvátal + +- Update to 0.3.3: + * Besides bytes and string, dict and MultiDict objects can be specified as query_string + * Add more files to source distribution (sdist). It now contains tests, assets, examples and other files + +------------------------------------------------------------------- +Fri Jul 26 13:51:39 UTC 2019 - Tomáš Chvátal + +- Update to 0.3.1: + * various bugfixes + * various documentation updates + +------------------------------------------------------------------- +Tue Jul 23 20:54:06 UTC 2019 - Todd R + +- Initial version diff --git a/python-pytest-httpserver.spec b/python-pytest-httpserver.spec new file mode 100644 index 0000000..4d72ab8 --- /dev/null +++ b/python-pytest-httpserver.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-pytest-httpserver +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-pytest-httpserver +Version: 1.1.0 +Release: 0 +Summary: A HTTP server for pytest +License: MIT +Group: Development/Languages/Python +URL: https://www.github.com/csernazs/pytest-httpserver +Source: https://files.pythonhosted.org/packages/source/p/pytest_httpserver/pytest_httpserver-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry-core} +BuildRequires: %{python_module toml >= 0.10} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-Werkzeug >= 2 +Requires: python-pytest +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Werkzeug >= 2} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +# /SECTION +%python_subpackages + +%description +This library is for testing HTTP clients without contacting the real +HTTP server. In other words, it is a fake HTTP server which is +accessible via localhost can be started with the pre-defined expected +HTTP requests and their responses. + +%prep +%setup -q -n pytest_httpserver-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/pytest_httpserver +%{python_sitelib}/pytest_httpserver-%{version}*-info + +%changelog