Comments (6)
@AluminumTank when building the package, the lack of yajl 1.X should be irrelevant: if it's not there, there shouldn't be a problem with building and/or installing the package, and/or running the tests. The ijson/backens/yajl.py
backend only looks for yajl 1 at runtime.
Are you running into a particular issue, and if so can you provide the details? Otherwise the only advantage of trying to remove the yajl
backend at build time is that you'll save a few bytes on installation. I'm not inclined to support such thing; moreover at some point the yajl
backend will be removed anyway.
from ijson.
For reference, other distros distribute ijson without removing the yajl
backend, even if they don't offer yajl 1.x either, you can have a look at https://repology.org/project/python:ijson/versions.
from ijson.
Awesome, thanks for the link. I went and looked at one of the other package's build script and realize that I was using python3 setup.py test
rather than python3 -m pytest
. Sorry to bother.
from ijson.
Also, to not be the "I solved it but didn't provide any details" guy, the error I was encountering was this:
======================================================================
ERROR: yajl (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: yajl
Traceback (most recent call last):
File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
module = __import__(module_name)
File "/builddir/ijson-3.1.4/ijson/backends/yajl.py", line 11, in <module>
yajl = _yajl2_ctypes_common.get_yajl(1)
File "/builddir/ijson-3.1.4/ijson/backends/_yajl2_ctypes_common.py", line 46, in get_yajl
yajl = backends.find_yajl_ctypes(version)
File "/builddir/ijson-3.1.4/ijson/backends/__init__.py", line 42, in find_yajl_ctypes
require_version(get_yajl_version(yajl), required)
File "/builddir/ijson-3.1.4/ijson/backends/__init__.py", line 16, in require_version
raise YAJLImportError('YAJL version %s.x required, found %s.%s.%s' % (required, major, minor, micro))
ijson.backends.YAJLImportError: YAJL version 1.x required, found 2.1.0
----------------------------------------------------------------------
Ran 574 tests in 0.653s
FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=574 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=574 errors=1 failures=0>
=> ERROR: python3-ijson-3.1.4_1: do_check: 'python3 setup.py ${make_check_target} ${make_check_args}' exited with 1
=> ERROR: in do_check() at common/build-style/python3-module.sh:40
...which can be avoided by not using the old test entrypoint in setup.py
and using pytest
instead.
from ijson.
I also run usually with python -munittest discover
, which works as well ;)
from ijson.
I was working within the confines of one of the build-style scripts in void-packages
which defaults to setup.py test
if it can't find pytest
with no other alternatives as far as I could tell. I figured conforming and not making my build-script a special snowflake was probably the best approach, but good to know there's other alternatives :)
from ijson.
Related Issues (20)
- yajl2_c backend crashes on PyPy3 HOT 19
- Is there a way to recursively iterate the key? HOT 4
- ijson.items(file, prefix) waits for EOF HOT 8
- Wheels for Python 3.12 with yajl2_c backend HOT 4
- Include array index HOT 2
- High level interface to iterate over lists HOT 3
- HighLevelAPI: Raise an error if the prefix does not exist HOT 2
- Is it possible to use multiple prefix HOT 8
- yajl2_c backend for lambda function HOT 2
- How to use ijson to covert string to dict? HOT 3
- How to read json records in chunks using ijson? HOT 4
- Question: is it possible that returing bytes instead of str could speedup parsing? HOT 3
- Thread safety HOT 9
- Full support for byte stream generator HOT 9
- Allow to use ijson package by a relative import HOT 4
- How can I most-efficiently check for a key in the top-level of a json object? HOT 3
- Python3.12 compilation error: ‘PyGenObject’ has no member named ‘gi_code’ HOT 5
- Is it possible to use isjon with Jsonl, ndjson ? HOT 5
- Memory leak on exception handling with yajl2_c backend HOT 6
- _yajl2 backend broken with Python 3.12 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ijson.