Skip to content

Commit a8daab5

Browse files
authored
Merge pull request #246 from python-openapi/feature/python-3.9-drop
Python 3.9 drop
2 parents bf12c9b + 5928d98 commit a8daab5

File tree

13 files changed

+113
-151
lines changed

13 files changed

+113
-151
lines changed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
name: Build documentation
1+
name: CI / Docs
22

33
on:
44
push:
55
pull_request:
66
types: [opened, synchronize]
77

88
jobs:
9-
build:
9+
docs_build:
10+
name: "Build"
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: actions/checkout@v4
1314

1415
- name: Set up Python 3.12
1516
uses: actions/setup-python@v5
1617
with:
17-
python-version: 3.12
18+
python-version: "3.12"
1819

1920
- name: Get full Python version
2021
id: full-python-version
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Test python code
4+
name: CI / Tests
55

66
on:
77
push:
88
pull_request:
99
types: [opened, synchronize]
1010

1111
jobs:
12-
test:
13-
name: "Tests"
12+
tests:
13+
name: "py${{ matrix.python-version }}"
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
17+
python-version: ['3.10', '3.11', '3.12', '3.13']
1818
fail-fast: false
1919
steps:
2020
- uses: actions/checkout@v4
@@ -62,7 +62,7 @@ jobs:
6262
- name: Upload coverage
6363
uses: codecov/codecov-action@v5
6464

65-
static-checks:
65+
static_checks:
6666
name: "Static checks"
6767
runs-on: ubuntu-latest
6868
steps:
@@ -72,7 +72,7 @@ jobs:
7272
- name: "Setup Python"
7373
uses: actions/setup-python@v5
7474
with:
75-
python-version: 3.9
75+
python-version: "3.10"
7676

7777
- name: Get full Python version
7878
id: full-python-version

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
default_stages: [commit, push]
2+
default_stages: [pre-commit, pre-push]
33
default_language_version:
44
# force all unspecified python hooks to run python3
55
python: python3

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ formats: all
88
build:
99
os: ubuntu-20.04
1010
tools:
11-
python: "3.9"
11+
python: "3.10"
1212
jobs:
1313
post_create_environment:
1414
- pip install poetry

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: python
22
sudo: false
33
matrix:
44
include:
5-
- python: 3.9
65
- python: 3.10
76
- python: 3.11
87
- python: 3.12

openapi_schema_validator/_format.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
from base64 import b64decode
33
from base64 import b64encode
44
from numbers import Number
5-
from typing import Any
6-
from typing import Union
75

86
from jsonschema._format import FormatChecker
97

108

11-
def is_int32(instance: Any) -> bool:
9+
def is_int32(instance: object) -> bool:
1210
# bool inherits from int, so ensure bools aren't reported as ints
1311
if isinstance(instance, bool):
1412
return True
@@ -17,7 +15,7 @@ def is_int32(instance: Any) -> bool:
1715
return ~(1 << 31) < instance < 1 << 31
1816

1917

20-
def is_int64(instance: Any) -> bool:
18+
def is_int64(instance: object) -> bool:
2119
# bool inherits from int, so ensure bools aren't reported as ints
2220
if isinstance(instance, bool):
2321
return True
@@ -26,7 +24,7 @@ def is_int64(instance: Any) -> bool:
2624
return ~(1 << 63) < instance < 1 << 63
2725

2826

29-
def is_float(instance: Any) -> bool:
27+
def is_float(instance: object) -> bool:
3028
# bool inherits from int
3129
if isinstance(instance, int):
3230
return True
@@ -35,7 +33,7 @@ def is_float(instance: Any) -> bool:
3533
return isinstance(instance, float)
3634

3735

38-
def is_double(instance: Any) -> bool:
36+
def is_double(instance: object) -> bool:
3937
# bool inherits from int
4038
if isinstance(instance, int):
4139
return True
@@ -46,15 +44,15 @@ def is_double(instance: Any) -> bool:
4644
return isinstance(instance, float)
4745

4846

49-
def is_binary(instance: Any) -> bool:
47+
def is_binary(instance: object) -> bool:
5048
if not isinstance(instance, (str, bytes)):
5149
return True
5250
if isinstance(instance, str):
5351
return False
5452
return True
5553

5654

57-
def is_byte(instance: Union[str, bytes]) -> bool:
55+
def is_byte(instance: object) -> bool:
5856
if not isinstance(instance, (str, bytes)):
5957
return True
6058
if isinstance(instance, str):
@@ -64,7 +62,7 @@ def is_byte(instance: Union[str, bytes]) -> bool:
6462
return encoded == instance
6563

6664

67-
def is_password(instance: Any) -> bool:
65+
def is_password(instance: object) -> bool:
6866
# A hint to UIs to obscure input
6967
return True
7068

0 commit comments

Comments
 (0)