DataBiosphere / azul

Metadata indexer and query service used for AnVIL, HCA, LungMAP, and CGP
Apache License 2.0
6 stars 2 forks source link

TDR unit test yacc table warnings #2035

Open amarjandu opened 4 years ago

amarjandu commented 4 years ago

WARNING: yacc table file version is out of date occurs multiple times within the TestTDRClient class. The issue was isolated to the ply 3.10 library that is being used, when attempting to update the pip installation of ply to 3.11 (currently the latest) the issue persists.

joson-cn commented 1 year ago

解决方法:1、降低ply版本,2、新生成文件替换原来的文件。

python3

from cffi import FFI _ffi = FFI() _ffi.cdef(""" ... int rpmvercmp (const char a, const char b); ... """) warning:yacc table file version is out of date。 以上命令可复现warning。

不报警告版本: rpm -qa|grep -E "python3-ply|python3-pycparser" python3-ply-3.9-9.ky10.noarch python3-pycparser-2.20-2.ky10.noarch

python3

import ply ply.version '3.9'

grep tabversion /usr/lib/python3.7/site-packages/pycparser/yacctab.py _tabversion = '3.8' //这个版本是正常的,上面的version=3.9,这里的_tabversion=3.8,与下面的版本对上,所以不报警告。

grep "version" /usr/lib/python3.7/site-packages/ply/yacc.py version = '3.9' tabversion__ = '3.8'

============ 报警告版本: rpm -qa|grep -E "python3-ply|python3-pycparser" python3-ply-3.11-1.ky10.noarch python3-pycparser-2.20-2.ky10.noarch

python3

import ply ply.version '3.11'

grep tabversion /usr/lib/python3.7/site-packages/pycparser/yacctab.py _tabversion = '3.8' //这里的版本过低导致报warning,上面的version=3.11,这里的_tabversion=3.8,与下面的两个版本对不上,所以报警告。

grep "version" /usr/lib/python3.7/site-packages/ply/yacc.py version = '3.11' tabversion__ = '3.10'

warning在当前目录下生成的py文件中的版本: grep tabversion yacctab.py _tabversion = '3.10' grep tabversion lextab.py _tabversion = '3.10'