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 — The docstring for `os.mkdir` should mention the effect of umask · Issue #96288 · python/cpython

The docstring for os.mkdir should mention the effect of umask #96288

New issue
Copy link
New issue
Copy link
Closed
Closed
The docstring for os.mkdir should mention the effect of umask#96288
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@hagai-helman
hagai-helman
opened on Aug 25, 2022
Issue body actions

Documentation

In os.mkdir, when the argument mode is used, the current umask value is first masked out of it. This behavior is mentioned in the library's documentation, but not in the docstring.

This behavior may be unexpected for some (for example, this is not the behavior of GNU's mkdir command - when a mode is explicitly given to it, it overrides the umask). When one is unaware of this behavior, it can lead to bugs that are difficult to notice or trace. For these two reasons, I suggest it will be mentioned in the docstring.

My edit suggestion is given in #96271.

Activity

  1. hagai-helman
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Aug 25, 2022
  2. JelleZijlstra
    added 5 commits that reference this issue on Oct 7, 2022

    gh-96288: Add a sentence to `os.mkdir`'s docstring. (#96271)

    1523c9e

    [3.11] pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (pyt…

    47141fe

    [3.10] pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (pyt…

    4c29f0f

    [3.10] gh-96288: Add a sentence to `os.mkdir`'s docstring. (GH-96271). (

    2090eeb

    [3.11] gh-96288: Add a sentence to `os.mkdir`'s docstring. (GH-96271). (

    1573211
  3. carljm
    added a commit that references this issue on Oct 8, 2022

    Merge branch 'main' into typewatch

    27a4980
  4. mpage
    added a commit that references this issue on Oct 11, 2022

    pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (python#96271)

    b9bd94d
  5. hauntsaninja commented on Oct 11, 2022

    @hauntsaninja
    hauntsaninja
    on Oct 11, 2022
    Contributor
    More actions

    Thanks, looks like this has been completed

  6. hauntsaninja
    closed this as completedon Oct 11, 2022
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

    docsDocumentation in the Doc dirDocumentation in the Doc dir

    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.