Closed jayvdb closed 4 years ago
I've now fixed this by skipping these tests when ujson
is installed. Honestly, it seems like ujson
is pretty much unmaintained, so I'm thinking about maybe not recommending its use any more. I've created an issue for discussing this at #263.
The problem has not been solved by https://github.com/msiemens/tinydb/commit/4e6f849e0dc698f468b53104f639f064dfd20691
If ujson is installed, using tinydb as documented breaks. i.e. use of separators
etc in the constructor.
"Deprecating" it is not nice. The user isnt explicitly trying to use it with tinydb
. They may need it for another part of their stack. It is merely available in their site-packages, and tinydb
assumes it should use it, and fails.
"Deprecating" it is not nice. The user isnt explicitly trying to use it with
tinydb
. They may need it for another part of their stack. It is merely available in their site-packages, andtinydb
assumes it should use it, and fails.
You're right that I was a little quick to add a deprecation warning. I think it wasn't the best idea to add this auto-detection mechanism in the first place. Maybe it would be better to raise a warning that the behavior of JSONStorage
may change if ujson
is installed. We could also add an environment variable that disables automatic ujson
usage so it's possible to run the test suite without errors even if ujson
is installed.
In the long term I think we'd need to release a breaking release of TinyDB that removes ujson
auto-import altogether.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reopen this if needed. Thank you for your contributions :heart:
Still an issue.
This should be fixed with TinyDB v4 where ujson
support has been dropped
One still can write a custom storage that uses the ujson
module but it won't be used automatically if found present
Thanks.
When ujson is installed, there are two errors in the test suite.
Builds at https://build.opensuse.org/package/show/home:jayvdb:py-new/python-tinydb