Skip to content

Commit 17a35c5

Browse files
fix!: Drop support for Python 3.7 (#1837)
1 parent fdd35a8 commit 17a35c5

File tree

22 files changed

+447
-467
lines changed

22 files changed

+447
-467
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ body:
3232
description: Version of Python you are using
3333
options:
3434
- "3.6 (deprecated)"
35-
- "3.7"
3635
- "3.8"
3736
- "3.9"
3837
- "3.10"
38+
- "3.11"
3939
- "NA"
4040
validations:
4141
required: true
@@ -75,6 +75,6 @@ body:
7575
attributes:
7676
label: Code
7777
description: Paste the failing code and/or traceback, if applicable
78-
render: python
78+
render: Python
7979
validations:
8080
required: false

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
matrix:
4747
session: [tests]
4848
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
49-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
49+
python-version: ["3.8", "3.9", "3.10", "3.11"]
5050
sqlalchemy: ["2.*"]
5151
include:
5252
- { session: tests, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "1.*" }

cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ packages = [
2121
{%- endif %}
2222

2323
[tool.poetry.dependencies]
24-
python = "<3.12,>=3.7.1"
25-
singer-sdk = { version="^0.31.1" }
24+
python = "<4,>=3.8"
25+
singer-sdk = { version="^0.30.0" }
2626
fs-s3fs = { version = "^1.1.1", optional = true }
2727

2828
[tool.poetry.group.dev.dependencies]

cookiecutter/tap-template/{{cookiecutter.tap_id}}/.github/workflows/{% if cookiecutter.include_ci_files == 'GitHub' %}test.yml{%endif%}

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
1313
strategy:
1414
matrix:
15-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
15+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1616
steps:
1717
- uses: actions/checkout@v3
1818
- name: Set up Python {{ '${{ matrix.python-version }}' }}

cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ keywords = [
1212
"ELT",
1313
"{{cookiecutter.source_name}}",
1414
]
15+
classifiers = [
16+
"Intended Audience :: Developers",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3.8",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
]
1523
license = "Apache-2.0"
1624
{%- if cookiecutter.variant != "None (Skip)" %}
1725
packages = [
@@ -20,14 +28,13 @@ packages = [
2028
{%- endif %}
2129

2230
[tool.poetry.dependencies]
23-
python = "<3.12,>=3.7.1"
24-
singer-sdk = { version="^0.31.1" }
31+
python = "<4,>=3.8"
32+
singer-sdk = { version="^0.31.0" }
2533
fs-s3fs = { version = "^1.1.1", optional = true }
2634
{%- if cookiecutter.stream_type in ["REST", "GraphQL"] %}
2735
requests = "^2.31.0"
2836
{%- endif %}
2937
{%- if cookiecutter.auth_method in ("OAuth2", "JWT") %}
30-
cached-property = "^1" # Remove after Python 3.7 support is dropped
3138
{%- endif %}
3239

3340
[tool.poetry.group.dev.dependencies]
@@ -51,7 +58,7 @@ ignore = [
5158
]
5259
select = ["ALL"]
5360
src = ["{{cookiecutter.library_name}}"]
54-
target-version = "py37"
61+
target-version = "py38"
5562

5663

5764
[tool.ruff.flake8-annotations]

cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy
22

33
[tox]
4-
envlist = py37, py38, py39, py310, py311
4+
envlist = py38, py39, py310, py311
55
isolated_build = true
66

77
[testenv]
@@ -13,7 +13,7 @@ commands =
1313
[testenv:pytest]
1414
# Run the python tests.
1515
# To execute, run `tox -e pytest`
16-
envlist = py37, py38, py39, py310, py311
16+
envlist = py38, py39, py310, py311
1717
commands =
1818
poetry install -v
1919
poetry run pytest

cookiecutter/tap-template/{{cookiecutter.tap_id}}/{{cookiecutter.library_name}}/{%if 'REST' == cookiecutter.stream_type %}client.py{%endif%}

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
{% if cookiecutter.auth_method in ("OAuth2", "JWT") -%}
6-
import sys
6+
from functools import cached_property
77
{% endif -%}
88
from pathlib import Path
99
from typing import Any, Callable, Iterable
@@ -41,14 +41,6 @@ from {{ cookiecutter.library_name }}.auth import {{ cookiecutter.source_name }}A
4141

4242
{% endif -%}
4343

44-
{%- if cookiecutter.auth_method in ("OAuth2", "JWT") -%}
45-
if sys.version_info >= (3, 8):
46-
from functools import cached_property
47-
else:
48-
from cached_property import cached_property
49-
50-
{% endif -%}
51-
5244
_Auth = Callable[[requests.PreparedRequest], requests.PreparedRequest]
5345
SCHEMAS_DIR = Path(__file__).parent / Path("./schemas")
5446

cookiecutter/target-template/{{cookiecutter.target_id}}/.github/workflows/{% if cookiecutter.include_ci_files == 'GitHub' %}test.yml{%endif%}

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
1313
strategy:
1414
matrix:
15-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
15+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1616
steps:
1717
- uses: actions/checkout@v3
1818
- name: Set up Python {{ '${{ matrix.python-version }}' }}

cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ keywords = [
1212
"ELT",
1313
"{{cookiecutter.destination_name}}",
1414
]
15+
classifiers = [
16+
"Intended Audience :: Developers",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3.8",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
]
1523
license = "Apache-2.0"
1624
{%- if cookiecutter.variant != "None (Skip)" %}
1725
packages = [
@@ -20,8 +28,8 @@ packages = [
2028
{%- endif %}
2129

2230
[tool.poetry.dependencies]
23-
python = "<3.12,>=3.7.1"
24-
singer-sdk = { version="^0.31.1" }
31+
python = "<4,>=3.8"
32+
singer-sdk = { version="^0.31.0" }
2533
fs-s3fs = { version = "^1.1.1", optional = true }
2634
{%- if cookiecutter.serialization_method != "SQL" %}
2735
requests = "^2.31.0"
@@ -41,7 +49,7 @@ ignore = [
4149
]
4250
select = ["ALL"]
4351
src = ["{{cookiecutter.library_name}}"]
44-
target-version = "py37"
52+
target-version = "py38"
4553

4654
[tool.ruff.flake8-annotations]
4755
allow-star-arg-any = true

cookiecutter/target-template/{{cookiecutter.target_id}}/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy
22

33
[tox]
4-
envlist = py37, py38, py39, py310, py311
4+
envlist = py38, py39, py310, py311
55
isolated_build = true
66

77
[testenv]
@@ -13,7 +13,7 @@ commands =
1313
[testenv:pytest]
1414
# Run the python tests.
1515
# To execute, run `tox -e pytest`
16-
envlist = py37, py38, py39, py310, py311
16+
envlist = py38, py39, py310, py311
1717
commands =
1818
poetry install -v
1919
poetry run pytest

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
COOKIECUTTER_REPLAY_FILES = list(Path("./e2e-tests/cookiecutters").glob("*.json"))
2929

3030
package = "singer_sdk"
31-
python_versions = ["3.11", "3.10", "3.9", "3.8", "3.7"]
31+
python_versions = ["3.11", "3.10", "3.9", "3.8"]
3232
main_python_version = "3.10"
3333
locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py"
3434
nox.options.sessions = (

0 commit comments

Comments
 (0)