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

setuptools.dist.Distribition.__init__ formatting failure #379

Open
ghost opened this issue May 5, 2015 · 1 comment
Open

setuptools.dist.Distribition.__init__ formatting failure #379

ghost opened this issue May 5, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented May 5, 2015

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).


@ghost
Copy link
Author

ghost commented May 5, 2015

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


I recommend changing the old formatting to new formatting, which will also solve this issue.

@jaraco jaraco removed the 15.2 label Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant