python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.14k stars 2.25k forks source link

Poetry insists on optional property #8299

Closed ashemedai closed 1 year ago

ashemedai commented 1 year ago

Issue

The PyPA Python Packaging User Guide states on declaring project metadata the following:

The only keys required to be statically defined are:

  • name

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

  • version

All other keys are considered optional and may be specified statically, listed as dynamic, or left unspecified.

So only name and version are required to be defined in pyproject.toml. However, Poetry 1.5.1 currently gives me the following:

The Poetry configuration is invalid:
  - 'authors' is a required property

This is, of course, at odds with the PyPA specifications.

Secrus commented 1 year ago

We don't conform to metadata spec yet. See #3332

ashemedai commented 1 year ago

@Secrus D'oh, mentally made [tool.poetry] equivalent to the PEP621/PyPA spec's [project]. My bad.

ghost commented 1 year ago

We don't conform to metadata spec yet. See #3332

That doesn't mean you have to require the authors field, seems like a quite simple change to make. I could make a PR if desired.

It has always bothered me, because I have some private projects where I don't put any author for safety reasons. At least authors = [] works.

Though I suppose eventually this will become a non-issue when you adopt the official Python metadata spec.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.