From faeac8636c4c6c15c47fa60fc7f2c18db775b3b7 Mon Sep 17 00:00:00 2001 From: Taksh Date: Mon, 6 Apr 2026 14:35:24 -0700 Subject: [PATCH] Update outdated C++17 and Python 2 references (#5045) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: - Update C++ language level from C++17 to C++20 in `CONTRIBUTING.md` to match the actual CMake configuration (`CMAKE_CXX_STANDARD 20` in the root `CMakeLists.txt`) - Remove outdated "progressively dropping python2 support" note from `contrib/README.md` (Python 2 reached end-of-life in January 2020 and Faiss requires Python 3) - Update shebangs from `python2` to `python3` in three benchmark scripts: `benchs/kmeans_mnist.py`, `benchs/bench_gpu_1bn.py`, and `benchs/bench_vector_ops.py` Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5045 Test Plan: - [ ] No functional code changes; only documentation and shebangs are modified - [ ] Verified C++20 is the actual standard by checking `CMakeLists.txt` (`set(CMAKE_CXX_STANDARD 20)`) and `INSTALL.md` (which already references "a C++20 compiler") 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed By: mnorris11 Differential Revision: D99691731 Pulled By: alibeklfc fbshipit-source-id: 579cf21054cdf6bdaea27f5abb1c56e0b709a922 --- CONTRIBUTING.md | 2 +- benchs/bench_gpu_1bn.py | 2 +- benchs/bench_vector_ops.py | 2 +- benchs/kmeans_mnist.py | 2 +- contrib/README.md | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10fc8152f..2ac8ad935 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ outlined on that page and do not file a public issue. * 4 spaces for indentation in C++ (no tabs) * 80 character line length (both for C++ and Python) -* C++ language level: C++17 +* C++ language level: C++20 ## License diff --git a/benchs/bench_gpu_1bn.py b/benchs/bench_gpu_1bn.py index fc17e9de7..f56a669f2 100644 --- a/benchs/bench_gpu_1bn.py +++ b/benchs/bench_gpu_1bn.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python2 +#! /usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the diff --git a/benchs/bench_vector_ops.py b/benchs/bench_vector_ops.py index 96aa97057..85ecc7231 100644 --- a/benchs/bench_vector_ops.py +++ b/benchs/bench_vector_ops.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python2 +#! /usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the diff --git a/benchs/kmeans_mnist.py b/benchs/kmeans_mnist.py index fa070483a..72b00c38a 100644 --- a/benchs/kmeans_mnist.py +++ b/benchs/kmeans_mnist.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python2 +#! /usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the diff --git a/contrib/README.md b/contrib/README.md index f2b7d0f84..8b9052c44 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -8,8 +8,6 @@ The contrib directory contains helper modules for Faiss for various tasks. The contrib directory gets compiled in the module faiss.contrib. Note that although some of the modules may depend on additional modules (eg. GPU Faiss, pytorch, hdf5), they are not necessarily compiled in to avoid adding dependencies. It is the user's responsibility to provide them. -In contrib, we are progressively dropping python2 support. - ## List of contrib modules ### rpc.py