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

More careful validation of cancel scope deadline values #423

Open
njsmith opened this issue Jan 27, 2018 · 0 comments
Open

More careful validation of cancel scope deadline values #423

njsmith opened this issue Jan 27, 2018 · 0 comments
Labels

Comments

@njsmith
Copy link
Member

njsmith commented Jan 27, 2018

Right now, assigning to the cancel scope .deadline attribute does:

self._deadline = float(new_deadline)

so that means that we at least know that scope.deadline = "asdf" or scope.deadline = None will fail. However, surprisingly, it allows code like:

scope.deadline = "1.2e3"  # a string is a float?1?
scope.deadline = float("nan")  # uh not sure what will happen here

We should perhaps validate these values more carefully.

@njsmith njsmith added the polish label Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant