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

Remove 3.12 deprecation warning... #63

Merged
merged 2 commits into from
Jul 26, 2024
Merged

Conversation

rocky
Copy link
Member

@rocky rocky commented Jul 26, 2024

regarding the use of pkgdata

regarding the use of pkgdata
@rocky rocky requested a review from mmatera July 26, 2024 00:53
@rocky
Copy link
Member Author

rocky commented Jul 26, 2024

NB: I will be investigating what's up with building doctest.

@rocky rocky marked this pull request as draft July 26, 2024 01:38
Copy link
Contributor

@mmatera mmatera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rocky rocky marked this pull request as ready for review July 26, 2024 20:29
@rocky
Copy link
Member Author

rocky commented Jul 26, 2024

I looked at the doctest failure. It looks like we have problems with in mathics core and incompatibility with newer dependencies (scipy?), but I am not sure which ones exactly.

Expect some issues or comments raised in mathics-core.

@rocky rocky merged commit 3244783 into master Jul 26, 2024
11 of 12 checks passed
@rocky rocky deleted the remove-3.12-deprecation-warning branch July 26, 2024 20:31
@mmatera
Copy link
Contributor

mmatera commented Jul 26, 2024

I looked at the doctest failure. It looks like we have problems with in mathics core and incompatibility with those versions.

Expect some issues or comments raised there.

@rocky, I tested the doctests in my laptop against different versions of Python, and they seem to work properly.

@rocky
Copy link
Member Author

rocky commented Jul 26, 2024

I was seeing the same kind of failure that is in the failure of the github workflows tracker for mathics-scanner here.

For example for this:

2015 ( 3): TEST ArcCosh[0.00000000000000000000000000000000000000]
----------------------------------------------------------------------
Test failed: in Reference of Built-in Symbols / Integer and Number-Theoretical Functions / Hyperbolic Functions
Reference of Built-in Symbols
Exception string index out of range

Adding a len() to the while test addresses this, but we still get the wrong result:

PAGER=cat git diff 
diff --git a/mathics/builtin/makeboxes.py b/mathics/builtin/makeboxes.py
index 58a1b231..d41c64be 100644
--- a/mathics/builtin/makeboxes.py
+++ b/mathics/builtin/makeboxes.py
@@ -108,9 +108,9 @@ def real_to_s_exp(expr, n):
             exp = s.index(".") - 1
             s = s[: exp + 1] + s[exp + 2 :].rstrip("0")
 
-            # consume leading '0's.
+            # Remove leading '0's from the integer part.
             i = 0
-            while s[i] == "0":
+            while i < len(s) and s[i] == "0" :
                 i += 1
                 exp -= 1
             s = s[i:]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants