Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
* Make linters happy

* Update CHANGELOG and version

* Update CHANGELOG

* Add Python 3.13, remove 3.8

* Remove Python 3.13 from build matrix

Remove Python 3.13 from build matrix, as pydantic_core cannot be installed in it. However, the package should work fine as pydantic_core is only used in tests.
  • Loading branch information
RobertoPrevato authored Jan 18, 2025
1 parent 2d131d3 commit 6d0e5bf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 30 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v1
Expand All @@ -33,27 +33,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v1
id: depcache
with:
path: deps
key: requirements-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}

- name: Download dependencies
if: steps.depcache.outputs.cache-hit != 'true'
run: |
pip download --dest=deps -r requirements.txt
- name: Install dependencies
run: |
PYVER=`python -V 2>&1`
if [ "${PYVER:0:-2}" == "Python 3.10" ]; then
pip install -r requirements.txt
else
pip install -U --no-index --find-links=deps deps/*
fi
pip install -r requirements.txt
pip install black isort
- name: Run tests
Expand Down Expand Up @@ -84,18 +66,18 @@ jobs:
- name: Install distribution dependencies
run: pip install build
if: matrix.python-version == 3.11
if: matrix.python-version == 3.12

- name: Create distribution package
run: python -m build
if: matrix.python-version == 3.11
if: matrix.python-version == 3.12

- name: Upload distribution package
uses: actions/upload-artifact@master
with:
name: dist
path: dist
if: matrix.python-version == 3.11
if: matrix.python-version == 3.12

publish:
runs-on: ubuntu-latest
Expand All @@ -108,10 +90,10 @@ jobs:
name: dist
path: dist

- name: Use Python 3.11
- name: Use Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ __pycache__
_test_files/
dist/
venv312/
.local
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2025-01-18

- Add additionalProperties to Schema object, by @tyzhnenko.
- Upgrade package MarkupSafe to 3.0.1, by @stollero.
- Remove Python 3.8 from the build matrix (EOF at the end of 2024).

## [1.0.9] - 2023-11-20
- Adds support for Python 3.12.
- Adds `MarkupSafe` among required dependencies (and not optional).
Expand Down
2 changes: 1 addition & 1 deletion openapidocs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "1.0.9"
__version__ = "1.1.0"
VERSION = __version__
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
]
keywords = [
Expand Down
9 changes: 6 additions & 3 deletions tests/test_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class FooParent:

class TestItem:
@abstractmethod
def get_instance(self) -> Any: ...
def get_instance(self) -> Any:
...

def expected_yaml(self) -> str:
return dedent(self.yaml()).strip()
Expand All @@ -101,10 +102,12 @@ def expected_json(self) -> str:
return dedent(self.json()).strip()

@abstractmethod
def json(self) -> str: ...
def json(self) -> str:
...

@abstractmethod
def yaml(self) -> str: ...
def yaml(self) -> str:
...


class ParameterExample1(TestItem):
Expand Down

0 comments on commit 6d0e5bf

Please sign in to comment.