Skip to content

Why does isort consider parser as built-in package? #2290

Answered by guillermodotn
secsilm asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @secsilm,

It depends on which Python version you are setting when using isort. If you're running Python 3.13, you can try the following command:

isort --py 313 <name_of_your_file.py>

This ensures that parser is correctly sorted for that Python version.

Why does this happen?

When you don't specify the Python version, isort creates a set containing all standard library packages available across all Python 3.X versions. Since parser was removed in Python 3.10, it is still included when isort considers older versions.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@secsilm
Comment options

Answer selected by secsilm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants