-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
buffer.py: make files readonly only when possible #33256
Comments
comment:1
While we may want to avoid error on file that are not changeable by the user, just a
Should the original block be preserved but with |
New commits:
|
Branch: u/fbissey/chmod_readonly |
Author: François Bissey |
Commit: |
comment:4
I don't know the details about this code there, but for the failures in #31306 I think the right fix is to change the doctests so that they don't attempt to make changes (including permissions) to the source tree. |
comment:5
Replying to @mkoeppe:
That's what I thought and why I switched the test to check for What about the other part of the branch which basically is about not failing if you cannot change the permissions outside of the source tree? The code wants to make sure the file that it is dealing with cannot be modified by changing its permission, but will fail when it cannot do so - in which case you probably cannot modify the file already. |
comment:7
Works fine here (also testing on installed package) |
Reviewer: Antonio Rojas |
comment:8
Thanks! |
Changed branch from u/fbissey/chmod_readonly to |
After #31306 we have doctest failure on sage-on-distros because files have been moved out of
SAGE_EXTCODE
. Insage/repl/rich_output/buffer.py
files are made readonly withchmod
so they are immutable during the process. Unfortunatelychmod
fails when trying to act on system installed files as a regular user. There is a safety for files inSAGE_EXTCODE
, this is a useless complication and should be replaced by atry
block.CC: @mkoeppe
Component: distribution
Author: François Bissey
Branch/Commit:
2c3a144
Reviewer: Antonio Rojas
Issue created by migration from https://trac.sagemath.org/ticket/33256
The text was updated successfully, but these errors were encountered: