Debian Codegraph @

CHANGELOG.md

raw
1 Changelog
2 =========
3
4 NOTE: isort follows the [semver](https://semver.org/) versioning standard.
5 Find out more about isort's release policy [here](docs/major_releases/release_policy.md).
6
7 Please find a complete overview of all releases
8 on [Github](https://github.com/PyCQA/isort/releases).
9
10 ## Releases
11
12 ### Unreleased
13
14 ### 9.0.0 August 26 2026
15
16 - Remove logic for deprecated options (#2498) @DanielNoord
17 - Sort lazy import statements (#2503) @DanielNoord
18 - Add initial support for Python 3.15 (#2466) @DanielNoord
19 - Compile with `mypyc` by @DanielNoord in https://github.com/PyCQA/isort/pull/2586
20 - Cache calls to `posixpath.abspath` by @DanielNoord in https://github.com/PyCQA/isort/pull/2606
21 - Consider private `stdlib` modules to be `stdlib` (#2295) @devdanzin
22 - Add CLI Flag for --forced-separate (https://github.com/PyCQA/isort/pull/2367) @hirak99
23 - Add separate_packages option (#2313) @alex-liang3
24 - Fix inline comment duplication across merged `from X import` lines (#2499) @copilot-swe-agent
25 - Fix src glob patterns passed via CLI (#2497) @ReinerBRO
26 - Fix opening-line comment moving to alias attribute line on wrapped imports (#2491) @copilot-swe-agent
27 - Fix multi_line_output=3/5 ignored when wrapping single imports with inline comments (#2474) @copilot-swe-agent
28 - Fix false positive in `check_code` when using `float_to_top` + `add_imports` (#2492) @copilot-swe-agent
29 - Fix: preserve bare `#` inline comments on imports (#2488) @copilot-swe-agent
30 - Fix grouping of non-aliased imports when mixed with aliased imports from the same module (#2470) @copilot-swe-agent
31 - Fix https://github.com/PyCQA/isort/issues/2500: trusted publishing by @staticdev in https://github.com/PyCQA/isort/pull/2521
32 - Fix git_hook lazy=True option by @sparrowt in https://github.com/PyCQA/isort/pull/2542
33 - Honor `# isort: off/on/split` during `float_to_top` preprocessing with CRLF input by @DanielNoord with @Copilot in https://github.com/PyCQA/isort/pull/2553
34 - Fix --sort-reexports crash with non-seekable streams (e.g. stdin) by @Abdu-Ahmed in https://github.com/PyCQA/isort/pull/2547
35 - Fix non-idempotent output with split_on_trailing_comma and a non-default wrap mode by @sarathfrancis90 in https://github.com/PyCQA/isort/pull/2554
36 - Fix non-idempotent NOQA wrap mode with imports that carry their own comment by @sarathfrancis90 in https://github.com/PyCQA/isort/pull/2556
37 - Fix NOQA wrap mode accumulating spaces before the comment on each run by @sarathfrancis90 in https://github.com/PyCQA/isort/pull/2558
38 - Fix NOQA not added to long imports in several output paths by @urayoru113 in https://github.com/PyCQA/isort/pull/2568
39 - Honor `# isort: skip` when a `__future__` import is present (#2092) by @apoorvdarshan in https://github.com/PyCQA/isort/pull/2574
40 - fix: make sorted `__all__` and literals black-compatible (#2280) by @lord-haffi in https://github.com/PyCQA/isort/pull/2576
41 - Honor skip comments when sorting reexports by @sakshichitnis27 in https://github.com/PyCQA/isort/pull/2581
42 - Keep aliased import when the plain name carries a comment by @sarathfrancis90 in https://github.com/PyCQA/isort/pull/2567
43 - fix: don't crash on --config-root without --resolve-all-configs by @Gooh456 in https://github.com/PyCQA/isort/pull/2597
44 - fix: check_code misses lines_before_imports-only changes (#2242) by @gaoflow in https://github.com/PyCQA/isort/pull/2563
45 - Fix preservation of form-feed blank lines by @utkarshalpha in https://github.com/PyCQA/isort/pull/2599
46 - Small clean up and fix inconsistency in handling of `*` imports by @DanielNoord in https://github.com/PyCQA/isort/pull/2619
47 - Fix word-wrapping of 'from ... import *' into invalid Python (#2267) by @sudorm-rf0 in https://github.com/PyCQA/isort/pull/2624
48 - Fix pylint disable-next comments at the start of imports by @Neallin-917 in https://github.com/PyCQA/isort/pull/2628
49 - Keep add_imports below a prefixed module docstring by @Eljees in https://github.com/PyCQA/isort/pull/2626
50 - Add read the docs configuration (#2504) @DanielNoord
51 - Remove unused and broken dependencies (#2517) @DanielNoord
52 - Remove `Any` from `parse.py` (#2516) @DanielNoord
53 - Bring documentation in line with old documentation (#2507) @DanielNoord
54 - Sync profile docs with implementation (#2495) @copilot-swe-agent
55 - Fix the playground (#2494) @DanielNoord7) @hirak99
56 - Remove unused _ENCODING_PATTERN regex and re import by @duriantaco in https://github.com/PyCQA/isort/pull/2525
57 - Remove references to defunct `git_ignore` config by @sparrowt in https://github.com/PyCQA/isort/pull/2531
58 - Fix broken relative links in README and CHANGELOG for both GitHub and Sphinx by @rohitshinde08 in https://github.com/PyCQA/isort/pull/2530
59 - Bump vendored `tomli` by @DanielNoord in https://github.com/PyCQA/isort/pull/2579
60 - Document temporary .isorted files by @sapunyangkut in https://github.com/PyCQA/isort/pull/2580
61 - Remove `cruft` by @DanielNoord in https://github.com/PyCQA/isort/pull/2610
62 - Small fixes in preparation for `mypyc` compiled wheels by @DanielNoord in https://github.com/PyCQA/isort/pull/2623
63 - Small fixes in preparation for compiling with `mypyc` by @DanielNoord in https://github.com/PyCQA/isort/pull/2625
64 - Fix `test_importable` for local dev by @DanielNoord in https://github.com/PyCQA/isort/pull/2635
65
66 ### 8.0.1 February 28 2026
67
68 - Fix #2461: Added compression to stdlibs for Python 3.14 in isort/stdlibs/py314.py (#2463) @FinlayTheBerry
69 - Fix unindented comments being corrupted in indented blocks (#2459) @worksbyfriday
70
71 ### 8.0.0 February 19 2026
72
73 - Removed `--old-finders` and `--magic-placement` flags and `old_finders` configuration option. The legacy finder logic that relied on environment introspection has been removed (#2445) @joao-faria-dev
74 - Update the `plone` profile to not clash with `black` (#2456) @ale-rt
75
76 ### 6.1.0 October 1 2025
77
78 - Add python 3.14 classifier and badge (#2409) @staticdev
79 - Drop use of non-standard pkg_resources API (#2405) @dvarrazzo
80
81 ### 6.0.1 Febuary 26 2025
82
83 - Add OSError handling in find_imports_in_file (#2331) @kobarity
84
85 ### 6.0.0 January 27 2025
86
87 - Remove support for Python 3.8 (#2327) @DanielNoord
88 - Python 3.13 support (#2306) @mayty
89 - Speed up exists_case_sensitive calls (#2264) @correctmost
90 - Ensure that split_on_trailing_comma works with as imports (#2340) @DanielNoord
91 - Black profile: enable magic comma (#2236) @MrMino
92 - Update line_length and single_line_exclusions in google profile (#2149) @jagapiou
93 - Allow --diff to be used with --jobs (#2302) @mnakama
94 - Fix wemake profile to have correct character limit (#2241) @sobolevn
95 - Fix sort_reexports code mangling (#2283) @Helveg
96 - Fix correct group by package tokenization (#2136) @glasnt
97
98 ### 5.13.2 December 13 2023
99
100 - Apply the bracket fix from issue #471 only for use_parentheses=True (#2184) @bp72
101 - Confine pre-commit to stages (#2213) @davidculley
102 - Fixed colors extras (#2212) @staticdev
103
104 ### 5.13.1 December 11 2023
105
106 - Fixed integration tests (#2208) @bp72
107 - Fixed normalizing imports from more than one level of parent modules (issue/2152) (#2191) @bp72
108 - Remove optional dependencies without extras (#2207) @staticdev
109
110 ### 5.13.0 December 9 2023
111
112 - Cleanup deprecated extras (#2089) @staticdev
113 - Fixed #1989: settings lookup when working in stream based mode
114 - Fixed 80 line length for wemake linter (#2183) @skatromb
115 - Add support for Python 3.12 (#2175) @hugovk
116 - Fixed: add newest version to pre-commit docs (#2190) @AzulGarza
117 - Fixed assertions in test_git_hook (#2196) @mgorny
118 - Removed check for include_trailing_comma for the Hanging Indent wrap mode (#2192) @bp72
119 - Use the standard library tomllib on sufficiently new python (#2202) @eli-schwartz
120 - Update pre-commit.md version number (#2197) @nicobako
121 - doc: Update black_compatibility.md (#2177) @JSS95
122 - Fixed safety sept 2023 (#2178) @staticdev
123 - docs: fix black profile documentation (#2163) @nijel
124 - Fixed typo: indended -> indented (#2161) @vadimkerr
125 - Docs(configuration/options.md): fix missing trailing spaces for hard linebreak (#2157) @JoeyTeng
126 - Update pre-commit.md (#2148) @godiard
127 - chore: move configurations to pyproject.toml (#2115) @SauravMaheshkar
128 - Fixed typo in README (#2112) @stefmolin
129 - Update version in pre-commit setup to avoid installation issue with poetry (#2103) @stefmolin
130 - Skip .pytype directory by default. (#2098) @manueljacob
131 - Fixed a tip block styling in the Config Files section (#2097) @Klavionik
132 - Do not cache configuration files (#1995) @kaste
133 - Derive settings_path from --filename (#1992) @kaste
134 - Fixed year of version 5.12.0 in CHANGELOG.md (#2082) @DjLegolas
135
136 ### 5.12.0 January 28 2023
137
138 - Removed support for Python 3.7
139 - Fixed incompatiblity with latest poetry version
140 - Added support for directory limitations within built in git hook
141
142 ### 5.11.5 January 30 2023 [hotfix]
143 - Fixed incompatiblity with latest poetry version
144
145 ### 5.11.4 December 21 2022
146
147 - Fixed #2038 (again): stop installing documentation files to top-level site-packages (#2057) @mgorny
148 - CI: only run release workflows for upstream (#2052) @hugovk
149 - Tests: remove obsolete toml import from the test suite (#1978) @mgorny
150 - CI: bump Poetry 1.3.1 (#2058) @staticdev
151
152 ### 5.11.3 December 16 2022
153
154 - Fixed #2007: settings for py3.11 (#2040) @staticdev
155 - Fixed #2038: packaging pypoetry (#2042) @staticdev
156 - Docs: renable portray (#2043) @timothycrosley
157 - Ci: add minimum GitHub token permissions for workflows (#1969) @varunsh-coder
158 - Ci: general CI improvements (#2041) @staticdev
159 - Ci: add release workflow (#2026) @staticdev
160
161 ### 5.11.2 December 12 2022
162
163 - Hotfix #2034: isort --version is not accurate on 5.11.x releases (#2034) @gschaffner
164
165 ### 5.11.1 December 12 2022
166
167 - Hotfix #2031: only call `colorama.init` if `colorama` is available (#2032) @tomaarsen
168
169 ### 5.11.0 December 12 2022
170
171 - Added official support for Python 3.11 (#1996, #2008, #2011) @staticdev
172 - Dropped support for Python 3.6 (#2019) @barrelful
173 - Fixed problematic tests (#2021, #2022) @staticdev
174 - Fixed #1960: Rich compatibility (#1961) @ofek
175 - Fixed #1945, #1986: Python 4.0 upper bound dependency resolving issues @staticdev
176 - Fixed Pyodide CDN URL (#1991) @andersk
177 - Docs: clarify description of use_parentheses (#1941) @mgedmin
178 - Fixed #1976: `black` compatibility for `.pyi` files @XuehaiPan
179 - Implemented #1683: magic trailing comma option (#1876) @legau
180 - Add missing space in unrecoverable exception message (#1933) @andersk
181 - Fixed #1895: skip-gitignore: use allow list, not deny list @bmalehorn
182 - Fixed #1917: infinite loop for unmatched parenthesis (#1919) @anirudnits
183 - Docs: shared profiles (#1896) @matthewhughes934
184 - Fixed build-backend values in the example plugins (#1892) @mgorny
185 - Remove reference to jamescurtin/isort-action (#1885) @AndrewLane
186 - Split long cython import lines (#1931) @davidcollins001
187 - Update plone profile: copy of `black`, plus three settings. (#1926) @mauritsvanrees
188 - Fixed #1815, #1862: Add a command-line flag to sort all re-exports (#1863) @parafoxia
189 - Fixed #1854: `lines_before_imports` appending lines after comments (#1861) @legau
190 - Remove redundant `multi_line_output = 3` from "Compatibility with black" (#1858) @jdufresne
191 - Add tox config example (#1856) @umonaca
192 - Docs: add examples for frozenset and tuple settings (#1822) @sgaist
193 - Docs: add multiple config documentation (#1850) @anirudnits
194
195 ### 5.10.1 November 8 2021
196 - Fixed #1819: Occasional inconsistency with multiple src paths.
197 - Fixed #1840: skip_file ignored when on the first docstring line
198
199 ### 5.10.0 November 3 2021
200 - Implemented #1796: Switch to `tomli` for pyproject.toml configuration loader.
201 - Fixed #1801: CLI bug (--exend-skip-glob, overrides instead of extending).
202 - Fixed #1802: respect PATH customization in nested calls to git.
203 - Fixed #1838: Append only with certain code snippets incorrectly adds imports.
204 - Added official support for Python 3.10
205
206 #### Potentially breaking changes:
207 - Fixed #1785: `_ast` module incorrectly excluded from stdlib definition.
208
209 ### 5.9.3 July 28 2021
210 - Improved text of skipped file message to mention gitignore feature.
211 - Made all exceptions pickleable.
212 - Fixed #1779: Pylama integration ignores pylama specific isort config overrides.
213 - Fixed #1781: `--from-first` CLI flag shouldn't take any arguments.
214 - Fixed #1792: Sorting literals sometimes ignored when placed on first few lines of file.
215 - Fixed #1777: extend_skip is not honored wit a git submodule when skip_gitignore=true.
216
217 ### 5.9.2 July 8th 2021
218 - Improved behavior of `isort --check --atomic` against Cython files.
219 - Fixed #1769: Future imports added below assignments when no other imports present.
220 - Fixed #1772: skip-gitignore will check files not in the git repository.
221 - Fixed #1762: in some cases when skip-gitignore is set, isort fails to skip any files.
222 - Fixed #1767: Encoding issues surfacing when invalid characters set in `__init__.py` files during placement.
223 - Fixed #1771: Improved handling of skips against named streamed in content.
224
225 ### 5.9.1 June 21st 2021 [hotfix]
226 - Fixed #1758: projects with many files and skip_ignore set can lead to a command-line overload.
227
228 ### 5.9.0 June 21st 2021
229 - Improved CLI startup time.
230 - Implemented #1697: Provisional support for PEP 582: skip `__pypackages__` directories by default.
231 - Implemented #1705: More intuitive handling of isort:skip_file comments on streams.
232 - Implemented #1737: Support for using action comments to avoid adding imports to individual files.
233 - Implemented #1750: Ability to customize output format lines.
234 - Implemented #1732: Support for custom sort functions.
235 - Implemented #1722: Improved behavior for running isort in atomic mode over Cython source files.
236 - Fixed (https://github.com/PyCQA/isort/pull/1695): added imports being added to doc string in some cases.
237 - Fixed (https://github.com/PyCQA/isort/pull/1714): in rare cases line continuation combined with tabs can output invalid code.
238 - Fixed (https://github.com/PyCQA/isort/pull/1726): isort ignores reverse_sort when force_sort_within_sections is true.
239 - Fixed #1741: comments in hanging indent modes can lead to invalid code.
240 - Fixed #1744: repeat noqa comments dropped when * import and non * imports exist from the same package.
241 - Fixed #1721: repeat noqa comments on separate from lines with force-single-line set, sometimes get dropped.
242
243 #### Goal Zero (Tickets related to aspirational goal of achieving 0 regressions for remaining 5.0.0 lifespan):
244 - Implemented #1394: 100% branch coverage (in addition to line coverage) enforced.
245 - Implemented #1751: Strict typing enforcement (turned on mypy strict mode).
246
247 ### 5.8.0 March 20th 2021
248 - Fixed #1631: as import comments can in some cases be duplicated.
249 - Fixed #1667: extra newline added with float-to-top, after skip, in some cases.
250 - Fixed #1594: incorrect placement of noqa comments with multiple from imports.
251 - Fixed #1566: in some cases different length limits for dos based line endings.
252 - Implemented #1648: Export MyPY type hints.
253 - Implemented #1641: Identified import statements now return runnable code.
254 - Implemented #1661: Added "wemake" profile.
255 - Implemented #1669: Parallel (`-j`) now defaults to number of CPU cores if no value is provided.
256 - Implemented #1668: Added a safeguard against accidental usage against /.
257 - Implemented #1638 / #1644: Provide a flag `--overwrite-in-place` to ensure same file handle is used after sorting.
258 - Implemented #1684: Added support for extending skips with `--extend-skip` and `--extend-skip-glob`.
259 - Implemented #1688: Auto identification and skipping of some invalid import statements.
260 - Implemented #1645: Ability to reverse the import sorting order.
261 - Implemented #1504: Added ability to push star imports to the top to avoid overriding explicitly defined imports.
262 - Documented #1685: Skip doesn't support plain directory names, but skip_glob does.
263
264 ### 5.7.0 December 30th 2020
265 - Fixed #1612: In rare circumstances an extra comma is added after import and before comment.
266 - Fixed #1593: isort encounters bug in Python 3.6.0.
267 - Implemented #1596: Provide ways for extension formatting and file paths to be specified when using streaming input from CLI.
268 - Implemented #1583: Ability to output and diff within a single API call to `isort.file`.
269 - Implemented #1562, #1592 & #1593: Better more useful fatal error messages.
270 - Implemented #1575: Support for automatically fixing mixed indentation of import sections.
271 - Implemented #1582: Added a CLI option for skipping symlinks.
272 - Implemented #1603: Support for disabling float_to_top from the command line.
273 - Implemented #1604: Allow toggling section comments on and off for indented import sections.
274
275 ### 5.6.4 October 12, 2020
276 - Fixed #1556: Empty line added between imports that should be skipped.
277
278 ### 5.6.3 October 11, 2020
279 - Improved packaging of test files alongside source distribution (see: https://github.com/PyCQA/isort/pull/1555).
280
281 ### 5.6.2 October 10, 2020
282 - Fixed #1548: On rare occasions an unecessary empty line can be added when an import is marked as skipped.
283 - Fixed #1542: Bug in VERTICAL_PREFIX_FROM_MODULE_IMPORT wrap mode.
284 - Fixed #1552: Pylama test dependent on source layout.
285
286 #### Goal Zero: (Tickets related to aspirational goal of achieving 0 regressions for remaining 5.0.0 lifespan):
287 - Zope added to integration test suite
288 - Additional testing of CLI (simulate unseekable streams)
289
290 ### 5.6.1 [Hotfix] October 8, 2020
291 - Fixed #1546: Unstable (non-idempotent) behavior with certain src trees.
292
293 ### 5.6.0 October 7, 2020
294 - Implemented #1433: Provide helpful feedback in case a custom config file is specified without a configuration.
295 - Implemented #1494: Default to sorting imports within `.pxd` files.
296 - Implemented #1502: Improved float-to-top behavior when there is an existing import section present at top-of-file.
297 - Implemented #1511: Support for easily seeing all files isort will be ran against using `isort . --show-files`.
298 - Implemented #1487: Improved handling of encoding errors.
299 - Improved handling of unsupported configuration option errors (see #1475).
300 - Fixed #1463: Better interactive documentation for future option.
301 - Fixed #1461: Quiet config option not respected by file API in some circumstances.
302 - Fixed #1482: pylama integration is not working correctly out-of-the-box.
303 - Fixed #1492: --check does not work with stdin source.
304 - Fixed #1499: isort gets confused by single line, multi-line style comments when using float-to-top.
305 - Fixed #1525: Some warnings can't be disabled with --quiet.
306 - Fixed #1523: in rare cases isort can ignore direct from import if as import is also on same line.
307
308 #### Potentially breaking changes:
309 - Implemented #1540: Officially support Python 3.9 stdlib imports by default.
310 - Fixed #1443: Incorrect third vs first party categorization - namespace packages.
311 - Fixed #1486: "Google" profile is not quite Google style.
312 - Fixed "PyCharm" profile to always add 2 lines to be consistent with what PyCharm "Optimize Imports" does.
313
314 #### Goal Zero: (Tickets related to aspirational goal of achieving 0 regressions for remaining 5.0.0 lifespan):
315 - Implemented #1472: Full testing of stdin CLI Options
316 - Added additional branch coverage.
317 - More projects added to integration test suite.
318
319 ### 5.5.5 [Hotfix] October 7, 2020
320 - Fixed #1539: in extremely rare cases isort 5.5.4 introduces syntax error by removing closing paren.
321
322 ### 5.5.4 [Hotfix] September 29, 2020
323 - Fixed #1507: in rare cases isort changes the content of multiline strings after a yield statement.
324 - Fixed #1505: Support case where known_SECTION points to a section not listed in sections.
325
326 ### 5.5.3 [Hotfix] September 20, 2020
327 - Fixed #1488: in rare cases isort can mangle `yield from` or `raise from` statements.
328
329 ### 5.5.2 [Hotfix] September 9, 2020
330 - Fixed #1469: --diff option is ignored when input is from stdin.
331
332 ### 5.5.1 September 4, 2020
333 - Fixed #1454: Ensure indented import sections with import heading and a preceding comment don't cause import sorting loops.
334 - Fixed #1453: isort error when float to top on almost empty file.
335 - Fixed #1456 and #1415: noqa comment moved to where flake8 cant see it.
336 - Fixed #1460: .svn missing from default ignore list.
337
338 ### 5.5.0 September 3, 2020
339 - Fixed #1398: isort: off comment doesn't work, if it's the top comment in the file.
340 - Fixed #1395: reverse_relative setting doesn't have any effect when combined with force_sort_within_sections.
341 - Fixed #1399: --skip can error in the case of projects that contain recursive symlinks.
342 - Fixed #1389: ensure_newline_before_comments doesn't work if comment is at top of section and sections don't have lines between them.
343 - Fixed #1396: comments in imports with ";" can keep isort from recognizing import line.
344 - Fixed #1380: As imports removed when `combine_star` is set.
345 - Fixed #1382: --float-to-top has no effect if no import is already at the top.
346 - Fixed #1420: isort never settles on module docstring + add import.
347 - Fixed #1421: Error raised when repo contains circular symlinks.
348 - Fixed #1427: noqa comment is moved from star import to constant import.
349 - Fixed #1444 & 1445: Incorrect placement of import additions.
350 - Fixed #1447: isort5 throws error when stdin used on Windows with deprecated args.
351 - Implemented #1397: Added support for specifying config file when using git hook (thanks @diseraluca!).
352 - Implemented #1405: Added support for coloring diff output.
353 - Implemented #1434: New multi-line grid mode without parentheses.
354
355 #### Goal Zero (Tickets related to aspirational goal of achieving 0 regressions for remaining 5.0.0 lifespan):
356 - Implemented #1392: Extensive profile testing.
357 - Implemented #1393: Proprety based testing applied to code snippets.
358 - Implemented #1391: Create automated integration test that includes full code base of largest OpenSource isort users.
359
360 #### Potentially breaking changes:
361 - Fixed #1429: --check doesn't print to stderr as the documentation says. This means if you were looking for `ERROR:` messages for files that contain incorrect imports within stdout you will now need to look in stderr.
362
363 ### 5.4.2 Aug 14, 2020
364 - Fixed #1383: Known other does not work anymore with .editorconfig.
365 - Fixed: Regression in first known party path expansion.
366
367 ### 5.4.1 [Hotfix] Aug 13, 2020
368 - Fixed #1381: --combine-as loses # noqa in different circumstances.
369
370 ### 5.4.0 Aug 12, 2020
371 - Implemented #1373: support for length sort only of direct (AKA straight) imports.
372 - Fixed #1321: --combine-as loses # noqa.
373 - Fixed #1375: --dont-order-by-type CLI broken.
374
375 ### 5.3.2 [Hotfix] Aug 7, 2020
376 - Fixed incorrect warning code (W503->W0503).
377
378 ### 5.3.1 Aug 7, 2020
379 - Improve upgrade warnings to be less noisy and point to error codes for easy interoperability with Visual Studio Code (see: #1363).
380
381 ### 5.3.0 Aug 4, 2020
382 - Implemented ability to treat all or select comments as code (issue #1357)
383 - Implemented ability to use different configs for different file extensions (issue #1162)
384 - Implemented ability to specify the types of imports (issue #1181)
385 - Implemented ability to dedup import headings (issue #953)
386 - Added experimental support for sorting literals (issue #1358)
387 - Added experimental support for sorting and deduping groupings of assignments.
388 - Improved handling of deprecated single line variables for usage with Visual Studio Code (issue #1363)
389 - Improved handling of mixed newline forms within same source file.
390 - Improved error handling for known sections.
391 - Improved API consistency, returning a boolean value for all modification API calls to indicate if changes were made.
392 - Fixed #1366: spurious errors when combining skip with --gitignore.
393 - Fixed #1359: --skip-gitignore does not honor ignored symlink
394
395 #### Internal Development:
396 - Initial hypothesmith powered test to help catch unexpected syntax parsing and output errors (thanks @Zac-HD!)
397
398 ### 5.2.2 July 30, 2020
399 - Fixed #1356: return status when arguments are passed in without files or a content stream.
400
401 ### 5.2.1 July 28, 2020
402 - Update precommit to default to filtering files that are defined in skip.
403 - Improved relative path detection for `skip` config usage.
404 - Added recursive symbolic link protection.
405 - Implemented #1177: Support for color output using `--color`.
406 - Implemented recursive symlink detection support.
407
408 ### 5.2.0 July 27, 2020
409 - Implemented #1335: Official API for diff capturing.
410 - Implemented #1331: Warn when sections don't match up.
411 - Implemented #1261: By popular demand, `filter_files` can now be set in the config option.
412 - Implemented #960: Support for respecting git ignore via "--gitignore" or "skip_gitignore=True".
413 - Implemented #727: Ability to only add imports if existing imports exist.
414 - Implemented #970: Support for custom sharable isort profiles.
415 - Implemented #1214: Added support for git_hook lazy option (Thanks @sztamas!)
416 - Implemented #941: Added an additional `multi_line_output` mode for more compact formatting (Thanks @sztamas!)
417 - Implemented #1020: Option for LOCALFOLDER.
418 - Implemented #1353: Added support for output formatting plugins.
419 - `# isort: split` can now be used at the end of an import line.
420 - Fixed #1339: Extra indent is not preserved when isort:skip is used in nested imports.
421 - Fixed #1348: `--diff` works incorrectly with files that have CRLF line endings.
422 - Improved code repositories usage of pylint tags (#1350).
423
424 ### 5.1.4 July 19, 2020
425 - Fixed issue #1333: Use of wrap_length raises an exception about it not being lower or equal to line_length.
426 - Fixed issue #1330: Ensure stdout can be stubbed dynamically for `show_unified_diff` function.
427
428 ### 5.1.3 July 18, 2020
429 - Fixed issue #1329: Fix comments duplicated when --fass option is set.
430
431 ### 5.1.2 July 17, 2020
432 - Fixed issue #1219 / #1326: Comments not wrapped for long lines
433 - Fixed issue #1156: Bug related to isort:skip usage followed by a multiline comment block
434
435 ### 5.1.1 July 15, 2020
436 - Fixed issue #1322: Occasionally two extra newlines before comment with `-n` & `--fss`.
437 - Fixed issue #1189: `--diff` broken when reading from standard input.
438
439 ### 5.1.0 July 14, 2020
440 - isort now throws an exception if an invalid settings path is given (issue #1174).
441 - Implemented support for automatic redundant alias removal (issue #1281).
442 - Implemented experimental support for floating all imports to the top of a file (issue #1228)
443 - Fixed #1178: support for semicolons in decorators.
444 - Fixed #1315: Extra newline before comment with -n + --fss.
445 - Fixed #1192: `-k` or `--keep-direct-and-as-imports` option has been deprecated as it is now always on.
446
447 #### Formatting changes implied:
448 - Fixed #1280: rewrite of as imports changes the behavior of the imports.
449
450 ### 5.0.9 July 11, 2020
451 - Fixed #1301: Import headings in nested sections leads to check errors
452
453 ### 5.0.8 July 11, 2020
454 - Fixed #1277 & #1278: New line detection issues on Windows.
455 - Fixed #1294: Fix bundled git hook.
456
457 ### 5.0.7 July 9, 2020
458 - Fixed #1306: unexpected --diff behavior.
459 - Fixed #1279: Fixed NOQA comment regression.
460
461 ### 5.0.6 July 8, 2020
462 - Fixed #1302: comments and --trailing-comma can generate invalid code.
463 - Fixed #1293: extra new line in indented imports, when immediately followed by a comment.
464 - Fixed #1304: isort 5 no longer recognises `sre_parse` as a stdlib module.
465 - Fixed #1300: add_imports moves comments following import section.
466 - Fixed #1276: Fix a bug that creates only one line after triple quotes.
467
468 ### 5.0.5 July 7, 2020
469 - Fixed #1285: packaging issue with bundling tests via poetry.
470 - Fixed #1284: Regression when sorting `.pyi` files from CLI using black profile.
471 - Fixed #1275 & #1283: Blank line after docstring removed.
472 - Fixed #1298: CLI Help out of date with isort 5.
473 - Fixed #1290: Unecessary blank lines above nested imports when import comments turned on.
474 - Fixed #1297: Usage of `--add-imports` alongside `--check` is broken.
475 - Fixed #1289: Stream usage no longer auto picking up config file from current working directory.
476 - Fixed #1296: Force_single_line setting removes immediately following comment line.
477 - Fixed #1295: `ensure_newline_before_comments` doesnt work with `force_sort_within_sections`.
478 - Setting not_skip will no longer immediately fail but instead give user a warning and direct
479 to upgrade docs.
480
481 ### 5.0.4 July 6, 2020
482 - Fixed #1264: a regression with comment handling and `force_sort_within_sections` config option
483 - Added warning for deprecated CLI flags and linked to upgrade guide.
484
485 ### 5.0.3 - July 4, 2020
486 - Fixed setup.py command incorrectly passing check=True as a configuration parameter (see: https://github.com/pycqa/isort/issues/1258)
487 - Fixed missing patch version
488 - Fixed issue #1253: Atomic fails when passed in not readable output stream
489
490 ### 5.0.2 - July 4, 2020
491 - Ensured black profile was complete, adding missing line_length definition.
492
493 ### 5.0.1 - July 4, 2020
494 - Fixed a runtime error in a vendored dependency (toml).
495
496 ### 5.0.0 Penny - July 4, 2020
497 **Breaking changes:**
498
499 - isort now requires Python 3.6+ to run but continues to support formatting on ALL versions of python including
500 Python 2 code.
501 - isort deprecates official support for Python 3.4, removing modules only in this release from known_standard_library:
502 - user
503 - Config files are no longer composed on-top of each-other. Instead the first config file found is used.
504 - Since there is no longer composition negative form settings (such as --dont-skip or it's config file variant `not_skip`) are no longer required and have been removed.
505 - Two-letter shortened setting names (like `ac` for `atomic`) now require two dashes to avoid ambiguity: `--ac`.
506 - For consistency with other tools `-v` now is shorthand for verbose and `-V` is shorthand for version. See Issue: #1067.
507 - `length_sort_{section_name}` config usage has been deprecated. Instead `length_sort_sections` list can be used to specify a list of sections that need to be length sorted.
508 - `safety_excludes` and `unsafe` have been deprecated
509 - Config now includes as default full set of safety directories defined by safety excludes.
510 - `--recursive` option has been removed. Directories passed in are now automatically sorted recursive.
511 - `--apply` option has been removed as it is the default behaviour.
512 - isort now does nothing, beyond giving instructions and exiting status code 0, when ran with no arguments.
513 - a new `--interactive` flag has been added to enable the old style behaviour.
514 - isort now works on contiguous sections of imports, instead of one whole file at a time.
515 - ~~isort now formats all nested "as" imports in the "from" form. `import x.y as a` becomes `from x import y as a`.~~ NOTE: This was undone in version 5.1.0 due to feedback it caused issues with some project conventions.
516 - `keep_direct_and_as_imports` option now defaults to `True`.
517 - `appdirs` is no longer supported. Unless manually specified, config should be project config only.
518 - `toml` is now installed as a vendorized module, meaning pyproject.toml based config is always supported.
519 - Completely new Python API, old version is removed and no longer accessible.
520 - New module placement logic and module fully replaces old finders. Old approach is still available via `--old-finders`.
521
522 Internal:
523
524 - isort now utilizes mypy and typing to filter out typing related issues before deployment.
525 - isort now utilizes black internally to ensure more consistent formatting.
526
527 - profile support for common project types (black, django, google, etc)
528
529 - Much much more. There is some difficulty in fully capturing the extent of changes in this release - just because of how all encompassing the release is. See: [Github Issues](https://github.com/pycqa/isort/issues?q=is%3Aissue+is%3Aclosed) for more.
530
531 ### 4.3.21 - June 25, 2019 - hot fix release
532 - Fixed issue #957 - Long aliases and use_parentheses generates invalid syntax
533
534 ### 4.3.20 - May 14, 2019 - hot fix release
535 - Fixed issue #948 - Pipe redirection broken on Python2.7
536
537 ### 4.3.19 - May 12, 2019 - hot fix release
538 - Fixed issue #942 - correctly handle pyi (Python Template Files) to match `black` output
539
540 ### 4.3.18 - May 1, 2019 - hot fix release
541 - Fixed an issue with parsing files that contain unicode characters in Python 2
542 - Fixed issue #924 - Pulling in pip internals causes depreciation warning
543 - Fixed issue #938 - Providing a way to filter explicitly passed in files via configuration settings (`--filter-files`)
544 - Improved interoperability with toml configuration files
545
546 ### 4.3.17 - April 7, 2019 - hot fix release
547 - Fixed issue #905 & #919: Import section headers behaving strangely
548
549 ### 4.3.16 - March 23, 2019 - hot fix release
550 - Fixed issue #909 - skip and skip-glob are not enforced when using settings-path.
551 - Fixed issue #907 - appdirs optional requirement does not correctly specify version
552 - Fixed issue #902 - Too broad warning about missing toml package
553 - Fixed issue #778 - remove `user` from known standard library as it's no longer in any supported Python version.
554
555 ### 4.3.15 - March 10, 2019 - hot fix release
556 - Fixed a regression with handling streaming input from pipes (Issue #895)
557 - Fixed handling of \x0c whitespace character (Issue #811)
558 - Improved CLI documentation
559
560 ### 4.3.14 - March 9, 2019 - hot fix release
561 - Fixed a regression with */directory/*.py style patterns
562
563 ### 4.3.13 - March 8, 2019 - hot fix release
564 - Fixed the inability to accurately determine import section when a mix of conda and virtual environments are used.
565 - Fixed some output being printed even when --quiet mode is enabled.
566 - Fixed issue #890 interoperability with PyCharm by allowing case sensitive non type grouped sorting.
567 - Fixed issue #889 under some circumstances isort will incorrectly add a new line at the beginning of a file.
568 - Fixed issue #885 many files not being skipped according to set skip settings.
569 - Fixed issue #842 streaming encoding improvements.
570
571 ### 4.3.12 - March 6, 2019 - hot fix release
572 - Fix error caused when virtual environment not detected
573
574 ### 4.3.11 - March 6, 2019 - hot fix release
575 - Fixed issue #876: confused by symlinks pointing to virtualenv gives FIRSTPARTY not THIRDPARTY
576 - Fixed issue #873: current version skips every file on travis
577 - Additional caching to reduce performance regression introduced in 4.3.5
578
579 ### 4.3.10 - March 2, 2019 - hot fix release
580 - Fixed Windows incompatibilities (Issue #835)
581 - Fixed relative import sorting bug (Issue #417)
582 - Fixed "no_lines_before" to also be respected from previous empty sections.
583 - Fixed slow-down introduced by finders mechanism by adding a LRU cache (issue #848)
584 - Fixed issue #842 default encoding not-set in Python2
585 - Restored Windows automated testing
586 - Added Mac automated testing
587
588 ### 4.3.9 - February 25, 2019 - hot fix release
589 - Fixed a bug that led to an incompatibility with black: #831
590
591 ### 4.3.8 - February 25, 2019 - hot fix release
592 - Fixed a bug that led to the recursive option not always been available from the command line.
593
594 ### 4.3.7 - February 25, 2019 - hot fix release
595 - Expands the finder failsafe to occur on the creation of the finder objects.
596
597 ### 4.3.6 - February 24, 2019 - hot fix release
598 - Fixes a fatal error that occurs if a single finder throws an exception. Important as we add more finders that utilize third party libraries.
599
600 ### 4.3.5 - February 24, 2019 - last Python 2.7 Maintenance Release
601
602 This is the final Python 2.x release of isort, and includes the following major changes:
603
604 Potentially Interface Breaking:
605 - The `-r` option for removing imports has been renamed `-rm` to avoid accidental deletions and confusion with the `-rc` recursive option.
606 - `__init__.py` has been removed from the default ignore list. The default ignore list is now empty - with all items needing to be explicitly ignored.
607 - Isort will now by default ignore .tox / venv folders in an effort to be "safe". You can disable this behaviour by setting the "--unsafe" flag, this is separate from any skip or not skip rules you may have in place.
608 - Isort now allows for files missing closing newlines in whitespace check
609 - `distutils` support has been removed to simplify setup.py
610
611 New:
612 - Official Python 3.7 Compatibility.
613 - Support for using requirements files to auto determine third-paty section if pipreqs & requirementslib are installed.
614 - Added support for using pyproject.toml if toml is installed.
615 - Added support for XDG_HOME if appdirs is installed.
616 - An option has been added to enable ignoring trailing comments ('ignore_comments') defaulting to False.
617 - Added support to enable line length sorting for only specific sections
618 - Added a `correctly_sorted` property on the SortsImport to enable more intuitive programmatic checking.
619
620 Fixes:
621 - Improved black compatibility.
622 - Isort will now detect files in the CWD as first-party.
623 - Fixed several cases where '-ns' or 'not_skip' was being incorrectly ignored.
624 - Fixed sorting of relative path imports ('.', '..', '...', etc).
625 - Fixed bugs caused by a failure to maintain order when loading iterables from config files.
626 - Correctly handle CPython compiled imports and others that need EXT_SUFFIX to correctly identify.
627 - Fixed handling of Symbolic Links to follow them when walking the path.
628 - Fixed handling of relative known_paths.
629 - Fixed lack of access to all wrap modes from the CLI.
630 - Fixed handling of FIFO files.
631 - Fixed a bug that could result in multiple imports being inserted on the same line.
632
633
634 ### 4.3.4 - February 12, 2018 - hotfix release
635 - Fixed issue #671: isort is corrupting CRLF files
636
637 ### 4.3.3 - Feburary 5, 2018 - hotfix release
638 - Fixed issue #665: Tabs turned into single spaces
639
640 ### 4.3.2 - Feburary 4, 2018 - hotfix release
641 - Fixed issue #651: Add imports option is broken
642 - Fixed issue #662: An error generated by rewriting `.imports` to `. imoprts`
643
644 ### 4.3.1 - Feburary 2, 2018 - hotfix release
645 - Fixed setup.py errors
646 - Fixed issue #654: Trailing comma count error
647 - Fixed issue #650: Wrong error message displayed
648
649 ### 4.3.0 - January 31, 2018
650 - Fixed #557: `force_alphabetical_sort` and `force_sort_within_sections` can now be utilized together without extra new lines
651 - Fix case-sensitive path existence check in Mac OS X
652 - Added `--no-lines-before` for more granular control over section output
653 - Fixed #493: Unwanted conversion to Windows line endings
654 - Fixed #590: Import `as` mucks with alphabetical sorting
655 - Implemented `--version-number` to retrieve just the version number without the isort logo
656 - Breaking changes
657 - Python 2.7+ only (dropped 2.6) allowing various code simplifications and improvements.
658
659 ### 4.2.15 - June 6, 2017 - hotfix release
660 IMPORTANT NOTE: This will be the last release with Python 2.6 support, subsequent releases will be 2.7+ only
661 - Fixed certain one line imports not being successfully wrapped
662
663 ### 4.2.14 - June 5, 2017 - hotfix release
664 - Fixed #559 & #565: Added missing standard library imports
665
666 ### 4.2.13 - June 2, 2017 - hotfix release
667 - Fixed #553: Check only and --diff now work together again
668
669 ### 4.2.12 - June 1, 2017 - hotfix release
670 - Fixed wheel distribution bug
671
672 ### 4.2.11 - June 1, 2017 - hotfix release
673 - Fixed #546: Can't select y/n/c after latest update
674 - Fixed #545: Incorrectly moves __future__ imports above encoding comments
675
676 ### 4.2.9 - June 1, 2017 - hotfix release
677 - Fixed #428: Check only modifies sorting
678 - Fixed #540: Not correctly identifying stdlib modules
679
680 ### 4.2.8 - May 31, 2017
681 - Added `--virtual-env` switch command line option
682 - Added --enforce-whitespace option to go along with --check-only for more exact checks (issue #423)
683 - Fixed imports with a tailing '\' and no space in-between getting removed (issue #425)
684 - Fixed issue #299: long lines occasionally not wrapped
685 - Fixed issue #432: No longer add import inside class when class starts at top of file after encoding comment
686 - Fixed issue #440: Added missing `--use-parentheses` option to command line tool and documentation
687 - Fixed issue #496: import* imports now get successfully identified and reformatted instead of deleted
688 - Fixed issue #491: Non ending parentheses withing single line comments no longer cause formatting issues
689 - Fixed issue #471: Imports that wrap the maximum line length and contain comments on the last line are no longer rendered incorrectly
690 - Fixed issue #436: Force sort within section no longer rearranges comments
691 - Fixed issue #473: Force_to_top and force_sort_within_sections now work together
692 - Fixed issue #484 & #472: Consistent output with imports of same spelling but different case
693 - Fixed issue #433: No longer incorrectly add an extra new-line when comment between imports and function definition
694 - Fixed issue #419: Path specification for skipped paths is not Unix/Windows inter-operable.
695 Breaking Changes:
696 - Fixed issue #511: All command line options with an underscore, have had the underscore replaced with a dash for consistency. This effects: multi-line, add-import, remove-import, force-adds, --force-single-line-imports, and length-sort.
697 - Replaced the `--enforce-whitespace` option with `--ignore-whitespace` to restore original behavior of strict whitespace by default
698
699 ### 4.2.5
700 - Fixed an issue that caused modules to inccorectly be matched as thirdparty when they simply had `src` in the leading path, even if they weren't withing $VIRTUALENV/src #414
701
702 ### 4.2.4
703 - Fixed an issue that caused module that contained functions before doc strings, to incorrectly place imports
704 - Fixed regression in how `force_alphabetical_sort` was being interpretted (issue #409)
705 - Fixed stray print statement printing skipped files (issue #411)
706 - Added option for forcing imports into a single bucket: `no_sections`
707 - Added option for new lines between import types (from, straight): `lines_between_sections`
708
709 ### 4.2.3
710 - Fixed a large number of priority bugs - bug fix only release
711
712 ### 4.2.2
713 - Give an error message when isort is unable to determine where to place a module
714 - Allow imports to be sorted by module, independent of import_type, when `force_sort_within_sections` option is set
715 - Fixed an issue that caused Python files with 2 top comments not to be sorted
716
717 ### 4.2.1
718 - Hot fix release to fix code error when skipping globs
719
720 ### 4.2.0
721 - Added option "NOQA" Do not wrap lines, but add a noqa statement at the end
722 - Added support for running isort recursively, simply with a standalone `isort` command
723 - Added support to run isort library as a module
724 - Added compatibility for Python 3.5
725 - Fixed performance issue (#338) when running on project with lots of skipped directories
726 - Fixed issue #328: extra new can occasionally occur when using alphabetical-only sort
727 - Fixed custom sections parsing from config file (unicode string -> list)
728 - Updated pylama extension to the correct entry point
729 - Skip files even when file_contents is provided if they are explicitly in skip list
730 - Removed always showing isort banner, keeping it for when the version is requested, verbose is used, or show_logo setting is set.
731
732 ### 4.1.2
733 - Fixed issue #323: Accidental default configuration change introduced
734
735 ### 4.1.1
736 - Added support for partial file match skips (thanks to @Amwam)
737 - Added support for --quiet option to only show errors when running isort
738 - Fixed issue #316: isort added new lines incorrectly when a top-of line comment is present
739
740 ### 4.1.0
741 - Started keeping a log of all changes between releases
742 - Added the isort logo to the command line interface
743 - Added example usage gif to README
744 - Implemented issue #292: skip setting now supports glob patterns
745 - Implemented issue #271: Add option to sort imports purely alphabetically
746 - Implemented issue #301: Readme is now natively in RST format, making it easier for Python tooling to pick up
747 - Implemented pylama isort extension
748 - Fixed issue #260: # encoding lines at the top of the file are now correctly supported
749 - Fixed issue #284: Sticky comments above first import are now supported
750 - Fixed issue #310: Ensure comments don't get duplicated when reformatting imports
751 - Fixed issue #289: Sections order not being respected
752 - Fixed issue #296: Made it more clear how to set arguments more then once
753
754 ### 4.0.0
755 - Removed all external dependencies