diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index f00e90baca..c907a22cfd 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -27,6 +27,7 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * {% jdoc vm::lang.vm.VmTokenManager %} * {% jdoc java::lang.java.JavaTokenManager %} +* {% jdoc python::lang.python.PythonTokenManager %} ### External Contributions diff --git a/pmd-python/src/main/java/net/sourceforge/pmd/lang/python/PythonTokenManager.java b/pmd-python/src/main/java/net/sourceforge/pmd/lang/python/PythonTokenManager.java index 30a3aa72fc..161aa944c7 100644 --- a/pmd-python/src/main/java/net/sourceforge/pmd/lang/python/PythonTokenManager.java +++ b/pmd-python/src/main/java/net/sourceforge/pmd/lang/python/PythonTokenManager.java @@ -1,4 +1,4 @@ -/** +/* * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ @@ -6,13 +6,21 @@ package net.sourceforge.pmd.lang.python; import java.io.Reader; +import net.sourceforge.pmd.annotation.InternalApi; +import net.sourceforge.pmd.cpd.Language; +import net.sourceforge.pmd.cpd.Tokenizer; import net.sourceforge.pmd.lang.TokenManager; import net.sourceforge.pmd.lang.ast.SimpleCharStream; import net.sourceforge.pmd.lang.python.ast.PythonParserTokenManager; /** * Python Token Manager implementation. + * + * @deprecated This is internal API, use {@link Tokenizer#tokenize(net.sourceforge.pmd.cpd.SourceCode, net.sourceforge.pmd.cpd.Tokens)} + * via {@link Language#getTokenizer()}. */ +@Deprecated +@InternalApi public class PythonTokenManager implements TokenManager { private final PythonParserTokenManager tokenManager;