Title: Windows os.path.isdir has different signature · Issue #109782 · python/cpython · GitHub
Open Graph Title: Windows os.path.isdir has different signature · Issue #109782 · python/cpython
X Title: Windows os.path.isdir has different signature · Issue #109782 · python/cpython
Description: Bug report Bug description: In this PR #101324 and issue #101196 the optimized methods of isdir and isfile were added for windows. If not available they will fall back to genericpath implementations. The issue with isdir is that this int...
Open Graph Description: Bug report Bug description: In this PR #101324 and issue #101196 the optimized methods of isdir and isfile were added for windows. If not available they will fall back to genericpath implementation...
X Description: Bug report Bug description: In this PR #101324 and issue #101196 the optimized methods of isdir and isfile were added for windows. If not available they will fall back to genericpath implementation...
Opengraph URL: https://github.com/python/cpython/issues/109782
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Windows os.path.isdir has different signature","articleBody":"# Bug report\n\n### Bug description:\n\nIn this PR #101324 and issue #101196 the optimized methods of `isdir` and `isfile` were added for windows. If not available they will fall back to `genericpath` implementations.\n\nThe issue with `isdir` is that this introduced a different signature compared to `genericpath`:\n```py\n# in genericpath.py\ndef isdir(s) -\u003e bool: ...\n\n# in optimized nt module\ndef isdir(path) -\u003e bool: ...\n```\n\nI'm not sure if this was intentional to have different signatures depending on the platform, and there's any possibility to fix this now. Ref: https://github.com/python/typeshed/pull/10751\n\n\n### CPython versions tested on:\n\n3.12\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-109790\n* gh-110233\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/aminalaee","@type":"Person","name":"aminalaee"},"datePublished":"2023-09-23T08:55:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/109782/cpython/issues/109782"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:beff9f27-4d98-988c-66d5-d9ebc543fd91 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 917C:1D189C:25ED9A:330134:69697920 |
| html-safe-nonce | 5f81784d2dfe92f7687ee239de8ff6c05eaace3c4952ae27602f1b010745e7f8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTdDOjFEMTg5QzoyNUVEOUE6MzMwMTM0OjY5Njk3OTIwIiwidmlzaXRvcl9pZCI6IjE4NTIzOTE5Njg4NzIxNjc3MTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5692534476d9ac4355cc3c476d1f81cb44665eb26d4a03047ae686eaa87a6c88 |
| hovercard-subject-tag | issue:1909792770 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/109782/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7c7d71d2c64565f56a18a7b1f977d3d7aaefab342ee5367017b2108667c984b4/python/cpython/issues/109782 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7c7d71d2c64565f56a18a7b1f977d3d7aaefab342ee5367017b2108667c984b4/python/cpython/issues/109782 |
| og:image:alt | Bug report Bug description: In this PR #101324 and issue #101196 the optimized methods of isdir and isfile were added for windows. If not available they will fall back to genericpath implementation... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aminalaee |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 212e3e3d3298bf5b313830edfd2399e869f7ea76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width