Skip to content

Commit 448aa4c

Browse files
Remove deprecated pkg_resources and drop Python 3.7 support (#337)
1 parent 9b0d360 commit 448aa4c

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ['3.7','3.8','3.9','3.10','3.11']
17+
python-version: ['3.8','3.9','3.10','3.11']
1818
steps:
1919
- uses: actions/checkout@v3
2020
- uses: actions/setup-python@v4

linode_api4/linode_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import json
44
import logging
5+
from importlib.metadata import version
56
from typing import BinaryIO, Tuple
67
from urllib import parse
78

8-
import pkg_resources
99
import requests
1010
from requests.adapters import HTTPAdapter, Retry
1111

@@ -36,7 +36,7 @@
3636
from .paginated_list import PaginatedList
3737
from .util import drop_null_keys
3838

39-
package_version = pkg_resources.require("linode_api4")[0].version
39+
package_version = version("linode_api4")
4040

4141
logger = logging.getLogger(__name__)
4242

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ line_length = 80
88

99
[tool.black]
1010
line-length = 80
11-
target-version = ["py37", "py38", "py39", "py310", "py311"]
11+
target-version = ["py38", "py39", "py310", "py311", "py312"]
1212

1313
[tool.autoflake]
1414
expand-star-imports = true

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ def bake_version(v):
103103
# that you indicate whether you support Python 2, Python 3 or both.
104104
'Programming Language :: Python',
105105
'Programming Language :: Python :: 3',
106-
'Programming Language :: Python :: 3.7',
107106
'Programming Language :: Python :: 3.8',
108107
'Programming Language :: Python :: 3.9',
109108
'Programming Language :: Python :: 3.10',
110109
'Programming Language :: Python :: 3.11',
110+
'Programming Language :: Python :: 3.12',
111111
],
112112

113113
# What does your project relate to?
@@ -118,7 +118,7 @@ def bake_version(v):
118118
packages=find_packages(exclude=['contrib', 'docs', 'test', 'test.*']),
119119

120120
# What do we need for this to run
121-
python_requires=">=3.7",
121+
python_requires=">=3.8",
122122

123123
install_requires=[
124124
"requests",

0 commit comments

Comments
 (0)