-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-40275: Add os_helper submodule in test.support #20732
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
Conversation
|
@vstinner Hi, victor. Pls have a look again when you have free time. |
|
For the first PR (this one), please leave |
|
For example, os_helper.py would contain something like: |
Oh, My logic is the opposite. IMHO, it is same behavior, no? |
|
Brett and me explained to you that a PR modifying 100+ files is a bad idea. Adding a new submodule which only imports existing functions avoids modifying any existing test and so it becomes possible to convert tests slowly, one by one, or 20 by 20. |
Pls forgive me, I have relealized that it's not easy to review and noisy too many developers.
IMO: Oh, wait. You are right. Some testcase use inner functions of test.support will be affected. |
vstinner
left a comment
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.
move existing functions in new submodule and reimport those existing functions in test.support
Right. I tried to check if there are remaining functions in support/init.py which should be moved to os_helper. But since functions are not moved, it's not easy.
Would you mind to create a second PR which moves functions but adds aliases in support/init.py? It sounds like an even better approach.
|
|
||
| .. data:: SAVEDCWD | ||
|
|
||
| Set to :func:`os.getcwd`. |
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.
Side note: I'm not sure why it exists in test.support. It seems like only test.libregrtest uses it. Maybe it should be moved (later) to test.libregrtest.
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.
Hm, I checked this detail. Looks like the describe info is right. It points that SAVEDCWD=os.getcwd()
|
IMO PR #20765 is the right way to fix this issue. |
Import the following vars, functions, classes in os_helper:
https://bugs.python.org/issue40275