-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
init: Use pathlib Path.read_text for readfile in the main executable #4234
Conversation
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.
I agree, if this is broken we will know quickly.
@veroandreo I was wondering if you were using this week a build from main since this was merged. I was waiting for the end of the week before merging #4235, to see if anything would pop up. |
I am using main indeed, and I just recompiled this morning. What should I test? |
Just opening and starting grass. It touched reading bash profiles. If it was broken you should've noticed it already. |
no, no issues |
Great! We might as well proceed earlier with #4235, it only needs a new approval after fixing the intended merge conflict when this PR was merged cleared the approval. |
I explicitly don't want readfile and writefile to be changed in the same PR.
I don't see any coverage (pytest from here, nor gunittest from my fork (too slow to be used allways)), that runs into the init script. So the approach is to leave it for some time before changing.
The readfile function is only used inside that file, 10 references, in functions like
create_gisrc()
,set_mapset()
,load_env()
,csh_startup()
,sh_like_startup()
,classic_parser()
.If it were to have an impact, we should see it easily.
I seriously don't think there are any difference, as Pathlib's
read_text()
function is really simple to understand, so I'm including it here for reference when reviewing my similar PRs:calling
and
write_text()
(not used here):calling