Skip to content

Commit

Permalink
python 3: leading zero still octal
Browse files Browse the repository at this point in the history
  • Loading branch information
pajod committed Aug 17, 2024
1 parent cf134b0 commit c781bc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/source/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1151,9 +1151,11 @@ Note that this affects unix socket permissions.

A valid value for the ``os.umask(mode)`` call or a string compatible
with ``int(value, 0)`` (``0`` means Python guesses the base, so values
like ``0``, ``0xFF``, ``0022`` are valid for decimal, hex, and octal
like ``0``, ``0xFF``, ``0o022`` are valid for decimal, hex, and octal
representations)

.. note:: For historical reasons, leading zero is treated like ``0o``.

.. _initgroups:

``initgroups``
Expand Down
4 changes: 3 additions & 1 deletion gunicorn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,10 @@ class Umask(Setting):
A valid value for the ``os.umask(mode)`` call or a string compatible
with ``int(value, 0)`` (``0`` means Python guesses the base, so values
like ``0``, ``0xFF``, ``0022`` are valid for decimal, hex, and octal
like ``0``, ``0xFF``, ``0o022`` are valid for decimal, hex, and octal
representations)
.. note:: For historical reasons, leading zero is treated like ``0o``.
"""


Expand Down

0 comments on commit c781bc1

Please sign in to comment.