diff --git a/AUTHORS.rst b/AUTHORS.rst index a00d4c6e..86aebc45 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -33,3 +33,4 @@ Contributors (chronological) - Ram Rachum `@cool-RR `_ - Romain Casati `@casatir `_ - Evgeny Kemerov `@sudoguy `_ +- Karthikeyan Singaravelan `@tirkarthi `_ diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a6195d4e..dabf01ca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,13 @@ Changelog 0.18.0 (unreleased) ------------------- +Bug fixes: + +- Remove usage of deprecated cElementTree (:issue:`339`). + Thanks :user:`tirkarthi` for reporting and for the PR. +- Address ``SyntaxWarning`` on Python 3.12 (:pr:`418`). + Thanks :user:`smontanaro` for the PR. + Removals: - ``TextBlob.translate()`` and ``TextBlob.detect_language``, and ``textblob.translate`` diff --git a/src/textblob/_text.py b/src/textblob/_text.py index d247c397..62cc0d55 100644 --- a/src/textblob/_text.py +++ b/src/textblob/_text.py @@ -9,7 +9,7 @@ import string import types from itertools import chain -from xml.etree import cElementTree +from xml.etree import ElementTree basestring = (str, bytes) @@ -909,7 +909,7 @@ def load(self, path=None): if not os.path.exists(path): return words, synsets, labels = {}, {}, {} - xml = cElementTree.parse(path) + xml = ElementTree.parse(path) xml = xml.getroot() for w in xml.findall("word"): if self._confidence is None or self._confidence <= float(