diff --git a/.circleci/config.yml b/.circleci/config.yml index 79e29e5..ecbcede 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,34 +3,34 @@ version: 2.1 orbs: opus10: executors: - python-pg: - parameters: - pg_version: - type: "string" - default: "14.4" + python: working_directory: /code docker: - - image: opus10/circleci-public-django-app:2023-10-06 + - image: opus10/circleci-python-library:2024-04-17 environment: # Ensure makefile commands are not wrapped in "docker-compose run" EXEC_WRAPPER: '' - DATABASE_URL: postgres://root@localhost/circle_test?sslmode=disable TOX_PARALLEL_NO_SPINNER: 1 + DATABASE_URL: postgres://root@localhost/circle_test?sslmode=disable - image: cimg/postgres:<> environment: POSTGRES_USER: root POSTGRES_DB: circle_test POSTGRES_PASSWORD: password + parameters: + pg_version: + type: "string" + default: "14.4" commands: test: steps: - checkout - restore_cache: - key: v4-{{ checksum "poetry.lock" }} + key: v4-{{ checksum "poetry.lock" }} - run: make dependencies - run: make full-test-suite - save_cache: - key: v4-{{ checksum "poetry.lock" }} + key: v4-{{ checksum "poetry.lock" }} paths: - /home/circleci/.cache/pypoetry/ - /code/.venv @@ -39,45 +39,54 @@ orbs: jobs: test_pg_min: executor: - name: opus10/python-pg + name: opus10/python pg_version: "12.15" steps: - opus10/test test_pg_max: executor: - name: opus10/python-pg + name: opus10/python pg_version: "16.0" steps: - opus10/test lint: - executor: opus10/python-pg + executor: opus10/python steps: - checkout - restore_cache: - key: v4-{{ checksum "poetry.lock" }} + key: v4-{{ checksum "poetry.lock" }} - run: make dependencies - run: make lint - check_changelog: - executor: opus10/python-pg + type_check: + executor: opus10/python steps: - checkout - restore_cache: key: v4-{{ checksum "poetry.lock" }} - run: make dependencies - - run: git tidy-log origin/master.. + - run: make type-check || true + + check_changelog: + executor: opus10/python + steps: + - checkout + - restore_cache: + key: v4-{{ checksum "poetry.lock" }} + - run: make dependencies + - run: git tidy-log origin/main.. - run: make tidy-lint deploy: - executor: opus10/python-pg + executor: opus10/python steps: - checkout - run: ssh-add -D - run: echo "${GITHUB_DEVOPS_PRIVATE_SSH_KEY_BASE64}" | base64 --decode | ssh-add - > /dev/null - restore_cache: - key: v4-{{ checksum "poetry.lock" }} + key: v4-{{ checksum "poetry.lock" }} - run: make dependencies - run: poetry run python devops.py deploy @@ -88,16 +97,18 @@ workflows: - test_pg_min - test_pg_max - lint + - type_check - check_changelog: filters: branches: - ignore: master + ignore: main - deploy: - context: public-django-app + context: python-library requires: - test_pg_min - test_pg_max - lint + - type_check filters: branches: - only: master + only: main diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5e5879..02e78d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Set up your development environment with: `make docker-setup` will set up a development environment managed by Docker. Install docker [here](https://www.docker.com/get-started) and be sure it is running when executing any of the commands below. -If you prefer a native development environment, `make conda-setup` will set up a development environment managed by [Conda](https://conda.io). The database must be ran manually. +If you prefer a native development environment, `make conda-setup` will set up a development environment managed by [Conda](https://conda.io). Dependent services, such as databases, must be ran manually. ## Testing and Validation @@ -48,7 +48,7 @@ To check if your commits pass linting, do: make tidy-lint -Note, the above command lints every commit since branching from master. You can also run `make shell` and run `git tidy` commands inside the docker environment to do other flavors of `git tidy` commands. +Note, the above command lints every commit since branching from main. You can also run `make shell` and run `git tidy` commands inside the docker environment to do other flavors of `git tidy` commands. ## Documentation @@ -62,7 +62,7 @@ A shortcut for serving them is: ## Releases and Versioning -Anything that is merged into the master branch will be automatically deployed to PyPI. Documentation will be published to a ReadTheDocs at `https://django-pglock.readthedocs.io/`. +Anything that is merged into the main branch will be automatically deployed to PyPI. Documentation will be published to a ReadTheDocs at `https://django-pglock.readthedocs.io/`. The following files will be generated and should *not* be edited by a user: diff --git a/LICENSE b/LICENSE index 7a31f1d..28efb8f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2023, Opus 10 +Copyright (c) 2024, Opus 10 All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/Makefile b/Makefile index 18154c6..f48759e 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ # docs-serve - Serve documentation # lint - Run code linting and static checks # lint-fix - Fix common linting errors +# type-check - Run Pyright type-checking # test - Run tests using pytest # full-test-suite - Run full test suite using tox # shell - Run a shell in a virtualenv @@ -36,7 +37,6 @@ endif # Docker run mounts the local code directory, SSH (for git), and global git config information DOCKER_RUN_CMD?=$(DOCKER_CMD)-compose run --name $(PACKAGE_NAME) $(DOCKER_RUN_ARGS) -d app - # Print usage of main targets when user types "make" or "make help" .PHONY: help help: @@ -51,6 +51,7 @@ ifndef run " tox: Run tests against all versions of Python\n"\ " lint: Run code linting and static checks\n"\ " lint-fix: Fix common linting errors\n"\ + " type-check: Run Pyright type-checking\n"\ " docs: Build documentation\n"\ " docs-serve: Serve documentation\n"\ " docker-teardown: Spin down docker resources\n"\ @@ -143,7 +144,7 @@ full-test-suite: # Build documentation .PHONY: docs docs: - $(EXEC_WRAPPER) mkdocs build + $(EXEC_WRAPPER) mkdocs build -s # Serve documentation @@ -155,23 +156,28 @@ docs-serve: # Run code linting and static analysis. Ensure docs can be built .PHONY: lint lint: - $(EXEC_WRAPPER) black . --check + $(EXEC_WRAPPER) ruff format . --check $(EXEC_WRAPPER) ruff check ${MODULE_NAME} - $(EXEC_WRAPPER) footing update --check $(EXEC_WRAPPER) bash -c 'make docs' # Fix common linting errors .PHONY: lint-fix lint-fix: - $(EXEC_WRAPPER) black . + $(EXEC_WRAPPER) ruff format . $(EXEC_WRAPPER) ruff check ${MODULE_NAME} --fix +# Run Pyright type-checking +.PHONY: type-check +type-check: + $(EXEC_WRAPPER) pyright $(MODULE_NAME) + + # Lint commit messages .PHONY: tidy-lint tidy-lint: - $(EXEC_WRAPPER) git tidy-lint origin/master.. + $(EXEC_WRAPPER) git tidy-lint origin/main.. # Perform a tidy commit @@ -183,4 +189,4 @@ tidy-commit: # Perform a tidy squash .PHONY: tidy-squash tidy-squash: - $(EXEC_WRAPPER) git tidy-squash origin/master + $(EXEC_WRAPPER) git tidy-squash origin/main diff --git a/README.md b/README.md index 77b9d9e..f34df79 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ After this, add both `pgactivity` and `pglock` to the `INSTALLED_APPS` setting o For information on setting up django-pglock for development and contributing changes, view [CONTRIBUTING.md](CONTRIBUTING.md). -## Primary Authors +## Creators - [Wes Kendall](https://github.com/wesleykendall) - [Paul Gilmartin](https://github.com/PaulGilmartin) diff --git a/devops.py b/devops.py index b7a6e48..9f22dd1 100644 --- a/devops.py +++ b/devops.py @@ -5,20 +5,23 @@ package deployment, changelog generation, and changelog checking. This script is generated by the template at -https://github.com/Opus10/public-django-app-template +https://github.com/Opus10/python-library-template Do not change this script! Any fixes or updates to this script should be made -to https://github.com/Opus10/public-django-app-template +to https://github.com/Opus10/python-library-template """ + import os import subprocess import sys import tempfile +from typing import IO, Any, Final, Literal, Tuple, TypeAlias, Union from packaging import version +CIRCLECI_ENV_VAR: Final = "CIRCLECI" -CIRCLECI_ENV_VAR = "CIRCLECI" +File: TypeAlias = Union[IO[Any], int, None] class Error(Exception): @@ -29,25 +32,31 @@ class NotOnCircleCIError(Error): """Thrown when not running on CircleCI""" -def _check_git_version(): +def _check_git_version() -> None: """Verify git version""" git_version = _shell_stdout("git --version | rev | cut -f 1 -d' ' | rev") if version.parse(git_version) < version.parse("2.22.0"): raise RuntimeError(f"Must have git version >= 2.22.0 (version = {git_version})") -def _shell(cmd, check=True, stdin=None, stdout=None, stderr=None): # pragma: no cover +def _shell( + cmd: str, + check: bool = True, + stdin: File = None, + stdout: File = None, + stderr: File = None, +): # pragma: no cover """Runs a subprocess shell with check=True by default""" return subprocess.run(cmd, shell=True, check=check, stdin=stdin, stdout=stdout, stderr=stderr) -def _shell_stdout(cmd, check=True): +def _shell_stdout(cmd: str, check: bool = True) -> str: """Runs a shell command and returns stdout""" ret = _shell(cmd, stdout=subprocess.PIPE, check=check) return ret.stdout.decode("utf-8").strip() if ret.stdout else "" -def _configure_git(): +def _configure_git() -> None: """Configure git name/email and verify git version""" _check_git_version() @@ -56,11 +65,11 @@ def _configure_git(): _shell("git config push.default current") -def _find_latest_tag(): +def _find_latest_tag() -> str: return _shell_stdout("git describe --tags --abbrev=0", check=False) -def _find_sem_ver_update(): +def _find_sem_ver_update() -> Literal["major", "minor", "patch"]: """ Find the semantic version string based on the commit log. Defaults to returning "patch" @@ -86,7 +95,7 @@ def _find_sem_ver_update(): return sem_ver -def _update_package_version(): +def _update_package_version() -> Tuple[str, str]: """Apply semantic versioning to package based on git commit messages""" # Obtain the current version old_version = _shell_stdout("poetry version | rev | cut -f 1 -d' ' | rev") @@ -113,7 +122,7 @@ def _update_package_version(): return old_version, new_version -def _generate_changelog_and_tag(old_version, new_version): +def _generate_changelog_and_tag(old_version: str, new_version: str) -> None: """Generates a change log using git-tidy and tags repo""" # Tag the version temporarily so that changelog generation # renders properly @@ -149,7 +158,7 @@ def _generate_changelog_and_tag(old_version, new_version): _shell(f"git tag -f -a {new_version} -F {commit_msg_file.name} --cleanup=whitespace") -def _publish_to_pypi(): +def _publish_to_pypi() -> None: """ Uses poetry to publish to pypi """ @@ -161,7 +170,7 @@ def _publish_to_pypi(): _shell("poetry publish -vvv -n", stdout=subprocess.PIPE) -def _build_and_push_distribution(): +def _build_and_push_distribution() -> None: """ Builds and pushes distribution to PyPI, along with pushing the tags back to the repo @@ -172,7 +181,7 @@ def _build_and_push_distribution(): _shell("git push --follow-tags") -def deploy(): +def deploy() -> None: """Deploys the package and uploads documentation.""" # Ensure proper environment if not os.environ.get(CIRCLECI_ENV_VAR): # pragma: no cover diff --git a/docker-compose.yml b/docker-compose.yml index 49d40ca..9c7be53 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres app: - image: opus10/circleci-public-django-app + image: opus10/circleci-python-library environment: - DATABASE_URL=postgres://postgres:postgres@db:5432/postgres depends_on: diff --git a/docs/contributing.md b/docs/contributing.md index f5e5879..78a9e9a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -32,6 +32,10 @@ If your code fails the linter checks, fix common errors with: make lint-fix +Run type checking with: + + make type-check + ## Committing This project uses [git-tidy](https://github.com/Opus10/git-tidy) to produce structured commits with git trailers. Information from commit messages is used to generate release notes and bump the version properly. @@ -48,7 +52,7 @@ To check if your commits pass linting, do: make tidy-lint -Note, the above command lints every commit since branching from master. You can also run `make shell` and run `git tidy` commands inside the docker environment to do other flavors of `git tidy` commands. +Note, the above command lints every commit since branching from main. You can also run `make shell` and run `git tidy` commands inside the docker environment to do other flavors of `git tidy` commands. ## Documentation @@ -62,7 +66,7 @@ A shortcut for serving them is: ## Releases and Versioning -Anything that is merged into the master branch will be automatically deployed to PyPI. Documentation will be published to a ReadTheDocs at `https://django-pglock.readthedocs.io/`. +Anything that is merged into the main branch will be automatically deployed to PyPI. Documentation will be published to a ReadTheDocs at `https://django-pglock.readthedocs.io/`. The following files will be generated and should *not* be edited by a user: diff --git a/footing.yaml b/footing.yaml index e5b2b0f..39b03e5 100644 --- a/footing.yaml +++ b/footing.yaml @@ -1,7 +1,9 @@ _extensions: - jinja2_time.TimeExtension _template: git@github.com:Opus10/public-django-app-template.git -_version: 3e583c745b210d08970a7be198e5b8e55dd8cd7a +_version: 80d7f1ffae8953435935d7f1ef7d1e526a4be755 +check_types_in_ci: 'False' +is_django: 'True' module_name: pglock repo_name: django-pglock short_description: Postgres locking routines and lock table access. diff --git a/manage.py b/manage.py index e163372..748dcfd 100644 --- a/manage.py +++ b/manage.py @@ -2,7 +2,6 @@ import os import sys - if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line diff --git a/pglock/config.py b/pglock/config.py index 759465a..f15484f 100644 --- a/pglock/config.py +++ b/pglock/config.py @@ -1,4 +1,5 @@ """Core way to access configuration""" + from django.conf import settings diff --git a/poetry.lock b/poetry.lock index 99edbda..8f832b4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -36,6 +36,21 @@ typing-extensions = {version = ">=4", markers = "python_version < \"3.11\""} [package.extras] tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] +[[package]] +name = "astunparse" +version = "1.6.3" +description = "An AST unparser for Python" +optional = false +python-versions = "*" +files = [ + {file = "astunparse-1.6.3-py2.py3-none-any.whl", hash = "sha256:c2652417f2c8b5bb325c885ae329bdf3f86424075c4fd1a128674bc6fba4b8e8"}, + {file = "astunparse-1.6.3.tar.gz", hash = "sha256:5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872"}, +] + +[package.dependencies] +six = ">=1.6.1,<2.0" +wheel = ">=0.23.0,<1.0" + [[package]] name = "babel" version = "2.13.0" @@ -97,33 +112,33 @@ chardet = ">=3.0.2" [[package]] name = "black" -version = "23.9.1" +version = "24.4.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-23.9.1-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:d6bc09188020c9ac2555a498949401ab35bb6bf76d4e0f8ee251694664df6301"}, - {file = "black-23.9.1-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:13ef033794029b85dfea8032c9d3b92b42b526f1ff4bf13b2182ce4e917f5100"}, - {file = "black-23.9.1-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:75a2dc41b183d4872d3a500d2b9c9016e67ed95738a3624f4751a0cb4818fe71"}, - {file = "black-23.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13a2e4a93bb8ca74a749b6974925c27219bb3df4d42fc45e948a5d9feb5122b7"}, - {file = "black-23.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:adc3e4442eef57f99b5590b245a328aad19c99552e0bdc7f0b04db6656debd80"}, - {file = "black-23.9.1-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:8431445bf62d2a914b541da7ab3e2b4f3bc052d2ccbf157ebad18ea126efb91f"}, - {file = "black-23.9.1-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:8fc1ddcf83f996247505db6b715294eba56ea9372e107fd54963c7553f2b6dfe"}, - {file = "black-23.9.1-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:7d30ec46de88091e4316b17ae58bbbfc12b2de05e069030f6b747dfc649ad186"}, - {file = "black-23.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:031e8c69f3d3b09e1aa471a926a1eeb0b9071f80b17689a655f7885ac9325a6f"}, - {file = "black-23.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:538efb451cd50f43aba394e9ec7ad55a37598faae3348d723b59ea8e91616300"}, - {file = "black-23.9.1-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:638619a559280de0c2aa4d76f504891c9860bb8fa214267358f0a20f27c12948"}, - {file = "black-23.9.1-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:a732b82747235e0542c03bf352c126052c0fbc458d8a239a94701175b17d4855"}, - {file = "black-23.9.1-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:cf3a4d00e4cdb6734b64bf23cd4341421e8953615cba6b3670453737a72ec204"}, - {file = "black-23.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf99f3de8b3273a8317681d8194ea222f10e0133a24a7548c73ce44ea1679377"}, - {file = "black-23.9.1-cp38-cp38-win_amd64.whl", hash = "sha256:14f04c990259576acd093871e7e9b14918eb28f1866f91968ff5524293f9c573"}, - {file = "black-23.9.1-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:c619f063c2d68f19b2d7270f4cf3192cb81c9ec5bc5ba02df91471d0b88c4c5c"}, - {file = "black-23.9.1-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:6a3b50e4b93f43b34a9d3ef00d9b6728b4a722c997c99ab09102fd5efdb88325"}, - {file = "black-23.9.1-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:c46767e8df1b7beefb0899c4a95fb43058fa8500b6db144f4ff3ca38eb2f6393"}, - {file = "black-23.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50254ebfa56aa46a9fdd5d651f9637485068a1adf42270148cd101cdf56e0ad9"}, - {file = "black-23.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:403397c033adbc45c2bd41747da1f7fc7eaa44efbee256b53842470d4ac5a70f"}, - {file = "black-23.9.1-py3-none-any.whl", hash = "sha256:6ccd59584cc834b6d127628713e4b6b968e5f79572da66284532525a042549f9"}, - {file = "black-23.9.1.tar.gz", hash = "sha256:24b6b3ff5c6d9ea08a8888f6977eae858e1f340d7260cf56d70a49823236b62d"}, + {file = "black-24.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6ad001a9ddd9b8dfd1b434d566be39b1cd502802c8d38bbb1ba612afda2ef436"}, + {file = "black-24.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e3a3a092b8b756c643fe45f4624dbd5a389f770a4ac294cf4d0fce6af86addaf"}, + {file = "black-24.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dae79397f367ac8d7adb6c779813328f6d690943f64b32983e896bcccd18cbad"}, + {file = "black-24.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:71d998b73c957444fb7c52096c3843875f4b6b47a54972598741fe9a7f737fcb"}, + {file = "black-24.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8e5537f456a22cf5cfcb2707803431d2feeb82ab3748ade280d6ccd0b40ed2e8"}, + {file = "black-24.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:64e60a7edd71fd542a10a9643bf369bfd2644de95ec71e86790b063aa02ff745"}, + {file = "black-24.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5cd5b4f76056cecce3e69b0d4c228326d2595f506797f40b9233424e2524c070"}, + {file = "black-24.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:64578cf99b6b46a6301bc28bdb89f9d6f9b592b1c5837818a177c98525dbe397"}, + {file = "black-24.4.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f95cece33329dc4aa3b0e1a771c41075812e46cf3d6e3f1dfe3d91ff09826ed2"}, + {file = "black-24.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4396ca365a4310beef84d446ca5016f671b10f07abdba3e4e4304218d2c71d33"}, + {file = "black-24.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44d99dfdf37a2a00a6f7a8dcbd19edf361d056ee51093b2445de7ca09adac965"}, + {file = "black-24.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:21f9407063ec71c5580b8ad975653c66508d6a9f57bd008bb8691d273705adcd"}, + {file = "black-24.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:652e55bb722ca026299eb74e53880ee2315b181dfdd44dca98e43448620ddec1"}, + {file = "black-24.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7f2966b9b2b3b7104fca9d75b2ee856fe3fdd7ed9e47c753a4bb1a675f2caab8"}, + {file = "black-24.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bb9ca06e556a09f7f7177bc7cb604e5ed2d2df1e9119e4f7d2f1f7071c32e5d"}, + {file = "black-24.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:d4e71cdebdc8efeb6deaf5f2deb28325f8614d48426bed118ecc2dcaefb9ebf3"}, + {file = "black-24.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6644f97a7ef6f401a150cca551a1ff97e03c25d8519ee0bbc9b0058772882665"}, + {file = "black-24.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:75a2d0b4f5eb81f7eebc31f788f9830a6ce10a68c91fbe0fade34fff7a2836e6"}, + {file = "black-24.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb949f56a63c5e134dfdca12091e98ffb5fd446293ebae123d10fc1abad00b9e"}, + {file = "black-24.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:7852b05d02b5b9a8c893ab95863ef8986e4dda29af80bbbda94d7aee1abf8702"}, + {file = "black-24.4.0-py3-none-any.whl", hash = "sha256:74eb9b5420e26b42c00a3ff470dc0cd144b80a766128b1771d07643165e08d0e"}, + {file = "black-24.4.0.tar.gz", hash = "sha256:f07b69fda20578367eaebbd670ff8fc653ab181e1ff95d84497f9fa20e7d0641"}, ] [package.dependencies] @@ -137,7 +152,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] +d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -472,6 +487,43 @@ files = [ [package.dependencies] django = ">=2" +[[package]] +name = "django-stubs" +version = "4.2.7" +description = "Mypy stubs for Django" +optional = false +python-versions = ">=3.8" +files = [ + {file = "django-stubs-4.2.7.tar.gz", hash = "sha256:8ccd2ff4ee5adf22b9e3b7b1a516d2e1c2191e9d94e672c35cc2bc3dd61e0f6b"}, + {file = "django_stubs-4.2.7-py3-none-any.whl", hash = "sha256:4cf4de258fa71adc6f2799e983091b9d46cfc67c6eebc68fe111218c9a62b3b8"}, +] + +[package.dependencies] +django = "*" +django-stubs-ext = ">=4.2.7" +tomli = {version = "*", markers = "python_version < \"3.11\""} +types-pytz = "*" +types-PyYAML = "*" +typing-extensions = "*" + +[package.extras] +compatible-mypy = ["mypy (>=1.7.0,<1.8.0)"] + +[[package]] +name = "django-stubs-ext" +version = "4.2.7" +description = "Monkey-patching and extensions for django-stubs" +optional = false +python-versions = ">=3.8" +files = [ + {file = "django-stubs-ext-4.2.7.tar.gz", hash = "sha256:519342ac0849cda1559746c9a563f03ff99f636b0ebe7c14b75e816a00dfddc3"}, + {file = "django_stubs_ext-4.2.7-py3-none-any.whl", hash = "sha256:45a5d102417a412e3606e3c358adb4744988a92b7b58ccf3fd64bddd5d04d14c"}, +] + +[package.dependencies] +django = "*" +typing-extensions = "*" + [[package]] name = "exceptiongroup" version = "1.1.3" @@ -576,16 +628,17 @@ requests = ">2.22.0" [[package]] name = "griffe" -version = "0.36.4" +version = "0.44.0" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." optional = false python-versions = ">=3.8" files = [ - {file = "griffe-0.36.4-py3-none-any.whl", hash = "sha256:4e37a723891fa774fafdd67240571801a1d90d0236562c178707e5c37fb3ebe2"}, - {file = "griffe-0.36.4.tar.gz", hash = "sha256:7b5968f5cc6446637ed0d3ded9de07d6a928f10ccb24116b1dd843635bf1994a"}, + {file = "griffe-0.44.0-py3-none-any.whl", hash = "sha256:8a4471c469ba980b87c843f1168850ce39d0c1d0c7be140dca2480f76c8e5446"}, + {file = "griffe-0.44.0.tar.gz", hash = "sha256:34aee1571042f9bf00529bc715de4516fb6f482b164e90d030300601009e0223"}, ] [package.dependencies] +astunparse = {version = ">=1.6", markers = "python_version < \"3.9\""} colorama = ">=0.4" [[package]] @@ -818,13 +871,13 @@ mkdocs = ">=1.1" [[package]] name = "mkdocs-material" -version = "9.4.4" +version = "9.5.18" description = "Documentation that simply works" optional = false python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.4.4-py3-none-any.whl", hash = "sha256:86fe79253afccc7f085f89a2d8e9e3300f82c4813d9b910d9081ce57a7e68380"}, - {file = "mkdocs_material-9.4.4.tar.gz", hash = "sha256:ab84a7cfaf009c47cd2926cdd7e6040b8cc12c3806cc533e8b16d57bd16d9c47"}, + {file = "mkdocs_material-9.5.18-py3-none-any.whl", hash = "sha256:1e0e27fc9fe239f9064318acf548771a4629d5fd5dfd45444fd80a953fe21eb4"}, + {file = "mkdocs_material-9.5.18.tar.gz", hash = "sha256:a43f470947053fa2405c33995f282d24992c752a50114f23f30da9d8d0c57e62"}, ] [package.dependencies] @@ -832,8 +885,8 @@ babel = ">=2.10,<3.0" colorama = ">=0.4,<1.0" jinja2 = ">=3.0,<4.0" markdown = ">=3.2,<4.0" -mkdocs = ">=1.5.3,<2.0" -mkdocs-material-extensions = ">=1.2,<2.0" +mkdocs = ">=1.5.3,<1.6.0" +mkdocs-material-extensions = ">=1.3,<2.0" paginate = ">=0.5,<1.0" pygments = ">=2.16,<3.0" pymdown-extensions = ">=10.2,<11.0" @@ -841,39 +894,41 @@ regex = ">=2022.4" requests = ">=2.26,<3.0" [package.extras] -git = ["mkdocs-git-committers-plugin-2 (>=1.1,<2.0)", "mkdocs-git-revision-date-localized-plugin (>=1.2,<2.0)"] -imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=9.4,<10.0)"] +git = ["mkdocs-git-committers-plugin-2 (>=1.1,<2.0)", "mkdocs-git-revision-date-localized-plugin (>=1.2.4,<2.0)"] +imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=10.2,<11.0)"] recommended = ["mkdocs-minify-plugin (>=0.7,<1.0)", "mkdocs-redirects (>=1.2,<2.0)", "mkdocs-rss-plugin (>=1.6,<2.0)"] [[package]] name = "mkdocs-material-extensions" -version = "1.2" +version = "1.3.1" description = "Extension pack for Python Markdown and MkDocs Material." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "mkdocs_material_extensions-1.2-py3-none-any.whl", hash = "sha256:c767bd6d6305f6420a50f0b541b0c9966d52068839af97029be14443849fb8a1"}, - {file = "mkdocs_material_extensions-1.2.tar.gz", hash = "sha256:27e2d1ed2d031426a6e10d5ea06989d67e90bb02acd588bc5673106b5ee5eedf"}, + {file = "mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31"}, + {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, ] [[package]] name = "mkdocstrings" -version = "0.23.0" +version = "0.24.3" description = "Automatic documentation from sources, for MkDocs." optional = false python-versions = ">=3.8" files = [ - {file = "mkdocstrings-0.23.0-py3-none-any.whl", hash = "sha256:051fa4014dfcd9ed90254ae91de2dbb4f24e166347dae7be9a997fe16316c65e"}, - {file = "mkdocstrings-0.23.0.tar.gz", hash = "sha256:d9c6a37ffbe7c14a7a54ef1258c70b8d394e6a33a1c80832bce40b9567138d1c"}, + {file = "mkdocstrings-0.24.3-py3-none-any.whl", hash = "sha256:5c9cf2a32958cd161d5428699b79c8b0988856b0d4a8c5baf8395fc1bf4087c3"}, + {file = "mkdocstrings-0.24.3.tar.gz", hash = "sha256:f327b234eb8d2551a306735436e157d0a22d45f79963c60a8b585d5f7a94c1d2"}, ] [package.dependencies] +click = ">=7.0" importlib-metadata = {version = ">=4.6", markers = "python_version < \"3.10\""} Jinja2 = ">=2.11.1" Markdown = ">=3.3" MarkupSafe = ">=1.1" -mkdocs = ">=1.2" +mkdocs = ">=1.4" mkdocs-autorefs = ">=0.3.1" +platformdirs = ">=2.2.0" pymdown-extensions = ">=6.3" typing-extensions = {version = ">=4.1", markers = "python_version < \"3.10\""} @@ -884,18 +939,18 @@ python-legacy = ["mkdocstrings-python-legacy (>=0.2.1)"] [[package]] name = "mkdocstrings-python" -version = "1.7.2" +version = "1.9.2" description = "A Python handler for mkdocstrings." optional = false python-versions = ">=3.8" files = [ - {file = "mkdocstrings_python-1.7.2-py3-none-any.whl", hash = "sha256:2d005729a90f1b86d6d71fad4953d787140996adec5b00a25fafc6ee48e1b79a"}, - {file = "mkdocstrings_python-1.7.2.tar.gz", hash = "sha256:75b6af86f9dcdc2d864072d8fed5b1d45ad94dd2ce97843ef52ca87ad53d9b26"}, + {file = "mkdocstrings_python-1.9.2-py3-none-any.whl", hash = "sha256:96d82f6424e08db6245e4a15ca95619f4ecd0ddd254c0aa590d4181814e16ee5"}, + {file = "mkdocstrings_python-1.9.2.tar.gz", hash = "sha256:8546a103c9b22e1778c72c887696acc39a6635fedde3c912ce00f967518a8847"}, ] [package.dependencies] -griffe = ">=0.35" -mkdocstrings = ">=0.20" +griffe = ">=0.37" +mkdocstrings = ">=0.24.2" [[package]] name = "mypy-extensions" @@ -908,6 +963,20 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] +[[package]] +name = "nodeenv" +version = "1.8.0" +description = "Node.js virtual environment builder" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +files = [ + {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, + {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, +] + +[package.dependencies] +setuptools = "*" + [[package]] name = "packaging" version = "23.2" @@ -1135,6 +1204,24 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} docs = ["furo (>=2023.8.19)", "sphinx (<7.2)", "sphinx-autodoc-typehints (>=1.24)"] testing = ["covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "setuptools (>=68.1.2)", "wheel (>=0.41.2)"] +[[package]] +name = "pyright" +version = "1.1.358" +description = "Command line wrapper for pyright" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyright-1.1.358-py3-none-any.whl", hash = "sha256:0995b6a95eb11bd26f093cd5dee3d5e7258441b1b94d4a171b5dc5b79a1d4f4e"}, + {file = "pyright-1.1.358.tar.gz", hash = "sha256:185524a8d52f6f14bbd3b290b92ad905f25b964dddc9e7148aad760bd35c9f60"}, +] + +[package.dependencies] +nodeenv = ">=1.6.0" + +[package.extras] +all = ["twine (>=3.4.1)"] +dev = ["twine (>=3.4.1)"] + [[package]] name = "pytest" version = "7.4.2" @@ -1210,17 +1297,17 @@ python-dotenv = ">=0.9.1" [[package]] name = "pytest-mock" -version = "3.10.0" +version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-mock-3.10.0.tar.gz", hash = "sha256:fbbdb085ef7c252a326fd8cdcac0aa3b1333d8811f131bdcc701002e1be7ed4f"}, - {file = "pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, + {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, + {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, ] [package.dependencies] -pytest = ">=5.0" +pytest = ">=6.2.5" [package.extras] dev = ["pre-commit", "pytest-asyncio", "tox"] @@ -1536,28 +1623,28 @@ requests = ">=2.0.1,<3.0.0" [[package]] name = "ruff" -version = "0.0.292" -description = "An extremely fast Python linter, written in Rust." +version = "0.3.7" +description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.0.292-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:02f29db018c9d474270c704e6c6b13b18ed0ecac82761e4fcf0faa3728430c96"}, - {file = "ruff-0.0.292-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:69654e564342f507edfa09ee6897883ca76e331d4bbc3676d8a8403838e9fade"}, - {file = "ruff-0.0.292-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c3c91859a9b845c33778f11902e7b26440d64b9d5110edd4e4fa1726c41e0a4"}, - {file = "ruff-0.0.292-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f4476f1243af2d8c29da5f235c13dca52177117935e1f9393f9d90f9833f69e4"}, - {file = "ruff-0.0.292-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be8eb50eaf8648070b8e58ece8e69c9322d34afe367eec4210fdee9a555e4ca7"}, - {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9889bac18a0c07018aac75ef6c1e6511d8411724d67cb879103b01758e110a81"}, - {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6bdfabd4334684a4418b99b3118793f2c13bb67bf1540a769d7816410402a205"}, - {file = "ruff-0.0.292-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa7c77c53bfcd75dbcd4d1f42d6cabf2485d2e1ee0678da850f08e1ab13081a8"}, - {file = "ruff-0.0.292-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e087b24d0d849c5c81516ec740bf4fd48bf363cfb104545464e0fca749b6af9"}, - {file = "ruff-0.0.292-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f160b5ec26be32362d0774964e218f3fcf0a7da299f7e220ef45ae9e3e67101a"}, - {file = "ruff-0.0.292-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:ac153eee6dd4444501c4bb92bff866491d4bfb01ce26dd2fff7ca472c8df9ad0"}, - {file = "ruff-0.0.292-py3-none-musllinux_1_2_i686.whl", hash = "sha256:87616771e72820800b8faea82edd858324b29bb99a920d6aa3d3949dd3f88fb0"}, - {file = "ruff-0.0.292-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b76deb3bdbea2ef97db286cf953488745dd6424c122d275f05836c53f62d4016"}, - {file = "ruff-0.0.292-py3-none-win32.whl", hash = "sha256:e854b05408f7a8033a027e4b1c7f9889563dd2aca545d13d06711e5c39c3d003"}, - {file = "ruff-0.0.292-py3-none-win_amd64.whl", hash = "sha256:f27282bedfd04d4c3492e5c3398360c9d86a295be00eccc63914438b4ac8a83c"}, - {file = "ruff-0.0.292-py3-none-win_arm64.whl", hash = "sha256:7f67a69c8f12fbc8daf6ae6d36705037bde315abf8b82b6e1f4c9e74eb750f68"}, - {file = "ruff-0.0.292.tar.gz", hash = "sha256:1093449e37dd1e9b813798f6ad70932b57cf614e5c2b5c51005bf67d55db33ac"}, + {file = "ruff-0.3.7-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:0e8377cccb2f07abd25e84fc5b2cbe48eeb0fea9f1719cad7caedb061d70e5ce"}, + {file = "ruff-0.3.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:15a4d1cc1e64e556fa0d67bfd388fed416b7f3b26d5d1c3e7d192c897e39ba4b"}, + {file = "ruff-0.3.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d28bdf3d7dc71dd46929fafeec98ba89b7c3550c3f0978e36389b5631b793663"}, + {file = "ruff-0.3.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:379b67d4f49774ba679593b232dcd90d9e10f04d96e3c8ce4a28037ae473f7bb"}, + {file = "ruff-0.3.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c060aea8ad5ef21cdfbbe05475ab5104ce7827b639a78dd55383a6e9895b7c51"}, + {file = "ruff-0.3.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:ebf8f615dde968272d70502c083ebf963b6781aacd3079081e03b32adfe4d58a"}, + {file = "ruff-0.3.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d48098bd8f5c38897b03604f5428901b65e3c97d40b3952e38637b5404b739a2"}, + {file = "ruff-0.3.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da8a4fda219bf9024692b1bc68c9cff4b80507879ada8769dc7e985755d662ea"}, + {file = "ruff-0.3.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c44e0149f1d8b48c4d5c33d88c677a4aa22fd09b1683d6a7ff55b816b5d074f"}, + {file = "ruff-0.3.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3050ec0af72b709a62ecc2aca941b9cd479a7bf2b36cc4562f0033d688e44fa1"}, + {file = "ruff-0.3.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a29cc38e4c1ab00da18a3f6777f8b50099d73326981bb7d182e54a9a21bb4ff7"}, + {file = "ruff-0.3.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b15cc59c19edca917f51b1956637db47e200b0fc5e6e1878233d3a938384b0b"}, + {file = "ruff-0.3.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:e491045781b1e38b72c91247cf4634f040f8d0cb3e6d3d64d38dcf43616650b4"}, + {file = "ruff-0.3.7-py3-none-win32.whl", hash = "sha256:bc931de87593d64fad3a22e201e55ad76271f1d5bfc44e1a1887edd0903c7d9f"}, + {file = "ruff-0.3.7-py3-none-win_amd64.whl", hash = "sha256:5ef0e501e1e39f35e03c2acb1d1238c595b8bb36cf7a170e7c1df1b73da00e74"}, + {file = "ruff-0.3.7-py3-none-win_arm64.whl", hash = "sha256:789e144f6dc7019d1f92a812891c645274ed08af6037d11fc65fcbc183b7d59f"}, + {file = "ruff-0.3.7.tar.gz", hash = "sha256:d5c1aebee5162c2226784800ae031f660c350e7a3402c4d1f8ea4e97e232e3ba"}, ] [[package]] @@ -1680,15 +1767,37 @@ files = [ {file = "types_python_dateutil-2.8.19.14-py3-none-any.whl", hash = "sha256:f977b8de27787639986b4e28963263fd0e5158942b3ecef91b9335c130cb1ce9"}, ] +[[package]] +name = "types-pytz" +version = "2024.1.0.20240417" +description = "Typing stubs for pytz" +optional = false +python-versions = ">=3.8" +files = [ + {file = "types-pytz-2024.1.0.20240417.tar.gz", hash = "sha256:6810c8a1f68f21fdf0f4f374a432487c77645a0ac0b31de4bf4690cf21ad3981"}, + {file = "types_pytz-2024.1.0.20240417-py3-none-any.whl", hash = "sha256:8335d443310e2db7b74e007414e74c4f53b67452c0cb0d228ca359ccfba59659"}, +] + +[[package]] +name = "types-pyyaml" +version = "6.0.12.20240311" +description = "Typing stubs for PyYAML" +optional = false +python-versions = ">=3.8" +files = [ + {file = "types-PyYAML-6.0.12.20240311.tar.gz", hash = "sha256:a9e0f0f88dc835739b0c1ca51ee90d04ca2a897a71af79de9aec5f38cb0a5342"}, + {file = "types_PyYAML-6.0.12.20240311-py3-none-any.whl", hash = "sha256:b845b06a1c7e54b8e5b4c683043de0d9caf205e7434b3edc678ff2411979b8f6"}, +] + [[package]] name = "typing-extensions" -version = "4.8.0" +version = "4.11.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, - {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, + {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, + {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, ] [[package]] @@ -1789,6 +1898,20 @@ files = [ {file = "wcwidth-0.2.8.tar.gz", hash = "sha256:8705c569999ffbb4f6a87c6d1b80f324bd6db952f5eb0b95bc07517f4c1813d4"}, ] +[[package]] +name = "wheel" +version = "0.43.0" +description = "A built-package format for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "wheel-0.43.0-py3-none-any.whl", hash = "sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81"}, + {file = "wheel-0.43.0.tar.gz", hash = "sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85"}, +] + +[package.extras] +test = ["pytest (>=6.0.0)", "setuptools (>=65)"] + [[package]] name = "zipp" version = "3.17.0" @@ -1807,4 +1930,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8.0,<4" -content-hash = "b7b3aae2939b0f8dddcdf4d385ce26fa96066d6135121ddd354d2a11887b8f0b" +content-hash = "2849b4e7efc5132992e94121662547452f2cca377fada748150fd681eb5fc1f1" diff --git a/pyproject.toml b/pyproject.toml index b1da4cb..ebfa66e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,10 +2,6 @@ requires = ["poetry_core>=1.0.0"] build-backend = "poetry.core.masonry.api" -[tool.black] -line-length = 99 -target-version = ['py38'] - [tool.coverage.run] branch = true source = ["pglock"] @@ -15,8 +11,10 @@ exclude_lines = [ "pragma: no cover", "raise AssertionError", "raise NotImplementedError", - " pass", - "pytest.mark.skip" + "pass", + "pytest.mark.skip", + "@(typing\\.)?overload", + "if TYPE_CHECKING:", ] show_missing = true fail_under = 100 @@ -39,6 +37,7 @@ classifiers = [ "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", "Framework :: Django :: 5.0", + "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", @@ -49,6 +48,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Framework :: Django", + ] license = "BSD-3-Clause" readme = "README.md" @@ -62,35 +62,50 @@ django = ">=3" django-pgactivity = ">=1.2,<2" [tool.poetry.dev-dependencies] -black = "23.9.1" -dj-database-url = "2.1.0" git-tidy = "1.2.0" -psycopg2-binary = "2.9.9" pytest = "7.4.2" pytest-cov = "4.1.0" pytest-dotenv = "0.5.2" pytest-django = "4.5.2" -pytest-mock = "3.10.0" +pytest-mock = "3.14.0" pytest-reraise = "2.1.2" django-dynamic-fixture = "4.0.1" django-extensions = "3.2.3" tox = "4.11.3" -ruff = "0.0.292" +ruff = "0.3.7" +pyright = "1.1.358" mkdocs = "1.5.3" -mkdocs-material = "9.4.4" -mkdocstrings-python = "1.7.2" +black = "24.4.0" +mkdocs-material = "9.5.18" +mkdocstrings-python = "1.9.2" footing = "*" setuptools = "*" poetry-core = "*" +typing-extensions = "4.11.0" +django-stubs = "4.2.7" +dj-database-url = "2.1.0" +psycopg2-binary = "2.9.9" [tool.pytest.ini_options] xfail_strict = true -addopts = "--reuse-db" testpaths = "pglock/tests" norecursedirs = ".venv" +addopts = "--reuse-db" DJANGO_SETTINGS_MODULE = "settings" [tool.ruff] -select = ["E", "F", "B", "I", "G", "C4"] +lint.select = ["E", "F", "B", "I", "G", "C4"] line-length = 99 target-version = "py38" + +[tool.pyright] +exclude = [ + "**/node_modules", + "**/__pycache__", + "src/experimental", + "src/typestubs", + "**/migrations/**", + "**/tests/**", +] +pythonVersion = "3.8" +typeCheckingMode = "standard" diff --git a/settings.py b/settings.py index a5923d9..3d2860f 100644 --- a/settings.py +++ b/settings.py @@ -29,3 +29,5 @@ "terminate": True, }, } + +USE_TZ = False diff --git a/tox.ini b/tox.ini index 0afdb6a..7e87b15 100644 --- a/tox.ini +++ b/tox.ini @@ -9,21 +9,21 @@ envlist = report [testenv] -install_command = pip install {opts} --no-compile {packages} -deps = - django32: Django>=3.2,<3.3 - django42: Django>=4.2,<4.3 - django50: Django>=5.0rc1,<5.1 - psycopg2: psycopg2-binary - psycopg3: psycopg[binary] allowlist_externals = poetry bash grep +skip_install = true passenv = DATABASE_URL PYTHONDONTWRITEBYTECODE -skip_install = true +install_command = pip install {opts} --no-compile {packages} +deps = + django32: Django>=3.2,<3.3 + django42: Django>=4.2,<4.3 + django50: Django>=5.0rc1,<5.1 + psycopg2: psycopg2-binary + psycopg3: psycopg[binary] commands = bash -c 'poetry export --with dev --without-hashes -f requirements.txt | grep -v "^[dD]jango==" | grep -v "^psycopg2-binary==" | pip install --no-compile -q --no-deps -r /dev/stdin' pip install --no-compile -q --no-deps --no-build-isolation -e .