delphix / virtualization-sdk

Delphix vSDK.
Apache License 2.0
7 stars 25 forks source link

DLPX-84163 Update all the greater than equal to (>=) dependencies in setup.py and requirements.txt files of dvp packages to equal to(==) #455

Closed SumoSourabh closed 1 year ago

SumoSourabh commented 1 year ago

Background

There are around 40 PRs opened by dependentBot to bump up the dependencies version. Also, some dependencies in our setup.py uses >= dependencies for example flake8 >= 3.6 which can cause some unknown errors in case dependencies releases a new version.

Problem

Recently, flake8 released 6.0.0 version which started causing dvp build to fail with 'Manager' object has no attribute 'checkers', as flake8 6.0.0 has made changes to manager package.

Evaluation

The exact cause of the issue is plugin_validator.py in tools package (line no. 213) where we try to access checkers object @style_guide._application.file_checker_manager.checkers.

As flake8 6.0.0 has removed checkers and started using result object, the issue occurred.

Solution

  1. Change all >= to >=, < or == in setup.py files of all packages.
  2. Use flake8 == 6.0.0 and update plugin_validator.py to sync with flake8 changes.
  3. Updated all the dependencies to latest version as required in requirements.txt files.
    • bump2version 0.5.11 -> 1.0.1 for common, dvp, libs, platform, tools
    • packaging 19.2 -> 22.0 for common, dvp, libs, platform, tools
    • pluggy 0.13.0 -> 1.0.0 for common, dvp, libs, platform, tools
    • pyparsing 2.4.5 -> 3.0.9 for common, dvp, libs, platform, tools
    • pytest 4.6.11 -> 7.2.0 for common, dvp, libs, platform, tools
    • six 1.13.0 -> 1.16.0 for common, dvp, libs, platform, tools
    • zipp 0.6.0 -> 3.11.0 for common, dvp, libs, platform, tools
    • mock 3.0.5 -> 4.0.3 for libs, platform, tools
    • coverage 5.0.2 -> 6.5.0 for tools
    • entrypoints 0.3 -> 0.4 for tools
    • flake8 3.7.9 -> 6.0.0 for tools
    • httpretty 0.9.7 -> 1.0.5 for tools
    • isort 4.3.21 -> 5.11.1 for tools
    • mccabe 0.6.1 -> 0.7.0 for tools
    • more-itertools 5.0.0 -> 9.0.0 for tools
    • pycodestyle 2.5.0 -> 2.10.0 for tools
    • pyflakes 2.1.1 -> 3.0.1 for tools
    • pytest-cov 2.8.1 -> 4.0.0 for tools
    • yapf 0.28 -> 0.32 for tools
  4. Removed older and unused dependencies.
    • All dependencies with python_version less than 3.8 have been removed.
    • enum34 and py have been removed as they were not being used anywhere in the code.

Testing Done

appdata_python_samples

appdata_basic

virtualization_sdk

Bonus

Dependency Tree for dvp 4.0.5 install

dvp4 0 5_Dependency_tree

Dependency Tree for local changes install

Changes_dependency_tree

Diff of Pip Freeze

PipFreezeDiff