From 58481bb666482600f3f600e596a94a64bcbf2a2b Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 17 Jul 2022 20:36:53 +0200 Subject: [PATCH] Bump pylint to 2.15.0-a0, update changelog [doc] Add summary for the release notes --- CONTRIBUTORS.txt | 83 ++++++++++++++++------------ doc/whatsnew/2/2.15/index.rst | 7 ++- doc/whatsnew/fragments/6974.internal | 5 ++ examples/pylintrc | 19 +++++-- examples/pyproject.toml | 16 ++++-- pylint/__pkginfo__.py | 2 +- script/.contributors_aliases.json | 4 ++ tbump.toml | 2 +- 8 files changed, 90 insertions(+), 48 deletions(-) create mode 100644 doc/whatsnew/fragments/6974.internal diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 6518b3b36b..5f987d3cde 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -17,8 +17,8 @@ Maintainers - Pierre Sassoulas - Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> - Marc Mueller <30130371+cdce8p@users.noreply.github.com> -- Hippo91 - Jacob Walls +- Hippo91 - Matus Valo - Andreas Finkler <3929834+DudeNr33@users.noreply.github.com> - Łukasz Rogalski @@ -52,6 +52,7 @@ contributors: * wrong-spelling-in-docstring * parallel execution on multiple CPUs - Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> +- Julthep Nandakwang - Bruno Daniel : check_docs extension. - Sushobhit <31987769+sushobhit27@users.noreply.github.com> (sushobhit27) * Added new check 'comparison-with-itself'. @@ -75,11 +76,12 @@ contributors: * ungrouped-imports, * wrong-import-position * redefined-variable-type +- Harutaka Kawamura - Alexandre Fayolle (Logilab): TkInter gui, documentation, debian support - Nick Drozd : performance improvements to astroid +- Ville Skyttä - Julien Cristau (Logilab): python 3 support - Adrien Di Mascio -- Frank Harrison (doublethefish) - Moisés López (Vauxoo): * Support for deprecated-modules in modules not installed, * Refactor wrong-import-order to integrate it with `isort` library @@ -89,7 +91,7 @@ contributors: * Fix consider-using-ternary for 'True and True and True or True' case * Add bad-docstring-quotes and docstring-first-line-empty * Add missing-timeout -- Ville Skyttä +- Frank Harrison (doublethefish) - Pierre-Yves David - David Shea : invalid sequence and slice index - Gunung P. Wibisono <55311527+gunungpw@users.noreply.github.com> @@ -101,6 +103,7 @@ contributors: - Radu Ciorba : not-context-manager and confusing-with-statement warnings. - Holger Peters - Cosmin Poieană : unichr-builtin and improvements to bad-open-mode. +- Tushar Sadhwani (tusharsadhwani) - Steven Myint : duplicate-except. - Peter Kolbus (Garmin) - Luigi Bertaco Cristofolini (luigibertaco) @@ -108,7 +111,6 @@ contributors: * autogenerated documentation for optional extensions, * bug fixes and enhancements for docparams (née check_docs) extension - Vlad Temian : redundant-unittest-assert and the JSON reporter. -- Tushar Sadhwani (tusharsadhwani) - Julien Jehannet - Boris Feld - Anthony Sottile @@ -131,7 +133,10 @@ contributors: - Marianna Polatoglou : minor contribution for wildcard import check - Manuel Vázquez Acosta - Luis Escobar (Vauxoo): Add bad-docstring-quotes and docstring-first-line-empty +- Konstantina Saketou <56515303+ksaketou@users.noreply.github.com> +- Konstantin - Jim Robertson +- Hugo van Kemenade - Ethan Leba - Enji Cooper - David Lindquist : logging-format-interpolation warning. @@ -147,8 +152,6 @@ contributors: - Téo Bouvard - Mihai Balint - Mark Bell -- Konstantina Saketou <56515303+ksaketou@users.noreply.github.com> -- Hugo van Kemenade - Hornwitser : fix import graph - Fureigh - David Douard @@ -163,6 +166,7 @@ contributors: - Sneaky Pete - Sergey B Kirpichev - Rene Zhang +- Paul Lichtenberger - Or Bahari - Mr. Senko - Martin von Gagern (Google): Added 'raising-format-tuple' warning. @@ -175,6 +179,7 @@ contributors: * Added new check for shallow copy of os.environ * Added new check for useless `with threading.Lock():` statement - Marcus Näslund (naslundx) +- Marco Pernigotti <7657251+mpernigo@users.noreply.github.com> - Marco Forte - Ionel Maries Cristian - Gergely Kalmár @@ -182,13 +187,14 @@ contributors: - Damien Baty - Benjamin Drung : contributing Debian Developer - Anubhav <35621759+anubh-v@users.noreply.github.com> -- Antonio Quarta (sgheppy) -- Andrew J. Simmons (anjsimmo) +- Antonio Quarta +- Andrew J. Simmons - wtracy -- Yilei "Dolee" Yang - chohner +- Yilei "Dolee" Yang - Tiago Honorato <61059243+tiagohonorato@users.noreply.github.com> - Steven M. Vascellaro +- Robin Tweedie <70587124+robin-wayve@users.noreply.github.com> - Roberto Leinardi : PyCharm plugin maintainer - Ricardo Gemignani - Pieter Engelbrecht @@ -204,13 +210,14 @@ contributors: - Lucas Cimon - Kylian - Konstantin Manna -- Kai Mueller <15907922+kasium@users.noreply.github.com> (kasium) +- Kai Mueller <15907922+kasium@users.noreply.github.com> - Joshua Cannon - John Leach - James Morgensen : ignored-modules option applies to import errors. - Jaehoon Hwang (jaehoonhwang) +- Huw Jones - Ganden Schaffner -- Frost Ming (frostming) +- Frost Ming - Federico Bond - Erik Wright - Erik Eriksson : Added overlapping-except error check. @@ -219,6 +226,7 @@ contributors: - Aurelien Campeas - Alexander Pervakov - Alain Leufroy +- Adam Williamson <> - xmo-odoo - root@clnstor.am.local - omarandlorraine <64254276+omarandlorraine@users.noreply.github.com> @@ -229,13 +237,16 @@ contributors: - Tyler Thieding - Tobias Hernstig <30827238+thernstig@users.noreply.github.com> - Thomas Grainger +- Stavros Ntentos <133706+stdedos@users.noreply.github.com> - Simu Toni -- Sergei Lebedev <185856+superbobry@users.noreply.github.com> (superbobry) +- Sergei Lebedev <185856+superbobry@users.noreply.github.com> - Scott Worley +- Saugat Pachhai - Rémi Cardona - Raphael Gaschignard - Ram Rachum (cool-RR) - Radostin Stoyanov +- Peter Bittner - Paul Renvoisé - PHeanEX - Omega Weapon @@ -251,7 +262,7 @@ contributors: - Maarten ter Huurne - Lefteris Karapetsas - LCD 47 -- Justin Li (justinnhli) +- Justin Li - John Kirkham - Jens H. Nielsen - Ioana Tagirta : fix bad thread instantiation check @@ -273,6 +284,7 @@ contributors: * Fixed issue 5281, added Unicode checker * Improve non-ascii-name checker - Buck Golemon +- Bruce Dawson - Brian Shaginaw : prevent error on exception check for functions - Benny Mueller - Ben James @@ -286,6 +298,7 @@ contributors: - vinnyrose - ttenhoeve-aa - thinwybk +- tbennett0 - syutbai - sdet_liang - pyves@crater.logilab.fr @@ -305,6 +318,7 @@ contributors: - flyingbot91 - fahhem - fadedDexofan +- epenet <6771947+epenet@users.noreply.github.com> - danields - cosven - cordis-dev @@ -319,7 +333,7 @@ contributors: - Yury Gribov - Yuri Bochkarev : Added epytext support to docparams extension. - Youngsoo Sung -- Yory <39745367+yory8@users.noreply.github.com> (yory8) +- Yory <39745367+yory8@users.noreply.github.com> - Yoichi Nakayama - Yeting Li (yetingli) - Yannack @@ -328,6 +342,7 @@ contributors: - Xi Shen - Will Shanks - Viorel Știrbu : intern-builtin warning. +- VictorT - Victor Jiajunsu <16359131+jiajunsu@users.noreply.github.com> - Trevor Bekolay * Added --list-msgs-enabled command @@ -335,6 +350,7 @@ contributors: - Tomasz Magulski - Tim Hatch - Tim Gates +- Thomas Benhamou - Tanvi Moharir <74228962+tanvimoharir@users.noreply.github.com>: Fix for invalid toml config - T.Rzepka - Svetoslav Neykov @@ -344,21 +360,20 @@ contributors: - Sorin Sbarnea - Slavfox - Skip Montanaro +- Sigurd Spieckermann <2206639+sisp@users.noreply.github.com> - Shiv Venkatasubrahmanyam - Sebastian Müller -- Saugat Pachhai - Sasha Bagan - Sardorbek Imomaliev - Santiago Castro - Sandro Tosi : Debian packaging - Samuel Freilich (sfreilich) - Samuel FORESTIER -- Sam Vermeiren <88253337+PaaEl@users.noreply.github.com> (PaaEl) +- Sam Vermeiren <88253337+PaaEl@users.noreply.github.com> - Ryan McGuire - Ry4an Brase - Ruro - Roman Ivanov -- Robin Tweedie <70587124+robin-wayve@users.noreply.github.com> - Robert Schweizer - Reverb Chu - Renat Galimov @@ -367,12 +382,11 @@ contributors: - Ramiro Leal-Cavazos (ramiro050): Fixed bug preventing pylint from working with Emacs tramp - Qwiddle13 <32040075+Qwiddle13@users.noreply.github.com> - Quentin Young +- Prajwal Borkar - Petr Pulc : require whitespace around annotations - Peter Dawyndt -- Peter Bittner - Peter Aronoff - Paul Cochrane -- Paul Lichtenberger - Patrik - Pascal Corpet - Pablo Galindo Salgado @@ -397,18 +411,17 @@ contributors: - Michael Kefeder - Michael Hudson-Doyle - Michael Giuffrida -- Melvin Hazeleger <31448155+melvio@users.noreply.github.com> (melvio) +- Melvin Hazeleger <31448155+melvio@users.noreply.github.com> - Matěj Grabovský - Matthijs Blom <19817960+MatthijsBlom@users.noreply.github.com> - Matej Marušák - Markus Siebenhaar <41283549+siehar@users.noreply.github.com> -- Marco Pernigotti <7657251+mpernigo@users.noreply.github.com> - Marco Edward Gorelli : Documented Jupyter integration - Marcin Kurczewski (rr-) - Maik Röder - Louis Sautier -- Lorena Buciu <46202743+lorena-b@users.noreply.github.com> (lorena-b) -- Logan Miller <14319179+komodo472@users.noreply.github.com> (komodo472) +- Lorena Buciu <46202743+lorena-b@users.noreply.github.com> +- Logan Miller <14319179+komodo472@users.noreply.github.com> - Kári Tristan Helgason - Kurian Benoy <70306694+kurianbenoy-aot@users.noreply.github.com> - Krzysztof Czapla @@ -422,7 +435,7 @@ contributors: - Kevin Jing Qiu - Kayran Schmidt <59456929+yumasheta@users.noreply.github.com> - Jürgen Hermann -- Jérome Perrin (perrinjerome) +- Jérome Perrin - Josselin Feist - Jonathan Kotta - John Paraskevopoulos : add 'differing-param-doc' and 'differing-type-doc' @@ -430,40 +443,41 @@ contributors: - John Gabriele - John Belmonte - Joffrey Mander -- Jochen Preusche (iilei) -- Jeroen Seegers (jeroenseegers) +- Jochen Preusche +- Jeroen Seegers : * Fixed `toml` dependency issue -- Jeremy Fleischman (jfly) +- Jeremy Fleischman - Jason Owen - Jared Garst - Jared Deckard - Janne Rönkkö -- James Sinclair (irgeek) +- James Sinclair - James M. Allen - James Lingard - James Broadhead +- Jakub Kulík - Jakob Normark -- Jake Lishman (jakelishman) +- Jake Lishman - Jacques Kvam - Jace Browning : updated default report format with clickable paths - JT Olds -- Huw Jones (huwcbjones) -- Hayden Richards <62866982+SupImDos@users.noreply.github.com> (SupImDos) +- Hayden Richards <62866982+SupImDos@users.noreply.github.com> * Fixed "no-self-use" for async methods * Fixed "docparams" extension for async functions and methods -- Harshil <37377066+harshil21@users.noreply.github.com> (harshil21) +- Harshil <37377066+harshil21@users.noreply.github.com> - Harry +- Grégoire <96051754+gregoire-mullvad@users.noreply.github.com> - Grant Welch - Giuseppe Valente - Gary Tyler McLeod -- Felix von Drigalski (felixvd) +- Felix von Drigalski - Fabrice Douchant - Fabio Natali - Fabian Damken - Eric Froemling - Emmanuel Chaudron - Elizabeth Bott <52465744+elizabethbott@users.noreply.github.com> -- Eisuke Kawashima (e-kwsm) +- Eisuke Kawashima - Edward K. Ream - Edgemaster - Drew Risinger @@ -491,7 +505,6 @@ contributors: - Caio Carrara - C.A.M. Gerlach - Bruno P. Kinoshita -- Bruce Dawson - Brian C. Lane - Brandon W Maister - BioGeek diff --git a/doc/whatsnew/2/2.15/index.rst b/doc/whatsnew/2/2.15/index.rst index 853c0de71c..0a33895f62 100644 --- a/doc/whatsnew/2/2.15/index.rst +++ b/doc/whatsnew/2/2.15/index.rst @@ -11,7 +11,10 @@ Summary -- Release highlights ============================= -* We improved ``pylint``'s handling of namespace packages. More packages should be - linted without resorting to using the ``-recursive=y`` option. +In pylint 2.15.0, we added a new check ``missing-timeout`` to warn of +default timeout values that could cause a program to be hanging indefinitely. + +>e improved ``pylint``'s handling of namespace packages. More packages should +be linted without resorting to using the ``-recursive=y`` option. .. towncrier release notes start diff --git a/doc/whatsnew/fragments/6974.internal b/doc/whatsnew/fragments/6974.internal new file mode 100644 index 0000000000..d34a3f0afb --- /dev/null +++ b/doc/whatsnew/fragments/6974.internal @@ -0,0 +1,5 @@ +We changed the way we handle the changelog internally by using towncrier. +If you're a contributor you won't have to fix merge conflicts in the +changelog anymore. + +Closes #6974 diff --git a/examples/pylintrc b/examples/pylintrc index 24fce68d2a..a955c56ed6 100644 --- a/examples/pylintrc +++ b/examples/pylintrc @@ -44,13 +44,15 @@ fail-under=10 # Files or directories to be skipped. They should be base names, not paths. ignore=CVS -# Add files or directories matching the regex patterns to the ignore-list. The -# regex matches against paths and can be in Posix or Windows format. +# Add files or directories matching the regular expressions patterns to the +# ignore-list. The regex matches against paths and can be in Posix or Windows +# format. Because '\' represents the directory delimiter on Windows systems, it +# can't be used as an escape character. ignore-paths= -# Files or directories matching the regex patterns are skipped. The regex -# matches against base names, not paths. The default value ignores Emacs file -# locks +# Files or directories matching the regular expression patterns are skipped. +# The regex matches against base names, not paths. The default value ignores +# Emacs file locks ignore-patterns=^\.# # List of module names for which member attributes should not be checked @@ -160,6 +162,13 @@ disable=raw-checker-failed, enable=c-extension-no-member +[METHOD_ARGS] + +# List of qualified names (i.e., library.method) which require a timeout +# parameter e.g. 'requests.api.get,requests.api.post' +timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request + + [EXCEPTIONS] # Exceptions that will emit a warning when caught. diff --git a/examples/pyproject.toml b/examples/pyproject.toml index 061ddaf220..b419f83e72 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -34,12 +34,15 @@ fail-under = 10 # Files or directories to be skipped. They should be base names, not paths. ignore = ["CVS"] -# Add files or directories matching the regex patterns to the ignore-list. The -# regex matches against paths and can be in Posix or Windows format. +# Add files or directories matching the regular expressions patterns to the +# ignore-list. The regex matches against paths and can be in Posix or Windows +# format. Because '\' represents the directory delimiter on Windows systems, it +# can't be used as an escape character. # ignore-paths = -# Files or directories matching the regex patterns are skipped. The regex matches -# against base names, not paths. The default value ignores Emacs file locks +# Files or directories matching the regular expression patterns are skipped. The +# regex matches against base names, not paths. The default value ignores Emacs +# file locks ignore-patterns = ["^\\.#"] # List of module names for which member attributes should not be checked (useful @@ -353,6 +356,11 @@ disable = ["raw-checker-failed", "bad-inline-option", "locally-disabled", "file- # should appear only once). See also the "--disable" option for examples. enable = ["c-extension-no-member"] +[tool.pylint.method_args] +# List of qualified names (i.e., library.method) which require a timeout +# parameter e.g. 'requests.api.get,requests.api.post' +timeout-methods = ["requests.api.delete", "requests.api.get", "requests.api.head", "requests.api.options", "requests.api.patch", "requests.api.post", "requests.api.put", "requests.api.request"] + [tool.pylint.miscellaneous] # List of note tags to take in consideration, separated by a comma. notes = ["FIXME", "XXX", "TODO"] diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index 4839aabe1c..ca2dc0dc16 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -9,7 +9,7 @@ from __future__ import annotations -__version__ = "2.15.0-dev0" +__version__ = "2.15.0-a0" def get_numversion_from_version(v: str) -> tuple[int, int, int]: diff --git a/script/.contributors_aliases.json b/script/.contributors_aliases.json index 85892ce0ae..fac83c0193 100644 --- a/script/.contributors_aliases.json +++ b/script/.contributors_aliases.json @@ -97,6 +97,10 @@ "mails": ["95424144+allanc65@users.noreply.github.com"], "name": "Allan Chandler" }, + "": { + "mails": ["awilliam@redhat.com", "adam@blueradius.ca"], + "name": "Adam Williamson" + }, "Adrien.DiMascio@logilab.fr": { "mails": ["Adrien.DiMascio@logilab.fr"], "name": "Adrien Di Mascio" diff --git a/tbump.toml b/tbump.toml index 0cda703c73..ec96c4e121 100644 --- a/tbump.toml +++ b/tbump.toml @@ -1,7 +1,7 @@ github_url = "https://github.com/PyCQA/pylint" [version] -current = "2.15.0-dev0" +current = "2.15.0-a0" regex = ''' ^(?P0|[1-9]\d*) \.