lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
980 stars 388 forks source link

Fix latent Python 3 test errors; fix PY_SSIZE_T_CLEAN DeprecationWarning #363

Closed EricCousineau-TRI closed 2 years ago

EricCousineau-TRI commented 2 years ago

Resolves #358 Resolves #347

We encounter this in Drake when using 20.04

EricCousineau-TRI commented 2 years ago

@ashuang I'm not seeing CI running; is that b/c it's using Travis CI, and perhaps those checks got disabled? I tested locally for Python 3.8.10, but did not try other versions (e.g. 3.6.9, or 2.7.17)

FYI @jwnimmer-tri


Testing commands:

rm -rf build && mkdir build && cd build
cmake .. \
    -DLCM_ENABLE_EXAMPLES=OFF \
    -DLCM_ENABLE_GO=OFF \
    -DLCM_ENABLE_JAVA=OFF \
    -DLCM_ENABLE_LUA=OFF \
    -DLCM_ENABLE_PYTHON=ON \
    -DLCM_ENABLE_TESTS=ON \
    -DPYTHON_EXECUTABLE=$(which python3)
make --always-make -j
ctest -V -R 'Python::*'
EricCousineau-TRI commented 2 years ago

Tested locally on Python 2.7.17, 3.6.9, and 3.8.10.

EricCousineau-TRI commented 2 years ago

Thanks!