won't build: lvalue required as increment operand
ruamel.yaml is a YAML 1.2 parser/emitter for Python
Brought to you by:
anthon
I am attempting to pip install some modules that require ruamel as a dependency. Build fails with the following (similar errors in other places where the same syntax is used):
ext/_ruamel_yaml.c: In function ‘__pyx_tp_dealloc_12_ruamel_yaml_CParser’:
ext/_ruamel_yaml.c:23877:5: error: lvalue required as increment operand
23877 | ++Py_REFCNT(o);
| ^~
ext/_ruamel_yaml.c:23879:5: error: lvalue required as decrement operand
23879 | --Py_REFCNT(o);
| ^~
ext/_ruamel_yaml.c: In function ‘__pyx_tp_dealloc_12_ruamel_yaml_CEmitter’:
ext/_ruamel_yaml.c:24050:5: error: lvalue required as increment operand
24050 | ++Py_REFCNT(o);
| ^~
ext/_ruamel_yaml.c:24052:5: error: lvalue required as decrement operand
24052 | --Py_REFCNT(o);
| ^~
pip is grabbing ruamel.yaml-0.15.100.tar.gz
. Python 3.10.2 on RHEL 7.9 x86_64 using devtoolset-10:
$ gcc --version
gcc (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)
pip install output with build warnings/errors
You don't explain why you use ruamel.yaml 0.15.100, which was released more than two full years before the first 3.10 release, and even before the first 3.8 release. I hope you realise the Python C binding do change over time, requiring updates to C and/or Cython code or at least some regeneration with a newer Cython version.
But even if you don't https://pypi.org/project/ruamel.yaml/0.15.100/ clearly states (on the left under Programming Languaages) what are the compatbile Python versions..
Perhaps you should yell at Amazon, because it's their package that is pulling that version as a dependency (via AWS CLI v2). Or one of their dependencies.
I've filed a bug with them, since this does seem to be their issue. I appreciate the response (though not necessarily the tone, thanks for that).
Here's that report if you're interested or curious. It links back here.