Skip to content

Instantly share code, notes, and snippets.

@pradyunsg
Last active December 19, 2025 15:14
Show Gist options
  • Select an option

  • Save pradyunsg/df5ff2072702dbc67b4d621f18771781 to your computer and use it in GitHub Desktop.

Select an option

Save pradyunsg/df5ff2072702dbc67b4d621f18771781 to your computer and use it in GitHub Desktop.
All mentions of `warn` in Python Packaging Core Metadata PEPs

With https://gist.github.com/pradyunsg/56b7b1c16bedc3555bec935682925a50:

./lookup.sh "warn" 241 314 345 566 643 685 639 794
  • PEP 685, ~line 103

    If a project's metadata specifies an older core metadata version and the name would be invalid with newer core metadata versions, tools reading that metadata SHOULD warn the user.

  • PEP 685, ~line 106

    Tools SHOULD warn users when an invalid extra name is read and SHOULD ignore the name to avoid ambiguity.

  • PEP 685, ~line 108

    Tools MAY raise an error instead of a warning when reading an invalid name, if they so desire.

  • PEP 794, ~line 175

    Tools MAY warn or raise an error when installing a project into a preexisting environment where there is import name overlap with a project that is already installed.

  • PEP 639, ~line 268

    Note that the guidance on errors and warnings is for tools' default behavior; they MAY operate more strictly if users explicitly configure them to do so, such as by a CLI flag or a configuration option.

  • PEP 639, ~line 324

    The error and warning guidance in this section applies to build and publishing tools; end-user-facing install tools MAY be less strict than mentioned here when encountering malformed metadata that does not conform to this specification.

  • PEP 639, ~line 351

    Tools SHOULD report a warning and publishing tools MAY raise an error if one or more license identifiers have been marked as deprecated in the SPDX License List <spdxlist_>__.

  • PEP 639, ~line 411

    Build tools MAY and publishing tools SHOULD produce an informative warning if a built distribution's metadata contains no License-File entries, and publishing tools MAY but build tools MUST NOT raise an error.

  • PEP 639, ~line 436

    If only the License field is present, tools MAY issue a warning informing users it is deprecated and recommending License-Expression instead.

  • PEP 639, ~line 463

    Otherwise, if this field contains a license classifier, tools MAY issue a warning informing users such classifiers are deprecated, and recommending License-Expression instead.

  • PEP 639, ~line 495

    Build tools SHOULD validate and perform case normalization of the expression as described in the :ref:639-spec-field-license-expression section, outputting an error or warning as specified.

  • PEP 639, ~line 619

    If the new license-files key is not present and the text subkey is present in a license table, tools SHOULD issue a warning informing users it is deprecated and recommending a license expression as a top-level string key instead.

  • PEP 639, ~line 624

    Likewise, if the new license-files key is not present and the file subkey is present in the license table, tools SHOULD issue a warning informing users it is deprecated and recommending the license-files key instead.

  • PEP 639, ~line 777

    For authors using the now-deprecated License field or license classifiers, packaging tools may warn them and inform them of the replacement, License-Expression.

rg 'warn' peps/pep-{0241,0314,0345,0566,0643,0685,0639,0794}.rst             
peps/pep-0794.rst
176:MAY warn or raise an error when installing a project into a preexisting

peps/pep-0685.rst
105:tools reading that metadata SHOULD warn the user.
106:Tools SHOULD warn users when an invalid extra name is read and SHOULD
108:Tools MAY raise an error instead of a warning when reading an

peps/pep-0639.rst
268:Note that the guidance on errors and warnings is for tools' default behavior;
324:The error and warning guidance in this section applies to build and
351:Tools SHOULD report a warning and publishing tools MAY raise an error
411:Build tools MAY and publishing tools SHOULD produce an informative warning
436:If only the ``License`` field is present, tools MAY issue a warning
464:tools MAY issue a warning informing users such classifiers
498:outputting an error or warning as specified.
621:tools SHOULD issue a warning informing users it is deprecated
626:tools SHOULD issue a warning informing users it is deprecated and recommending
778:packaging tools may warn them and inform them of the replacement,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment