This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Clarify wording for warning message when checking a package
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, jugmac00, miss-islington, p-ganssle
Priority: normal Keywords: patch

Created on 2019-11-26 09:41 by jugmac00, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17388 merged jugmac00, 2019-11-26 10:25
PR 23264 open jugmac00, 2020-11-13 15:20
Messages (7)
msg357490 - (view) Author: Jürgen Gmach (jugmac00) * Date: 2019-11-26 09:41
When creating a package for PyPi, and naming an author, but not an author_email, you get a warning as follows:

warning: Check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too

The specs ( https://packaging.python.org/specifications/core-metadata/#author ) do not enforce this behavior, so I'd like to change the wording from `must` to `should`.

This can be reproduced by creating a setup.py, providing `author`, but not `author_email`, and then calling `python setup.py check` or `python -m pep517.build .`.

This issue was discussed at:
https://discuss.python.org/t/which-fields-are-required-for-a-setup-py-especially-is-author-required/2705
and
https://github.com/pypa/pep517/issues/73

Background:
I ported a 16 year old package to Python 3, and tried to upload it to PyPi. I know the author name, but not his email address. Also, I think he does not like to get bothered with emails for a project he abandoned 16 years ago.

P.S.: I am working on a PR for this and update this issue accordingly.
msg357498 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2019-11-26 14:20
For your project, if you define maintainer and maintainer-email (with your own info), it’s too bad that adding author results in a warning for missing author-email!

The goal of these checks as I understand them is a best effort to encourage projects to contain contact information (and recognition for the work).  It seems legitimate to know the original author name but not email, and too bad that the simplest way to avoid the warning is to remove the author info.

I wonder if it would be going too far to change the checks to avoid the warning if we have author, maintainer and maintainer-email (or even more combinations? given that email format allows embedding a name directly there)
msg357500 - (view) Author: Jürgen Gmach (jugmac00) * Date: 2019-11-26 14:39
Thank you for your feedback.

Paul Ganssle suggested a updated wording over at
https://github.com/pypa/pep517/issues/73
so this is why I created a pr accordingly.

The intent of this issue and the pr is to minimize the confusion for a beginner with Python packaging (e.g myself) by doing something with the probably wrong word "must".

Changing the checks is another way to fix this issue, but it is beyond my scope to say one is better or the other.
msg357508 - (view) Author: Paul Ganssle (p-ganssle) * (Python committer) Date: 2019-11-26 16:26
For the future, we generally tend to keep distutils pretty "frozen", only making minor changes or the changes needed to build Python itself. Instead we generally make changes in setuptools, which for the moment monkey-patches distutils (and into which distutils will eventually be merged). One of the big reasons is that setuptools is used across all versions of Python, so the changes are automatically backported, whereas changes to distutils will only be seen by people using the most recent Python versions.

In this case, it's not really a substantive change, so I think we can leave it in distutils, I just wanted to bring this up as an FYI.
msg357536 - (view) Author: Jürgen Gmach (jugmac00) * Date: 2019-11-26 22:44
Thank you, both of you!

I especially appreciate the further information about how setuptools and distutils play together.
msg358819 - (view) Author: miss-islington (miss-islington) Date: 2019-12-23 14:53
New changeset 9f9dac0a4e58d5c72aa3b644701cb155c009cb2c by Miss Islington (bot) (Jürgen Gmach) in branch 'master':
bpo-38914 Do not require email field in setup.py. (GH-17388)
https://github.com/python/cpython/commit/9f9dac0a4e58d5c72aa3b644701cb155c009cb2c
msg378148 - (view) Author: Jürgen Gmach (jugmac00) * Date: 2020-10-07 07:26
This issue can be closed as the related PR was merged.
History
Date User Action Args
2022-04-11 14:59:23adminsetgithub: 83095
2020-11-13 15:20:35jugmac00setpull_requests: + pull_request22160
2020-10-07 23:46:10pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-10-07 07:26:28jugmac00setmessages: + msg378148
2019-12-23 14:53:21miss-islingtonsetnosy: + miss-islington
messages: + msg358819
2019-11-26 22:44:07jugmac00setmessages: + msg357536
2019-11-26 16:26:27p-gansslesetnosy: + p-ganssle
messages: + msg357508
2019-11-26 14:39:11jugmac00setmessages: + msg357500
2019-11-26 14:20:49eric.araujosettype: enhancement -> behavior
versions: + Python 3.8, Python 3.9
2019-11-26 14:20:16eric.araujosetmessages: + msg357498
2019-11-26 10:25:02jugmac00setkeywords: + patch
stage: patch review
pull_requests: + pull_request16870
2019-11-26 09:41:11jugmac00create