Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clarify zip_safe=False recommendation for PEP 561 #8802

@bhrutledge

Description

@bhrutledge

In pypa/twine#618, I'm adding py.typed so that Twine's type annotations are recognized when it's used as an installed package. I've set zip_safe=False as suggested by the mypy docs:

If you use setuptools, you must pass the option zip_safe=False to setup(), or mypy will not be able to find the installed package.

However, one of the other maintainers has requested removing this: pypa/twine#618 (comment)

The only references I've found to zip_safe in the mypy repo are:

I've done some cursory testing without setting zip_safe, including using pip install -e path/to/twine, and it doesn't seem to be necessary. However, the note quoted above seems unequivocal. Is it still accurate? Could it be expanded?

Caveat: I've only skimmed the issues above, and am far from an expert on the various use cases of setuptools, esp. editable installs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions