GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Windows os.path.isdir has different signature · Issue #109782 · python/cpython

Windows os.path.isdir has different signature #109782

New issue
Copy link
New issue
Copy link
Closed
Closed
Windows os.path.isdir has different signature#109782
Copy link
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@aminalaee
aminalaee
opened on Sep 23, 2023
Issue body actions

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 introduced a different signature compared to genericpath:

# in genericpath.py
def isdir(s) -> bool: ...

# in optimized nt module
def isdir(path) -> bool: ...

I'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: python/typeshed#10751

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

  • gh-109782: Ensure os.path.isdir has the same signature on all platforms #109790
  • [3.12] gh-109782: Ensure os.path.isdir has the same signature on all platforms (GH-109790) #110233

Activity

  1. aminalaee
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Sep 23, 2023
  2. AlexWaygood
    added
    3.12only security fixesonly security fixes
    3.13only security fixesonly security fixes
    on Sep 23, 2023
  3. sobolevn commented on Sep 23, 2023

    @sobolevn
    sobolevn
    on Sep 23, 2023
    Member
    More actions

    CC @zooba and @mdboom

  4. aminalaee
    added 2 commits that reference this issue on Sep 23, 2023

    pythongh-109782 Update NT os.path.isdir signature

    0628d63

    pythongh-109782 Update NT os.path.isdir signature

    13d10df
  5. zooba
    added a commit that references this issue on Sep 28, 2023

    gh-109782: Ensure `os.path.isdir` has the same signature on all platf…

    7df8b16
  6. zooba
    closed this as completedon Sep 28, 2023
  7. csm10495
    added a commit that references this issue on Sep 29, 2023

    pythongh-109782: Ensure `os.path.isdir` has the same signature on all…

    f7f79fe
  8. AlexWaygood
    added 2 commits that reference this issue on Oct 2, 2023

    pythongh-109782: Ensure `os.path.isdir` has the same signature on all…

    1ca2a2f

    [3.12] gh-109782: Ensure `os.path.isdir` has the same signature on al…

    da75bd6
  9. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-109782: Ensure `os.path.isdir` has the same signature on all…

    5a8bdec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesonly security fixes3.13only security fixesonly security fixestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.