Skip to content

Commit 0b125e1

Browse files
committed
Drop support for python 3.8
1 parent b785290 commit 0b125e1

File tree

25 files changed

+38
-47
lines changed

25 files changed

+38
-47
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ max-line-length = 119
1919
copyright-check = True
2020
select = E,F,W,C
2121
copyright-regexp=Copyright \(c\) Facebook, Inc. and its affiliates. All Rights Reserved
22-
ignore=W503,E203,E701,E704
22+
ignore=W503,E203,E231,E701,E704

.github/workflows/core_tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
strategy:
1111
matrix:
1212
py_version:
13-
- '3.8'
1413
- '3.9'
1514
- '3.10'
1615
- '3.11'
@@ -32,7 +31,6 @@ jobs:
3231
strategy:
3332
matrix:
3433
py_version:
35-
- '3.8'
3634
- '3.9'
3735
- '3.10'
3836
- '3.11'
@@ -53,7 +51,6 @@ jobs:
5351
strategy:
5452
matrix:
5553
py_version:
56-
- '3.8'
5754
- '3.9'
5855
- '3.10'
5956
- '3.11'
@@ -73,7 +70,6 @@ jobs:
7370
strategy:
7471
matrix:
7572
py_version:
76-
- '3.8'
7773
- '3.9'
7874
- '3.10'
7975
- '3.11'

contrib/hydra_torchrun_launcher/setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
packages=find_namespace_packages(include=["hydra_plugins.*"]),
2626
classifiers=[
2727
"License :: OSI Approved :: MIT Apache License, Version 2.0",
28-
"Programming Language :: Python :: 3.7",
29-
"Programming Language :: Python :: 3.8",
3028
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
3131
],
32+
python_requires=">=3.9",
3233
install_requires=["torch>=1.11.0", "hydra-core>=1.1.1"],
3334
include_package_data=True,
3435
)

examples/plugins/example_configsource_plugin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"License :: OSI Approved :: MIT License",
2020
# Hydra uses Python version and Operating system to determine
2121
# In which environments to test this plugin
22-
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Operating System :: OS Independent",
2726
],
27+
python_requires=">=3.9",
2828
install_requires=[
2929
# consider pinning to a specific major version of Hydra to avoid unexpected problems
3030
# if a new major version of Hydra introduces breaking changes for plugins.

examples/plugins/example_generic_plugin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"License :: OSI Approved :: MIT License",
2020
# Hydra uses Python version and Operating system to determine
2121
# In which environments to test this plugin
22-
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Operating System :: OS Independent",
2726
],
27+
python_requires=">=3.9",
2828
install_requires=[
2929
# consider pinning to a specific major version of Hydra to avoid unexpected problems
3030
# if a new major version of Hydra introduces breaking changes for plugins.

examples/plugins/example_launcher_plugin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"License :: OSI Approved :: MIT License",
2020
# Hydra uses Python version and Operating system to determine
2121
# In which environments to test this plugin
22-
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Operating System :: OS Independent",
2726
],
27+
python_requires=">=3.9",
2828
install_requires=[
2929
# consider pinning to a specific major version of Hydra to avoid unexpected problems
3030
# if a new major version of Hydra introduces breaking changes for plugins.

examples/plugins/example_registered_plugin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"License :: OSI Approved :: MIT License",
2020
# Hydra uses Python version and Operating system to determine
2121
# In which environments to test this plugin
22-
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Operating System :: OS Independent",
2726
],
27+
python_requires=">=3.9",
2828
install_requires=[
2929
# consider pinning to a specific major version of Hydra to avoid unexpected problems
3030
# if a new major version of Hydra introduces breaking changes for plugins.

examples/plugins/example_searchpath_plugin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"License :: OSI Approved :: MIT License",
2222
# Hydra uses Python version and Operating system to determine
2323
# In which environments to test this plugin
24-
"Programming Language :: Python :: 3.8",
2524
"Programming Language :: Python :: 3.9",
2625
"Programming Language :: Python :: 3.10",
2726
"Programming Language :: Python :: 3.11",
2827
"Operating System :: OS Independent",
2928
],
29+
python_requires=">=3.9",
3030
install_requires=[
3131
# consider pinning to a specific major version of Hydra to avoid unexpected problems
3232
# if a new major version of Hydra introduces breaking changes for plugins.

examples/plugins/example_sweeper_plugin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"License :: OSI Approved :: MIT License",
2020
# Hydra uses Python version and Operating system to determine
2121
# In which environments to test this plugin
22-
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Operating System :: OS Independent",
2726
],
27+
python_requires=">=3.9",
2828
install_requires=[
2929
# consider pinning to a specific major version of Hydra to avoid unexpected problems
3030
# if a new major version of Hydra introduces breaking changes for plugins.

hydra/_internal/core_plugins/importlib_resources_config_source.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
22
import os
3-
import sys
43
import zipfile
5-
from typing import TYPE_CHECKING, Any, List, Optional
4+
from importlib import resources
5+
from typing import Any, List, Optional
66

77
from omegaconf import OmegaConf
88

99
from hydra.core.object_type import ObjectType
1010
from hydra.plugins.config_source import ConfigLoadError, ConfigResult, ConfigSource
1111

12-
if TYPE_CHECKING or (sys.version_info < (3, 9)):
13-
import importlib_resources as resources
14-
else:
15-
from importlib import resources
16-
17-
# Relevant issue: https://github.com/python/mypy/issues/1153
18-
# Use importlib backport for Python older than 3.9
12+
# Relevant issue: https://github.com/python/mypy/issues/1153
13+
# Python 3.9+ has importlib.resources in the standard library
1914

2015

2116
class ImportlibResourcesConfigSource(ConfigSource):

0 commit comments

Comments
 (0)