[SERVER-78474] Upgrade remaining Python linters Created: 27/Jun/23  Updated: 16/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Steve Gross Assignee: [DO NOT ASSIGN] Backlog - DevProd Correctness
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Correctness
Participants:

 Description   

This previous upgrade issue identified a few problematic upgrades, including:

  • pylint == 2.7.2 # latest is 2.17.4, but that causes pip install requirements to fail
  • yapf == 0.26.0 # latest is 0.40.1, but that causes CI failures
  • types-setuptools == 57.4.12 # latest is 68.0.0.0, but that causes pip install requirements to fail

It would be great to update these as well, but it may take some more time to explore and solve the problems caused by updating them.



 Comments   
Comment by Alex Neben [ 05/Sep/23 ]

steve.gross@mongodb.com I think we can kick this back to the backlog and un-assign it from you. Thoughts?

Comment by Steve Gross [ 11/Jul/23 ]

In this PR, I've upgrade the pylinter but disabled all the newly-detected warnings. PB is running here. If/when it passes I'll send the PR for review.

Comment by Steve Gross [ 06/Jul/23 ]

Note to self: I'm continuing this work in branch stevegrossmongodb/SERVER-76796

Comment by Steve Gross [ 05/Jul/23 ]

Roger that, will do (that is, I'll delete the dependency). Thanks!

Comment by Alex Neben [ 05/Jul/23 ]

Based on the specification here the for sure fix would be this line to "^4". That being said I think you can just delete evergreen-lint as a dependency since I don't think it is used anymore.

Comment by Steve Gross [ 05/Jul/23 ]

alex.neben@mongodb.com If we change this line from "^3.10.0" to ">=3.10.0", that should eliminate the conflict, right? Is anything going to break if we do that?

Comment by Steve Gross [ 03/Jul/23 ]

alex.neben@mongodb.com I see you're listed as a maintainer of evergreen-lint (https://pypi.org/project/evergreen-lint/#history). I also see that the newest version dates from ~2 years ago (September 2021). Any chance we can just update the evergreen-lint code to not require typing-extensions LESS than 4.0.0? (IIUC, this would eliminate the conflict w/ pylint & astroid).

Comment by Steve Gross [ 03/Jul/23 ]

First, I'm tackling the pylint upgrade (from 2.7.2 to 2.17.4). Pip install requirements fails with this message:
The conflict is caused by:
The user requested typing-extensions>=3.7.4
evergreen-lint 0.1.4 depends on typing-extensions<4.0.0 and >=3.10.0
mypy 1.3.0 depends on typing-extensions>=3.10
astroid 2.15.5 depends on typing-extensions>=4.0.0; python_version < "3.11"
The user requested typing-extensions>=3.7.4
evergreen-lint 0.1.4 depends on typing-extensions<4.0.0 and >=3.10.0
mypy 1.3.0 depends on typing-extensions>=3.10
astroid 2.15.4 depends on typing-extensions>=4.0.0; python_version < "3.11"
(Note that astroid is required by pylint).

So, we've got a conflict between:

  • pylint 2.17.4 -> astroid 2.15.4 > typing-extensions >= 4.0.0
  • evergreen-lint 0.1.4 -> typing-extensions < 4.0.0
Generated at Thu Feb 08 06:38:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.