From afabbcd07e4742b9a4dd7072cae0f826e5e8e3b2 Mon Sep 17 00:00:00 2001 From: Ted Pudlik Date: Mon, 18 Jul 2022 09:43:32 +0000 Subject: [PATCH] docs: Describe supported language versions Tested: By viewing generated docs in browser. Change-Id: I1166ae2fd9736f8263bcb11b5945c3f5f7f29e74 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/100743 Commit-Queue: Ted Pudlik Reviewed-by: Wyatt Hepler --- docs/concepts/index.rst | 18 ++++++++++++++++++ docs/style_guide.rst | 11 ++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/docs/concepts/index.rst b/docs/concepts/index.rst index 1caf7b5975..ab6c72a685 100644 --- a/docs/concepts/index.rst +++ b/docs/concepts/index.rst @@ -109,3 +109,21 @@ to keep in mind: * Setting up new projects to use Pigweed is currently not very easy, but we are working to address that. In the meantime, join the Pigweed community on `Discord `_ to get help. + +Supported language versions +=========================== + +C++ +--- +Most Pigweed code requires C++17, but a few modules, such as +:ref:`module-pw_kvs` and :ref:`module-pw_tokenizer`, work with C++14. All +Pigweed code is compatible with C++20. Pigweed defines toolchains for testing +with C++14 and C++20; see :ref:`target-host` target documentation for more +information. + +Python +------ +We currently officially support Python 3.7.7, 3.8, and 3.9. + +.. note:: + Python 3.10 is not yet supported (https://bugs.pigweed.dev/234874769). diff --git a/docs/style_guide.rst b/docs/style_guide.rst index 5736239ee3..7a7c06675e 100644 --- a/docs/style_guide.rst +++ b/docs/style_guide.rst @@ -28,9 +28,6 @@ embedded development beyond just C++ style. C++ standard ============ -Pigweed primarily uses the C++17 standard. A few modules maintain support for -C++14, however (e.g. :ref:`module-pw_kvs` and its dependencies). - All Pigweed C++ code must compile with ``-std=c++17`` in Clang and GCC. C++20 features may be used as long as the code still compiles unmodified with C++17. See ``pw_polyfill/language_feature_macros.h`` for macros that provide C++20 @@ -841,10 +838,10 @@ Pigweed uses the standard Python style: PEP8, which is available on the web at https://www.python.org/dev/peps/pep-0008/. All Pigweed Python code should pass ``yapf`` when configured for PEP8 style. -Python 3 -======== -Pigweed uses Python 3. Some modules may offer limited support for Python 2, but -Python 3.6 or newer is required for most Pigweed code. +Python versions +=============== +Pigweed code must support Python 3.7.7, 3.8, and 3.9. The only exception is +:ref:`module-pw_env_setup`, which also supports Python 2 and 3.6. --------------- Build files: GN