-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: python3.11 support #102
Conversation
Thanks for the pull request, @ichintanjoshi! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
@feanil all tests are green now |
calc/calc.py
Outdated
@@ -265,6 +265,11 @@ def eval_variable(x): | |||
return all_variables[casify(x[0])] | |||
|
|||
def eval_function(x): | |||
# This condition here is only for factorial function | |||
if isinstance(x[1], numbers.Real): |
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.
@ichintanjoshi this felt a little late since by now all the other evaluation has happened, what do you think about this alternate proposal where we fix the eval functions upstream instead?
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.
Yes @feanil sure, that'd work
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.
@feanil what should be the next course of actions ?
As we discussed earlier, I agree with your changes and I think it's best to do it in that manner if they are appearing earlier in flow, instead of my approach.
How to proceed with those changes ? Should I change code in this branch ?
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.
How about you cherry-pick my commits onto your branch since you have more updates here and then we can land your PR and I'll close mine?
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.
Done @feanil
Update evaluation functions to not coerce integers to floating point numbers when not necessary.
@ichintanjoshi 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
This PR contains changes for upgrading python 3.8 to python 3.11.
Changes include :-
evaluator
function in calc.py file will convert all numbers to floatmath.factorial
to calculate float values and will raise an error refDone as a part of following :-