isort 9.0.0 is the result of several alpha and beta releases, as well as a small number of fixes added after the last beta. For release notes for the individual alphas and betas we would like to refer to:
Skipped version numbers are the result of changes to our release infrastructure that broke while creating the actual releases.
Please find below the full release notes for version 9.0.0, the newest release of isort after version 8.0.1.
isort 9.0.0 contains some significant changes and improvements. Most notably there is now support for Python 3.15 and its lazy imports and we have included several performance improvements as well as providing mypyc compiled wheels for all major platforms and supported versions of Python. In our own tests we saw speeds ups of more than 2x and 3x times, but this is highly dependent on the codebase isort needs to inspect.
The full list of changes is as follows:
💥 Breaking Changes
- Remove logic for deprecated options (#2498) @DanielNoord
🚀 Features
- Sort lazy import statements (#2503) @DanielNoord
- Add initial support for Python 3.15 (#2466) @DanielNoord
- Compile with
mypycby @DanielNoord in #2586 - Cache calls to
posixpath.abspathby @DanielNoord in #2606 - Consider private
stdlibmodules to bestdlib(#2295) @devdanzin - Add CLI Flag for --forced-separate (#2367) @hirak99
- Add separate_packages option (#2313) @alex-liang3
🪲 Fixes
- Fix inline comment duplication across merged
from X importlines (#2499) @copilot-swe-agent - Fix src glob patterns passed via CLI (#2497) @ReinerBRO
- Fix opening-line comment moving to alias attribute line on wrapped imports (#2491) @copilot-swe-agent
- Fix multi_line_output=3/5 ignored when wrapping single imports with inline comments (#2474) @copilot-swe-agent
- Fix false positive in
check_codewhen usingfloat_to_top+add_imports(#2492) @copilot-swe-agent - Fix: preserve bare
#inline comments on imports (#2488) @copilot-swe-agent - Fix grouping of non-aliased imports when mixed with aliased imports from the same module (#2470) @copilot-swe-agent
- Fix #2500: trusted publishing by @staticdev in #2521
- Fix git_hook lazy=True option by @sparrowt in #2542
- Honor
# isort: off/on/splitduringfloat_to_toppreprocessing with CRLF input by @DanielNoord with @Copilot in #2553 - Fix --sort-reexports crash with non-seekable streams (e.g. stdin) by @Abdu-Ahmed in #2547
- Fix non-idempotent output with split_on_trailing_comma and a non-default wrap mode by @sarathfrancis90 in #2554
- Fix non-idempotent NOQA wrap mode with imports that carry their own comment by @sarathfrancis90 in #2556
- Fix NOQA wrap mode accumulating spaces before the comment on each run by @sarathfrancis90 in #2558
- Fix NOQA not added to long imports in several output paths by @urayoru113 in #2568
- Honor
# isort: skipwhen a__future__import is present (#2092) by @apoorvdarshan in #2574 - fix: make sorted
__all__and literals black-compatible (#2280) by @lord-haffi in #2576 - Honor skip comments when sorting reexports by @sakshichitnis27 in #2581
- Keep aliased import when the plain name carries a comment by @sarathfrancis90 in #2567
- fix: don't crash on --config-root without --resolve-all-configs by @Gooh456 in #2597
- fix: check_code misses lines_before_imports-only changes (#2242) by @gaoflow in #2563
- Fix preservation of form-feed blank lines by @utkarshalpha in #2599
- Small clean up and fix inconsistency in handling of
*imports by @DanielNoord in #2619 - Fix word-wrapping of 'from ... import *' into invalid Python (#2267) by @sudorm-rf0 in #2624
- Fix pylint disable-next comments at the start of imports by @Neallin-917 in #2628
- Keep add_imports below a prefixed module docstring by @Eljees in #2626
Other changes
- Add read the docs configuration (#2504) @DanielNoord
- Remove unused and broken dependencies (#2517) @DanielNoord
- Remove
Anyfromparse.py(#2516) @DanielNoord - Bring documentation in line with old documentation (#2507) @DanielNoord
- Sync profile docs with implementation (#2495) @copilot-swe-agent
- Fix the playground (#2494) @DanielNoord7) @hirak99
- Remove unused _ENCODING_PATTERN regex and re import by @duriantaco in #2525
- Remove references to defunct
git_ignoreconfig by @sparrowt in #2531 - Fix broken relative links in README and CHANGELOG for both GitHub and Sphinx by @rohitshinde08 in #2530
- Bump vendored
tomliby @DanielNoord in #2579 - Document temporary .isorted files by @sapunyangkut in #2580
- Remove
cruftby @DanielNoord in #2610 - Small fixes in preparation for
mypyccompiled wheels by @DanielNoord in #2623 - Small fixes in preparation for compiling with
mypycby @DanielNoord in #2625 - Fix
test_importablefor local dev by @DanielNoord in #2635
Full Changelog: 8.0.1...9.0.0