diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 24959e454d..4e238428ed 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -158,6 +158,7 @@ contributors: * Added new useless-return checker, * Added new try-except-raise checker - theirix +- correctmost <134317971+correctmost@users.noreply.github.com> - Téo Bouvard - Stavros Ntentos <133706+stdedos@users.noreply.github.com> - Nicolas Boulenguez @@ -210,6 +211,7 @@ contributors: - wtracy - jessebrennan - chohner +- aatle <168398276+aatle@users.noreply.github.com> - Tiago Honorato <61059243+tiagohonorato@users.noreply.github.com> - Steven M. Vascellaro - Robin Tweedie <70587124+robin-wayve@users.noreply.github.com> @@ -264,6 +266,7 @@ contributors: - Samuel FORESTIER - Rémi Cardona - Ryan Ozawa +- Roger Sheu <78449574+rogersheu@users.noreply.github.com> - Raphael Gaschignard - Ram Rachum (cool-RR) - Radostin Stoyanov @@ -287,9 +290,11 @@ contributors: - Justin Li - John Kirkham - Jens H. Nielsen +- Jake Lishman - Ioana Tagirta : fix bad thread instantiation check - Ikraduya Edian : Added new checks 'consider-using-generator' and 'use-a-generator'. - Hugues Bruant +- Hashem Nasarat - Harut - Grygorii Iermolenko - Grizzly Nyo @@ -317,9 +322,11 @@ contributors: - Ben Green - Batuhan Taskaya - Alexander Kapshuna +- Akhil Kamat - Adam Parkin - 谭九鼎 <109224573@qq.com> - Łukasz Sznuk +- zasca - y2kbugger - vinnyrose - ttenhoeve-aa @@ -382,10 +389,12 @@ contributors: - Trevor Bekolay * Added --list-msgs-enabled command - Tomer Chachamu : simplifiable-if-expression +- Tomasz Michalski - Tomasz Magulski - Tom - Tim Hatch - Tim Gates +- Tianyu Chen <124018391+UTsweetyfish@users.noreply.github.com> - Théo Battrel - Thomas Benhamou - Theodore Ni <3806110+tjni@users.noreply.github.com> @@ -412,6 +421,7 @@ contributors: - Ryan McGuire - Ry4an Brase - Ruro +- Roshan Shetty - Roman Ivanov - Robert Schweizer - Reverb Chu @@ -438,6 +448,7 @@ contributors: - Oisín Moran - Obscuron - Noam Yorav-Raphael +- Noah-Agnel <138210920+Noah-Agnel@users.noreply.github.com> - Nir Soffer - Niko Wenselowski - Nikita Sobolev @@ -515,7 +526,6 @@ contributors: - James Broadhead - Jakub Kulík - Jakob Normark -- Jake Lishman - Jacques Kvam - Jace Browning : updated default report format with clickable paths - JT Olds @@ -523,7 +533,6 @@ contributors: - Hayden Richards <62866982+SupImDos@users.noreply.github.com> * Fixed "no-self-use" for async methods * Fixed "docparams" extension for async functions and methods -- Hashem Nasarat - Harshil <37377066+harshil21@users.noreply.github.com> - Harry - Grégoire <96051754+gregoire-mullvad@users.noreply.github.com> @@ -537,6 +546,7 @@ contributors: - Eric Froemling - Emmanuel Chaudron - Elizabeth Bott <52465744+elizabethbott@users.noreply.github.com> +- Ekin Dursun - Eisuke Kawashima - Edward K. Ream - Edgemaster @@ -547,6 +557,7 @@ contributors: - Dmytro Kyrychuk - Dionisio E Alonso - DetachHead <57028336+DetachHead@users.noreply.github.com> +- Dennis Keck <26092524+fellhorn@users.noreply.github.com> - Denis Laxalde - David Lawson - David Cain @@ -582,12 +593,14 @@ contributors: - Benjamin Graham - Benedikt Morbach - Ben Greiner +- Barak Shoshany - Banjamin Freeman - Avram Lubkin - Athos Ribeiro : Fixed dict-keys-not-iterating false positive for inverse containment checks - Arun Persaud - Arthur Lutz - Antonio Ossa +- Antonio Gámiz Delgado <73933988+antoniogamizbadger@users.noreply.github.com> - Anthony VEREZ - Anthony Tan - Anthony Foglia (Google): Added simple string slots check. @@ -617,6 +630,7 @@ contributors: - Adrian Chirieac - Aditya Gupta (adityagupta1089) * Added ignore_signatures to duplicate checker +- Adam Tuft <73994535+adamtuft@users.noreply.github.com> - Adam Dangoor - 243f6a88 85a308d3 <33170174+243f6a8885a308d313198a2e037@users.noreply.github.com> diff --git a/doc/whatsnew/3/3.3/index.rst b/doc/whatsnew/3/3.3/index.rst index 2cae04e110..53d10e4440 100644 --- a/doc/whatsnew/3/3.3/index.rst +++ b/doc/whatsnew/3/3.3/index.rst @@ -7,10 +7,148 @@ :maxdepth: 2 :Release:3.3 -:Date: TBA +:Date: 2024-09-20 Summary -- Release highlights ============================= - .. towncrier release notes start + +What's new in Pylint 3.3.0? +--------------------------- +Release date: 2024-09-20 + + +Changes requiring user actions +------------------------------ + +- We migrated ``symilar`` to argparse, from getopt, so the error and help output changed + (for the better). We exit with 2 instead of sometime 1, sometime 2. The error output + is not captured by the runner anymore. It's not possible to use a value for the + boolean options anymore (``--ignore-comments 1`` should become ``--ignore-comments``). + + Refs #9731 (`#9731 `_) + + + +New Features +------------ + +- Add new `declare-non-slot` error which reports when a class has a `__slots__` member and a type hint on the class is not present in `__slots__`. + + Refs #9499 (`#9499 `_) + + + +New Checks +---------- + +- Added `too-many-positional-arguments` to allow distinguishing the configuration for too many + total arguments (with keyword-only params specified after `*`) from the configuration + for too many positional-or-keyword or positional-only arguments. + + As part of evaluating whether this check makes sense for your project, ensure you + adjust the value of `--max-positional-arguments`. + + Closes #9099 (`#9099 `_) + +- Add `using-exception-group-in-unsupported-version` and + `using-generic-type-syntax-in-unsupported-version` for uses of Python 3.11+ or + 3.12+ features on lower supported versions provided with `--py-version`. + + Closes #9791 (`#9791 `_) + +- Add `using-assignment-expression-in-unsupported-version` for uses of `:=` (walrus operator) + on Python versions below 3.8 provided with `--py-version`. + + Closes #9820 (`#9820 `_) + +- Add `using-positional-only-args-in-unsupported-version` for uses of positional-only args on + Python versions below 3.8 provided with `--py-version`. + + Closes #9823 (`#9823 `_) + +- Add ``unnecessary-default-type-args`` to the ``typing`` extension to detect the use + of unnecessary default type args for ``typing.Generator`` and ``typing.AsyncGenerator``. + + Refs #9938 (`#9938 `_) + + + +False Negatives Fixed +--------------------- + +- Fix computation of never-returning function: `Never` is handled in addition to `NoReturn`, and priority is given to the explicit `--never-returning-functions` option. + + Closes #7565. (`#7565 `_) + +- Fix a false negative for `await-outside-async` when await is inside Lambda. + + Refs #9653 (`#9653 `_) + +- Fix a false negative for ``duplicate-argument-name`` by including ``positional-only``, ``*args`` and ``**kwargs`` arguments in the check. + + Closes #9669 (`#9669 `_) + +- Fix false negative for `multiple-statements` when multiple statements are present on `else` and `finally` lines of `try`. + + Refs #9759 (`#9759 `_) + +- Fix false negatives when `isinstance` does not have exactly two arguments. + pylint now emits a `too-many-function-args` or `no-value-for-parameter` + appropriately for `isinstance` calls. + + Closes #9847 (`#9847 `_) + + + +Other Bug Fixes +--------------- + +- `--enable` with `--disable=all` now produces an error, when an unknown msg code is used. Internal `pylint` messages are no longer affected by `--disable=all`. + + Closes #9403 (`#9403 `_) + +- Impossible to compile regexes for paths in the configuration or argument given to pylint won't crash anymore but + raise an argparse error and display the error message from ``re.compile`` instead. + + Closes #9680 (`#9680 `_) + +- Fix a bug where a ``tox.ini`` file with pylint configuration was ignored and it exists in the current directory. + + ``.cfg`` and ``.ini`` files containing a ``Pylint`` configuration may now use a section named ``[pylint]``. This enhancement impacts the scenario where these file types are used as defaults when they are present and have not been explicitly referred to, using the ``--rcfile`` option. + + Closes #9727 (`#9727 `_) + +- Improve file discovery for directories that are not python packages. + + Closes #9764 (`#9764 `_) + + + +Other Changes +------------- + +- Remove support for launching pylint with Python 3.8. + Code that supports Python 3.8 can still be linted with the ``--py-version=3.8`` setting. + + Refs #9774 (`#9774 `_) + +- Add support for Python 3.13. + + Refs #9852 (`#9852 `_) + + + +Internal Changes +---------------- + +- All variables, classes, functions and file names containing the word 'similar', when it was, + in fact, referring to 'symilar' (the standalone program for the duplicate-code check) were renamed + to 'symilar'. + + Closes #9734 (`#9734 `_) + +- Remove old-style classes (Python 2) code and remove check for new-style class since everything is new-style in Python 3. Updated doc for exception checker to remove reference to new style class. + + Refs #9925 (`#9925 `_) diff --git a/doc/whatsnew/fragments/7565.false_negative b/doc/whatsnew/fragments/7565.false_negative deleted file mode 100644 index 647eb4611f..0000000000 --- a/doc/whatsnew/fragments/7565.false_negative +++ /dev/null @@ -1,3 +0,0 @@ -Fix computation of never-returning function: `Never` is handled in addition to `NoReturn`, and priority is given to the explicit `--never-returning-functions` option. - -Closes #7565. diff --git a/doc/whatsnew/fragments/9099.new_check b/doc/whatsnew/fragments/9099.new_check deleted file mode 100644 index 4c5744bb54..0000000000 --- a/doc/whatsnew/fragments/9099.new_check +++ /dev/null @@ -1,8 +0,0 @@ -Added `too-many-positional-arguments` to allow distinguishing the configuration for too many -total arguments (with keyword-only params specified after `*`) from the configuration -for too many positional-or-keyword or positional-only arguments. - -As part of evaluating whether this check makes sense for your project, ensure you -adjust the value of `--max-positional-arguments`. - -Closes #9099 diff --git a/doc/whatsnew/fragments/9403.bugfix b/doc/whatsnew/fragments/9403.bugfix deleted file mode 100644 index 478f5978fe..0000000000 --- a/doc/whatsnew/fragments/9403.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -`--enable` with `--disable=all` now produces an error, when an unknown msg code is used. Internal `pylint` messages are no longer affected by `--disable=all`. - -Closes #9403 diff --git a/doc/whatsnew/fragments/9499.feature b/doc/whatsnew/fragments/9499.feature deleted file mode 100644 index e60a7c4f73..0000000000 --- a/doc/whatsnew/fragments/9499.feature +++ /dev/null @@ -1,3 +0,0 @@ -Add new `declare-non-slot` error which reports when a class has a `__slots__` member and a type hint on the class is not present in `__slots__`. - -Refs #9499 diff --git a/doc/whatsnew/fragments/9653.false_negative b/doc/whatsnew/fragments/9653.false_negative deleted file mode 100644 index c576e071ea..0000000000 --- a/doc/whatsnew/fragments/9653.false_negative +++ /dev/null @@ -1,3 +0,0 @@ -Fix a false negative for `await-outside-async` when await is inside Lambda. - -Refs #9653 diff --git a/doc/whatsnew/fragments/9669.false_negative b/doc/whatsnew/fragments/9669.false_negative deleted file mode 100644 index 483de2a77d..0000000000 --- a/doc/whatsnew/fragments/9669.false_negative +++ /dev/null @@ -1,3 +0,0 @@ -Fix a false negative for ``duplicate-argument-name`` by including ``positional-only``, ``*args`` and ``**kwargs`` arguments in the check. - -Closes #9669 diff --git a/doc/whatsnew/fragments/9680.bugfix b/doc/whatsnew/fragments/9680.bugfix deleted file mode 100644 index cfec07a6d7..0000000000 --- a/doc/whatsnew/fragments/9680.bugfix +++ /dev/null @@ -1,4 +0,0 @@ -Impossible to compile regexes for paths in the configuration or argument given to pylint won't crash anymore but -raise an argparse error and display the error message from ``re.compile`` instead. - -Closes #9680 diff --git a/doc/whatsnew/fragments/9727.bugfix b/doc/whatsnew/fragments/9727.bugfix deleted file mode 100644 index 043541f75b..0000000000 --- a/doc/whatsnew/fragments/9727.bugfix +++ /dev/null @@ -1,5 +0,0 @@ -Fix a bug where a ``tox.ini`` file with pylint configuration was ignored and it exists in the current directory. - -``.cfg`` and ``.ini`` files containing a ``Pylint`` configuration may now use a section named ``[pylint]``. This enhancement impacts the scenario where these file types are used as defaults when they are present and have not been explicitly referred to, using the ``--rcfile`` option. - -Closes #9727 diff --git a/doc/whatsnew/fragments/9731.user_action b/doc/whatsnew/fragments/9731.user_action deleted file mode 100644 index 24d1bb9ef6..0000000000 --- a/doc/whatsnew/fragments/9731.user_action +++ /dev/null @@ -1,6 +0,0 @@ -We migrated ``symilar`` to argparse, from getopt, so the error and help output changed -(for the better). We exit with 2 instead of sometime 1, sometime 2. The error output -is not captured by the runner anymore. It's not possible to use a value for the -boolean options anymore (``--ignore-comments 1`` should become ``--ignore-comments``). - -Refs #9731 diff --git a/doc/whatsnew/fragments/9734.internal b/doc/whatsnew/fragments/9734.internal deleted file mode 100644 index ed64210332..0000000000 --- a/doc/whatsnew/fragments/9734.internal +++ /dev/null @@ -1,5 +0,0 @@ -All variables, classes, functions and file names containing the word 'similar', when it was, -in fact, referring to 'symilar' (the standalone program for the duplicate-code check) were renamed -to 'symilar'. - -Closes #9734 diff --git a/doc/whatsnew/fragments/9759.false_negative b/doc/whatsnew/fragments/9759.false_negative deleted file mode 100644 index c9b673df38..0000000000 --- a/doc/whatsnew/fragments/9759.false_negative +++ /dev/null @@ -1,3 +0,0 @@ -Fix false negative for `multiple-statements` when multiple statements are present on `else` and `finally` lines of `try`. - -Refs #9759 diff --git a/doc/whatsnew/fragments/9764.bugfix b/doc/whatsnew/fragments/9764.bugfix deleted file mode 100644 index 6ee88070a1..0000000000 --- a/doc/whatsnew/fragments/9764.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Improve file discovery for directories that are not python packages. - -Closes #9764 diff --git a/doc/whatsnew/fragments/9774.other b/doc/whatsnew/fragments/9774.other deleted file mode 100644 index fd536768c1..0000000000 --- a/doc/whatsnew/fragments/9774.other +++ /dev/null @@ -1,4 +0,0 @@ -Remove support for launching pylint with Python 3.8. -Code that supports Python 3.8 can still be linted with the ``--py-version=3.8`` setting. - -Refs #9774 diff --git a/doc/whatsnew/fragments/9791.new_check b/doc/whatsnew/fragments/9791.new_check deleted file mode 100644 index 279c364420..0000000000 --- a/doc/whatsnew/fragments/9791.new_check +++ /dev/null @@ -1,5 +0,0 @@ -Add `using-exception-group-in-unsupported-version` and -`using-generic-type-syntax-in-unsupported-version` for uses of Python 3.11+ or -3.12+ features on lower supported versions provided with `--py-version`. - -Closes #9791 diff --git a/doc/whatsnew/fragments/9820.new_check b/doc/whatsnew/fragments/9820.new_check deleted file mode 100644 index a6df7913eb..0000000000 --- a/doc/whatsnew/fragments/9820.new_check +++ /dev/null @@ -1,4 +0,0 @@ -Add `using-assignment-expression-in-unsupported-version` for uses of `:=` (walrus operator) -on Python versions below 3.8 provided with `--py-version`. - -Closes #9820 diff --git a/doc/whatsnew/fragments/9823.new_check b/doc/whatsnew/fragments/9823.new_check deleted file mode 100644 index 0cc263ccb1..0000000000 --- a/doc/whatsnew/fragments/9823.new_check +++ /dev/null @@ -1,4 +0,0 @@ -Add `using-positional-only-args-in-unsupported-version` for uses of positional-only args on -Python versions below 3.8 provided with `--py-version`. - -Closes #9823 diff --git a/doc/whatsnew/fragments/9847.false_negative b/doc/whatsnew/fragments/9847.false_negative deleted file mode 100644 index 0a3d1d9955..0000000000 --- a/doc/whatsnew/fragments/9847.false_negative +++ /dev/null @@ -1,5 +0,0 @@ -Fix false negatives when `isinstance` does not have exactly two arguments. -pylint now emits a `too-many-function-args` or `no-value-for-parameter` -appropriately for `isinstance` calls. - -Closes #9847 diff --git a/doc/whatsnew/fragments/9852.other b/doc/whatsnew/fragments/9852.other deleted file mode 100644 index 4a715c5d2d..0000000000 --- a/doc/whatsnew/fragments/9852.other +++ /dev/null @@ -1,3 +0,0 @@ -Add support for Python 3.13. - -Refs #9852 diff --git a/doc/whatsnew/fragments/9925.internal b/doc/whatsnew/fragments/9925.internal deleted file mode 100644 index 145fe4a947..0000000000 --- a/doc/whatsnew/fragments/9925.internal +++ /dev/null @@ -1,3 +0,0 @@ -Remove old-style classes (Python 2) code and remove check for new-style class since everything is new-style in Python 3. Updated doc for exception checker to remove reference to new style class. - -Refs #9925 diff --git a/doc/whatsnew/fragments/9938.new_check b/doc/whatsnew/fragments/9938.new_check deleted file mode 100644 index a13556f7de..0000000000 --- a/doc/whatsnew/fragments/9938.new_check +++ /dev/null @@ -1,4 +0,0 @@ -Add ``unnecessary-default-type-args`` to the ``typing`` extension to detect the use -of unnecessary default type args for ``typing.Generator`` and ``typing.AsyncGenerator``. - -Refs #9938 diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index 0953e70e7b..954fd98a13 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -9,7 +9,7 @@ from __future__ import annotations -__version__ = "3.3.0-dev0" +__version__ = "3.3.0" def get_numversion_from_version(v: str) -> tuple[int, int, int]: diff --git a/script/.contributors_aliases.json b/script/.contributors_aliases.json index d30e2dc055..651aa4c4e6 100644 --- a/script/.contributors_aliases.json +++ b/script/.contributors_aliases.json @@ -567,6 +567,10 @@ "mails": ["jaehoonhwang@users.noreply.github.com"], "name": "Jaehoon Hwang" }, + "jake.lishman@ibm.com": { + "mails": ["jake.lishman@ibm.com", "jake@binhbar.com"], + "name": "Jake Lishman" + }, "james.morgensen@gmail.com": { "comment": ": ignored-modules option applies to import errors.", "mails": ["james.morgensen@gmail.com"], diff --git a/tbump.toml b/tbump.toml index 6443128e33..c7962a94e3 100644 --- a/tbump.toml +++ b/tbump.toml @@ -1,7 +1,7 @@ github_url = "https://github.com/pylint-dev/pylint" [version] -current = "3.3.0-dev0" +current = "3.3.0" regex = ''' ^(?P0|[1-9]\d*) \.