15
0
forked from pool/python-WebOb
Files
python-WebOb/python-WebOb.spec

90 lines
2.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-WebOb
#
# Copyright (c) 2023 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.
- Spec cleanup: * Simplified macro usage * Remove unneeded runtime requirement on python-nose * Run testsuite - Update to version 1.2b2: * Fix request.cookies.get('name', 'default'). Previously default was ignored. - Changes from version 1.2b1: * Mutating the request.cookies property now reflects the mutations into the HTTP_COOKIES environ header. * Response.etag = (tag, False) sets weak etag. * Range only parses single range now. * Range.satisfiable(..) is gone. * Accept.best_matches() is gone; use list(request.accept) or request.accept.best_match(..) instead (applies to all Accept-* headers) or similar with request.accept_language. * Response.request and Response.environ attrs are undeprecated and no longer raise exceptions when used. These can also be passed to the Response constructor. This is to support codebases that pass them to the constructor or assign them to a response instance. However, some behavior differences from 1.1 exist. In particular, synchronization is no longer done between environ and request attribute properties of Response; you may pass either to the constructor (or both) or assign one or the other or both, but they wont be managed specially and will remain the same over the lifetime of the response just as you passed them. Default values for both request and environ on any given response are None now. * Undeprecated uscript_name and upath_info. * For backwards compatibility purposes, switch req.script_name and path_info back again to contain “raw” undecoded native strings rather than text. Use uscript_name and upath_info to get the text version of SCRIPT_NAME and PATH_INFO. * Don’t raise an exception if unicode_errors or decode_param_names is passed to the Request constructor. Instead, emit a warning. For benefit of Pylons 1.X, which passes both. * Don’t raise an exception if HTTPException.exception is used; instead emit a warning. For benefit of Pylons 1.X, which uses it. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebOb?expand=0&rev=5
2012-01-31 13:46:38 +00:00
- update to 1.8.5: - Fixed one last remaining invalid escape sequence in a docstring. - Response.content_type now accepts unicode strings on Python 2 and encodes them to latin-1. - Accept header classes now support a .copy() function that may be used to create a copy. This allows ``create_accept_header`` and other like functions to accept an pre-existing Accept header. - Some backslashes introduced with the new accept handling code were causing DeprecationWarnings upon compiling the source to pyc files, all of the backslashes have been reigned in as appropriate, and users should no longer see DeprecationWarnings for invalid escape sequence. - ``acceptparse.AcceptValidHeader``, ``acceptparse.AcceptInvalidHeader``, and ``acceptparse.AcceptNoHeader`` will now always ignore offers that do not match the required media type grammar when calling ``.acceptable_offers()``. Previous versions raised a ``ValueError`` for invalid offers in ``AcceptValidHeader`` and returned them as acceptable in the others. - Add Request.remote_host, exposing REMOTE_HOST environment variable. - Added ``acceptparse.Accept.parse_offer`` to codify what types of offers are compatible with ``acceptparse.AcceptValidHeader.acceptable_offers``, ``acceptparse.AcceptMissingHeader.acceptable_offers``, and ``acceptparse.AcceptInvalidHeader.acceptable_offers``. This API also normalizes the offer with lowercased type/subtype and parameter names. - SameSite may now be passed as str or bytes to `Response.set_cookie` and `cookies.make_cookie`. This was an oversight as all other arguments would be correctly coerced before being serialized. - acceptparse.MIMEAccept which is deprecated in WebOb 1.8.0 made a backwards incompatible change that led to it raising on an invalid Accept header. This behaviour has now been reversed, as well as some other fixes to allow MIMEAccept to behave more like the old version. - ``request.POST`` now supports any requests with the appropriate OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebOb?expand=0&rev=53
2019-01-07 09:57:14 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-WebOb
Version: 1.8.7
Release: 0
Summary: WSGI request and response object
- Spec cleanup: * Simplified macro usage * Remove unneeded runtime requirement on python-nose * Run testsuite - Update to version 1.2b2: * Fix request.cookies.get('name', 'default'). Previously default was ignored. - Changes from version 1.2b1: * Mutating the request.cookies property now reflects the mutations into the HTTP_COOKIES environ header. * Response.etag = (tag, False) sets weak etag. * Range only parses single range now. * Range.satisfiable(..) is gone. * Accept.best_matches() is gone; use list(request.accept) or request.accept.best_match(..) instead (applies to all Accept-* headers) or similar with request.accept_language. * Response.request and Response.environ attrs are undeprecated and no longer raise exceptions when used. These can also be passed to the Response constructor. This is to support codebases that pass them to the constructor or assign them to a response instance. However, some behavior differences from 1.1 exist. In particular, synchronization is no longer done between environ and request attribute properties of Response; you may pass either to the constructor (or both) or assign one or the other or both, but they wont be managed specially and will remain the same over the lifetime of the response just as you passed them. Default values for both request and environ on any given response are None now. * Undeprecated uscript_name and upath_info. * For backwards compatibility purposes, switch req.script_name and path_info back again to contain “raw” undecoded native strings rather than text. Use uscript_name and upath_info to get the text version of SCRIPT_NAME and PATH_INFO. * Don’t raise an exception if unicode_errors or decode_param_names is passed to the Request constructor. Instead, emit a warning. For benefit of Pylons 1.X, which passes both. * Don’t raise an exception if HTTPException.exception is used; instead emit a warning. For benefit of Pylons 1.X, which uses it. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebOb?expand=0&rev=5
2012-01-31 13:46:38 +00:00
License: MIT
Group: Development/Languages/Python
URL: http://webob.org/
Source: https://files.pythonhosted.org/packages/source/W/WebOb/WebOb-%{version}.tar.gz
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# Documentation requirements:
BuildRequires: fdupes
BuildRequires: python3-Sphinx
BuildArch: noarch
%ifpython2
# We need SSL support
BuildRequires: python3
Requires: python3
Obsoletes: python3-webob < %{version}
Provides: python3-webob = %{version}
%endif
%python_subpackages
%description
WebOb provides wrappers around the WSGI request environment, and an
object to help create WSGI responses.
The objects map much of the specified behavior of HTTP, including
header parsing and accessors for other standard parts of the
environment.
%if 0%{?suse_version} > 1500
%package -n python-WebOb-doc
Summary: WSGI request and response object - Documentation
Group: Documentation/HTML
Provides: %{python_module WebOb-doc = %{version}}
%description -n python-WebOb-doc
This package contains documentation files for %{name}.
%endif
%prep
%setup -q -n WebOb-%{version}
# gh#Pylons/webob#390 -- Thread.is_alive is present since Python 2.6, Thread.isAlive was removed in 3.9.
sed -i 's/worker.isAlive/worker.is_alive/' tests/conftest.py
%build
%python_build
PYTHONPATH=./src sphinx-build -b html docs build/sphinx/html && rm build/sphinx/html/.buildinfo
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%license docs/license.txt
%doc CHANGES.txt README.rst
%{python_sitelib}/webob
%{python_sitelib}/WebOb-%{version}*-info
%if 0%{?suse_version} > 1500
%files -n python-WebOb-doc
%endif
%doc build/sphinx/html
%changelog