Skip to content

Commit

Permalink
Support Python 3.10 (#54)
Browse files Browse the repository at this point in the history
Provide support for Python 3.10.
  • Loading branch information
druzhinin-kirill committed Jun 13, 2024
1 parent 177dad1 commit 77588f8
Show file tree
Hide file tree
Showing 9 changed files with 683 additions and 695 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.11", "3.12"]
python: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
pdm sync -d
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Publish package distributions to PyPI
run: |
pdm publish
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to

## [Unreleased]

- Support Python 3.10.

## [0.1.3] - 2023-06-11

- Inject current working directory into python path by default.
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ documentation website.

You'll need the following:

- Any Python version starting from 3.11
- Any Python version starting from 3.10
- [pre-commit](https://pre-commit.com/) (recommended)
- [PDM](https://pdm-project.org/2.12/)

Expand Down
2 changes: 1 addition & 1 deletion docs/get_started.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Get started

`dbt-score` is a Python library that is easy to install and use. The minimum
required version of Python is `3.11`.
required version of Python is `3.10`.

## Installation

Expand Down
1,353 changes: 666 additions & 687 deletions pdm.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
Expand All @@ -24,8 +25,9 @@ classifiers = [
dependencies = [
"dbt-core>=1.5",
"click>=7.1.1, <9.0.0",
"tomli>=1.1.0; python_version<'3.11'",
]
requires-python = ">=3.11"
requires-python = ">=3.10"
readme = "README.md"
license = {text = "MIT"}

Expand Down
7 changes: 6 additions & 1 deletion src/dbt_score/config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
"""This module is responsible for loading configuration."""

import logging
import tomllib
import sys
from dataclasses import dataclass, field, replace
from pathlib import Path
from typing import Any, Final

from dbt_score.rule import RuleConfig

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

logger = logging.getLogger(__name__)

DEFAULT_CONFIG_FILE = "pyproject.toml"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
env_list = py{310,311},lint,docs
env_list = py{310,311,312},lint,docs

skip_missing_interpreters = true

Expand Down

0 comments on commit 77588f8

Please sign in to comment.