-
Notifications
You must be signed in to change notification settings - Fork 821
Issue 703 -- support for Decimal type #726
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
Conversation
If someone can explain why the python 2.7 tests are failing, and how to run the travis builds locally I can fix the travis errors. |
@picturedots you'll need to setup a virtualenv with python 2.7 Then run the commands in the contributing section in the readme: https://github.com/graphql-python/graphene#contributing Looks like the flake8 (for linting) is not included in the requirements so you'll need to install it first before running it. |
Also thanks for the PR! It's looking great |
Anyway we can get this into the next release? |
I got stalled on the tests and forgot to come back to this -- when is the next release? |
I don't think there's any set schedule, I've just been noticing some release-related activity on the various graphql-python projects and thought a new graphene release was imminent. |
@picturedots maybe try adding |
I appreciate the updates to the "Contributing" section in README.MD -- I will see if I can finally get this finished this week. |
# Conflicts: # graphene/__init__.py # graphene/types/__init__.py
To be ahead of #794, we could raise assertion errors. |
It looks like there are black formatting errors in |
@picturedots done: #802 |
This should be all good to go now, @jplock -- unfortunately it looks like I missed the latest release. |
Thanks for all the efforts @picturedots! @jkimbo @syrusakbary think this could make the next release? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good thanks @picturedots
There are a couple of PR's ready for a 2.2 release so it would be great to get it in that. Also when you get the chance could you add the Decimal type to the docs?
@syrusakbary merge whenever you're happy |
def parse_value(value): | ||
try: | ||
return _Decimal(value) | ||
except ValueError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it check for decimal.DecimalException
here, as for example Django does? I've copied your changes to my repo (as it hasn't been released yet) and I'm trying to use it in my mutations, but when providing invalid values like an empty string I'm getting:
{
"errors": [
{
"message": "[<class 'decimal.ConversionSyntax'>]"
}
]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maarcingebala can you submit a pull request with this change so it can be reviewed?
#703