Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

python 3.7 error #20

@caleb15

Description

@caleb15

mocurly depends on a old version of httpretty that doesn't support python 3.7

It requires httpretty <=0.8.10 but at least httpretty 0.9.5 is needed to be compatible with python 3.7 - see getmoto/moto#1706 and gabrielfalcao/HTTPretty#339

Error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/local/lib/python3.7/unittest/case.py", line 628, in run
    testMethod()
  File "/home/circleci/project/ff/mods/billing/tests/test_recurly_integration.py", line 71, in test_cancel_all_subscriptions
    with mocurly():
  File "/home/circleci/project/venv/lib/python3.7/site-packages/mocurly/core.py", line 43, in __enter__
    self.start()
  File "/home/circleci/project/venv/lib/python3.7/site-packages/mocurly/core.py", line 64, in start
    self._register()
  File "/home/circleci/project/venv/lib/python3.7/site-packages/mocurly/core.py", line 165, in _register
    content_type="application/xml")
  File "/home/circleci/project/venv/lib/python3.7/site-packages/httpretty/core.py", line 940, in register_uri
    match_querystring)
  File "/home/circleci/project/venv/lib/python3.7/site-packages/httpretty/core.py", line 762, in __init__
    self.info = URIInfo.from_uri(uri, entries)
  File "/home/circleci/project/venv/lib/python3.7/site-packages/httpretty/core.py", line 732, in from_uri
    result = urlsplit(uri)
  File "/usr/local/lib/python3.7/urllib/parse.py", line 418, in urlsplit
    url, scheme, _coerce_result = _coerce_args(url, scheme)
  File "/usr/local/lib/python3.7/urllib/parse.py", line 123, in _coerce_args
    return _decode_args(args) + (_encode_result,)
  File "/usr/local/lib/python3.7/urllib/parse.py", line 107, in _decode_args
    return tuple(x.decode(encoding, errors) if x else '' for x in args)
  File "/usr/local/lib/python3.7/urllib/parse.py", line 107, in <genexpr>
    return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 're.Pattern' object has no attribute 'decode'

We can submit a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions