rust-x-bindings / rust-xcb

Rust bindings and wrapper for XCB.
MIT License
165 stars 64 forks source link

xml.etree.cElementTree removed from Python 3.9 #84

Closed gyakovlev closed 4 years ago

gyakovlev commented 4 years ago

attempt to build with python3.9 will result in

error: failed to run custom build command for `xcb v0.9.0`

Caused by:
  process didn't exit successfully: `/tmp/portage/x11-terms/alacritty-0.4.3_rc1/work/alacritty-0.4.3-rc1/target/release/build/xcb-544891cd03de51f6/build-script-build` (exit code: 101)
--- stderr
failed to load xcbgen
Traceback (most recent call last):
  File "/tmp/portage/x11-terms/alacritty-0.4.3_rc1/work/cargo_home/gentoo/xcb-0.9.0/rs_client.py", line 2439, in <module>
    from xcbgen.state import Module
  File "/tmp/portage/x11-terms/alacritty-0.4.3_rc1/work/cargo_home/gentoo/xcb-0.9.0/xcbgen/state.py", line 5, in <module>
    from xml.etree.cElementTree import parse
ModuleNotFoundError: No module named 'xml.etree.cElementTree'
thread 'main' panicked at 'processing of /tmp/portage/x11-terms/alacritty-0.4.3_rc1/work/cargo_home/gentoo/xcb-0.9.0/xml/xvmc.xml returned non-zero (1)', /tmp/portage/x11-terms/alacritty-0.4.3_rc1/work/cargo_home/gentoo/xcb-0.9.0/build.rs:77:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

xml.etree.ElementTree should be used directly, since python3.1

https://github.com/rtbo/rust-xcb/blob/cceb5442ba3d63e79cee7367d73835afaa635d48/xcbgen/state.py#L5 and https://github.com/rtbo/rust-xcb/blob/d7cb614a6fe9f4424ed26939a5720770f84acd05/xcbgen/matcher.py#L10 will need to be updated as 3.9 started hitting repos.

gyakovlev commented 4 years ago

upstream python bug for reference https://bugs.python.org/issue40064

rtbo commented 4 years ago

Solved in #87