Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python39 #858

Merged
merged 8 commits into from
Dec 13, 2020
Merged

Fix python39 #858

merged 8 commits into from
Dec 13, 2020

Conversation

hippo91
Copy link
Contributor

@hippo91 hippo91 commented Nov 22, 2020

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

This PR deals with python 3.9. The biggest change concerns the NamedTuple brain. With python 3.9 NamedTuple is no more a class but instead it is now a function. The class NamedTuple is built dynamically that's why it is necessary to enhance the brain module to take this into account.

Type of Changes

Type
🐛 Bug fix
✨ New feature

Linked issues

Closes pylint-dev/pylint#3876 and partially pylint-dev/pylint#3895

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice evolution. Should we also remove python 3.5 ? What about in pylint ? python3.5 prevent some thing from being done easily and the end of life was September 2020.

astroid/brain/brain_namedtuple_enum.py Show resolved Hide resolved
@hippo91
Copy link
Contributor Author

hippo91 commented Dec 13, 2020

@Pierre-Sassoulas you are right, it's time to drop support for python3.5 but i would prefer to do this in another PR.

@hippo91 hippo91 merged commit 8ad8381 into pylint-dev:master Dec 13, 2020
@hippo91 hippo91 deleted the fix_python39_new branch December 13, 2020 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inherit-non-class false positive: NamedTuple (Python 3.9)
2 participants