Skip to content

Commit

Permalink
Python 3.9a5 removed xml.etree.cElementTree
Browse files Browse the repository at this point in the history
It was deprecated since Python 3.3.

Fixes #112.
  • Loading branch information
mgedmin committed Mar 29, 2020
1 parent 3fdab8e commit 3193cdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion check_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
from distutils.filelist import glob_to_re
from contextlib import contextmanager, closing
from distutils.text_file import TextFile
from xml.etree import cElementTree as ET

try:
from xml.etree import cElementTree as ET
except ImportError:
# Python 3.9+
from xml.etree import ElementTree as ET

try:
import ConfigParser
Expand Down
2 changes: 1 addition & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import zipfile
from contextlib import closing
from io import BytesIO
from xml.etree import cElementTree as ET
from xml.etree import ElementTree as ET

try:
from cStringIO import StringIO # Python 2.x
Expand Down

0 comments on commit 3193cdd

Please sign in to comment.