tests: Skip P2PConnection's is_closing() check when not available #13747

pull domob1812 wants to merge 1 commits into bitcoin:master from domob1812:skip-isclosing changing 1 files +11 −1
  1. domob1812 commented at 12:47 PM on July 23, 2018: contributor

    #13715 introduced a new check for _transport.is_closing() in mininode's P2PConnection's. This function is only available from Python 3.4.4, though, while Bitcoin Core is supposed to support all Python 3.4 versions.

    In this change, we make the check conditional on is_closing being available. If it is not, then we revert to the behaviour before the check was introduced; this means that #13579 is not fixed for old systems, but at least the tests work as they used to do before.

    This includes a small refactoring from a one-line lambda to an inline function, because this makes the code easier to read with more and more conditions being added.

    Fixes #13745.

  2. domob1812 cross-referenced this on Jul 23, 2018 from issue mininode tests broken with Python 3.4.2 (Debian Jessie) by domob1812
  3. MarcoFalke commented at 12:51 PM on July 23, 2018: member

    utACK 4728553290aebd9fc22f08c8bc73b05a45fb388a

  4. fanquake added the label Tests on Jul 23, 2018
  5. marcoagner commented at 1:10 PM on July 23, 2018: contributor

    utACK 4728553290aebd9fc22f08c8bc73b05a45fb388a

  6. flack commented at 1:29 PM on July 23, 2018: contributor

    maybe add a note that this is to support python < 3.4.4, so that it's easier to find and remove this workaround when support for these versions is dropped

  7. Skip is_closing() check when not available.
    https://github.com/bitcoin/bitcoin/pull/13715 introduced a new check
    for _transport.is_closing() in mininode's P2PConnection's.  This function
    is only available from Python 3.4.4, though, while Bitcoin is supposed
    to support all Python 3.4 versions.
    
    In this change, we make the check conditional on is_closing() being
    available.  If it is not, then we revert to the behaviour before the
    check was introduced; this means that
    https://github.com/bitcoin/bitcoin/issues/13579 is not fixed for old
    systems, but at least the tests work as they used to do before.
    
    This includes a small refactoring from a one-line lambda to an
    inline function, because this makes the code easier to read with more
    and more conditions being added.
    
    Fixes https://github.com/bitcoin/bitcoin/issues/13745.
    64b9f27e0e
  8. domob1812 force-pushed on Jul 23, 2018
  9. domob1812 commented at 1:45 PM on July 23, 2018: contributor

    Added a comment as suggested by @flack.

  10. MarcoFalke merged this on Jul 23, 2018
  11. MarcoFalke closed this on Jul 23, 2018

  12. MarcoFalke referenced this in commit ab28b5b527 on Jul 23, 2018
  13. domob1812 deleted the branch on Jul 23, 2018
  14. Bushstar cross-referenced this on Jul 24, 2018 from issue commits from bitcoin/master by Bushstar
  15. domob1812 referenced this in commit 4d3285921f on Jul 30, 2018
  16. adaminsky cross-referenced this on Aug 12, 2020 from issue example_test.py doesn't work with Python 3.5 by adaminsky
  17. furszy cross-referenced this on Jun 4, 2021 from issue [Test] Add p2p invalid messages functional test (and test framework update) by furszy
  18. random-zebra referenced this in commit bffe509aed on Jun 28, 2021
  19. UdjinM6 referenced this in commit cf0d69952f on Jun 29, 2021
  20. UdjinM6 referenced this in commit 010ff7d499 on Jun 29, 2021
  21. UdjinM6 referenced this in commit 1395a6a01f on Jul 1, 2021
  22. UdjinM6 referenced this in commit 5f50a8c8ad on Jul 2, 2021
  23. UdjinM6 referenced this in commit ea58f30a6f on Jul 2, 2021
  24. bitcoin locked this on Sep 8, 2021

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-05-20 06:55 UTC