Skip to content

Remove dependency on "Dephell" #6

Open

Description

@ChadBailey

Proposal

Remove dependency on Dephell since it has been archived & abandoned. Replace with pipenv since pipenv accomplishes the same objectives that Dephell attempted to while also being a well maintained & highly used Python dependency manager.

Extra Details

Background / Rationale

Back say maybe 6 months ago (total guess) I learned of Flakehell and really enjoyed it. I added it to my project and it worked great at first, but then I found a bug that prevented it from working perfectly with, ironically, pipenv (the tool I propose replacing Dephell with).

I did fix the bug and wanted to submit a PR back with my fix, but got stuck at being unable to run the tests. Since I needed to have ran the tests to validate my fix didn't cause any regressions (and I want to say this may have been listed as required in the contributions section), I never submitted a PR with my fix.

The reason I could not get the tests running is because running the tests requires the use of Dephell. I could not get Dephell working even after many hours of trying. Due to this I was unable to ever satisfy all of the dependencies to run the Flakehell tests

Help Requested

I don't mind implementing, but need help. If anyone is able to extract the list of dev/test dependencies so that I can get my test environment working I would happily fix all of this and remove Dephell then submit that PR. As it stands today, I'm unable to make a suitable dev environment for running tests.

I may have missed something super obvious here, so please don't assume you can't help, surely there's a way I can solve this easily.

Activity

  1. Jaakkonen commented on Mar 9, 2021

    @Jaakkonen

    I got a environment setup as follows:

    python -m venv venv
    . ./venv/bin/activate
    git clone https://github.com/flakehell/flakehell.git
    cd flakehell
    pip install flit  # Dependency manager used in this project
    flit install --deps=all  # Install `tool.flit.metadata.requires-extra.{dev,docs}` in addition to `tool.flit.metadata.requires`
    pytest
    

    With my Python version 3.9.2 following tests fail out of the box:

    ======================================== short test summary info =========================================
    FAILED tests/test_logic/test_extractors.py::test_smoke_extract[flake8-annotations-complexity] - AttributeError: type object 'AnnotationsComplexityChecker' has no attribute '_error_message_template'
    FAILED tests/test_logic/test_extractors.py::test_smoke_prefixes[flake8-annotations-complexity] - AttributeError: type object 'AnnotationsComplexityChecker' has no attribute '_error_message_template'
    ============================= 2 failed, 186 passed, 4694 warnings in 16.98s ==============================
    

    This seems to be a regression of best-doctor/flake8-annotations-complexity@93cadc3

    I personally prefer poetry or just plain old venv & pip for my projects but flit seems to have pyproject.toml support too without also taking care of the virtual environment stuff too.

  2. ChadBailey commented on Apr 8, 2021

    @ChadBailey
    Author

    Sorry I forgot about this, I need to figure out a way to stop forgetting to check github for notifications :(

    I didn't realize flit was in use for this project, thanks for calling that out! I may try and give this a stab over the weekend...

    That said, I'm only vaguely familiar with flit but based on my understanding pipenv and flit offer different functions and can be used together. The very last sentence of "Why use Flit?" addresses this:

    "Flit also doesn’t help you manage dependencies: you have to add them to pyproject.toml by hand. Tools like Poetry and Pipenv have features which help add and update dependencies on other packages."

    Edit: I'm still researching best options, seems there's no clear path forward in Python packaging right now with so many competing standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions