Skip to content

Commit

Permalink
Adds support to python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jairhenrique committed Oct 1, 2024
1 parent e6ae935 commit 809e8d6
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 58 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
env:
PGUSER: postgres
PGPASSWORD: postgres
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added
- Support to Field `db_default` value
- Support to python 3.13

### Changed

Expand Down
77 changes: 31 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@ dynamic = ["version"]
description = "Smart object creation facility for Django."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
authors = [
{ name = "berin", email = "[email protected]" },
{ name = "amureki", email = "[email protected]" },
]
keywords = [
"django",
"factory",
"python",
"testing",
]
keywords = ["django", "factory", "python", "testing"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
Expand All @@ -35,11 +30,10 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
]
dependencies = [
"django>=4.2",
]
dependencies = ["django>=4.2"]

[project.optional-dependencies]
test = [
Expand All @@ -51,31 +45,19 @@ test = [
"ruff",
"mypy",
]
docs = [
"Sphinx",
"sphinx-rtd-theme",
"myst-parser",
]
docs = ["Sphinx", "sphinx-rtd-theme", "myst-parser"]

[project.urls]
Homepage = "https://github.com/model-bakers/model_bakery"

[tool.coverage.run]
branch = true
parallel = true
source = [
"model_bakery",
]
omit = [
"model_bakery/__about__.py",
"model_bakery/_types.py",
]
source = ["model_bakery"]
omit = ["model_bakery/__about__.py", "model_bakery/_types.py"]

[tool.coverage.paths]
source = [
"model_bakery",
".tox/**/site-packages/model_bakery",
]
source = ["model_bakery", ".tox/**/site-packages/model_bakery"]

[tool.coverage.report]
show_missing = true
Expand All @@ -84,9 +66,7 @@ show_missing = true
path = "model_bakery/__about__.py"

[tool.hatch.build.targets.sdist]
include = [
"/model_bakery",
]
include = ["/model_bakery"]

[tool.mypy]
ignore_missing_imports = true
Expand All @@ -97,31 +77,36 @@ addopts = "--tb=short -rxs --nomigrations"

[tool.ruff.lint]
select = [
"S", # flake8-bandit
"B", # flake8-bugbear
"C", # flake8-comprehensions
"SIM", # flake8-simplify
"I", # isort
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"D", # pydocstyle
"UP", # pyupgrade
"S", # flake8-bandit
"B", # flake8-bugbear
"C", # flake8-comprehensions
"SIM", # flake8-simplify
"I", # isort
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"D", # pydocstyle
"UP", # pyupgrade
"RUF100", # Unused noqa directive
]

ignore = ["B904", "E501", "S101", "D1", "D212"]

[tool.ruff.lint.per-file-ignores]
"tests/test_*.py" = [
"S",
]
"tests/test_*.py" = ["S"]

[tool.ruff.lint.isort]
combine-as-imports=true
split-on-trailing-comma=true
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder"]
force-wrap-aliases=true
combine-as-imports = true
split-on-trailing-comma = true
section-order = [
"future",
"standard-library",
"django",
"third-party",
"first-party",
"local-folder",
]
force-wrap-aliases = true

[tool.ruff.lint.isort.sections]
django = ["django"]
Expand Down
24 changes: 12 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[tox]
env_list =
py{38,39}-django{42}-{postgresql,sqlite}
py{310,311}-django{42,50,51}-{postgresql,sqlite}
py{311,312}-django{42,50,51}-{postgresql-psycopg3}
py312-django{50,51}-{postgresql-contenttypes}
py{38,39}-django{42}-{psycopg2,sqlite}
py{310,311}-django{42,50,51}-{psycopg3,psycopg2,sqlite}
py312-django{50,51}-{psycopg2}
py{312,313}-django{50,51}-{sqlite,psycopg3,postgresql-contenttypes}

[testenv]
package = wheel
setenv =
PYTHONPATH={toxinidir}
postgresql: TEST_DB=postgis
postgresql: PGUSER=postgres
postgresql: PGPASSWORD=postgres
postgresql-psycopg3: TEST_DB=postgis
postgresql-psycopg3: PGUSER=postgres
postgresql-psycopg3: PGPASSWORD=postgres
psycopg2: TEST_DB=postgis
psycopg2: PGUSER=postgres
psycopg2: PGPASSWORD=postgres
psycopg3: TEST_DB=postgis
psycopg3: PGUSER=postgres
psycopg3: PGPASSWORD=postgres
postgresql-contenttypes: USE_CONTENTTYPES=True
sqlite: TEST_DB=sqlite
sqlite: USE_TZ=True
Expand All @@ -26,8 +26,8 @@ deps =
django42: Django>=4.2,<5
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
postgresql: psycopg2-binary
postgresql-psycopg3: psycopg
psycopg2: psycopg2-binary
psycopg3: psycopg[binary,pool]
commands =
python \
-m coverage run \
Expand Down

0 comments on commit 809e8d6

Please sign in to comment.