Skip to content

Inconsistent default behavior of include #9691

@radoering

Description

@radoering

Before diving into the issue, a short clarification:

  1. There are packages includes, which default to sdist and wheel.
  2. There are includes, which (according to the docs) default to only sdist.

These different defaults can be confusing, but might make sense because you normally want to include packages in sdists and wheels but additional data like tests and a changelog only in the sdist.

Issue

The behavior for includes (the second one) is different for files and directories:

  • files are included in both sdist and wheel
  • directories are only included in sdists

Considering that the docs were "fixed" recently in #8852 to describe the behavior for directories - previously, it described the behavior for files - I wondered which behavior is correct and which is the bug?

Events of confusion in chronologically order:

We can be sure that the initial intention was to default to "only sdist". However, I am not sure if the behavior should be changed to "sdist and wheel" later or if it was just a confusion between the two types of includes.

Thus, the big question: What should the default be?

  • sdist and wheel for package includes (first type) and sdist only for includes (second type)
    • pro: You normally want to include packages in sdists and wheels but additional data like tests and a changelog only in the sdist
    • contra: different defaults
  • sdist and wheel for both types of includes
    • pro: same defaults
    • contra: maybe improper default for one type

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/build-systemRelated to PEP 517 packaging (see poetry-core)area/coreRelated to the poetry-core librarykind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions