Skip to content

poetry show [package] 'required by' output is confusing #9749

@elliot-100

Description

@elliot-100

Description

Here's an example.

Extract from my project's poetry.lock:

[[package]]
name = "playwright"
version = "1.47.0"
description = "A high-level API to automate web browsers"
optional = false
python-versions = ">=3.8"
files = [--snipped--]

[package.dependencies]
greenlet = "3.0.3"
pyee = "12.0.0"
> poetry show greenlet
 name         : greenlet                                      
 version      : 3.0.3                                         
 description  : Lightweight in-process concurrent programming 

required by
 - playwright 3.0.3

Playwright's latest version is 1.47; it looks like the locked version of greenlet is being shown here instead.

Notes:

  • Re 'How did you install Poetry?' I am not sure of the answer - is there a way to verify?
  • I will try to check on other platforms

Workarounds

Examining poetry.lock and not trusting poetry show [package].

Poetry Installation Method

install.python-poetry.org

Operating System

Windows 11

Poetry Version

1.8.3

Poetry Configuration

cache-dir = "C:\\Users\\--user-redacted--\\AppData\\Local\\pypoetry\\Cache"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
repositories.testpypi.url = "https://test.pypi.org/legacy/"
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}\\virtualenvs"  # C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = false


### Python Sysconfig

```bash session
Platform: "win-amd64"
Python version: "3.12"
Current installation scheme: "venv"

Paths: 
        data = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12"
        include = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312\Include"
        platinclude = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312\Include"
        platlib = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12\Lib\site-packages"
        platstdlib = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12\Lib"
        purelib = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12\Lib\site-packages"
        scripts = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12\Scripts"
        stdlib = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312\Lib"

Variables: 
        BINDIR = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12\Scripts"
        BINLIBDEST = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12\Lib"
        EXE = ".exe"
        EXT_SUFFIX = ".cp312-win_amd64.pyd"
        INCLUDEPY = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312\Include"  
        LIBDEST = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312\Lib"        
        TZPATH = ""
        VERSION = "312"
        VPATH = "..\.."
        abiflags = ""
        base = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12"
        exec_prefix = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12"
        installed_base = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312"     
        installed_platbase = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312" 
        platbase = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12"
        platlibdir = "DLLs"
        prefix = "C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12"
        projectbase = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312"        
        py_version = "3.12.7"
        py_version_nodot = "312"
        py_version_nodot_plat = "312"
        py_version_short = "3.12"
        srcdir = "C:\Users\--user-redacted--\AppData\Local\Programs\Python\Python312"
        userbase = "C:\Users\--user-redacted--\AppData\Roaming\Python"

Example pyproject.toml

[tool.poetry]
name = "britishcycling-clubs"
version = "0.10.0.post1"
description = "Unofficial library to automate aspects of British/Scottish/Welsh Cycling's club Membership Manager system"
authors = ["elliot-100 <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/elliot-100/britishcycling-clubs"
repository = "https://github.com/elliot-100/britishcycling-clubs"
packages = [{include = "britishcycling_clubs"}]
include = ["CHANGELOG.md"]
license = "GPL-3.0-only"

[tool.poetry.dependencies]
python = ">=3.8"
beautifulsoup4 = ">=4.12.2"
requests = ">=2.23.1"
playwright = ">=1.39.0"

[tool.poetry.group.dev.dependencies]
pdoc = ">=14.6.0"
ruff = ">=0.5.7"

[tool.poetry.group.test.dependencies]
mypy = ">=1.11.1"
pytest = ">=7.4.4"
types-requests = ">=2.32.0"
types-beautifulsoup4 = ">=4.12.0"

[tool.mypy]
strict = true

[[tool.mypy.overrides]]
module = "playwright"
disallow_untyped_calls = false

[tool.ruff]
target-version = "py38"  # Ruff doesn't respect Python version in [tool.poetry.dependencies]

[tool.ruff.lint]
select = ["ALL"]

# Ignore rules that conflict with Ruff formatter:
#   COM812 Trailing comma missing
#   ISC001 Implicitly concatenated string literals on one line
ignore = ["COM812", "ISC001"]

[tool.ruff.lint.per-file-ignores]
# Ignore rules that aren't relevant/useful in tests:
#   PLR2004 Magic value used in comparison
#   S101 Use of assert detected
"**/{tests}/*" = ["PLR2004", "S101"]
# Ignore rules that aren't relevant/useful in example scripts:
#   T203 `pprint` found
"example*.py" = ["T203"]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

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

Poetry Runtime Logs

Loading configuration file C:\Users\--user-redacted--\AppData\Roaming\pypoetry\config.toml
Using virtualenv: C:\Users\--user-redacted--\AppData\Local\pypoetry\Cache\virtualenvs\britishcycling-clubs-_kmXzTV9-py3.12
 name         : greenlet                                      
 version      : 3.0.3                                         
 description  : Lightweight in-process concurrent programming 

required by
 - playwright 3.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/showRelated to `poetry show`area/uxFeatures and improvements related to the user experiencekind/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