#1114302 python-falcon: FTBFS: dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1114302#5
Date:
2025-09-05 18:23:47 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build.

Below you will find how the build ends (probably the most relevant part,
but not necessarily). If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202509/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-falcon, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
make: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
debian/rules:40: warning: overriding recipe for target 'override_dh_installchangelogs'
/usr/share/openstack-pkg-tools/pkgos.make:59: warning: ignoring old recipe for target 'override_dh_installchangelogs'
dh clean --buildsystem=pybuild --with python3
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
make[1]: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
debian/rules:40: warning: overriding recipe for target 'override_dh_installchangelogs'
/usr/share/openstack-pkg-tools/pkgos.make:59: warning: ignoring old recipe for target 'override_dh_installchangelogs'
rm -rf build .stestr *.egg-info .pytest_cache
find falcon/ -iname '*.c' -delete

[... snipped ...]


tests/asgi/test_testing_asgi.py:37
  /<<PKGBUILDDIR>>/tests/asgi/test_testing_asgi.py:37: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_testing_asgi.py:50
  /<<PKGBUILDDIR>>/tests/asgi/test_testing_asgi.py:50: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:53
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:53: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:111
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:111: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:229
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:229: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:239
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:239: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:299
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:299: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:401
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:401: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:513
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:513: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:555
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:555: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:593
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:593: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:642
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:642: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:676
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:676: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:702
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:702: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:716
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:716: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:730
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:730: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:763
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:763: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:818
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:818: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:871
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:871: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:880
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:880: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:889
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:889: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:916
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:916: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:930
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:930: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:944
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:944: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:1013
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:1013: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:1027
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:1027: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/asgi/test_ws.py:1046
  /<<PKGBUILDDIR>>/tests/asgi/test_ws.py:1046: PytestUnknownMarkWarning: Unknown pytest.mark.asyncio - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.asyncio

tests/test_cookies.py::test_response_complex_case[asgi]
tests/test_cookies.py::test_response_complex_case[wsgi]
  /<<PKGBUILDDIR>>/tests/test_cookies.py:157: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    assert cookie.expires < datetime.utcnow()

tests/test_cookies.py::test_unset_cookies[asgi]
tests/test_cookies.py::test_unset_cookies[asgi]
tests/test_cookies.py::test_unset_cookies[asgi]
tests/test_cookies.py::test_unset_cookies[asgi]
tests/test_cookies.py::test_unset_cookies[wsgi]
tests/test_cookies.py::test_unset_cookies[wsgi]
tests/test_cookies.py::test_unset_cookies[wsgi]
tests/test_cookies.py::test_unset_cookies[wsgi]
  /<<PKGBUILDDIR>>/tests/test_cookies.py:180: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    assert cookie.expires < datetime.utcnow()

tests/test_cookies.py::test_response_unset_cookie[asgi]
tests/test_cookies.py::test_response_unset_cookie[wsgi]
  /<<PKGBUILDDIR>>/tests/test_cookies.py:265: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    assert expiration < datetime.utcnow()

tests/test_headers.py::TestHeaders::test_response_set_and_get_header[asgi]
tests/test_headers.py::TestHeaders::test_response_set_and_get_header[wsgi]
tests/test_headers.py::TestHeaders::test_request_multiple_header[asgi]
tests/test_headers.py::TestHeaders::test_request_multiple_header[wsgi]
  /<<PKGBUILDDIR>>/tests/test_headers.py:34: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    self.last_modified = datetime.utcnow()

tests/test_http_custom_method_routing.py::test_environment_override[FOO,-expected2]
  /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: <test_hello.NonClosingBytesIO object at 0x7f155fa9e480>

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/_pytest/reports.py", line 346, in from_item_and_call
      keywords = {x: 1 for x in item.keywords}
                  ^^^^
  TypeError: 'bool' object is not callable

  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_middleware.py: 26 warnings
  /<<PKGBUILDDIR>>/tests/test_middleware.py:39: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    context['start_time'] = datetime.utcnow()

tests/test_middleware.py: 24 warnings
  /<<PKGBUILDDIR>>/tests/test_middleware.py:47: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    context['end_time'] = datetime.utcnow()

tests/test_middleware.py: 16 warnings
  /<<PKGBUILDDIR>>/tests/test_middleware.py:43: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    context['mid_time'] = datetime.utcnow()

tests/test_utils.py::TestFalconUtils::test_http_now
  /<<PKGBUILDDIR>>/tests/test_utils.py:112: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    expected = datetime.utcnow()

tests/test_utils.py::TestFalconUtils::test_http_now
  /<<PKGBUILDDIR>>/falcon/util/misc.py:138: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    return dt_to_http(utcnow())

tests/test_wsgi.py::TestWSGIServer::test_get
  /usr/lib/python3.13/multiprocessing/popen_fork.py:67: DeprecationWarning: This process (pid=428) is multi-threaded, use of fork() may lead to deadlocks in the child.
    self.pid = os.fork()

#1114302#12
Date:
2025-09-15 11:24:34 UTC
From:
To:
Hello,
on behalf of Falcon's maintainer team, is there anything we could help with
this bug?

I have taken a quick look at
https://salsa.debian.org/openstack-team/python/python-falcon/-/merge_requests/2,
and it seems fine for most of it.

A couple of nitpicks:
* Falcon neither any longer depends on, nor vendors, any other packages
outside of the stdlib. So "Depends:" should only include the required
Python infrastructure, such as the runtime, stdlib, etc, depending on your
distribution.
* You can remove any "problematic" test dependencies from "Build-Depends:"
if you wish. As of Falcon 4.0+, the tests only require pytest as a hard
dependency, other integration tests with 3rd party packages are optional:
https://falcon.readthedocs.io/en/stable/community/packaging.html#testing-package
. Of course, this is a tradeoff, and it is ideal to include as many
optional dependencies from your distribution as possible, but that also
increases the maintenance burden.
* pytest-asyncio, which effectively causes this particular bug due to some
incompatibility, is no longer a dependency at all, not even any longer used
for the tests.

Do not hesitate to reach out if you have any questions!
https://falcon.readthedocs.io/en/stable/community/packaging.html#thank-you

Kindly
Vytas

Thanks.

#1114302#17
Date:
2025-09-29 12:25:51 UTC
From:
To:
This was fixed by latest version 4.0.2-1 in unstable.