Skip to content

bpo-31904: Fix test_netrc for VxWorks RTOS #21675

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

Merged
merged 4 commits into from
Dec 1, 2020

Conversation

pxinwr
Copy link
Contributor

@pxinwr pxinwr commented Jul 29, 2020

VxWorks RTOS has no user home directory. So VxWorks native ftp client doesn't support auto-login feature. We also can't support this Python module. So skip the corresponding test.

https://bugs.python.org/issue31904

@JimJJewett
Copy link

Why is netrc not supported? Is this just a temporary workaround to get the build passing all tests? Or it is something more fundamental?

If it is temporary, and likely to be fixed, then that intent should be documented near the skipif.

If it is permanent, then that reason should be documented both here and in the documentation for netrc. https://docs.python.org/3.10/library/netrc.html gives no hint that it might be missing in certain operating systems, let alone excluding VxWorks in particular.

And I suppose this comment applies globally to failures resolved by a skipIf, including those already integrated.

@pxinwr
Copy link
Contributor Author

pxinwr commented Jul 30, 2020

@JimJJewett Thanks for your review.
This is permanent design. VxWorks RTOS has no user home directory. So VxWorks native ftp client doesn't support auto-login feature. We also can't support this Python module. I've modified the docs as you requested.

And I suppose this comment applies globally to failures resolved by a skipIf, including those already integrated.

Yes. We have updated docs in the previous merged PRs and I will keep this in mind in the following PRs. Thanks.

@pxinwr pxinwr force-pushed the fix-issue-31904-netrc branch from 712a618 to fa9db85 Compare December 1, 2020 08:03
Comment on lines 112 to 113
with tempfile.TemporaryDirectory() as tmpdir:
with os_helper.change_cwd(tmpdir):
Copy link
Member

Choose a reason for hiding this comment

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

You can use temp_cwd() which does these two things as a single line.

Same remark for the two other functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@pxinwr pxinwr changed the title bpo-31904: skip netrc module test for VxWorks RTOS bpo-31904: Fix test_netrc for VxWorks RTOS Dec 1, 2020
@vstinner vstinner merged commit e483d28 into python:master Dec 1, 2020
@vstinner
Copy link
Member

vstinner commented Dec 1, 2020

I merged your PR, thanks. The final change is no longer specific to VxWorks and it makes the code cleaner, good!

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Fix test_netrc on VxWorks: create temporary directories using temp_cwd().
@pxinwr pxinwr deleted the fix-issue-31904-netrc branch May 7, 2021 07:42
@kuhlenough kuhlenough mannequin mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants