applauncher-team / applauncher

App launcher for python
Apache License 2.0
5 stars 1 forks source link

Add Support for black v22.6.0+ #19

Closed bruno-robert closed 8 months ago

bruno-robert commented 2 years ago

Problem

Applauncher is incompatible with the current version of black (v22.6.0). When running: poetry add --dev black, I get the following:

Using version ^22.6.0 for black

Updating dependencies
Resolving dependencies... (10.5s)

  SolverProblemError

  Because no versions of black match >22.6.0,<23.0.0
   and black (22.6.0) depends on click (>=8.0.0), black (>=22.6.0,<23.0.0) requires click (>=8.0.0).
  Because typer (0.3.2) depends on click (>=7.1.1,<7.2.0)
   and no versions of typer match >0.3.2,<0.4.0, typer (>=0.3.2,<0.4.0) requires click (>=7.1.1,<7.2.0).
  Thus, black (>=22.6.0,<23.0.0) is incompatible with typer (>=0.3.2,<0.4.0).
  And because applauncher (2.2.0) depends on typer (>=0.3.2,<0.4.0)
   and no versions of applauncher match >2.2.0,<3.0.0, black (>=22.6.0,<23.0.0) is incompatible with applauncher (>=2.2.0,<3.0.0).
  So, because socan-api depends on both applauncher (^2.2.0) and black (^22.6.0), version solving failed.

  at ~/Library/Application Support/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│ 
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

The reason (explained in the logs), is that both black and applauncher depend on click, but applauncher indirectly depends on click v7.0.0 and black requires click v8.0.0.

Proposed solution

A solution would be to change the typer requirement from typer = "^0.3.2" to `typer = "^0.4.0" (see typer release 4.0).

maxpowel commented 8 months ago

Done, thank you