From 35a6f47aff3c00c40de1038f217f36502dad1579 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Sat, 6 Mar 2021 09:45:45 -0500 Subject: [PATCH] Fix pypy3 tests --- src/dependency_injector/schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dependency_injector/schema.py b/src/dependency_injector/schema.py index ac37a6bb..b1971f08 100644 --- a/src/dependency_injector/schema.py +++ b/src/dependency_injector/schema.py @@ -1,5 +1,6 @@ """Schema module.""" +import builtins import importlib from typing import Dict, Any, Type, Optional @@ -204,7 +205,7 @@ def _import_string(string_name: str) -> Optional[object]: segments = string_name.split('.') if len(segments) == 1: - member = __builtins__.get(segments[0]) + member = getattr(builtins, segments[0], None) if member: return member