example_test.py doesn't work with Python 3.5 #19701

issue adaminsky opened this issue on August 12, 2020
  1. adaminsky commented at 5:29 AM on August 12, 2020: contributor

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    Expected behavior The example_test.py functional test should run without errors with Python 3.5.0 since this is the minimum supported version.

    <!--- What behavior did you expect? -->

    Actual behavior Test fails with AttributeError: '_SelectorSocketTransport' object has no attribute 'is_closing'

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    To reproduce Run example_test.py with Python 3.5.0.

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    System information Latest version of Bitcoin Core compiled on macOS 10.15.5.

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

    PR #13747 fixed the issue but it seems like the Python documentation incorrectly says that is_closing() was added to BaseTransport in 3.4.4 (here), but then on another page on the Python docs (here) it says it was included in Python 3.5.1. The previous fix was reverted when moving to 3.5, but it seems like that may have reintroduced the problem. I'm not sure how soon the minimum Python version will be increased, so not sure if fixing this is important.

  2. adaminsky added the label Bug on Aug 12, 2020
  3. fanquake added the label Tests on Aug 12, 2020
  4. skmcontrib commented at 6:51 AM on August 12, 2020: none

    @adaminsky do you think a noob in bitcoin code can work on this? If yes I can take a stab at this.

  5. adaminsky commented at 7:10 AM on August 12, 2020: contributor

    @skmcontrib I'm a noob too haha. I'm sure you can fix the problem, basically just do what was in the linked PR. I just saw #19504 which will increase the minimum python version to 3.6, but it seems like it could be a couple months for it to be merged.

  6. jnewbery commented at 12:59 PM on August 13, 2020: member

    Good catch @adaminsky . Since this only affects Python 3.5.0 (and not 3.5.1-3.5.9), and we're increasing the minimum required version to 3.6 soon (expected merge date Nov 1), I don't think it's worth fixing this.

  7. adaminsky commented at 4:24 PM on August 13, 2020: contributor

    Makes sense @jnewbery, I'm closing the issue.

  8. adaminsky closed this on Aug 13, 2020

  9. DrahtBot locked this on Feb 15, 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