-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Update os.path module to use file descriptor where possible #1680
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
(The Travis failure is due to a mypy change. I'll submit a typeshed PR to fix it, but you may end up having to rebase this PR.) |
This is causing typeshed's build to fail (e.g. python/typeshed#1680). Followup from #4130.
@JelleZijlstra sure, thanks! |
This is causing typeshed's build to fail (e.g. python/typeshed#1680). Followup from #4130.
Fix python#1653 Use `_FdOrPathType` when possible in `os.path` module.
Fixed now (just needed to restart the build). |
Is it documented that these accept fds? They're not in Looking at the code for |
@JelleZijlstra I wasn't aware of So what do you suggest? If you like, I could prepare some pull requests to update cpython, either adding these functions to |
My position is that if it isn't documented it's not intentional.
|
I agree, so filing a ticket with CPython to clarify whether this behavior is intentional sounds like the right approach. |
Ok, I've created ticket to CPython to clarify this: https://bugs.python.org/issue31871 |
This is causing typeshed's build to fail (e.g. python/typeshed#1680). Followup from #4130.
Serhiy's response on bugs.python.org suggests that the fact that these functions support fd arguments in some platforms is unintentional. Therefore, I'm inclined to not support fd arguments in typeshed. |
Agreed.
|
Fix #1653
Use
_FdOrPathType
when possible inos.path
module.