Skip to content

Conversation

@SumoSourabh
Copy link
Contributor

@SumoSourabh SumoSourabh commented Dec 16, 2022

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

@SumoSourabh SumoSourabh changed the title DLPX-83965 Update all the greater than equal to (>=) dependencies in setup.py and requirements.txt files of dvp packages to equal to(==) DLPX-84163 Update all the greater than equal to (>=) dependencies in setup.py and requirements.txt files of dvp packages to equal to(==) Jan 5, 2023
@SumoSourabh SumoSourabh marked this pull request as ready for review January 6, 2023 05:17
@SumoSourabh SumoSourabh requested a review from a team as a code owner January 6, 2023 05:17
@SumoSourabh SumoSourabh deleted the DLPX-83965 branch February 9, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants