-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
Replaced vendored omnijson by the standard lib version #279
Conversation
setup.py
Outdated
print('Pip required.') | ||
sys.exit(1) | ||
|
||
os.system('pip install ujson') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it removed a feature (speed). We can try to import ujson if it is available.
try:
import ujson as json
except ImportError:
import json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When reading the numbers on https://pypi.python.org/pypi/ujson, it seems own Python json is as fast or even faster, or did I misread them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ujson
is faster. The numbers in their benchmarks are number of operations
. Higher is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just found http://jyotiska.github.io/blog/posts/json_vs_simplejson_vs_ujson.html
Then let's keep the ujson import, I'll update the patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you also want to keep the "speedups" part in setup.py?
Yes, maintain the speedups.
Em 24 de fev de 2017 07:14, "Claude Paroz" <[email protected]>
escreveu:
… ***@***.**** commented on this pull request.
------------------------------
In setup.py
<https://github.com/kennethreitz/tablib/pull/279#discussion_r102913722>:
> @@ -14,16 +14,6 @@
os.system("python setup.py sdist upload")
sys.exit()
-if sys.argv[-1] == 'speedups':
- try:
- __import__('pip')
- except ImportError:
- print('Pip required.')
- sys.exit(1)
-
- os.system('pip install ujson')
Do you also want to keep the "speedups" part in setup.py?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/kennethreitz/tablib/pull/279#discussion_r102913722>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGdfOghnmuNJmA8tsKrkp28h2afQKquks5rfq2dgaJpZM4MG90h>
.
|
Should be good to go now. |
Great! Thanks! |
Refs #273.