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 — `pathlib.WindowsPath.glob()` preserves case of literal pattern segments · Issue #104114 · python/cpython

pathlib.WindowsPath.glob() preserves case of literal pattern segments #104114

New issue
Copy link
New issue
Copy link
Closed
Closed
pathlib.WindowsPath.glob() preserves case of literal pattern segments#104114
Copy link
Labels
3.12only security fixesonly security fixestopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@barneygale
barneygale
opened on May 3, 2023
Issue body actions

When pathlib.WindowsPath.glob() evaluates a literal (non-wildcard) pattern segment, it returns paths using the case of the pattern segment, rather than the real filesystem case. This problem does not affect segments involving * or ** wildcards.

>>> from pathlib import WindowsPath
>>> next(WindowsPath().glob('LIB/PATHLIB.*'))
WindowsPath('LIB/pathlib.py')  # 'LIB' should be 'Lib'

Linked PRs

  • GH-104114: Fix pathlib.WindowsPath.glob() use of literal pattern segment case #104116

Activity

  1. barneygale
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    3.12only security fixesonly security fixes
    topic-pathlib
    on May 3, 2023
  2. barneygale
    added 3 commits that reference this issue on May 3, 2023

    pythonGH-104114: Fix `pathlib.WindowsPath.glob()` use of literal patt…

    1f58b94

    Merge branch 'main' into pythongh-104114-windowspath-literal-pattern-…

    6fd03f4

    GH-104114: Fix `pathlib.WindowsPath.glob()` use of literal pattern se…

    da1980a
  3. barneygale
    closed this as completedon May 3, 2023
  4. barneygale commented on May 3, 2023

    @barneygale
    barneygale
    on May 3, 2023
    ContributorAuthor
    More actions

    Fixed in 3.12. Not backported as it relies on other changes in the 3.12 line.

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 fixestopic-pathlibtype-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.