Skip to content

Pylint 3.1.0 reports ByteString as deprecated class when py-version = 3.8 #9489

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

Closed
Wayonb opened this issue Mar 8, 2024 · 3 comments
Closed
Labels
Invalid Not a bug, already exists or already fixed

Comments

@Wayonb
Copy link

Wayonb commented Mar 8, 2024

Bug description

ByteString class is deprecated in Python 3.9.
https://docs.python.org/3/library/typing.html#typing.ByteString

Since upgrading to Pylint 3.1, getting deprecated class warning even though the minimum py-version = 3.8

Configuration

[MAIN]

# Minimum supported python version
py-version = 3.8

Command used

14:18:25  + xargs python3 -m pylint --rcfile C:/Users/Administrator/jenkins/workspace/linters/python/.pylintrc --disable=duplicate-code

Pylint output

14:19:12  ************* Module symbolchain.nc
14:19:12  symbolchain\nc\__init__.py:13:0: W4904: Using deprecated class ByteString of module typing (deprecated-class)
14:19:12  ************* Module symbolchain.sc
14:19:12  symbolchain\sc\__init__.py:13:0: W4904: Using deprecated class ByteString of module typing (deprecated-class)

Expected behavior

Pylint not to report the warning.

Pylint version

pylint 3.1
Python 3.12

OS / Environment

No response

Additional dependencies

No response

@Wayonb Wayonb added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Mar 8, 2024
@Pierre-Sassoulas
Copy link
Member

I think this is voluntary afair. Python itself is going to warn you in python 3.9 or above, what would be the value added by this check if it only warned when python already does ? (Can't search for the original discussion easily as I'm on mobile).

@Pierre-Sassoulas Pierre-Sassoulas added Discussion 🤔 Documentation 📗 Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Mar 8, 2024
@jacobtylerwalls
Copy link
Member

Right, even if your lowest supported version is 3.8, it's still something that needs to be removed.

@jacobtylerwalls
Copy link
Member

Decision to not use py-version for deprecated checkers discussed in #5876 (comment)

@jacobtylerwalls jacobtylerwalls closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
@jacobtylerwalls jacobtylerwalls added Won't fix/not planned Invalid Not a bug, already exists or already fixed and removed Discussion 🤔 Documentation 📗 Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning Won't fix/not planned labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Not a bug, already exists or already fixed
Projects
None yet
Development

No branches or pull requests

3 participants