Skip to content

Remove traceLog decorator from pretty_getcwd#1584

Merged
xsuchy merged 1 commit intorpm-software-management:mainfrom
ferdnyc:import-cwd
May 27, 2025
Merged

Remove traceLog decorator from pretty_getcwd#1584
xsuchy merged 1 commit intorpm-software-management:mainfrom
ferdnyc:import-cwd

Conversation

@ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented May 24, 2025

pretty_getcwd() is called during module import (to set ORIGINAL_CWD), and using a traced function creates unwanted side effects.

Fixes: #1583

I think this can be label no-release-notes, let me know if you disagree.

@xsuchy
Copy link
Member

xsuchy commented May 26, 2025

I think removing the tracelog decorator will be simpler fix. We can live without it.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented May 26, 2025

@xsuchy That also works for me. I'll make that change to the PR.

`pretty_getcwd()` is called during module import (to set
`ORIGINAL_CWD`), and using a traced function creates unwanted
side effects.

Fixes: rpm-software-management#1583
@ferdnyc ferdnyc changed the title Use os.getcwd to set ORIGINAL_CWD on import Remove traceLog decorator from pretty_getcwd May 26, 2025
Copy link
Member

@xsuchy xsuchy left a comment

Choose a reason for hiding this comment

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

+1 from me

@xsuchy
Copy link
Member

xsuchy commented May 27, 2025

the TF failure is not relevant to this PR. So merging.
Thank you for the contribution.

@xsuchy xsuchy merged commit 89d297f into rpm-software-management:main May 27, 2025
22 of 23 checks passed
@ferdnyc ferdnyc deleted the import-cwd branch May 27, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mockbuild.util shouldn't use pretty_getcwd() to set ORIGINAL_CWD on import

3 participants