Skip to content

Commit 5b99489

Browse files
committed
chore(templates): update Python version requirement and clean up versioned __init__.py.j2
1 parent 27003b3 commit 5b99489

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version

packages/gapic-generator/gapic/ads-templates/%namespace/%name/%version/__init__.py.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ from {{package_path}} import gapic_version as package_version
1111
__version__ = package_version.__version__
1212

1313

14-
if sys.version_info < (3, 7):
15-
raise ImportError('This module requires Python 3.7 or later.')
14+
if sys.version_info < (3, 8):
15+
raise ImportError('This module requires Python 3.8 or later.')
1616

1717

1818
_lazy_type_to_package_map = {
@@ -37,14 +37,14 @@ _lazy_type_to_package_map = {
3737

3838

3939
# Background on how this behaves: https://www.python.org/dev/peps/pep-0562/
40-
def __getattr__(name): # Requires Python >= 3.7
40+
def __getattr__(name):
4141
if name == '__all__':
4242
all_names = globals()['__all__'] = sorted(_lazy_type_to_package_map)
4343
return all_names
4444
elif name in _lazy_type_to_package_map:
4545
module = importlib.import_module(f'{_lazy_type_to_package_map[name]}')
4646
klass = getattr(module, name)
47-
{# new_klass = type(name, (klass,), {'__doc__': klass.__doc__}) #}
47+
4848
globals()[name] = klass
4949
return klass
5050
else:

0 commit comments

Comments
 (0)