pypi / isort
isort
What changed in isort 9, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
5 breaking2 new APIs and options1 performance3 behavior and defaults1 tooling31 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initisort 943 changes
Breaking changes 5
Configuration discovery stops at Git worktree boundaries.
The setting now sorts unwrapped lines.
EOF on stdin now acts as quit in the interactive prompt.
Logic for deprecated options was removed.
Private standard-library modules are now considered stdlib modules.
New APIs and options 2
A CLI flag for forced separation was added.
The separate_packages option was added.
Performance 1
isort is compiled with mypyc, with compiled wheels for major platforms and supported Python versions; the notes report speedups of more than 2x and 3x in tests.
Behavior and default changes 3
An aliased import is kept when the plain name carries a comment.
Sorted __all__ and literals are now compatible with Black.
Initial support for Python 3.15, including its lazy imports, was added.
Tooling 1
isort can now sort lazy import statements.
Fixes and other changes 31
Blank lines before comment-only sections are preserved.
The setting no longer hoists indented semicolon imports.
Preprocessing preserves CRLF blank lines.
Sorting literals preserves trailing comments.
The setting no longer emits unparsable code around trailing comments when set to 10.
Sorting reexports preserves trailing-comma layout.
Sorting reexports preserves file line endings.
Star imports are handled better when using parentheses.
stdin output preserves LF line endings on Windows.
Restores running isort with python -m isort by excluding __main__ from mypyc compilation.
Added imports are now kept below a prefixed module docstring.
Bare # inline comments on imports are now preserved.
Fixed a false positive with float_to_top and add_imports.
check_code now detects changes that only affect lines_before_imports.
Using --config-root without --resolve-all-configs no longer crashes.
The isort off/on/split comments are now honored during float_to_top preprocessing with CRLF input.
Preservation of form-feed blank lines was fixed.
Fixed the lazy=True option for git_hook.
Inline comments are no longer duplicated across merged from-import lines.
The skip comment is now honored when a __future__ import is present.
Values 3 and 5 are no longer ignored when wrapping single imports with inline comments.
Fixed grouping when non-aliased and aliased imports come from the same module.
NOQA is now added to long imports in the affected output paths.
Fixed non-idempotent output for commented imports and prevented spaces from accumulating before comments.
Opening-line comments no longer move to the alias attribute line on wrapped imports.
Fixed handling of pylint disable-next comments at the start of imports.
Skip comments are now honored when sorting reexports.
Fixed a crash on non-seekable streams such as stdin.
Fixed non-idempotent output when split_on_trailing_comma is used with a non-default wrap mode.
Fixed handling of src glob patterns passed through the CLI.
Fixed handling and word-wrapping of star imports, including wrapping that could produce invalid Python.