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

parser.addoption(type="float") backwards incompatibility #457

Closed
pytestbot opened this Issue Feb 10, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@pytestbot
Copy link

pytestbot commented Feb 10, 2014

Originally reported by: Floris Bruynooghe (BitBucket: flub, GitHub: flub)


The parser.addoption(type="...") api has changed from optparse to argparse and the conversion from "int" -> int and "string" -> string is handled however float is not available. This causes existing plugins to fail without any notice.


@pytestbot

This comment has been minimized.

Copy link
Author

pytestbot commented Apr 28, 2014

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


Is this a py2/py3 thing? https://docs.python.org/dev/library/argparse.html seems to suggest that type=float is supported.

@pytestbot

This comment has been minimized.

Copy link
Author

pytestbot commented Apr 28, 2014

Original comment by Floris Bruynooghe (BitBucket: flub, GitHub: flub):


I think in the optparse world it was type="float", but will check. Re-reading this description it is not the best in the world...

@RonnyPfannschmidt

This comment has been minimized.

Copy link
Member

RonnyPfannschmidt commented Apr 20, 2016

@flub still an issue or can we close this?

RonnyPfannschmidt added a commit to RonnyPfannschmidt/pytest that referenced this issue Jul 19, 2016

optparse compatibility - add float and complex
also documents the implementation quality
fixes pytest-dev#457

@nicoddemus nicoddemus closed this Jul 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.