Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version field not required in [project] table when package-mode = false #10032

Open
johnthagen opened this issue Jan 13, 2025 · 0 comments
Open
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@johnthagen
Copy link
Contributor

johnthagen commented Jan 13, 2025

Description

This pyproject.toml file is allowed by Poetry 2.0.1:

[project]
name = "test"
requires-python = ">=3.10"
dependencies = [
    "mkdocs",
]

[tool.poetry]
package-mode = false

But should be disallowed according to PEP 621

According to the spec:

The keys which are required but may be specified either statically or listed as dynamic are:

  • version

Since the name field is being required by Poetry, the version field should also be required to exist during check, lock, sync, etc.

Workarounds

Manually verify you have added the version field to be compliant.

Poetry Installation Method

pipx

Operating System

Windows 10

Poetry Version

Poetry (version 2.0.1)

Poetry Configuration

cache-dir = "C:\\Users\\User\\AppData\\Local\\pypoetry\\Cache"
installer.max-workers = null
installer.no-binary = null
installer.only-binary = null
installer.parallel = true
installer.re-resolve = true
keyring.enabled = true
requests.max-retries = 0
solver.lazy-wheel = true
system-git-client = false
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}\\virtualenvs"  # C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs
virtualenvs.prompt = "{project_name}-py{python_version}"
virtualenvs.use-poetry-python = false

Python Sysconfig

sysconfig.log
Platform: "win-amd64"
Python version: "3.10"
Current installation scheme: "nt"

Paths: 
    data = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10"
    include = "C:\Program Files\Python310\Include"
    platinclude = "C:\Program Files\Python310\Include"
    platlib = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Lib\site-packages"
    platstdlib = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Lib"
    purelib = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Lib\site-packages"
    scripts = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Scripts"
    stdlib = "C:\Program Files\Python310\Lib"

Variables: 
    BINDIR = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Scripts"
    BINLIBDEST = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Lib"
    EXE = ".exe"
    EXT_SUFFIX = ".cp310-win_amd64.pyd"
    INCLUDEPY = "C:\Program Files\Python310\Include"
    LIBDEST = "C:\Program Files\Python310\Lib"
    SO = ".cp310-win_amd64.pyd"
    TZPATH = ""
    VERSION = "310"
    abiflags = ""
    base = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10"    
    exec_prefix = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10"
    installed_base = "C:\Program Files\Python310"
    installed_platbase = "C:\Program Files\Python310"
    platbase = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10"
    platlibdir = "lib"
    prefix = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10"  
    projectbase = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Scripts"
    py_version = "3.10.11"
    py_version_nodot = "310"
    py_version_nodot_plat = "310"
    py_version_short = "3.10"
    srcdir = "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-CSqu6s7h-py3.10\Scripts"
    userbase = "C:\Users\User\AppData\Roaming\Python"

Poetry Runtime Logs

$ poetry check -vvv
Loading configuration file C:\Users\User\AppData\Roaming\pypoetry\config.toml
All set!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant