-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Description
Is there an existing issue for this?
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
Did you read the documentation and troubleshoot guide?
- I have read the documentation and troubleshoot guide
Environment
- **OS**: Linux Mint 20.2 (Ubuntu 20.04 variant)
- **Sage Version**: 10.1.beta3, Release Date: 2023-06-11 (pulled from github a few days ago)
bug also exhibited by sage 9.6
- **build steps**:
configure
make
make install
Steps To Reproduce
Run the following lines in batch mode (e.g., sage tst.sage). You will see the recursion limit being reset to the default 3000 by P = Z[x]. Interestingly, it works fine if you type the same lines in the interpreter..
#tst.sage
N = 100
sys.setrecursionlimit(2**31 - 1)
Z = Zmod(N)
print(f"RECURSION LIMIT: {sys.getrecursionlimit()}")
P = Z[x]
print(f"RECURSION LIMIT: {sys.getrecursionlimit()}")
Expected Behavior
Defining a poly ring should not change the recursion limit - especially, it should not decrease it.
Actual Behavior
Recursion limit gets reset to the python default of 3000.
Additional Information
No response