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

Clarify wording for warning message when checking a package #83095

Closed
jugmac00 mannequin opened this issue Nov 26, 2019 · 7 comments
Closed

Clarify wording for warning message when checking a package #83095

jugmac00 mannequin opened this issue Nov 26, 2019 · 7 comments
Labels
3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@jugmac00
Copy link
Mannequin

jugmac00 mannequin commented Nov 26, 2019

BPO 38914
Nosy @merwok, @dstufft, @pganssle, @jugmac00, @miss-islington
PRs
  • bpo-38914 Do not require email field in setup.py. #17388
  • bpo-42344: Improve pseudo implementation for SimpleNamespace #23264
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-10-07.23:46:10.569>
    created_at = <Date 2019-11-26.09:41:10.985>
    labels = ['3.8', 'type-bug', 'library', '3.9']
    title = 'Clarify wording for warning message when checking a package'
    updated_at = <Date 2020-11-13.15:20:35.741>
    user = 'https://github.com/jugmac00'

    bugs.python.org fields:

    activity = <Date 2020-11-13.15:20:35.741>
    actor = 'jugmac00'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-10-07.23:46:10.569>
    closer = 'pablogsal'
    components = ['Distutils']
    creation = <Date 2019-11-26.09:41:10.985>
    creator = 'jugmac00'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38914
    keywords = ['patch']
    message_count = 7.0
    messages = ['357490', '357498', '357500', '357508', '357536', '358819', '378148']
    nosy_count = 5.0
    nosy_names = ['eric.araujo', 'dstufft', 'p-ganssle', 'jugmac00', 'miss-islington']
    pr_nums = ['17388', '23264']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue38914'
    versions = ['Python 3.8', 'Python 3.9']

    @jugmac00
    Copy link
    Mannequin Author

    jugmac00 mannequin commented Nov 26, 2019

    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 PEP-517.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
    pypa/pyproject-hooks#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.

    @jugmac00 jugmac00 mannequin added type-feature A feature request or enhancement stdlib Python modules in the Lib dir labels Nov 26, 2019
    @merwok
    Copy link
    Member

    merwok commented Nov 26, 2019

    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)

    @merwok merwok added 3.8 only security fixes 3.9 only security fixes type-bug An unexpected behavior, bug, or error and removed type-feature A feature request or enhancement labels Nov 26, 2019
    @jugmac00
    Copy link
    Mannequin Author

    jugmac00 mannequin commented Nov 26, 2019

    Thank you for your feedback.

    Paul Ganssle suggested a updated wording over at
    pypa/pyproject-hooks#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.

    @pganssle
    Copy link
    Member

    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.

    @jugmac00
    Copy link
    Mannequin Author

    jugmac00 mannequin commented Nov 26, 2019

    Thank you, both of you!

    I especially appreciate the further information about how setuptools and distutils play together.

    @miss-islington
    Copy link
    Contributor

    New changeset 9f9dac0 by Miss Islington (bot) (Jürgen Gmach) in branch 'master':
    bpo-38914 Do not require email field in setup.py. (GH-17388)
    9f9dac0

    @jugmac00
    Copy link
    Mannequin Author

    jugmac00 mannequin commented Oct 7, 2020

    This issue can be closed as the related PR was merged.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants