From 9223172074c4ca2bb5bff3b2c5a40190cc527fcf Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sat, 18 May 2024 11:56:37 -0400 Subject: [PATCH] Bump pylint to 3.2.1, update changelog --- doc/whatsnew/3/3.2/index.rst | 65 ++++++++++++++++++++++ doc/whatsnew/fragments/9139.internal | 5 -- doc/whatsnew/fragments/9145.bugfix | 3 - doc/whatsnew/fragments/9273.false_negative | 3 - doc/whatsnew/fragments/9608.bugfix | 4 -- doc/whatsnew/fragments/9626.bugfix | 9 --- doc/whatsnew/fragments/9627.false_positive | 4 -- doc/whatsnew/fragments/9638.false_positive | 5 -- doc/whatsnew/fragments/9643.false_positive | 4 -- pylint/__pkginfo__.py | 2 +- tbump.toml | 2 +- towncrier.toml | 2 +- 12 files changed, 68 insertions(+), 40 deletions(-) delete mode 100644 doc/whatsnew/fragments/9139.internal delete mode 100644 doc/whatsnew/fragments/9145.bugfix delete mode 100644 doc/whatsnew/fragments/9273.false_negative delete mode 100644 doc/whatsnew/fragments/9608.bugfix delete mode 100644 doc/whatsnew/fragments/9626.bugfix delete mode 100644 doc/whatsnew/fragments/9627.false_positive delete mode 100644 doc/whatsnew/fragments/9638.false_positive delete mode 100644 doc/whatsnew/fragments/9643.false_positive diff --git a/doc/whatsnew/3/3.2/index.rst b/doc/whatsnew/3/3.2/index.rst index eb488e83c3..d2f0d57475 100644 --- a/doc/whatsnew/3/3.2/index.rst +++ b/doc/whatsnew/3/3.2/index.rst @@ -14,6 +14,71 @@ Summary -- Release highlights .. towncrier release notes start +What's new in Pylint 3.2.1? +--------------------------- +Release date: 2024-05-18 + + +False Positives Fixed +--------------------- + +- Exclude if/else branches containing terminating functions (e.g. `sys.exit()`) + from `possibly-used-before-assignment` checks. + + Closes #9627 (`#9627 `_) + +- Don't emit ``typevar-name-incorrect-variance`` warnings for PEP 695 style TypeVars. + The variance is inferred automatically by the type checker. + Adding ``_co`` or ``_contra`` suffix can help to reason about TypeVar. + + Refs #9638 (`#9638 `_) + +- Fix a false positive for `possibly-used-before-assignment` when using + `typing.assert_never()` (3.11+) to indicate exhaustiveness. + + Closes #9643 (`#9643 `_) + + + +Other Bug Fixes +--------------- + +- Fix a false negative for ``--ignore-patterns`` when the directory to be linted is specified using a dot(``.``) and all files are ignored instead of only the files whose name begin with a dot. + + Closes #9273 (`#9273 `_) + +- Restore "errors / warnings by module" section to report output (with `-ry`). + + Closes #9145 (`#9145 `_) + +- ``trailing-comma-tuple`` should now be correctly emitted when it was disabled globally + but enabled via local message control, after removal of an over-optimisation. + + Refs #9608. (`#9608 `_) + +- Add `--prefer-stubs=yes` option to opt-in to the astroid 3.2 feature + that prefers `.pyi` stubs over same-named `.py` files. This has the + potential to reduce `no-member` errors but at the cost of more errors + such as `not-an-iterable` from function bodies appearing as `...`. + + Defaults to `no`. + + Closes #9626 + Closes #9623 (`#9626 `_) + + + +Internal Changes +---------------- + +- Update astroid version to 3.2.1. This solves some reports of ``RecursionError`` + and also makes the *prefer .pyi stubs* feature in astroid 3.2.0 *opt-in* + with the aforementioned ``--prefer-stubs=y`` option. + + Refs #9139 (`#9139 `_) + + + What's new in Pylint 3.2.0? --------------------------- Release date: 2024-05-14 diff --git a/doc/whatsnew/fragments/9139.internal b/doc/whatsnew/fragments/9139.internal deleted file mode 100644 index 98fbbabc2c..0000000000 --- a/doc/whatsnew/fragments/9139.internal +++ /dev/null @@ -1,5 +0,0 @@ -Update astroid version to 3.2.1. This solves some reports of ``RecursionError`` -and also makes the *prefer .pyi stubs* feature in astroid 3.2.0 *opt-in* -with the aforementioned ``--prefer-stubs=y`` option. - -Refs #9139 diff --git a/doc/whatsnew/fragments/9145.bugfix b/doc/whatsnew/fragments/9145.bugfix deleted file mode 100644 index 9cb32d9c67..0000000000 --- a/doc/whatsnew/fragments/9145.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Restore "errors / warnings by module" section to report output (with `-ry`). - -Closes #9145 diff --git a/doc/whatsnew/fragments/9273.false_negative b/doc/whatsnew/fragments/9273.false_negative deleted file mode 100644 index 4a982ee7e5..0000000000 --- a/doc/whatsnew/fragments/9273.false_negative +++ /dev/null @@ -1,3 +0,0 @@ -Fix a false negative for ``--ignore-patterns`` when the directory to be linted is specified using a dot(``.``) and all files are ignored instead of only the files whose name begin with a dot. - -Closes #9273 diff --git a/doc/whatsnew/fragments/9608.bugfix b/doc/whatsnew/fragments/9608.bugfix deleted file mode 100644 index badcf32d19..0000000000 --- a/doc/whatsnew/fragments/9608.bugfix +++ /dev/null @@ -1,4 +0,0 @@ -``trailing-comma-tuple`` should now be correctly emitted when it was disabled globally -but enabled via local message control, after removal of an over-optimisation. - -Refs #9608. diff --git a/doc/whatsnew/fragments/9626.bugfix b/doc/whatsnew/fragments/9626.bugfix deleted file mode 100644 index 44b7539eac..0000000000 --- a/doc/whatsnew/fragments/9626.bugfix +++ /dev/null @@ -1,9 +0,0 @@ -Add `--prefer-stubs=yes` option to opt-in to the astroid 3.2 feature -that prefers `.pyi` stubs over same-named `.py` files. This has the -potential to reduce `no-member` errors but at the cost of more errors -such as `not-an-iterable` from function bodies appearing as `...`. - -Defaults to `no`. - -Closes #9626 -Closes #9623 diff --git a/doc/whatsnew/fragments/9627.false_positive b/doc/whatsnew/fragments/9627.false_positive deleted file mode 100644 index 2a9edb26d8..0000000000 --- a/doc/whatsnew/fragments/9627.false_positive +++ /dev/null @@ -1,4 +0,0 @@ -Exclude if/else branches containing terminating functions (e.g. `sys.exit()`) -from `possibly-used-before-assignment` checks. - -Closes #9627 diff --git a/doc/whatsnew/fragments/9638.false_positive b/doc/whatsnew/fragments/9638.false_positive deleted file mode 100644 index 8076ad555c..0000000000 --- a/doc/whatsnew/fragments/9638.false_positive +++ /dev/null @@ -1,5 +0,0 @@ -Don't emit ``typevar-name-incorrect-variance`` warnings for PEP 695 style TypeVars. -The variance is inferred automatically by the type checker. -Adding ``_co`` or ``_contra`` suffix can help to reason about TypeVar. - -Refs #9638 diff --git a/doc/whatsnew/fragments/9643.false_positive b/doc/whatsnew/fragments/9643.false_positive deleted file mode 100644 index 471807d3b2..0000000000 --- a/doc/whatsnew/fragments/9643.false_positive +++ /dev/null @@ -1,4 +0,0 @@ -Fix a false positive for `possibly-used-before-assignment` when using -`typing.assert_never()` (3.11+) to indicate exhaustiveness. - -Closes #9643 diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index 509dea3f94..b0f13ea606 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -9,7 +9,7 @@ from __future__ import annotations -__version__ = "3.2.0" +__version__ = "3.2.1" def get_numversion_from_version(v: str) -> tuple[int, int, int]: diff --git a/tbump.toml b/tbump.toml index 8ff0411016..e5a9a99151 100644 --- a/tbump.toml +++ b/tbump.toml @@ -1,7 +1,7 @@ github_url = "https://github.com/pylint-dev/pylint" [version] -current = "3.2.0" +current = "3.2.1" regex = ''' ^(?P0|[1-9]\d*) \. diff --git a/towncrier.toml b/towncrier.toml index 66d5f0a514..f2e1245fc2 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -1,5 +1,5 @@ [tool.towncrier] -version = "3.2.0" +version = "3.2.1" directory = "doc/whatsnew/fragments" filename = "doc/whatsnew/3/3.2/index.rst" template = "doc/whatsnew/fragments/_template.rst"