Skip to content

Commit 5f74bb2

Browse files
authored
Chore/update-to-38 (#342)
* Update all deps and drop 3.8 support * Typo fix and drop 3.8 support * Add auto changelog generation * Update ruff * Fix deps and tests_tasks to drop support for 3.7 and fix issues for 3.8 * Replace test devcontainer with 3.8 container * Update pyproject to include python 3.9 issues * Add python 3.12 * Rename ci job name
1 parent 1a14266 commit 5f74bb2

File tree

10 files changed

+1093
-1053
lines changed

10 files changed

+1093
-1053
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
2-
"name": "fastapi-37",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.12",
2+
"name": "fastapi-38",
3+
"image": "mcr.microsoft.com/devcontainers/python:1-3.8-bookworm",
44
"features": {
5-
"ghcr.io/devcontainers/features/node:1": { "version": "latest" }
5+
"ghcr.io/devcontainers/features/node:1": {
6+
"version": "latest"
7+
}
68
},
79
"postCreateCommand": "pipx install poetry && poetry install",
8-
"forwardPorts": [2222]
9-
}
10+
"forwardPorts": [
11+
2222
12+
]
13+
}

.github/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
categories:
6+
- title: Breaking Changes 🛠
7+
labels:
8+
- Semver-Major
9+
- breaking-change
10+
- title: Exciting New Features 🎉
11+
labels:
12+
- Semver-Minor
13+
- enhancement
14+
- title: Other Changes
15+
labels:
16+
- "*"
17+
exclude:
18+
labels:
19+
- dependencies
20+
- title: 👒 Dependencies
21+
labels:
22+
- dependencies

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
max-parallel: 3
1515
matrix:
16-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
16+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1717

1818
steps:
1919
- uses: actions/checkout@v4
@@ -26,7 +26,7 @@ jobs:
2626
uses: abatilo/[email protected]
2727
with:
2828
poetry-version: 1.5.1
29-
- uses: actions/cache@v3
29+
- uses: actions/cache@v4
3030
id: cache-deps
3131
with:
3232
path: ~/.cache/pip
@@ -37,11 +37,11 @@ jobs:
3737
- name: Install dependencies
3838
run: poetry install -E session
3939

40-
- uses: actions/cache@v3
40+
- uses: actions/cache@v4
4141
with:
4242
path: .mypy_cache
4343
key: mypy-${{ matrix.python-version }}
44-
- uses: actions/cache@v3
44+
- uses: actions/cache@v4
4545
with:
4646
path: .pytest_cache
4747
key: pytest-${{ matrix.python-version }}

.github/workflows/pull-request.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build-pull-request
1+
name: tests-pull-request
22

33
on:
44
pull_request:
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
max-parallel: 3
1313
matrix:
14-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
14+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -24,7 +24,7 @@ jobs:
2424
uses: abatilo/[email protected]
2525
with:
2626
poetry-version: 1.5.1
27-
- uses: actions/cache@v3
27+
- uses: actions/cache@v4
2828
id: cache-deps
2929
with:
3030
path: ~/.cache/pip
@@ -34,11 +34,11 @@ jobs:
3434
3535
- name: Install dependencies
3636
run: poetry install -E session
37-
- uses: actions/cache@v3
37+
- uses: actions/cache@v4
3838
with:
3939
path: .mypy_cache
4040
key: mypy-${{ matrix.python-version }}
41-
- uses: actions/cache@v3
41+
- uses: actions/cache@v4
4242
with:
4343
path: .pytest_cache
4444
key: pytest-${{ matrix.python-version }}

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ test:
2424
format:
2525
black $(all_src)
2626
black -l 82 $(docs_src)
27-
ruff --fix $(all_src)
27+
ruff check --fix $(all_src)
2828

2929
.PHONY: lint
3030
lint:
31-
ruff $(all_src)
31+
ruff check $(all_src)
3232
black --check --diff $(all_src)
3333
black -l 82 $(docs_src) --check --diff
3434

@@ -47,11 +47,10 @@ testcov:
4747
fi
4848

4949
.PHONY: ci-v1 ## Run all CI validation steps without making any changes to code in pydantic v1
50-
5150
ci-v1: install-v1 lint test
5251

5352

54-
.PHONY: ci-v1 ## Run all CI validation steps without making any changes to code in pydantic v2
53+
.PHONY: ci-v2 ## Run all CI validation steps without making any changes to code in pydantic v2
5554
ci-v2: install-v2 lint mypy test
5655

5756

@@ -108,7 +107,7 @@ docs-build:
108107

109108
.PHONY: docs-format ## Format the python code that is part of the docs
110109
docs-format:
111-
ruff $(docs_src)
110+
ruff check $(docs_src)
112111
autoflake -r --remove-all-unused-imports --ignore-init-module-imports $(docs_src) -i
113112
black -l 82 $(docs_src)
114113

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
</p>
44
<p align="center">
55
<a href="https://github.com/dmontagu/fastapi-utils" target="_blank">
6-
<img src="https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg">
7-
<img src="https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg" alt="Build CI">
6+
<img src="https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg">
7+
<img src="https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg" alt="Build CI">
88
</a>
99
<a href="https://codecov.io/gh/dmontagu/fastapi-utils" target="_blank">
1010
<img src="https://codecov.io/gh/dmontagu/fastapi-utils/branch/master/graph/badge.svg" alt="Coverage">
@@ -26,7 +26,7 @@
2626

2727
---
2828

29-
<a href="https://fastapi.tiangolo.com">FastAPI</a> is a modern, fast web framework for building APIs with Python 3.7+.
29+
<a href="https://fastapi.tiangolo.com">FastAPI</a> is a modern, fast web framework for building APIs with Python 3.8+.
3030

3131
But if you're here, you probably already knew that!
3232

@@ -57,7 +57,7 @@ See the [docs](https://fastapi-utils.davidmontague.xyz/) for more details and ex
5757

5858
## Requirements
5959

60-
This package is intended for use with any recent version of FastAPI (depending on `pydantic>=1.0`), and Python 3.7+.
60+
This package is intended for use with any recent version of FastAPI (depending on `pydantic>=1.0`), and Python 3.8+.
6161

6262
## Installation
6363

docs/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
</p>
44
<p align="center">
55
<a href="https://github.com/dmontagu/fastapi-utils" target="_blank">
6-
<img src="https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg">
7-
<img src="https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg" alt="Build CI">
6+
<img src="https://img.shields.io/github/last-commit/dmontagu/fastapi-utils.svg">
7+
<img src="https://github.com/dmontagu/fastapi-utils/workflows/build/badge.svg" alt="Build CI">
88
</a>
99
<a href="https://codecov.io/gh/dmontagu/fastapi-utils" target="_blank">
1010
<img src="https://codecov.io/gh/dmontagu/fastapi-utils/branch/master/graph/badge.svg" alt="Coverage">
@@ -26,7 +26,7 @@
2626

2727
---
2828

29-
<a href="https://fastapi.tiangolo.com">FastAPI</a> is a modern, fast web framework for building APIs with Python 3.7+.
29+
<a href="https://fastapi.tiangolo.com">FastAPI</a> is a modern, fast web framework for building APIs with Python 3.8+.
3030

3131
But if you're here, you probably already knew that!
3232

@@ -57,16 +57,16 @@ See the [docs](https://https://fastapi-utils.davidmontague.xyz/) for more detail
5757

5858
## Requirements
5959

60-
This package is intended for use with any recent version of FastAPI (depending on `pydantic>=1.0`), and Python 3.7+.
60+
This package is intended for use with any recent version of FastAPI (depending on `pydantic>=1.0`), and Python 3.8+.
6161

6262
## Installation
6363

6464
```bash
65-
pip install fastapi-restful # For basic slim package :)
65+
pip install fastapi-utils # For basic slim package :)
6666

67-
pip install fastapi-restful[session] # To add sqlalchemy session maker
67+
pip install fastapi-utils[session] # To add sqlalchemy session maker
6868

69-
pip install fastapi-restful[all] # For all the packages
69+
pip install fastapi-utils[all] # For all the packages
7070
```
7171

7272
## License

0 commit comments

Comments
 (0)