mininode tests broken with Python 3.4.2 (Debian Jessie) #13745

issue domob1812 opened this issue on July 23, 2018
  1. domob1812 commented at 9:10 AM on July 23, 2018: contributor

    The recent change in #13715 broke mininode tests on systems with Python 3.4.2 (as included in Debian Jessie aka oldstable). This is because the method is_closing is only introduced in Python 3.4.4.

    A workaround would be to add a hasattr condition that only checks is_closing if it is actually available - keeping the benefits of #13715 for newer systems while not breaking old systems (basically falling back to the behaviour before #13715 for them). If that's a desired fix, I'm happy to create a PR for it.

  2. fanquake added the label Tests on Jul 23, 2018
  3. domob1812 referenced this in commit b233b9c3d7 on Jul 23, 2018
  4. MarcoFalke commented at 11:54 AM on July 23, 2018: member

    I am happy with that fallback, if the tests would otherwise be impossible to run. Just noting that you probably shouldn't run anything older than python 3.4.8 and that python 3.4 is completely EOL Q1 2019: https://devguide.python.org/#status-of-python-branches

  5. marcoagner commented at 11:59 AM on July 23, 2018: contributor

    Sorry for the trouble. I think a simple and explicit if condition in send_message would be fine so it stays obvious and simple for when Python <=3.4.2 is dropped:

    if hasattr(self._transport, "is_closing"):                              
        NetworkThread.network_event_loop.call_soon_threadsafe(lambda: self._transport and not self._transport.is_closing() and self._transport.write(tmsg))
    else:
        # is_closing not implemented before Python 3.4.4                                                             
        NetworkThread.network_event_loop.call_soon_threadsafe(lambda: self._transport and self._transport.write(tmsg))
    

    *Verbose/redundant but very obvious.

    Unless #13579 should be solved for Python <3.4.4 too; then another workaround should be implemented. LMK if you are doing it or would like me to do it.

  6. domob1812 commented at 12:11 PM on July 23, 2018: contributor

    Sounds good to me. I don't know if #13579 should be solved also for old systems, but will prepare a PR with the simple workaround for now.

  7. domob1812 referenced this in commit 4728553290 on Jul 23, 2018
  8. domob1812 commented at 12:47 PM on July 23, 2018: contributor

    Proposed fix is in #13747, which simply disables the new is_closing check for systems that don't have it (as discussed above).

  9. domob1812 referenced this in commit 64b9f27e0e on Jul 23, 2018
  10. MarcoFalke closed this on Jul 23, 2018

  11. MarcoFalke referenced this in commit ab28b5b527 on Jul 23, 2018
  12. Bushstar referenced this in commit 4cf7d34a20 on Jul 24, 2018
  13. HashUnlimited referenced this in commit abcd4e4bb1 on Sep 12, 2018
  14. joemphilips referenced this in commit 44001f95b7 on Nov 9, 2018
  15. jfhk referenced this in commit b8a0a20775 on Nov 14, 2018
  16. furszy referenced this in commit 4331a67772 on Jun 4, 2021
  17. furszy referenced this in commit 1460e5b812 on Jun 9, 2021
  18. furszy referenced this in commit c9f265c7aa on Jun 10, 2021
  19. furszy referenced this in commit 7038ae0bcc on Jun 12, 2021
  20. furszy referenced this in commit 649cc97ea5 on Jun 12, 2021
  21. furszy referenced this in commit 37aa223224 on Jun 14, 2021
  22. furszy referenced this in commit 6ca86b36b0 on Jun 22, 2021
  23. furszy referenced this in commit 77b9a4394b on Jun 22, 2021
  24. furszy referenced this in commit 0433f2380e on Jun 24, 2021
  25. furszy referenced this in commit db28a539ee on Jun 28, 2021
  26. furszy referenced this in commit 2f49b8e44c on Jun 28, 2021
  27. UdjinM6 referenced this in commit cf0d69952f on Jun 29, 2021
  28. UdjinM6 referenced this in commit 010ff7d499 on Jun 29, 2021
  29. UdjinM6 referenced this in commit 1395a6a01f on Jul 1, 2021
  30. UdjinM6 referenced this in commit 5f50a8c8ad on Jul 2, 2021
  31. UdjinM6 referenced this in commit ea58f30a6f on Jul 2, 2021
  32. DrahtBot locked this on Sep 8, 2021
  33. gades referenced this in commit 83977f6821 on May 4, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 21:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me