poetry: Poetry Never Updates pywin32

  • [x ] 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: Windows 10, version 1909
  • Poetry version: 1.1.0
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

poetry update always attempts to update pywin32, but never does. Every new install lists pywin32 as requiring update

>>> poetry update
Updating dependencies
Resolving dependencies...

Package operations: 0 installs, 1 update, 0 removals

  • Updating pywin32 (228 C:/Code/project/.venv/Lib/site-packages/pythonwin -> 228)

The pyproject.toml file is as follows:

[tool.poetry]
name = "project"
version = "0.1.0"
description = "test"
license = "Apache-2.0"

[tool.poetry.dependencies]
python = "^3.8"
numpy = "^1.19.2"
matplotlib = "^3.3.2"
pywin32 = "^228"

[tool.poetry.dev-dependencies]
black = "^20.8b1"
flake8 = "^3.8.4"
pytest = "^6.1.1"
pylint = "^2.6.0"
jupyter = "^1.0.0"
notebook = "^6.1.4"

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

I am running Python 3.8.6.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 5
  • Comments: 25 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Dug into this a further. Found the root cause.

https://github.com/python-poetry/poetry/blob/20a3161b0e3f417f04b833c192dcb72076098a4b/poetry/repositories/installed_repository.py#L141-L148

We seem to be assuming that a package is a “path” package because the .pth file lists multiple paths but none of them are vcs pakcages. The else block should only set source_type = "directory" if at least one of the paths listed is outside the site package directories (ie. editable package).