Skip to content

poetry does not resolve dependencies correctly for fastdiff #3140

@sobolevn

Description

@sobolevn
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macos 10.14
  • Poetry version: 1.1.2
  • Link of a Gist with the contents of your pyproject.toml file:
[tool.poetry]
name = "code6"
version = "0.1.0"
description = ""
authors = ["sobolevn <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.7"
fastdiff = "0.2.0"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Issue

Here's a lock file for this project:

[[package]]
name = "fastdiff"
version = "0.2.0"
description = "A fast native implementation of diff algorithm with a pure python fallback"
category = "main"
optional = false
python-versions = "*"

[package.dependencies]
wasmer = {version = ">=0.3.0", markers = "python_version >= \"3.5\" and platform_machine == \"x86_64\" and sys_platform == \"darwin\""}

[[package]]
name = "wasmer"
version = "0.4.1"
description = "Python extension to run WebAssembly binaries"
category = "main"
optional = false
python-versions = "*"

[metadata]
lock-version = "1.1"
python-versions = "^3.7"
content-hash = "f0c632f74d4c742bb9b222cea08f50aaf6dfea9eaea54ebb0fcedf7bc101b8d5"

[metadata.files]
fastdiff = [
    {file = "fastdiff-0.2.0.tar.gz", hash = "sha256:623ad3d9055ab78e014d0d10767cb033d98d5d4f66052abf498350c8e42e29aa"},
]
wasmer = [
    {file = "wasmer-0.4.1-cp36-cp36m-macosx_10_7_x86_64.whl", hash = "sha256:519d9f7a33f0dc28498edf8d074944df1cfda3f4d56a6b0a9dc606e99f230c07"},
    {file = "wasmer-0.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:c36c6c7a3582c0467ea76c5b86a5a25c2e1a713669ebf8fc6511b26f30828ed7"},
    {file = "wasmer-0.4.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:6e37fd76931da954d12f7708e7fc790c479e17ea6dfe54bb4f1403d6fe919c62"},
    {file = "wasmer-0.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d5a58b318628bd48605a4810ee9ba030ec4423dee730d45f031bd082cf36ad8b"},
    {file = "wasmer-0.4.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:f864b1e910e6803aa8f3ed9c371b145f0b6fd191f5fbefea011ac7ed4258734d"},
    {file = "wasmer-0.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:fa1c8479781c91e6b814ef006f6e099b6550eba12601a8617475fb514fc09365"},
    {file = "wasmer-0.4.1-py3-none-any.whl", hash = "sha256:92aee4b3994735f72e27c9deaca36d063781ddfd1068756bf63509288c1a2c14"},
]

Take a look at this part:

[[package]]
name = "fastdiff"
version = "0.2.0"
python-versions = "*"

[package.dependencies]
wasmer = {version = ">=0.3.0", markers = "python_version >= \"3.5\" and platform_machine == \"x86_64\" and sys_platform == \"darwin\""}

That's how poetry resolves deps for fastdiff. And there's how they are defined:

requirements = [
    # wasmer, if we are in Linux x86_64
    'wasmer>=0.3.0; python_version>="3.5" and platform_machine=="x86_64" and sys_platform=="linux"',
    # wasmer, if we are in macOS x86_64
    'wasmer>=0.3.0; python_version>="3.5" and platform_machine=="x86_64" and sys_platform=="darwin"'
]

Source: https://github.com/syrusakbary/fastdiff/blob/master/python/setup.py

So, I end up with a missing wasmer package on linux. PR with reproduction: wemake-services/wemake-python-styleguide#1655

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions