Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcg: gateway: use Python's built-in json library #17

Merged
merged 1 commit into from
Mar 16, 2022
Merged

bcg: gateway: use Python's built-in json library #17

merged 1 commit into from
Mar 16, 2022

Conversation

commodo
Copy link
Contributor

@commodo commodo commented Mar 16, 2022

This reduces the dependency list by one, since Python has a built-in JSON
library with the same API.

Fixes #16

Signed-off-by: Alexandru Ardelean ardeleanalex@gmail.com

This reduces the dependency list by one, since Python has a built-in JSON
library with the same API.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
@commodo
Copy link
Contributor Author

commodo commented Mar 16, 2022

i've not tested this, but from a high-level perspective it looks correct;

i just wanted to sort of ping / re-kick the discussion from #16
and i thought of doing it in the form of a PR

@blavka
Copy link
Member

blavka commented Mar 16, 2022

Hi,
we're using simplejson because the standard library didn't work well with the decimal type

talk = json.loads(line, parse_float=decimal.Decimal)

But it's been a long time since we've done it, it's still been for python2.7 and it's stayed that way.

@blavka
Copy link
Member

blavka commented Mar 16, 2022

I see that shouldn't be a problem anymore.

@blavka blavka merged commit 0c284ff into hardwario:master Mar 16, 2022
@commodo commodo deleted the drop-simplejson branch March 16, 2022 08:47
@commodo
Copy link
Contributor Author

commodo commented Mar 16, 2022

oh, thank you for taking the patch

i was hoping for a bit more discussion, since i don't want to break anything and i didn't test anything :)

but if you're fine with this, then it's super for me;
i can try to remove the simplejson package from OpenWrt :)

thank you :)

@blavka
Copy link
Member

blavka commented Mar 16, 2022

I haven't done a release yet, I want to test the behavior, but it's true that with python3.x it was an unnecessary addiction.

commodo added a commit to commodo/packages that referenced this pull request Aug 16, 2022
From:
  hardwario/bch-gateway#17

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
commodo added a commit to commodo/packages that referenced this pull request Aug 16, 2022
From:
  hardwario/bch-gateway#17

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
commodo added a commit to commodo/packages that referenced this pull request Aug 16, 2022
From:
  hardwario/bch-gateway#17

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
neheb pushed a commit to openwrt/packages that referenced this pull request Aug 16, 2022
From:
  hardwario/bch-gateway#17

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this pull request Nov 11, 2022
From:
  hardwario/bch-gateway#17

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
stokito pushed a commit to stokito/packages that referenced this pull request Dec 6, 2022
From:
  hardwario/bch-gateway#17

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thoughts on using Python's json lib vs simplejson?
2 participants