Skip to content

setuptools.dist.Distribition.__init__ formatting failure #379

Open
@ghost

Description

Originally reported by: ronaldoussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren)


The init method of setuptools.dist.Distribution contains a call to warnings.warn at the end of the method. The argument to this call is a formatted using te % operator where the RHS of the call is a user provided value.

When the version argument of the distribution is a tuple this will cause a TypeError, e.g.:

#!python

   Distribution(name='test', version=(1,0))

That call specifies an invalid value for 'version', but that's no reason to crash in this way.

I have no opinion on the correct behavior, obvious options are to create an explicit tuple for the RHS, or to raise an exception for invalid input (for example DistutilsOptionError).


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions