This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: test_etree is skipped in test_typing due to cElementTree removal
Type: behavior Stage: resolved
Components: Tests, XML Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: furkanonder, levkivskyi, serhiy.storchaka, xtreak
Priority: normal Keywords: patch

Created on 2020-03-27 11:36 by xtreak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19189 merged furkanonder, 2020-03-27 13:21
Messages (4)
msg365143 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-03-27 11:36
Currently, test_etree has a Python 2 shim importing cElementTree and skipping the test on ImportError. Since cElementTree was deprecated and removed in Python 3 with 36543. So this test is now skipped. The fix would be to remove the shim and import Element from xml.etree.ElementTree. This is a good beginner issue. Test log as below : 

./python -m test test_typing -m test_etree -vvv
== CPython 3.9.0a5+ (heads/master:33f15a16d4, Mar 27 2020, 11:15:48) [GCC 7.5.0]
== Linux-4.15.0-66-generic-x86_64-with-glibc2.27 little-endian
== cwd: /root/cpython/build/test_python_24162
== CPU count: 1
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 0.07 Run tests sequentially
0:00:00 load avg: 0.07 [1/1] test_typing
test_etree (test.test_typing.UnionTests) ... skipped 'cElementTree not found'


Ran 1 test in 0.001s

OK (skipped=1)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 150 ms
Tests result: SUCCESS
msg365209 - (view) Author: Ivan Levkivskyi (levkivskyi) * (Python committer) Date: 2020-03-28 12:32
New changeset 34b0598295284e3ff6cedf5c05e159ce1fa54d60 by Furkan Önder in branch 'master':
bpo-40086: Update/fix test_etree test case in test_typing (GH-19189)
msg365210 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-03-28 12:53
Thanks @furkanonder for the patch.
msg365216 - (view) Author: Furkan Onder (furkanonder) * Date: 2020-03-28 15:31
@xtreak You're welcome :)
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84267
2020-03-28 15:31:30furkanondersetmessages: + msg365216
2020-03-28 12:53:05xtreaksetstatus: open -> closed
resolution: fixed
messages: + msg365210

stage: patch review -> resolved
2020-03-28 12:32:39levkivskyisetnosy: + levkivskyi
messages: + msg365209
2020-03-27 13:21:59furkanondersetkeywords: + patch
nosy: + furkanonder

pull_requests: + pull_request18549
stage: needs patch -> patch review
2020-03-27 11:36:55xtreakcreate