test_framework: python3.4 authproxy compat #7751

pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2016_03_authproxy_py3compat changing 1 files +3 −4
  1. laanwj commented at 11:21 AM on March 27, 2016: member

    Changed in version 3.4: The strict parameter was removed. HTTP 0.9-style “Simple Responses” are not longer supported. (https://docs.python.org/3/library/http.client.html)

    Work around this by using a named parameter.

    Also avoid an infinite loop in encoding, by ensuring EncodeDecimal returns a string. round(Decimal) used to convert it to float, but it no longer does. Strings are supported since #6380, so just use that.

  2. laanwj added the label Tests on Mar 27, 2016
  3. laanwj added the label RPC on Mar 27, 2016
  4. laanwj force-pushed on Mar 27, 2016
  5. in qa/rpc-tests/test_framework/authproxy.py:None in 5efe742695 outdated
      95 | @@ -96,7 +96,7 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connect
      96 |                                                    timeout)
      97 |          else:
      98 |              self.__conn = httplib.HTTPConnection(self.__url.hostname, port,
      99 | -                                                 False, timeout)
     100 | +                                                 timeout=timeout)
    


    MarcoFalke commented at 12:28 PM on March 27, 2016:

    Thanks!

    This is a bugfix, which should also go upstream?


    laanwj commented at 3:50 PM on March 27, 2016:

    Yes, probably. Although the EncodeDecimal change does break compatibility with older versions of bitcoind.


    MarcoFalke commented at 3:53 PM on March 27, 2016:

    Sure, so I'd prefer those to be two commits :)


    MarcoFalke commented at 9:52 AM on March 28, 2016:

    Actually this was already fixed: https://github.com/jgarzik/python-bitcoinrpc/commit/7ebeebb4f61917fe590d980cb4f9aefdce2c8f25

    But somehow we forgot to fetch it.


    laanwj commented at 10:17 AM on March 28, 2016:

    Hm @luke-jr's commit seems to be more thorough. I indeed didn't test the https path. Will replace with his commit.

  6. laanwj force-pushed on Mar 28, 2016
  7. laanwj commented at 9:44 AM on March 28, 2016: member

    @MarcoFalke Ok, split into two commits

  8. MarcoFalke commented at 9:46 AM on March 28, 2016: member

    Tested ACK 28b1ec3

  9. sipa commented at 9:56 AM on March 28, 2016: member

    utACK

  10. laanwj commented at 10:11 AM on March 28, 2016: member

    Travis fail was unrelated (#7470), retriggered.

  11. test_framework: Avoid infinite loop in encoding Decimal
    Avoid an infinite loop in encoding, by ensuring EncodeDecimal
    returns a string. round(Decimal) used to convert it to
    float, but it no longer does in python 3.x. Strings are
    supported since #6380, so just use that.
    d7b80b54fb
  12. laanwj force-pushed on Mar 28, 2016
  13. test_framework: Py3.4 compat: Specify timeout parameter by name
    Changed in version 3.4: The strict parameter was removed. HTTP 0.9-style
    “Simple Responses” are not longer supported.
    (https://docs.python.org/3/library/http.client.html)
    
    Source: https://github.com/jgarzik/python-bitcoinrpc/commit/7ebeebb4f61917fe590d980cb4f9aefdce2c8f25
    e7e48ba66c
  14. laanwj force-pushed on Mar 28, 2016
  15. MarcoFalke commented at 10:32 AM on March 28, 2016: member

    utACK e7e48ba

  16. laanwj merged this on Mar 28, 2016
  17. laanwj closed this on Mar 28, 2016

  18. laanwj referenced this in commit 84370d58ff on Mar 28, 2016
  19. MarcoFalke referenced this in commit afbc000b0b on Jun 9, 2016
  20. nomnombtc referenced this in commit ebe305e433 on Nov 12, 2016
  21. nomnombtc referenced this in commit ad29324e69 on Nov 12, 2016
  22. nomnombtc referenced this in commit f231af0f1f on Nov 13, 2016
  23. sickpig referenced this in commit 0b04b7f78c on Nov 14, 2016
  24. zkbot referenced this in commit cfc3fea437 on Oct 16, 2019
  25. zkbot referenced this in commit 3c2ec7dbfe on Oct 18, 2019
  26. zkbot referenced this in commit 3242b1ecc5 on Oct 18, 2019
  27. zkbot referenced this in commit 552482a404 on Jun 4, 2020
  28. MarcoFalke 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-04-13 15:15 UTC

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