Mock Version: 4.1 Mock Version: 4.1 Mock Version: 4.1 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-pytest-httpbin.spec'], chrootPath='/var/lib/mock/dist-oc9-epol-build-86303-57699/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-pytest-httpbin.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch Wrote: /builddir/build/SRPMS/python-pytest-httpbin-2.0.0-1.oc9.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-pytest-httpbin.spec'], chrootPath='/var/lib/mock/dist-oc9-epol-build-86303-57699/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=991gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-pytest-httpbin.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.1hDtbd + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf pytest-httpbin-2.0.0 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/v2.0.0.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd pytest-httpbin-2.0.0 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Vyd2lU + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd pytest-httpbin-2.0.0 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' running build running build_py creating build creating build/lib creating build/lib/pytest_httpbin copying pytest_httpbin/certs.py -> build/lib/pytest_httpbin copying pytest_httpbin/__init__.py -> build/lib/pytest_httpbin copying pytest_httpbin/version.py -> build/lib/pytest_httpbin copying pytest_httpbin/plugin.py -> build/lib/pytest_httpbin copying pytest_httpbin/serve.py -> build/lib/pytest_httpbin running egg_info creating pytest_httpbin.egg-info writing pytest_httpbin.egg-info/PKG-INFO writing dependency_links to pytest_httpbin.egg-info/dependency_links.txt writing entry points to pytest_httpbin.egg-info/entry_points.txt writing requirements to pytest_httpbin.egg-info/requires.txt writing top-level names to pytest_httpbin.egg-info/top_level.txt writing manifest file 'pytest_httpbin.egg-info/SOURCES.txt' reading manifest file 'pytest_httpbin.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pytest_httpbin.egg-info/SOURCES.txt' /usr/lib/python3.11/site-packages/setuptools/command/build_py.py:201: _Warning: Package 'pytest_httpbin.certs' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'pytest_httpbin.certs' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'pytest_httpbin.certs' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'pytest_httpbin.certs' to be distributed and are already explicitly excluding 'pytest_httpbin.certs' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) creating build/lib/pytest_httpbin/certs copying pytest_httpbin/certs/cacert.pem -> build/lib/pytest_httpbin/certs copying pytest_httpbin/certs/cert.pem -> build/lib/pytest_httpbin/certs copying pytest_httpbin/certs/key.pem -> build/lib/pytest_httpbin/certs + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.yg2fg4 + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch ++ dirname /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch + cd pytest-httpbin-2.0.0 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch running install /usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. Follow the current Python packaging guidelines when building Python RPM packages. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html and https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ for details. ******************************************************************************** !! self.initialize_options() running install_lib creating /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr creating /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib creating /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11 creating /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages creating /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin copying build/lib/pytest_httpbin/certs.py -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin copying build/lib/pytest_httpbin/__init__.py -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin copying build/lib/pytest_httpbin/version.py -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin creating /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/certs copying build/lib/pytest_httpbin/certs/key.pem -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/certs copying build/lib/pytest_httpbin/certs/cert.pem -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/certs copying build/lib/pytest_httpbin/certs/cacert.pem -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/certs copying build/lib/pytest_httpbin/plugin.py -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin copying build/lib/pytest_httpbin/serve.py -> /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin byte-compiling /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/certs.py to certs.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/__init__.py to __init__.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/version.py to version.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/plugin.py to plugin.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin/serve.py to serve.cpython-311.pyc writing byte-compilation script '/tmp/tmpu33o5xj3.py' /usr/bin/python3 /tmp/tmpu33o5xj3.py removing /tmp/tmpu33o5xj3.py running install_egg_info running egg_info writing pytest_httpbin.egg-info/PKG-INFO writing dependency_links to pytest_httpbin.egg-info/dependency_links.txt writing entry points to pytest_httpbin.egg-info/entry_points.txt writing requirements to pytest_httpbin.egg-info/requires.txt writing top-level names to pytest_httpbin.egg-info/top_level.txt reading manifest file 'pytest_httpbin.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pytest_httpbin.egg-info/SOURCES.txt' Copying pytest_httpbin.egg-info to /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11/site-packages/pytest_httpbin-2.0.0-py3.11.egg-info running install_scripts + rm -rfv /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/bin/__pycache__ + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 2.0.0-1.oc9 --unique-debug-suffix -2.0.0-1.oc9.noarch --unique-debug-src-base python-pytest-httpbin-2.0.0-1.oc9.noarch -S debugsourcefiles.list /builddir/build/BUILD/pytest-httpbin-2.0.0 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/OpenCloudOS/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/OpenCloudOS/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/OpenCloudOS/brp-mangle-shebangs + /usr/lib/rpm/OpenCloudOS/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-pytest-httpbin-2.0.0-1.oc9.noarch/usr/lib/python3.11 using python3.11 + /usr/lib/rpm/OpenCloudOS/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.omxLqt + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd pytest-httpbin-2.0.0 + PYTHONPATH=./ + py.test-3 -p no:unraisableexception ============================= test session starts ============================== platform linux -- Python 3.11.6, pytest-7.4.0, pluggy-1.3.0 rootdir: /builddir/build/BUILD/pytest-httpbin-2.0.0 configfile: setup.cfg plugins: httpbin-2.0.0 collected 21 items tests/test_httpbin.py ............. [ 61%] tests/test_server.py .......F [100%] =================================== FAILURES =================================== ______________ test_redirect_location_is_https_for_secure_server _______________ httpbin_secure = def test_redirect_location_is_https_for_secure_server(httpbin_secure): assert httpbin_secure.url.startswith("https://") response = requests.get( httpbin_secure + "/redirect-to?url=/html", allow_redirects=False ) > assert response.status_code == 302 E assert 500 == 302 E + where 500 = .status_code tests/test_server.py:122: AssertionError ----------------------------- Captured stderr call ----------------------------- 127.0.0.1 - - [25/Jul/2024 22:41:40] "GET /redirect-to?url=/html HTTP/1.1" 500 265 ------------------------------ Captured log call ------------------------------- ERROR httpbin.core:app.py:1744 Exception on /redirect-to [GET] Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/httpbin/core.py", line 301, in redirect_to response.headers['Location'] = args['url'].encode('utf-8') ~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/werkzeug/datastructures/headers.py", line 408, in __setitem__ self.set(key, value) File "/usr/lib/python3.11/site-packages/werkzeug/datastructures/headers.py", line 330, in set _value = _str_header_value(_value) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/werkzeug/datastructures/headers.py", line 501, in _str_header_value warnings.warn( DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0. =========================== short test summary info ============================ FAILED tests/test_server.py::test_redirect_location_is_https_for_secure_server ========================= 1 failed, 20 passed in 3.21s ========================= error: Bad exit status from /var/tmp/rpm-tmp.omxLqt (%check) Bad exit status from /var/tmp/rpm-tmp.omxLqt (%check) RPM build errors: Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-pytest-httpbin.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/python-pytest-httpbin.spec