tests: Remove compatibility code not needed now when we're on Python 3 #12993

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-python-2-compatibility-code changing 3 files +14 −36
  1. practicalswift commented at 7:57 AM on April 16, 2018: contributor

    Remove compatibility code not needed now when we're on Python 3.

  2. tests: Remove compatibility code not needed now when we're on Python 3 b95f9a61e0
  3. fanquake added the label Tests on Apr 16, 2018
  4. Empact commented at 9:40 AM on April 16, 2018: member

    utACK b95f9a6

  5. laanwj commented at 10:46 AM on April 16, 2018: member

    Nice cleanup. utACK b95f9a61e0b2ae6cab0ea5431d7ee1841b80a8c8

  6. cdecker commented at 11:19 AM on April 16, 2018: contributor

    This also removes python2 support from the rpcauth tool, but shouldn't be an issue imho

    ACK

  7. practicalswift commented at 12:11 PM on April 16, 2018: contributor

    @cdecker rpcauth.py has a Python 3 hashbang: #!/usr/bin/env python3 :-)

  8. MarcoFalke commented at 12:21 PM on April 16, 2018: member

    Yeah, but you could still run python2.7 ./share/rpcauth/rpcauth.py user if your system doesn't provide python3.

  9. laanwj commented at 2:14 PM on April 16, 2018: member

    I'm ok with consistently dropping Python 2 support. Yes, rpcauth.py just happens to work right now, but no one is testing or maintaining that* so it'll be broken anyway at some random point in the future otherwise.

    * even worse - we don't have tests for that script at all!

  10. MarcoFalke commented at 2:27 PM on April 16, 2018: member

    We don't test it with python3 either. ;)

    utACK b95f9a6. Affected persons can run git revert b95f9a6 or similar.

  11. laanwj commented at 2:31 PM on April 16, 2018: member

    We don't test it with python3 either. ;)

    Created an issue to track that; #12995

  12. laanwj merged this on Apr 16, 2018
  13. laanwj closed this on Apr 16, 2018

  14. laanwj referenced this in commit 0d6992168c on Apr 16, 2018
  15. in test/functional/test_framework/script.py:407 in b95f9a61e0
     405 |              else:
     406 |                  other = CScriptNum.encode(other)
     407 |          elif isinstance(other, int):
     408 |              if 0 <= other <= 16:
     409 | -                other = bytes(bchr(CScriptOp.encode_op_n(other)))
     410 | +                other = bytes(bytes([CScriptOp.encode_op_n(other)]))
    


    jnewbery commented at 2:40 PM on April 16, 2018:

    bytes() is idempotent. Can change bytes(bytes()) to be bytes(). Same below.

  16. jnewbery commented at 2:40 PM on April 16, 2018: member

    utACK b95f9a61e0b2ae6cab0ea5431d7ee1841b80a8c8. One nit.

  17. MarcoFalke referenced this in commit 6a278e0640 on Apr 16, 2018
  18. PastaPastaPasta referenced this in commit 2632f8109c on Jun 17, 2020
  19. PastaPastaPasta referenced this in commit c3fb2d9386 on Jun 17, 2020
  20. PastaPastaPasta referenced this in commit cd367b0be5 on Jun 17, 2020
  21. PastaPastaPasta referenced this in commit c70f0f130f on Jun 27, 2020
  22. PastaPastaPasta referenced this in commit 71bcdc7cb8 on Jun 27, 2020
  23. practicalswift deleted the branch on Apr 10, 2021
  24. gades referenced this in commit 5fe542893e on Mar 8, 2022
  25. DrahtBot locked this on Aug 16, 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-16 15:15 UTC

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