Repository navigation
Conversation
…sions When a module appears in DEPRECATED_CLASSES under more than one Python version, dict.update replaced its older set of classes with the newer one. Merge the sets instead, so classes like typing.ByteString and asyncio.SafeChildWatcher are reported again on Python 3.14. Closes pylint-dev#11763
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Changes
Description
DEPRECATED_CLASSESmaps a Python version to{module: {classes}}. The checker built its table withdict.update, so when a module is listed under more than one version, the newer set of classes replaced the older one. Five modules are affected:typing,asyncio,importlib.abc,astandwebbrowser.For example, on Python 3.14 only
typing._UnionGenericAliasand the 3.14asyncioevent loop policies are left, sotyping.ByteString,typing.Text,typing.Hashable, theasynciochild watchers andimportlib.abc.Finderare no longer reported. On Python 3.15 theastnode classes andwebbrowser.MacOSXwould be lost too.The fix merges the sets for each module instead of replacing them.
Test:
deprecated_class_py314(Python 3.14+) imports or calls one class from each affected module. It fails onmain(onlyDefaultEventLoopPolicyis reported) and passes with the fix. The changed lines are fully covered, and the functional and checker tests pass (1401 passed).Closes #11763