Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.47.3: pytest warnings with call traces #1133

Open
kloczek opened this issue Mar 10, 2023 · 9 comments
Open

0.47.3: pytest warnings with call traces #1133

kloczek opened this issue Mar 10, 2023 · 9 comments

Comments

@kloczek
Copy link

kloczek commented Mar 10, 2023

Looks like something odd happens duting pytest execution and some writes to the tty som call traces.
Thre are as well some pytest warnings.
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-zeroconf-0.47.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-zeroconf-0.47.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3, configfile: pyproject.toml
plugins: asyncio-0.20.3, xdist-3.2.0
asyncio: mode=strict
collected 269 items

tests/test_asyncio.py ..........................                         [  9%]
tests/test_cache.py ................                                     [ 15%]
tests/test_core.py ......s...................                            [ 25%]
tests/test_dns.py ...........................                            [ 35%]
tests/test_exceptions.py .........                                       [ 38%]
tests/test_handlers.py .........................                         [ 47%]
tests/test_history.py ..                                                 [ 48%]
tests/test_init.py .......                                               [ 51%]
tests/test_logger.py .....                                               [ 53%]
tests/test_protocol.py .............................................     [ 69%]
tests/test_services.py ...                                               [ 71%]
tests/test_updates.py .                                                  [ 71%]
tests/services/test_browser.py .....................                     [ 79%]
tests/services/test_info.py ....................                         [ 86%]
tests/services/test_registry.py ......                                   [ 88%]
tests/services/test_types.py ....                                        [ 90%]
tests/utils/test_asyncio.py .......                                      [ 92%]
tests/utils/test_name.py ...                                             [ 94%]
tests/utils/test_net.py ...........s....                                 [100%]

=============================== warnings summary ===============================
tests/test_asyncio.py::test_async_with_sync_passed_in_closed_in_async
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7f2e74bd8c40>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 139, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 159, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_asyncio.py::test_async_service_registration
  /usr/lib64/python3.8/ipaddress.py:44: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    return IPv4Address(address)
  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.

tests/test_asyncio.py::test_async_service_registration
  /usr/lib64/python3.8/ipaddress.py:44: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    return IPv4Address(address)
  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.

tests/test_asyncio.py::test_async_service_registration
tests/test_core.py::test_guard_against_oversized_packets
tests/test_handlers.py::test_qu_response
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=11>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_asyncio.py: 1 warning
tests/test_core.py: 7 warnings
tests/test_handlers.py: 4 warnings
tests/test_init.py: 1 warning
tests/services/test_browser.py: 5 warnings
tests/services/test_info.py: 3 warnings
tests/utils/test_asyncio.py: 1 warning
tests/utils/test_net.py: 1 warning
  /usr/lib64/python3.8/asyncio/base_events.py:654: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
  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.

tests/test_core.py::test_open_close_twice_from_async
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7f2e7491d640>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 139, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 159, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_core.py::test_multiple_sync_instances_stared_from_async_close
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7f2e747d7040>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 139, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 159, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=15, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=23, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_dns.py:368: ResourceWarning: unclosed <socket.socket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=13>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=15>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=23>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_exceptions.py::Exceptions::test_invalid_addresses
  /usr/lib64/python3.8/asyncio/tasks.py:922: ResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    futures._chain_future(ensure_future(coro, loop=loop), future)
  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.

tests/test_exceptions.py::Exceptions::test_invalid_addresses
  /usr/lib64/python3.8/asyncio/tasks.py:922: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    futures._chain_future(ensure_future(coro, loop=loop), future)
  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.

tests/test_handlers.py::test_qu_response
  /usr/lib64/python3.8/selectors.py:74: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    raise KeyError("{!r} is not registered".format(fileobj)) from None
  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.

tests/test_handlers.py::test_qu_response
  /usr/lib64/python3.8/selectors.py:74: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    raise KeyError("{!r} is not registered".format(fileobj)) from None
  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.

tests/test_handlers.py::test_qu_response
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7f2e748c1a40>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 139, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py", line 159, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_init.py::Names::test_verify_name_change_with_lots_of_names
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport fd=11>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_init.py::Names::test_verify_name_change_with_lots_of_names
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_core.py:159: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
  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.

tests/test_init.py::Names::test_verify_name_change_with_lots_of_names
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport fd=12>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/services/test_browser.py::test_service_browser_listeners_no_update_service
  /usr/lib/python3.8/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread zeroconf-ServiceBrowser-_hap._tcp-1716625

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
      self.run()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_services/browser.py", line 547, in run
      self._fire_service_state_changed_event(event)
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_services/browser.py", line 428, in _fire_service_state_changed_event
      self._service_state_changed.fire(
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_services/__init__.py", line 54, in fire
      h(**kwargs)
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_services/browser.py", line 188, in on_change
      getattr(listener, _ON_CHANGE_DISPATCH[state_change])(zeroconf, service_type, name)
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.3/src/zeroconf/_services/__init__.py", line 45, in update_service
      raise NotImplementedError()
  NotImplementedError

    warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))

tests/utils/test_net.py::test_disable_ipv6_only_or_raise
  /usr/lib/python3.8/site-packages/_pytest/python.py:200: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 0)>
    result = testfunction(**testargs)
  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.

tests/utils/test_net.py::test_add_multicast_member
  /usr/lib64/python3.8/unittest/mock.py:2076: ResourceWarning: unclosed <socket.socket fd=15, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 0)>
    self.name = name
  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.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] tests/test_core.py:154: apple_p2p happy path only testable on mac
SKIPPED [1] tests/utils/test_net.py:136: System has SO_REUSEPORT
=========== 267 passed, 2 skipped, 53 warnings in 106.08s (0:01:46) ============
@kloczek
Copy link
Author

kloczek commented Mar 20, 2023

Just tested 0.47.4 and accidentaly I found build produces whl archive when there is no gcc in build env

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Compiling src/zeroconf/_cache.py because it changed.
Compiling src/zeroconf/_dns.py because it changed.
Compiling src/zeroconf/_protocol/incoming.py because it changed.
Compiling src/zeroconf/_protocol/outgoing.py because it changed.
[1/4] Cythonizing src/zeroconf/_cache.py
[2/4] Cythonizing src/zeroconf/_dns.py
[3/4] Cythonizing src/zeroconf/_protocol/incoming.py
[4/4] Cythonizing src/zeroconf/_protocol/outgoing.py
running build
running build_py
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_cache.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_core.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_dns.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_exceptions.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_handlers.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_history.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_logger.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_updates.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/asyncio.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/const.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/incoming.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/outgoing.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/browser.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/info.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/registry.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/types.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/asyncio.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/name.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/net.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/time.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_cache.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_dns.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/py.typed -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_cache.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_dns.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_protocol/incoming.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/outgoing.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/incoming.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/outgoing.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
running build_ext
building 'zeroconf._cache' extension
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -I/usr/include/python3.8 -c src/zeroconf/_cache.c -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_cache.o
Successfully built zeroconf-0.47.4-cp38-cp38-manylinux_2_37_x86_64.whl

@kloczek
Copy link
Author

kloczek commented Mar 20, 2023

Second issue: looks after install gcc in build env produced whl contains .pxd and .c files.

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Compiling src/zeroconf/_cache.py because it changed.
Compiling src/zeroconf/_dns.py because it changed.
Compiling src/zeroconf/_protocol/incoming.py because it changed.
Compiling src/zeroconf/_protocol/outgoing.py because it changed.
[1/4] Cythonizing src/zeroconf/_cache.py
[2/4] Cythonizing src/zeroconf/_dns.py
[3/4] Cythonizing src/zeroconf/_protocol/incoming.py
[4/4] Cythonizing src/zeroconf/_protocol/outgoing.py
running build
running build_py
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_cache.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_core.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_dns.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_exceptions.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_handlers.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_history.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_logger.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_updates.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/asyncio.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/const.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/incoming.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/outgoing.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/browser.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/info.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/registry.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
copying src/zeroconf/_services/types.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_services
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/__init__.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/asyncio.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/name.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/net.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_utils/time.py -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_utils
copying src/zeroconf/_cache.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_dns.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/py.typed -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_cache.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_dns.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf
copying src/zeroconf/_protocol/incoming.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/outgoing.pxd -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/incoming.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
copying src/zeroconf/_protocol/outgoing.c -> /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol
running build_ext
building 'zeroconf._cache' extension
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -I/usr/include/python3.8 -c src/zeroconf/_cache.c -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_cache.o
/usr/bin/gcc -shared -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_cache.o -L/usr/lib64 -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_cache.cpython-38-x86_64-linux-gnu.so
building 'zeroconf._dns' extension
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -I/usr/include/python3.8 -c src/zeroconf/_dns.c -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_dns.o
/usr/bin/gcc -shared -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_dns.o -L/usr/lib64 -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_dns.cpython-38-x86_64-linux-gnu.so
building 'zeroconf._protocol.incoming' extension
creating /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_protocol
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -I/usr/include/python3.8 -c src/zeroconf/_protocol/incoming.c -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_protocol/incoming.o
/usr/bin/gcc -shared -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_protocol/incoming.o -L/usr/lib64 -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol/incoming.cpython-38-x86_64-linux-gnu.so
building 'zeroconf._protocol.outgoing' extension
/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -I/usr/include/python3.8 -c src/zeroconf/_protocol/outgoing.c -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_protocol/outgoing.o
/usr/bin/gcc -shared -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/temp.linux-x86_64-cpython-38/src/zeroconf/_protocol/outgoing.o -L/usr/lib64 -o /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.47.4/build/lib.linux-x86_64-cpython-38/zeroconf/_protocol/outgoing.cpython-38-x86_64-linux-gnu.so
Successfully built zeroconf-0.47.4-cp38-cp38-manylinux_2_37_x86_64.whl

@kloczek
Copy link
Author

kloczek commented Apr 3, 2023

gentle ping .. 🤔

@bdraco
Copy link
Member

bdraco commented Apr 4, 2023

this one needs to get solved first #1138

Happy to take a PR if you want to work on this.

@kloczek
Copy link
Author

kloczek commented Aug 4, 2023

Just FTR pytest output of the 0.74.0

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-zeroconf-0.74.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-zeroconf-0.74.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0
configfile: pyproject.toml
plugins: asyncio-0.21.0, xdist-3.3.1
asyncio: mode=strict
collected 279 items

tests/test_asyncio.py ............................                       [ 10%]
tests/test_cache.py ................                                     [ 15%]
tests/test_core.py ......s...................                            [ 25%]
tests/test_dns.py ...........................                            [ 34%]
tests/test_exceptions.py .........                                       [ 37%]
tests/test_handlers.py ............................                      [ 48%]
tests/test_history.py ..                                                 [ 48%]
tests/test_init.py .......                                               [ 51%]
tests/test_logger.py .....                                               [ 53%]
tests/test_protocol.py .............................................     [ 69%]
tests/test_services.py ...                                               [ 70%]
tests/test_updates.py .                                                  [ 70%]
tests/services/test_browser.py .....................                     [ 78%]
tests/services/test_info.py ..........................                   [ 87%]
tests/services/test_registry.py .....                                    [ 89%]
tests/services/test_types.py ....                                        [ 90%]
tests/utils/test_asyncio.py .......                                      [ 93%]
tests/utils/test_name.py ...                                             [ 94%]
tests/utils/test_net.py ...........s....                                 [100%]

=============================== warnings summary ===============================
tests/test_asyncio.py::test_async_with_sync_passed_in_closed_in_async
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7fbebbd3c840>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 192, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 212, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_asyncio.py::test_async_service_registration
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/__init__.py:60: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    return SignalRegistrationInterface(self._handlers)
  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.

tests/test_asyncio.py::test_async_service_registration
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/__init__.py:60: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    return SignalRegistrationInterface(self._handlers)
  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.

tests/test_asyncio.py::test_async_service_registration
tests/test_core.py::test_guard_against_oversized_packets
tests/test_handlers.py::test_qu_response
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=11>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_asyncio.py: 1 warning
tests/test_core.py: 7 warnings
tests/test_handlers.py: 6 warnings
tests/test_protocol.py: 1 warning
tests/services/test_browser.py: 6 warnings
tests/services/test_info.py: 3 warnings
tests/services/test_types.py: 2 warnings
tests/utils/test_asyncio.py: 1 warning
tests/utils/test_net.py: 1 warning
  /usr/lib64/python3.8/asyncio/base_events.py:654: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
  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.

tests/test_core.py::test_open_close_twice_from_async
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7fbebc12db40>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 192, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 212, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_core.py::test_multiple_sync_instances_stared_from_async_close
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7fbebc12dbc0>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 192, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 212, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=15, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=23, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_dns.py:374: ResourceWarning: unclosed <socket.socket fd=24, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    super().__init__(name, type_, class_, ttl, created)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=13>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=15>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_core.py::test_guard_against_oversized_packets
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=23>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_exceptions.py::Exceptions::test_invalid_addresses
  /usr/lib64/python3.8/traceback.py:220: ResourceWarning: unclosed <socket.socket fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    tb.tb_frame.clear()
  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.

tests/test_exceptions.py::Exceptions::test_invalid_addresses
  /usr/lib64/python3.8/traceback.py:220: ResourceWarning: unclosed <socket.socket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    tb.tb_frame.clear()
  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.

tests/test_handlers.py::test_qu_response
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/registry.py:81: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    return [self._services[name] for name in records.get(key, [])]
  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.

tests/test_handlers.py::test_qu_response
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/registry.py:81: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    return [self._services[name] for name in records.get(key, [])]
  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.

tests/test_handlers.py::test_qu_response
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/registry.py:81: ResourceWarning: unclosed <socket.socket fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    return [self._services[name] for name in records.get(key, [])]
  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.

tests/test_handlers.py::test_qu_response
  /home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/registry.py:81: ResourceWarning: unclosed <socket.socket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    return [self._services[name] for name in records.get(key, [])]
  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.

tests/test_handlers.py::test_qu_response
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport closing fd=16>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_handlers.py::test_qu_response
  /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object AsyncEngine._async_setup at 0x7fbebc0d0540>

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1349, in create_datagram_endpoint
      await waiter
  GeneratorExit

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 192, in _async_setup
      await self._async_create_endpoints()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_core.py", line 212, in _async_create_endpoints
      transport, protocol = await loop.create_datagram_endpoint(lambda: AsyncListener(self.zc), sock=s)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 1351, in create_datagram_endpoint
      transport.close()
    File "/usr/lib64/python3.8/asyncio/selector_events.py", line 692, in close
      self._loop.call_soon(self._call_connection_lost, None)
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
      self._check_closed()
    File "/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
      raise RuntimeError('Event loop is closed')
  RuntimeError: Event loop is closed

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/test_handlers.py::test_future_answers_are_removed_on_send
tests/services/test_info.py::test_release_wait_when_new_recorded_added_concurrency
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport fd=11>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/test_handlers.py::test_future_answers_are_removed_on_send
  /usr/lib64/python3.8/unittest/mock.py:2076: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    self.name = name
  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.

tests/test_handlers.py::test_future_answers_are_removed_on_send
tests/services/test_info.py::test_release_wait_when_new_recorded_added_concurrency
  /usr/lib64/python3.8/asyncio/selector_events.py:696: ResourceWarning: unclosed transport <_SelectorDatagramTransport fd=12>
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
  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.

tests/services/test_browser.py::test_service_browser_listeners_no_update_service
  /usr/lib/python3.8/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread zeroconf-ServiceBrowser-_hap._tcp-1304036

  Traceback (most recent call last):
    File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
      self.run()
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/browser.py", line 571, in run
      self._fire_service_state_changed_event(event)
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/browser.py", line 449, in _fire_service_state_changed_event
      self._service_state_changed.fire(
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/__init__.py", line 56, in fire
      h(**kwargs)
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/browser.py", line 193, in on_change
      getattr(listener, _ON_CHANGE_DISPATCH[state_change])(zeroconf, service_type, name)
    File "/home/tkloczko/rpmbuild/BUILD/python-zeroconf-0.74.0/src/zeroconf/_services/__init__.py", line 45, in update_service
      raise NotImplementedError()
  NotImplementedError

    warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))

tests/services/test_info.py::test_release_wait_when_new_recorded_added_concurrency
  /usr/lib64/python3.8/asyncio/selector_events.py:626: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 5353)>
    self._extra['peername'] = sock.getpeername()
  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.

tests/services/test_info.py::test_release_wait_when_new_recorded_added_concurrency
  /usr/lib64/python3.8/asyncio/selector_events.py:626: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 5353)>
    self._extra['peername'] = sock.getpeername()
  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.

tests/utils/test_net.py::test_disable_ipv6_only_or_raise
  /usr/lib/python3.8/site-packages/_pytest/python.py:199: ResourceWarning: unclosed <socket.socket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 0)>
    result = testfunction(**testargs)
  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.

tests/utils/test_net.py::test_set_so_reuseport_if_available_not_present
  /usr/lib64/python3.8/contextlib.py:83: ResourceWarning: unclosed <socket.socket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 0)>
    self.gen = func(*args, **kwds)
  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.

tests/utils/test_net.py::test_add_multicast_member
  /usr/lib64/python3.8/inspect.py:2821: ResourceWarning: unclosed <socket.socket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 0)>
    params = OrderedDict(((param.name, param)
  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.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] tests/test_core.py:152: apple_p2p happy path only testable on mac
SKIPPED [1] tests/utils/test_net.py:136: System has SO_REUSEPORT
=========== 277 passed, 2 skipped, 66 warnings in 109.42s (0:01:49) ============

@bdraco
Copy link
Member

bdraco commented Aug 4, 2023

Many of these warning have likely existed for the better part of a decade. I prioritize fixing errors and regressions so this one is far down on the list as I have at least a list of 200 other issues to solve (and growing) before I could get to this one.

@kloczek
Copy link
Author

kloczek commented Apr 25, 2024

BTW I have few small cleanups

  • make compilation verbose (to be able see compilers params)
--- a/build_ext.py
+++ b/build_ext.py
@@ -43,6 +43,7 @@
                         "src/zeroconf/_utils/time.py",
                     ],
                     compiler_directives={"language_level": "3"},  # Python 3
+                    gdb_debug=True,
                 ),
                 cmdclass=dict(build_ext=BuildExt),
             )
  • switch from deprecated distutils
--- a/build_ext.py
+++ b/build_ext.py
@@ -1,7 +1,7 @@
 """Build optional cython modules."""

 import os
-from distutils.command.build_ext import build_ext
+from setuptools.command.build_ext import build_ext
 from typing import Any
  • use of sys.version_info related cleanup
--- a/src/zeroconf/_utils/asyncio.py
+++ b/src/zeroconf/_utils/asyncio.py
@@ -26,7 +26,7 @@
 import sys
 from typing import Any, Awaitable, Coroutine, Optional, Set

-if sys.version_info[:2] < (3, 11):
+if sys.version_info < (3, 11):
     from async_timeout import timeout as asyncio_timeout
 else:
     from asyncio import timeout as asyncio_timeout

This change will not confuse pyupgrade on dropping python<=3.11 support

Also I have tested pyupgrade --py38-plus generated patch + some manual added changes to drop python<=3.7 support.

Please let me know if you want those changes as PR.

@bdraco
Copy link
Member

bdraco commented Apr 26, 2024

A PR with the above would be great.

I'm not sure about gdb_debug as it likely means we get even larger binaries https://cython.readthedocs.io/en/latest/src/userguide/debugging.html

@kloczek
Copy link
Author

kloczek commented Apr 26, 2024

That single line change causes that gcc with all params is printed in build log.
As I'm packaging everything as rpm package debug info is automatically stripped and packaged into debuginfo subpackages.
It is good sometimes to have preserved exact commands params in build logs.

OK .. will try to prepare PR with that 😋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants