René's URL Explorer Experiment


Title: Some os and os.path function signatures do not admit legal integer (file descriptor) arguments · Issue #1653 · python/typeshed · GitHub

Open Graph Title: Some os and os.path function signatures do not admit legal integer (file descriptor) arguments · Issue #1653 · python/typeshed

X Title: Some os and os.path function signatures do not admit legal integer (file descriptor) arguments · Issue #1653 · python/typeshed

Description: From the docs: 16.1.5. Files and Directories On some Unix platforms, many of these functions support one or more of these features: specifying a file descriptor: For some functions, the path argument can be not only a string giving a pat...

Open Graph Description: From the docs: 16.1.5. Files and Directories On some Unix platforms, many of these functions support one or more of these features: specifying a file descriptor: For some functions, the path argume...

X Description: From the docs: 16.1.5. Files and Directories On some Unix platforms, many of these functions support one or more of these features: specifying a file descriptor: For some functions, the path argume...

Opengraph URL: https://github.com/python/typeshed/issues/1653

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Some os and os.path function signatures do not admit legal integer (file descriptor) arguments","articleBody":"From the docs:\r\n\r\n>16.1.5. Files and Directories\r\n>On some Unix platforms, many of these functions support one or more of these features:\r\n>\r\n>specifying a file descriptor: For some functions, the path argument can be not only a string giving a path name, but also a file descriptor. The function will then operate on the file referred to by the descriptor. (For POSIX systems, Python will call the f... version of the function.)\r\n>\r\n>You can check whether or not path can be specified as a file descriptor on your platform using os.supports_fd. If it is unavailable, using it will raise a NotImplementedError.\r\n\r\nNot sure if we want to widen the types for all platforms, or try to special case just for Posix. Here is a list of offenders (via `suports_fd` on python3.7): chdir, chmod, chown, listdir, pathconf, scandir, stat, statvfs, truncate, utime.\r\n\r\nI also looked through os.path manually, and found one more: os.path.exists.\r\n\r\n\r\n### `os.chdir(path)`\r\n> Change the current working directory to path.\r\n> This function can support specifying a file descriptor. The descriptor must refer to an opened directory, not an open file.\r\n\r\ntypeshed: `def chdir(path: _PathType) -> None: ...`\r\n\r\n\r\n### `os.chmod(path, mode, *, dir_fd=None, follow_symlinks=True)`\r\n> New in version 3.3: Added support for specifying path as an open file descriptor, and the dir_fd and follow_symlinks arguments.\r\n\r\ntypeshed: `def chmod(path: _PathType, mode: int) -> None: ...`\r\n\r\n\r\n### `os.chown(path, uid, gid, *, dir_fd=None, follow_symlinks=True)`\r\n> New in version 3.3: Added support for specifying an open file descriptor for path, and the dir_fd and follow_symlinks arguments.\r\n\r\ntypeshed: `def chown(path: _PathType, uid: int, gid: int) -> None: ...  # Unix only`\r\n\r\n\r\n### `os.listdir(path=’.’)`\r\n> New in version 3.3: Added support for specifying an open file descriptor for path.\r\n\r\ntypeshed:\r\n```\r\n@overload\r\ndef listdir(path: str = ...) -> List[str]: ...\r\n@overload\r\ndef listdir(path: bytes) -> List[bytes]: ...\r\n```\r\n\r\n\r\n### `os.pathconf(path, name)`\r\n> This function can support specifying a file descriptor.\r\n\r\ntypeshed: `def pathconf(path: _PathType, name: Union[str, int]) -> int: ...  # Unix only`\r\n\r\n\r\n### `os.stat(path, *, dir_fd=None, follow_symlinks=True)`\r\n> New in version 3.3: Added the dir_fd and follow_symlinks arguments, specifying a file descriptor instead of a path.\r\n\r\ntypeshed: `def stat(path: _PathType) -> stat_result: ...`\r\n\r\n\r\n### `os.statvfs(path)`\r\n> New in version 3.3: Added support for specifying an open file descriptor for path.\r\n\r\ntypeshed: `def statvfs(path: _PathType) -> statvfs_result: ...  # Unix only`\r\n\r\n\r\n### `os.truncate(path, length)`\r\n> This function can support specifying a file descriptor.\r\n\r\ntypeshed: `def truncate(path: Union[_PathType, int], length: int) -> None: ...  # Unix only up to version 3.4`\r\n\r\n\r\n### `os.utime(path, times=None, *, [ns, ]dir_fd=None, follow_symlinks=True)`\r\n> New in version 3.3: Added support for specifying an open file descriptor for path, and the dir_fd, follow_symlinks, and ns parameters.\r\n\r\ntypeshed: `def utime(path: _PathType, times: Optional[Union[Tuple[int, int], Tuple[float, float]]] = ...,`\r\n\r\n\r\n### `os.path.exists(path)`\r\n> Return True if path refers to an existing path or an open file descriptor.\r\n\r\ntypeshed: `def exists(path: _PathType) -> bool: ...`\r\n\r\n\r\n","author":{"url":"https://github.com/gwk","@type":"Person","name":"gwk"},"datePublished":"2017-10-06T15:58:55Z","url":"https://github.com/python/typeshed/issues/1653"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:40aede01-f911-76ed-d546-d1fde3f47023
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC930:196792:2CCF388:3B4BFB6:6B002262
html-safe-nonce6abb99bc6f1acc6ae007199288a39b3fa355fd69ba789ab817370a3e4f6212bd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTMwOjE5Njc5MjoyQ0NGMzg4OjNCNEJGQjY6NkIwMDIyNjIiLCJ2aXNpdG9yX2lkIjoiODQzNTU4NTIyMDIwNzQ1Mjc3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac25d596ea3c619805c93a76d003b72754f06519159d2598f65650ab402ecff0e5
hovercard-subject-tagissue:263494332
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/1653/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0543c11477650519caadebbb40f07bd9ee75299a01e06d3feac6b8c24eb69b3e/python/typeshed/issues/1653
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0543c11477650519caadebbb40f07bd9ee75299a01e06d3feac6b8c24eb69b3e/python/typeshed/issues/1653
og:image:altFrom the docs: 16.1.5. Files and Directories On some Unix platforms, many of these functions support one or more of these features: specifying a file descriptor: For some functions, the path argume...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegwk
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typeshed/issues/1653#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F1653
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F1653
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/issues/1653
Reloadhttps://github.com/python/typeshed/issues/1653
Reloadhttps://github.com/python/typeshed/issues/1653
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests251 (251)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
https://github.com/python/typeshed
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/1653
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/1653
Some os and os.path function signatures do not admit legal integer (file descriptor) argumentshttps://github.com/python/typeshed/issues/1653#top
https://github.com/gwk
gwkhttps://github.com/gwk
on Oct 6, 2017https://github.com/python/typeshed/issues/1653#issue-263494332
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Oct 6, 2017https://github.com/python/typeshed/issues/1653#issuecomment-334823923
#1645https://github.com/python/typeshed/pull/1645
https://github.com/gwk
gwkhttps://github.com/gwk
on Oct 10, 2017https://github.com/python/typeshed/issues/1653#issuecomment-335531224
#1645https://github.com/python/typeshed/pull/1645
mkurekhttps://github.com/mkurek
on Oct 20, 2017https://github.com/python/typeshed/issues/1653#event-1303120408
Update os.path module to use file descriptor where possiblehttps://github.com/mkurek/typeshed/commit/e8c8b3b1b87a53db7add4dbf2366b7ca0f1fffe7
https://docs.github.com/articles/closing-issues-via-commit-messages
e8c8b3bhttps://github.com/mkurek/typeshed/commit/e8c8b3b1b87a53db7add4dbf2366b7ca0f1fffe7
Update os.path module to use file descriptor where possiblehttps://github.com/mkurek/typeshed/commit/50fe9c4fc08cfa5766c7240a7d5ba5c449259e91
https://docs.github.com/articles/closing-issues-via-commit-messages
50fe9c4https://github.com/mkurek/typeshed/commit/50fe9c4fc08cfa5766c7240a7d5ba5c449259e91
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 20, 2017https://github.com/python/typeshed/issues/1653#issuecomment-338320167
https://github.com/gwk
gwkhttps://github.com/gwk
on Oct 20, 2017https://github.com/python/typeshed/issues/1653#issuecomment-338328535
@gvanrossumhttps://github.com/gvanrossum
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 20, 2017https://github.com/python/typeshed/issues/1653#issuecomment-338330434
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Oct 20, 2017https://github.com/python/typeshed/issues/1653#issuecomment-338333847
https://docs.python.org/3/library/os.path.html#os.path.existshttps://docs.python.org/3/library/os.path.html#os.path.exists
https://github.com/gwk
gwkhttps://github.com/gwk
on Jun 28, 2018https://github.com/python/typeshed/issues/1653#issuecomment-401140928
srittauhttps://github.com/srittau
size-smallhttps://github.com/python/typeshed/issues?q=state%3Aopen%20label%3A%22size-small%22
on Sep 11, 2018https://github.com/python/typeshed/issues/1653#event-1837680943
srittauhttps://github.com/srittau
on Sep 12, 2018https://github.com/python/typeshed/issues/1653#event-1840533907
os.path.exists (Py 3) accepts a file descriptorhttps://github.com/srittau/typeshed/commit/a7f1e89c3c374e0330049cd467da3ce9c329ecd4
https://docs.github.com/articles/closing-issues-via-commit-messages
a7f1e89https://github.com/srittau/typeshed/commit/a7f1e89c3c374e0330049cd467da3ce9c329ecd4
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/typeshed/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#2451https://github.com/python/typeshed/pull/2451
on Sep 24, 2018https://github.com/python/typeshed/issues/1653#event-1863333477
JelleZijlstrahttps://github.com/JelleZijlstra
on Sep 24, 2018https://github.com/python/typeshed/issues/1653#event-1863333692
os.path.exists (Py 3) accepts a file descriptor (#2451)https://github.com/python/typeshed/commit/ea2122741faa0df576094584f869e9517a1115ce
#2451https://github.com/python/typeshed/pull/2451
https://docs.github.com/articles/closing-issues-via-commit-messages
ea21227https://github.com/python/typeshed/commit/ea2122741faa0df576094584f869e9517a1115ce
yedpodtrzitkohttps://github.com/yedpodtrzitko
on Jan 23, 2019https://github.com/python/typeshed/issues/1653#event-2090661260
os.path.exists (Py 3) accepts a file descriptor (python#2451)https://github.com/yedpodtrzitko/typeshed/commit/62e0d39345e86889218e1227a2b0081a52dd872d
python#2451https://github.com/python/typeshed/pull/2451
https://docs.github.com/articles/closing-issues-via-commit-messages
62e0d39https://github.com/yedpodtrzitko/typeshed/commit/62e0d39345e86889218e1227a2b0081a52dd872d
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typeshed/issues/1653
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typeshed/issues/1653
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.