]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106847: Add -X warn_default_encoding in sys.flags Doc (#106854)
authorqqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
Fri, 21 Jul 2023 10:17:58 +0000 (18:17 +0800)
committerGitHub <noreply@github.com>
Fri, 21 Jul 2023 10:17:58 +0000 (15:47 +0530)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/library/sys.rst

index c01d2d45271526c480944a1561b65a105f9a8f33..f6b67dc57c187359663ebddc17e07c35faf20f17 100644 (file)
@@ -515,27 +515,28 @@ always available.
    The :term:`named tuple` *flags* exposes the status of command line
    flags. The attributes are read only.
 
-   ============================= ==============================================================================================================
-   attribute                     flag
-   ============================= ==============================================================================================================
-   :const:`debug`                :option:`-d`
-   :const:`inspect`              :option:`-i`
-   :const:`interactive`          :option:`-i`
-   :const:`isolated`             :option:`-I`
-   :const:`optimize`             :option:`-O` or :option:`-OO`
-   :const:`dont_write_bytecode`  :option:`-B`
-   :const:`no_user_site`         :option:`-s`
-   :const:`no_site`              :option:`-S`
-   :const:`ignore_environment`   :option:`-E`
-   :const:`verbose`              :option:`-v`
-   :const:`bytes_warning`        :option:`-b`
-   :const:`quiet`                :option:`-q`
-   :const:`hash_randomization`   :option:`-R`
-   :const:`dev_mode`             :option:`-X dev <-X>` (:ref:`Python Development Mode <devmode>`)
-   :const:`utf8_mode`            :option:`-X utf8 <-X>`
-   :const:`safe_path`            :option:`-P`
-   :const:`int_max_str_digits`   :option:`-X int_max_str_digits <-X>` (:ref:`integer string conversion length limitation <int_max_str_digits>`)
-   ============================= ==============================================================================================================
+   ==============================  ==============================================================================================================
+   attribute                       flag
+   ==============================  ==============================================================================================================
+   :const:`debug`                  :option:`-d`
+   :const:`inspect`                :option:`-i`
+   :const:`interactive`            :option:`-i`
+   :const:`isolated`               :option:`-I`
+   :const:`optimize`               :option:`-O` or :option:`-OO`
+   :const:`dont_write_bytecode`    :option:`-B`
+   :const:`no_user_site`           :option:`-s`
+   :const:`no_site`                :option:`-S`
+   :const:`ignore_environment`     :option:`-E`
+   :const:`verbose`                :option:`-v`
+   :const:`bytes_warning`          :option:`-b`
+   :const:`quiet`                  :option:`-q`
+   :const:`hash_randomization`     :option:`-R`
+   :const:`dev_mode`               :option:`-X dev <-X>` (:ref:`Python Development Mode <devmode>`)
+   :const:`utf8_mode`              :option:`-X utf8 <-X>`
+   :const:`safe_path`              :option:`-P`
+   :const:`int_max_str_digits`     :option:`-X int_max_str_digits <-X>` (:ref:`integer string conversion length limitation <int_max_str_digits>`)
+   :const:`warn_default_encoding`  :option:`-X warn_default_encoding <-X>`
+   ==============================  ==============================================================================================================
 
    .. versionchanged:: 3.2
       Added ``quiet`` attribute for the new :option:`-q` flag.
@@ -554,6 +555,9 @@ always available.
       Mode <devmode>` and the ``utf8_mode`` attribute for the new  :option:`-X`
       ``utf8`` flag.
 
+   .. versionchanged:: 3.10
+      Added ``warn_default_encoding`` attribute for :option:`-X` ``warn_default_encoding`` flag.
+
    .. versionchanged:: 3.11
       Added the ``safe_path`` attribute for :option:`-P` option.