huobi_Python icon indicating copy to clipboard operation
huobi_Python copied to clipboard

Python3.9 compatible

Open pancak3 opened this issue 4 years ago • 6 comments

json.loads removed arg encoding since python 3.9, see 'https://docs.python.org/3.9/library/json.html#json.loads'

pancak3 avatar Feb 04 '21 08:02 pancak3

I think

is_below_py39 = False
if sys.version_info.major < 3 and sys.version_info.minor < 9:
    is_below_py39 = True

Should be moved inside json_loads. Maybe import sys too.

Also, maybe encoding can be dropped even for Python 3.7 and 3.8?

Qumeric avatar Apr 13 '21 13:04 Qumeric

I think

is_below_py39 = False
if sys.version_info.major < 3 and sys.version_info.minor < 9:
    is_below_py39 = True

Should be moved inside json_loads. Maybe import sys too.

Also, maybe encoding can be dropped even for Python 3.7 and 3.8?

I think

is_below_py39 = False
if sys.version_info.major < 3 and sys.version_info.minor < 9:
    is_below_py39 = True

Should be moved inside json_loads. Maybe import sys too.

Also, maybe encoding can be dropped even for Python 3.7 and 3.8?

Excellent advice! I am going to change it. Thanks!

pancak3 avatar Apr 14 '21 11:04 pancak3

I have the same problem. @pancak3, thanks for this fix! Сould you please merge this PR?

kuznetsov-m avatar May 31 '22 12:05 kuznetsov-m

I have the same problem. @pancak3, thanks for this fix! Сould you please merge this PR?

Haha this is really an old PR! I would like to help, but only authorized users are allowed to merge. Maybe you can try rebase in your local environment.

pancak3 avatar May 31 '22 13:05 pancak3

I have the same problem. @pancak3, thanks for this fix! Сould you please merge this PR?

Haha this is really an old PR! I would like to help, but only authorized users are allowed to merge. Maybe you can try rebase in your local environment.

Yes, I merged the PR in my own repository. But I do not give up hope that an authorized user will merge this PR. I just didn't find a better user to mention in this PR 🙂

kuznetsov-m avatar May 31 '22 14:05 kuznetsov-m

They did not maintain this for a long time. This branch may be merged decades later :D

pancak3 avatar May 31 '22 14:05 pancak3