Skip to content

Commit

Permalink
Update Python version boundaries to include 3.12 (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Jul 30, 2023
1 parent 4c087eb commit c6e248c
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ jobs:
max-parallel: 5
matrix:
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Poetry and dependencies
run: |
set -e
Expand Down
2 changes: 1 addition & 1 deletion dataclasses_json/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def _decode_dataclass(cls, kvs, infer_missing):
)
else:
warnings.warn(
f"`NoneType` object {warning}.", RuntimeWarning
f"'NoneType' object {warning}.", RuntimeWarning
)
init_kwargs[field.name] = field_value
continue
Expand Down
86 changes: 43 additions & 43 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
repository = 'https://github.com/lidatong/dataclasses-json'

[tool.poetry.dependencies]
python = ">=3.7, <3.12"
python = ">=3.7, <3.13"
typing-inspect = ">=0.4.0, <1"
marshmallow = ">=3.18.0,<4.0.0"

Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_warns_when_nonoptional_field_is_missing_with_infer_missing(self):
assert (actual == expected)

def test_warns_when_required_field_is_none(self):
with pytest.warns(RuntimeWarning, match='`NoneType` object'):
with pytest.warns(RuntimeWarning, match='\'NoneType\' object'):
assert (DataClassWithDataClass.from_json(
'{"dc_with_list": null}') == DataClassWithDataClass(None))

Expand Down

6 comments on commit c6e248c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
dataclasses_json
   cfg.py51492%80, 84–86
   core.py2351096%38–41, 51, 64, 66, 81, 83, 169, 197
   mm.py2003085%33–36, 42–45, 53–56, 62–65, 88, 161–162, 167, 171, 175, 180, 184, 188, 196, 202, 207, 216, 221, 226, 235, 244–251
   stringcase.py25388%59, 76, 97
   undefined.py143299%24, 38
   utils.py1283672%11–24, 44–49, 60–64, 74, 99–100, 108–109, 124–132, 158, 177, 202
tests
   entities.py220299%229, 235
   test_annotations.py814248%50–67, 78–102, 106–122
   test_api.py142497%88, 99, 139–140
   test_str_subclass.py22195%9
   test_union.py981090%87–94, 108–115
TOTAL247614494% 

Tests Skipped Failures Errors Time
291 3 💤 0 ❌ 0 🔥 3.130s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
dataclasses_json
   cfg.py51492%80, 84–86
   core.py234996%38–41, 51, 64, 66, 81, 83, 169
   mm.py1992985%33–36, 42–45, 53–56, 62–65, 88, 161–162, 167, 171, 175, 180, 184, 188, 196, 202, 207, 216, 221, 226, 244–251
   stringcase.py25388%59, 76, 97
   undefined.py143299%24, 38
   utils.py1282977%11–24, 44–49, 60–64, 74, 99–100, 108–109, 158, 177, 202
tests
   entities.py220299%229, 235
   test_annotations.py814248%50–67, 78–102, 106–122
   test_api.py142299%139–140
   test_str_subclass.py22195%9
TOTAL247412395% 

Tests Skipped Failures Errors Time
291 1 💤 0 ❌ 0 🔥 3.648s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
dataclasses_json
   cfg.py51492%80, 84–86
   core.py235996%38–41, 51, 64, 66, 81, 83, 169
   mm.py1992985%33–36, 42–45, 53–56, 62–65, 88, 161–162, 167, 171, 175, 180, 184, 188, 196, 202, 207, 216, 221, 226, 244–251
   stringcase.py25388%59, 76, 97
   undefined.py141299%24, 38
   utils.py1282977%11–24, 44–49, 60–64, 74, 99–100, 108–109, 158, 177, 202
tests
   entities.py201299%229, 235
   test_annotations.py804248%50–67, 78–102, 106–122
   test_api.py140299%139–140
   test_str_subclass.py22195%9
TOTAL236312395% 

Tests Skipped Failures Errors Time
291 1 💤 0 ❌ 0 🔥 3.838s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
dataclasses_json
   cfg.py51492%80, 84–86
   core.py234996%38–41, 51, 64, 66, 81, 83, 169
   mm.py1992985%33–36, 42–45, 53–56, 62–65, 88, 161–162, 167, 171, 175, 180, 184, 188, 196, 202, 207, 216, 221, 226, 244–251
   stringcase.py25388%59, 76, 97
   undefined.py143299%24, 38
   utils.py1282977%11–24, 44–49, 60–64, 74, 99–100, 108–109, 158, 177, 202
tests
   entities.py220299%229, 235
   test_annotations.py814248%50–67, 78–102, 106–122
   test_api.py142199%139
   test_str_subclass.py22195%9
TOTAL247412295% 

Tests Skipped Failures Errors Time
291 1 💤 0 ❌ 0 🔥 4.291s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
dataclasses_json
   cfg.py51492%80, 84–86
   core.py2351096%38–41, 51, 64, 66, 81, 83, 169, 197
   mm.py2003085%33–36, 42–45, 53–56, 62–65, 88, 161–162, 167, 171, 175, 180, 184, 188, 196, 202, 207, 216, 221, 226, 235, 244–251
   stringcase.py25388%59, 76, 97
   undefined.py143299%24, 38
   utils.py1283672%11–24, 44–49, 60–64, 74, 99–100, 108–109, 124–132, 158, 177, 202
tests
   entities.py220299%229, 235
   test_annotations.py814248%50–67, 78–102, 106–122
   test_api.py142497%88, 99, 139–140
   test_str_subclass.py22195%9
   test_union.py981090%87–94, 108–115
TOTAL247614494% 

Tests Skipped Failures Errors Time
291 3 💤 0 ❌ 0 🔥 4.043s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
dataclasses_json
   cfg.py51492%80, 84–86
   core.py2351096%38–41, 51, 64, 66, 81, 83, 169, 197
   mm.py2003085%33–36, 42–45, 53–56, 62–65, 88, 161–162, 167, 171, 175, 180, 184, 188, 196, 202, 207, 216, 221, 226, 235, 244–251
   stringcase.py25388%59, 76, 97
   undefined.py143299%24, 38
   utils.py1283672%11–24, 44–49, 60–64, 74, 99–100, 108–109, 124–132, 158, 177, 202
tests
   entities.py220299%229, 235
   test_annotations.py814248%50–67, 78–102, 106–122
   test_api.py142497%88, 99, 139–140
   test_str_subclass.py22195%9
   test_union.py981090%87–94, 108–115
TOTAL247614494% 

Tests Skipped Failures Errors Time
291 3 💤 0 ❌ 0 🔥 5.498s ⏱️

Please sign in to comment.