Merge for Issue #18997: Issue #18997: fix ElementTree crash with using pickle and __getstate__.