14
0
Files
python-urllib3/python-urllib3.spec

146 lines
5.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-urllib3
#
# Copyright (c) 2025 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/
- Update to version 1.8: * Improved url parsing in urllib3.util.parse_url (properly parse '@' in username, and blank ports like 'hostname:'). * New urllib3.connection module which contains all the HTTPConnection objects. * Several urllib3.util.Timeout-related fixes. Also changed constructor signature to a more sensible order. [Backwards incompatible] (Issues #252, #262, #263) * Use backports.ssl_match_hostname if it's installed. (Issue #274) * Added .tell() method to urllib3.response.HTTPResponse which returns the number of bytes read so far. (Issue #277) * Support for platforms without threading. (Issue #289) * Expand default-port comparison in HTTPConnectionPool.is_same_host to allow a pool with no specified port to be considered equal to to an HTTP/HTTPS url with port 80/443 explicitly provided. (Issue #305) * Improved default SSL/TLS settings to avoid vulnerabilities. (Issue #309) * Fixed urllib3.poolmanager.ProxyManager not retrying on connect errors. (Issue #310) * Disable Nagle's Algorithm on the socket for non-proxies. A subset of requests will send the entire HTTP request ~200 milliseconds faster; however, some of the resulting TCP packets will be smaller. (Issue #254) * Increased maximum number of SubjectAltNames in urllib3.contrib.pyopenssl from the default 64 to 1024 in a single certificate. (Issue #318) * Headers are now passed and stored as a custom urllib3.collections_.HTTPHeaderDict object rather than a plain dict. (Issue #329, #333) * Headers no longer lose their case on Python 3. (Issue #236) * urllib3.contrib.pyopenssl now uses the operating system's default CA certificates on inject. (Issue #332) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=3
2014-03-20 15:22:29 +00:00
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-urllib3%{psuffix}
Version: 2.5.0
Release: 0
Summary: HTTP library with thread-safe connection pooling, file post, and more
- Update to version 1.8: * Improved url parsing in urllib3.util.parse_url (properly parse '@' in username, and blank ports like 'hostname:'). * New urllib3.connection module which contains all the HTTPConnection objects. * Several urllib3.util.Timeout-related fixes. Also changed constructor signature to a more sensible order. [Backwards incompatible] (Issues #252, #262, #263) * Use backports.ssl_match_hostname if it's installed. (Issue #274) * Added .tell() method to urllib3.response.HTTPResponse which returns the number of bytes read so far. (Issue #277) * Support for platforms without threading. (Issue #289) * Expand default-port comparison in HTTPConnectionPool.is_same_host to allow a pool with no specified port to be considered equal to to an HTTP/HTTPS url with port 80/443 explicitly provided. (Issue #305) * Improved default SSL/TLS settings to avoid vulnerabilities. (Issue #309) * Fixed urllib3.poolmanager.ProxyManager not retrying on connect errors. (Issue #310) * Disable Nagle's Algorithm on the socket for non-proxies. A subset of requests will send the entire HTTP request ~200 milliseconds faster; however, some of the resulting TCP packets will be smaller. (Issue #254) * Increased maximum number of SubjectAltNames in urllib3.contrib.pyopenssl from the default 64 to 1024 in a single certificate. (Issue #318) * Headers are now passed and stored as a custom urllib3.collections_.HTTPHeaderDict object rather than a plain dict. (Issue #329, #333) * Headers no longer lose their case on Python 3. (Issue #236) * urllib3.contrib.pyopenssl now uses the operating system's default CA certificates on inject. (Issue #332) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=3
2014-03-20 15:22:29 +00:00
License: MIT
URL: https://urllib3.readthedocs.org/
Accepting request 486170 from devel:languages:python:singlespec - merge python3 modifications - update for multipython build - update to 1.20: * Added support for waiting for I/O using selectors other than select, improving urllib3’s behaviour with large numbers of concurrent connections. (Pull #1001) * Updated the date for the system clock check. (Issue #1005) * ConnectionPools now correctly consider hostnames to be case-insensitive. (Issue #1032) * Outdated versions of PyOpenSSL now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Pull #1063) * Outdated versions of cryptography now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Issue #1044) * Automatically attempt to rewind a file-like body object when a request is retried or redirected. (Pull #1039) * Fix some bugs that occur when modules incautiously patch the queue module. (Pull #1061) * Prevent retries from occuring on read timeouts for which the request method was not in the method whitelist. (Issue #1059) * Changed the PyOpenSSL contrib module to lazily load idna to avoid unnecessarily bloating the memory of programs that don’t need it. (Pull #1076) * Add support for IPv6 literals with zone identifiers. (Pull #1013) * Added support for socks5h:// and socks4a:// schemes when working with SOCKS proxies, and controlled remote DNS appropriately. (Issue #1035) OBS-URL: https://build.opensuse.org/request/show/486170 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=25
2017-04-06 15:11:12 +00:00
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
# https://github.com/urllib3/urllib3/issues/3334
%define hypercorn_commit d1719f8c1570cbd8e6a3719ffdb14a4d72880abb
Source1: https://github.com/urllib3/hypercorn/archive/%{hypercorn_commit}/hypercorn-%{hypercorn_commit}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatch-vcs}
- Update to 2.0.1: * Fixed a socket leak when fingerprint or hostname verifications fail. * Fixed an error when HTTPResponse.read(0) was the first read call or when the internal response body buffer was otherwise empty. * Removed support for Python 2.7, 3.5, and 3.6. * Removed fallback on certificate commonName in match_hostname() function. * Removed support for Python with an ssl module compiled with LibreSSL, CiscoSSL, wolfSSL, and all other OpenSSL alternatives. * Removed support for OpenSSL versions earlier than 1.1.1. * Removed urllib3.contrib.appengine.AppEngineManager and support for Google App Engine Standard Environment. * Changed ssl_version to instead set the corresponding SSLContext.minimum_version and SSLContext.maximum_version values. * Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2 in line with Python 3.10. * Changed urllib3.util.create_urllib3_context to not override the system cipher suites with a default value. * Changed multipart/form-data header parameter formatting matches the WHATWG HTML Standard as of 2021-06-10. * Changed HTTPConnection.request() to always use lowercase chunk boundaries when sending requests with Transfer-Encoding: chunked. * Changed enforce_content_length default to True, preventing silent data loss when reading streamed responses. * Changed all parameters in the HTTPConnection and HTTPSConnection constructors to be keyword-only except host and port. * Changed HTTPConnection.getresponse() to set the socket timeout from HTTPConnection.timeout value before reading data from the socket. * Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX. * Changed TLS handshakes to use SSLContext.check_hostname when possible. * Changed the default blocksize to 16KB to match OpenSSL's default read OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=152
2023-05-03 06:50:37 +00:00
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
#!BuildIgnore: python-requests
Requires: ca-certificates-mozilla
Recommends: python-Brotli >= 1.0.9
Recommends: python-PySocks >= 1.7.1
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
Recommends: python-h2 >= 4
Recommends: python-zstandard >= 0.18
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module Brotli >= 1.0.9}
BuildRequires: %{python_module PySocks >= 1.7.1}
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
BuildRequires: %{python_module Quart >= 0.19}
BuildRequires: %{python_module cryptography >= 43}
BuildRequires: %{python_module flaky}
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
BuildRequires: %{python_module h2 >= 4.1}
BuildRequires: %{python_module httpx >= 0.25}
BuildRequires: %{python_module idna >= 3.7}
BuildRequires: %{python_module psutil}
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
BuildRequires: %{python_module pyOpenSSL >= 24.2}
BuildRequires: %{python_module pytest >= 7.4.0}
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
BuildRequires: %{python_module pytest-socket >= 0.7}
BuildRequires: %{python_module pytest-timeout >= 2.1.0}
BuildRequires: %{python_module pytest-xdist}
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
BuildRequires: %{python_module quart-trio >= 0.11}
BuildRequires: %{python_module trio >= 0.26}
BuildRequires: %{python_module trustme >= 0.9.0}
BuildRequires: %{python_module urllib3 >= %{version}}
- Update to 2.0.1: * Fixed a socket leak when fingerprint or hostname verifications fail. * Fixed an error when HTTPResponse.read(0) was the first read call or when the internal response body buffer was otherwise empty. * Removed support for Python 2.7, 3.5, and 3.6. * Removed fallback on certificate commonName in match_hostname() function. * Removed support for Python with an ssl module compiled with LibreSSL, CiscoSSL, wolfSSL, and all other OpenSSL alternatives. * Removed support for OpenSSL versions earlier than 1.1.1. * Removed urllib3.contrib.appengine.AppEngineManager and support for Google App Engine Standard Environment. * Changed ssl_version to instead set the corresponding SSLContext.minimum_version and SSLContext.maximum_version values. * Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2 in line with Python 3.10. * Changed urllib3.util.create_urllib3_context to not override the system cipher suites with a default value. * Changed multipart/form-data header parameter formatting matches the WHATWG HTML Standard as of 2021-06-10. * Changed HTTPConnection.request() to always use lowercase chunk boundaries when sending requests with Transfer-Encoding: chunked. * Changed enforce_content_length default to True, preventing silent data loss when reading streamed responses. * Changed all parameters in the HTTPConnection and HTTPSConnection constructors to be keyword-only except host and port. * Changed HTTPConnection.getresponse() to set the socket timeout from HTTPConnection.timeout value before reading data from the socket. * Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX. * Changed TLS handshakes to use SSLContext.check_hostname when possible. * Changed the default blocksize to 16KB to match OpenSSL's default read OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=152
2023-05-03 06:50:37 +00:00
BuildRequires: timezone
%else
Conflicts: python-urllib3 < 2
%endif
Accepting request 486170 from devel:languages:python:singlespec - merge python3 modifications - update for multipython build - update to 1.20: * Added support for waiting for I/O using selectors other than select, improving urllib3’s behaviour with large numbers of concurrent connections. (Pull #1001) * Updated the date for the system clock check. (Issue #1005) * ConnectionPools now correctly consider hostnames to be case-insensitive. (Issue #1032) * Outdated versions of PyOpenSSL now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Pull #1063) * Outdated versions of cryptography now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Issue #1044) * Automatically attempt to rewind a file-like body object when a request is retried or redirected. (Pull #1039) * Fix some bugs that occur when modules incautiously patch the queue module. (Pull #1061) * Prevent retries from occuring on read timeouts for which the request method was not in the method whitelist. (Issue #1059) * Changed the PyOpenSSL contrib module to lazily load idna to avoid unnecessarily bloating the memory of programs that don’t need it. (Pull #1076) * Add support for IPv6 literals with zone identifiers. (Pull #1013) * Added support for socks5h:// and socks4a:// schemes when working with SOCKS proxies, and controlled remote DNS appropriately. (Issue #1035) OBS-URL: https://build.opensuse.org/request/show/486170 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=25
2017-04-06 15:11:12 +00:00
%python_subpackages
%description
Highlights
- Re-use the same socket connection for multiple requests
(HTTPConnectionPool and HTTPSConnectionPool)
(with optional client-side certificate verification).
- File posting (encode_multipart_formdata).
- Built-in redirection and retries (optional).
- Supports gzip and deflate decoding.
- Thread-safe and sanity-safe.
- Works with AppEngine, gevent, and eventlib.
- Tested on Python 2.6+ and Python 3.3+, 100% unit test coverage.
- Small and easy to understand codebase perfect for extending and building upon.
For a more comprehensive solution, have a look at
Requests which is also powered by urllib3.
%prep
%autosetup -p1 -n urllib3-%{version}
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
# https://github.com/urllib3/urllib3/issues/3334
%if %{with test}
mkdir ../patched-hypercorn
tar -C ../patched-hypercorn -zxf %{SOURCE1}
%endif
find . -type f -exec chmod a-x '{}' \;
find . -name __pycache__ -type d -exec rm -fr {} +
%build
- Update to 2.0.1: * Fixed a socket leak when fingerprint or hostname verifications fail. * Fixed an error when HTTPResponse.read(0) was the first read call or when the internal response body buffer was otherwise empty. * Removed support for Python 2.7, 3.5, and 3.6. * Removed fallback on certificate commonName in match_hostname() function. * Removed support for Python with an ssl module compiled with LibreSSL, CiscoSSL, wolfSSL, and all other OpenSSL alternatives. * Removed support for OpenSSL versions earlier than 1.1.1. * Removed urllib3.contrib.appengine.AppEngineManager and support for Google App Engine Standard Environment. * Changed ssl_version to instead set the corresponding SSLContext.minimum_version and SSLContext.maximum_version values. * Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2 in line with Python 3.10. * Changed urllib3.util.create_urllib3_context to not override the system cipher suites with a default value. * Changed multipart/form-data header parameter formatting matches the WHATWG HTML Standard as of 2021-06-10. * Changed HTTPConnection.request() to always use lowercase chunk boundaries when sending requests with Transfer-Encoding: chunked. * Changed enforce_content_length default to True, preventing silent data loss when reading streamed responses. * Changed all parameters in the HTTPConnection and HTTPSConnection constructors to be keyword-only except host and port. * Changed HTTPConnection.getresponse() to set the socket timeout from HTTPConnection.timeout value before reading data from the socket. * Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX. * Changed TLS handshakes to use SSLContext.check_hostname when possible. * Changed the default blocksize to 16KB to match OpenSSL's default read OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=152
2023-05-03 06:50:37 +00:00
%pyproject_wheel
%install
%if !%{with test}
- Update to 2.0.1: * Fixed a socket leak when fingerprint or hostname verifications fail. * Fixed an error when HTTPResponse.read(0) was the first read call or when the internal response body buffer was otherwise empty. * Removed support for Python 2.7, 3.5, and 3.6. * Removed fallback on certificate commonName in match_hostname() function. * Removed support for Python with an ssl module compiled with LibreSSL, CiscoSSL, wolfSSL, and all other OpenSSL alternatives. * Removed support for OpenSSL versions earlier than 1.1.1. * Removed urllib3.contrib.appengine.AppEngineManager and support for Google App Engine Standard Environment. * Changed ssl_version to instead set the corresponding SSLContext.minimum_version and SSLContext.maximum_version values. * Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2 in line with Python 3.10. * Changed urllib3.util.create_urllib3_context to not override the system cipher suites with a default value. * Changed multipart/form-data header parameter formatting matches the WHATWG HTML Standard as of 2021-06-10. * Changed HTTPConnection.request() to always use lowercase chunk boundaries when sending requests with Transfer-Encoding: chunked. * Changed enforce_content_length default to True, preventing silent data loss when reading streamed responses. * Changed all parameters in the HTTPConnection and HTTPSConnection constructors to be keyword-only except host and port. * Changed HTTPConnection.getresponse() to set the socket timeout from HTTPConnection.timeout value before reading data from the socket. * Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX. * Changed TLS handshakes to use SSLContext.check_hostname when possible. * Changed the default blocksize to 16KB to match OpenSSL's default read OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=152
2023-05-03 06:50:37 +00:00
%pyproject_install
- Update to 2.0.1: * Fixed a socket leak when fingerprint or hostname verifications fail. * Fixed an error when HTTPResponse.read(0) was the first read call or when the internal response body buffer was otherwise empty. * Removed support for Python 2.7, 3.5, and 3.6. * Removed fallback on certificate commonName in match_hostname() function. * Removed support for Python with an ssl module compiled with LibreSSL, CiscoSSL, wolfSSL, and all other OpenSSL alternatives. * Removed support for OpenSSL versions earlier than 1.1.1. * Removed urllib3.contrib.appengine.AppEngineManager and support for Google App Engine Standard Environment. * Changed ssl_version to instead set the corresponding SSLContext.minimum_version and SSLContext.maximum_version values. * Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2 in line with Python 3.10. * Changed urllib3.util.create_urllib3_context to not override the system cipher suites with a default value. * Changed multipart/form-data header parameter formatting matches the WHATWG HTML Standard as of 2021-06-10. * Changed HTTPConnection.request() to always use lowercase chunk boundaries when sending requests with Transfer-Encoding: chunked. * Changed enforce_content_length default to True, preventing silent data loss when reading streamed responses. * Changed all parameters in the HTTPConnection and HTTPSConnection constructors to be keyword-only except host and port. * Changed HTTPConnection.getresponse() to set the socket timeout from HTTPConnection.timeout value before reading data from the socket. * Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX. * Changed TLS handshakes to use SSLContext.check_hostname when possible. * Changed the default blocksize to 16KB to match OpenSSL's default read OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=152
2023-05-03 06:50:37 +00:00
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
# https://github.com/urllib3/urllib3/issues/3334
export PYTHONPATH="$PWD/../patched-hypercorn/hypercorn-%{hypercorn_commit}/src"
# gh#urllib3/urllib3#2109
export CI="true"
# skip some randomly failing tests (mostly on i586, but sometimes they fail on other architectures)
skiplist="test_ssl_read_timeout or test_ssl_failed_fingerprint_verification or test_ssl_custom_validation_failure_terminates or test_close_after_handshake"
# gh#urllib3/urllib3#1752 and others: upstream's way of checking that the build
# system has a correct system time breaks (re-)building the package after too
# many months have passed since the last release.
skiplist+=" or test_recent_date"
# too slow to run in obs (checks 2GiB of data)
skiplist+=" or test_requesting_large_resources_via_ssl"
# Try to access external evil.com
skiplist+=" or test_deprecated_no_scheme"
# weird threading issues on OBS runners
skiplist+=" or test_http2_probe_blocked_per_thread"
# flaky test, works locally but fails in OBS with
# TypeError: _wrap_bio() argument 'incoming' must be _ssl.MemoryBIO, not _ssl.MemoryBIO
skiplist+=" or test_https_proxy_forwarding_for_https or test_https_headers_forwarding_for_https"
%pytest -W ignore::DeprecationWarning %{?jobs:-n %jobs} -k "not (${skiplist})" --ignore test/with_dummyserver/test_socketlevel.py
%endif
%if ! %{with test}
Accepting request 486170 from devel:languages:python:singlespec - merge python3 modifications - update for multipython build - update to 1.20: * Added support for waiting for I/O using selectors other than select, improving urllib3’s behaviour with large numbers of concurrent connections. (Pull #1001) * Updated the date for the system clock check. (Issue #1005) * ConnectionPools now correctly consider hostnames to be case-insensitive. (Issue #1032) * Outdated versions of PyOpenSSL now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Pull #1063) * Outdated versions of cryptography now cause the PyOpenSSL contrib module to fail when it is injected, rather than at first use. (Issue #1044) * Automatically attempt to rewind a file-like body object when a request is retried or redirected. (Pull #1039) * Fix some bugs that occur when modules incautiously patch the queue module. (Pull #1061) * Prevent retries from occuring on read timeouts for which the request method was not in the method whitelist. (Issue #1059) * Changed the PyOpenSSL contrib module to lazily load idna to avoid unnecessarily bloating the memory of programs that don’t need it. (Pull #1076) * Add support for IPv6 literals with zone identifiers. (Pull #1013) * Added support for socks5h:// and socks4a:// schemes when working with SOCKS proxies, and controlled remote DNS appropriately. (Issue #1035) OBS-URL: https://build.opensuse.org/request/show/486170 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=25
2017-04-06 15:11:12 +00:00
%files %{python_files}
%license LICENSE.txt
- Update to 2.0.1: * Fixed a socket leak when fingerprint or hostname verifications fail. * Fixed an error when HTTPResponse.read(0) was the first read call or when the internal response body buffer was otherwise empty. * Removed support for Python 2.7, 3.5, and 3.6. * Removed fallback on certificate commonName in match_hostname() function. * Removed support for Python with an ssl module compiled with LibreSSL, CiscoSSL, wolfSSL, and all other OpenSSL alternatives. * Removed support for OpenSSL versions earlier than 1.1.1. * Removed urllib3.contrib.appengine.AppEngineManager and support for Google App Engine Standard Environment. * Changed ssl_version to instead set the corresponding SSLContext.minimum_version and SSLContext.maximum_version values. * Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2 in line with Python 3.10. * Changed urllib3.util.create_urllib3_context to not override the system cipher suites with a default value. * Changed multipart/form-data header parameter formatting matches the WHATWG HTML Standard as of 2021-06-10. * Changed HTTPConnection.request() to always use lowercase chunk boundaries when sending requests with Transfer-Encoding: chunked. * Changed enforce_content_length default to True, preventing silent data loss when reading streamed responses. * Changed all parameters in the HTTPConnection and HTTPSConnection constructors to be keyword-only except host and port. * Changed HTTPConnection.getresponse() to set the socket timeout from HTTPConnection.timeout value before reading data from the socket. * Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX. * Changed TLS handshakes to use SSLContext.check_hostname when possible. * Changed the default blocksize to 16KB to match OpenSSL's default read OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=152
2023-05-03 06:50:37 +00:00
%doc CHANGES.rst README.md
- Update to version 1.8: * Improved url parsing in urllib3.util.parse_url (properly parse '@' in username, and blank ports like 'hostname:'). * New urllib3.connection module which contains all the HTTPConnection objects. * Several urllib3.util.Timeout-related fixes. Also changed constructor signature to a more sensible order. [Backwards incompatible] (Issues #252, #262, #263) * Use backports.ssl_match_hostname if it's installed. (Issue #274) * Added .tell() method to urllib3.response.HTTPResponse which returns the number of bytes read so far. (Issue #277) * Support for platforms without threading. (Issue #289) * Expand default-port comparison in HTTPConnectionPool.is_same_host to allow a pool with no specified port to be considered equal to to an HTTP/HTTPS url with port 80/443 explicitly provided. (Issue #305) * Improved default SSL/TLS settings to avoid vulnerabilities. (Issue #309) * Fixed urllib3.poolmanager.ProxyManager not retrying on connect errors. (Issue #310) * Disable Nagle's Algorithm on the socket for non-proxies. A subset of requests will send the entire HTTP request ~200 milliseconds faster; however, some of the resulting TCP packets will be smaller. (Issue #254) * Increased maximum number of SubjectAltNames in urllib3.contrib.pyopenssl from the default 64 to 1024 in a single certificate. (Issue #318) * Headers are now passed and stored as a custom urllib3.collections_.HTTPHeaderDict object rather than a plain dict. (Issue #329, #333) * Headers no longer lose their case on Python 3. (Issue #236) * urllib3.contrib.pyopenssl now uses the operating system's default CA certificates on inject. (Issue #332) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=3
2014-03-20 15:22:29 +00:00
%{python_sitelib}/urllib3
- Update to 2.2.3: * Features + Added support for Python 3.13. * Bugfixes + Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. + Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. + Fixed a crash where certain standard library hash functions were absent in restricted environments. + Added the Proxy-Authorization header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via Retry.remove_headers_on_redirect. + Allowed passing negative integers as amt to read methods of http.client.HTTPResponse as an alternative to None. + Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. + Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. + Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. + Changed ProtocolError to be more verbose on incomplete reads with excess content. + Added support for HTTPResponse.read1() method. + Fixed issue where requests against urls with trailing dots were failing due to SSL errors when using proxy. + Fixed HTTPConnection.proxy_is_verified and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=180
2024-09-24 05:07:08 +00:00
%{python_sitelib}/urllib3-%{version}.dist-info
%endif
- Update to version 1.8: * Improved url parsing in urllib3.util.parse_url (properly parse '@' in username, and blank ports like 'hostname:'). * New urllib3.connection module which contains all the HTTPConnection objects. * Several urllib3.util.Timeout-related fixes. Also changed constructor signature to a more sensible order. [Backwards incompatible] (Issues #252, #262, #263) * Use backports.ssl_match_hostname if it's installed. (Issue #274) * Added .tell() method to urllib3.response.HTTPResponse which returns the number of bytes read so far. (Issue #277) * Support for platforms without threading. (Issue #289) * Expand default-port comparison in HTTPConnectionPool.is_same_host to allow a pool with no specified port to be considered equal to to an HTTP/HTTPS url with port 80/443 explicitly provided. (Issue #305) * Improved default SSL/TLS settings to avoid vulnerabilities. (Issue #309) * Fixed urllib3.poolmanager.ProxyManager not retrying on connect errors. (Issue #310) * Disable Nagle's Algorithm on the socket for non-proxies. A subset of requests will send the entire HTTP request ~200 milliseconds faster; however, some of the resulting TCP packets will be smaller. (Issue #254) * Increased maximum number of SubjectAltNames in urllib3.contrib.pyopenssl from the default 64 to 1024 in a single certificate. (Issue #318) * Headers are now passed and stored as a custom urllib3.collections_.HTTPHeaderDict object rather than a plain dict. (Issue #329, #333) * Headers no longer lose their case on Python 3. (Issue #236) * urllib3.contrib.pyopenssl now uses the operating system's default CA certificates on inject. (Issue #332) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=3
2014-03-20 15:22:29 +00:00
%changelog