From 1f57bb54560a659e10a8775e0a5b94937e3bed42 Mon Sep 17 00:00:00 2001 From: Dov Shlachter Date: Tue, 22 Sep 2020 12:39:41 -0700 Subject: [PATCH] fix: remove 'property' from reserved names The Python 'property' builtin name should not be reserved. --- gapic/utils/reserved_names.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gapic/utils/reserved_names.py b/gapic/utils/reserved_names.py index 14958fc52f..3d1e9b4459 100644 --- a/gapic/utils/reserved_names.py +++ b/gapic/utils/reserved_names.py @@ -17,13 +17,11 @@ import keyword -# The filter and map builtins are a historical artifact; -# they are not used in modern, idiomatic python, -# nor are they used in the gapic surface. -# They are too useful to reserve. +# The exceptions to builtins are frequent and useful. +# They are explicitly allowed message, module, and field names. RESERVED_NAMES = frozenset( itertools.chain( keyword.kwlist, - set(dir(builtins)) - {"filter", "map", "id"}, + set(dir(builtins)) - {"filter", "map", "id", "property"}, ) )