Skip to content

Commit

Permalink
refactor: Drop support for Python 3.7 (#1837)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jan 9, 2024
1 parent 873ea36 commit 6532984
Show file tree
Hide file tree
Showing 20 changed files with 234 additions and 694 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ body:
description: Version of Python you are using
options:
- "3.6 (deprecated)"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down Expand Up @@ -76,6 +75,6 @@ body:
attributes:
label: Code
description: Paste the failing code and/or traceback, if applicable
render: python
render: Python
validations:
required: false
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
matrix:
session: [tests]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
sqlalchemy: ["2"]
include:
- { session: tests, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "1" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ keywords = [
"Mapper",
"{{cookiecutter.name}}",
]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
packages = [
Expand All @@ -21,7 +30,7 @@ packages = [
{%- endif %}

[tool.poetry.dependencies]
python = ">=3.8,<4"
python = ">=3.8"
singer-sdk = { version="~=0.34.1" }
fs-s3fs = { version = "~=1.1.1", optional = true }

Expand All @@ -38,7 +47,7 @@ warn_unused_configs = true

[tool.ruff]
src = ["{{cookiecutter.library_name}}"]
target-version = "py37"
target-version = "py38"

[tool.ruff.lint]
ignore = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy

[tox]
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
isolated_build = true

[testenv]
Expand All @@ -13,7 +13,7 @@ commands =
[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
commands =
poetry install -v
poetry run pytest
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python {{ '${{ matrix.python-version }}' }}
Expand Down
13 changes: 11 additions & 2 deletions cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ keywords = [
"ELT",
"{{cookiecutter.source_name}}",
]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
packages = [
Expand All @@ -20,7 +29,7 @@ packages = [
{%- endif %}

[tool.poetry.dependencies]
python = ">=3.8,<4"
python = ">=3.8"
importlib-resources = { version = "==6.1.*", python = "<3.9" }
singer-sdk = { version="~=0.34.1" }
fs-s3fs = { version = "~=1.1.1", optional = true }
Expand All @@ -47,7 +56,7 @@ plugins = "sqlmypy"

[tool.ruff]
src = ["{{cookiecutter.library_name}}"]
target-version = "py37"
target-version = "py38"

[tool.ruff.lint]
ignore = [
Expand Down
4 changes: 2 additions & 2 deletions cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy

[tox]
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
isolated_build = true

[testenv]
Expand All @@ -13,7 +13,7 @@ commands =
[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
commands =
poetry install -v
poetry run pytest
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import sys
from functools import cached_property
from typing import Any, Callable, Iterable

import requests
Expand Down Expand Up @@ -38,14 +39,6 @@

{% endif -%}

{%- if cookiecutter.auth_method in ("OAuth2", "JWT") -%}
if sys.version_info >= (3, 8):
from functools import cached_property
else:
from cached_property import cached_property

{% endif -%}

if sys.version_info >= (3, 9):
import importlib.resources as importlib_resources
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python {{ '${{ matrix.python-version }}' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ keywords = [
"ELT",
"{{cookiecutter.destination_name}}",
]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
packages = [
Expand All @@ -20,7 +29,7 @@ packages = [
{%- endif %}

[tool.poetry.dependencies]
python = ">=3.8,<4"
python = ">=3.8"
singer-sdk = { version="~=0.34.1" }
fs-s3fs = { version = "~=1.1.1", optional = true }
{%- if cookiecutter.serialization_method != "SQL" %}
Expand All @@ -36,7 +45,7 @@ s3 = ["fs-s3fs"]

[tool.ruff]
src = ["{{cookiecutter.library_name}}"]
target-version = "py37"
target-version = "py38"

[tool.ruff.lint]
ignore = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy

[tox]
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
isolated_build = true

[testenv]
Expand All @@ -13,7 +13,7 @@ commands =
[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
commands =
poetry install -v
poetry run pytest
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
COOKIECUTTER_REPLAY_FILES = list(Path("./e2e-tests/cookiecutters").glob("*.json"))

package = "singer_sdk"
python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8", "3.7"]
python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8"]
main_python_version = "3.11"
locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py"
nox.options.sessions = (
Expand Down
Loading

0 comments on commit 6532984

Please sign in to comment.