From 4df036dc9c3f55e9d980d6e60289608c4588137d Mon Sep 17 00:00:00 2001 From: Ilan Steemers Date: Thu, 10 Jun 2021 15:42:21 +0200 Subject: [PATCH] Autofield (#574) * Adds autofield default * linting * Updates packages --- django_q/apps.py | 1 + django_q/cluster.py | 2 +- django_q/tests/test_scheduler.py | 6 +++--- poetry.lock | 14 +++++++------- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/django_q/apps.py b/django_q/apps.py index 1f27759..abfb0b2 100644 --- a/django_q/apps.py +++ b/django_q/apps.py @@ -6,6 +6,7 @@ from django_q.conf import Conf class DjangoQConfig(AppConfig): name = "django_q" verbose_name = Conf.LABEL + default_auto_field = "django.db.models.AutoField" def ready(self): from django_q.signals import call_hook diff --git a/django_q/cluster.py b/django_q/cluster.py index 1bea5e1..326d735 100644 --- a/django_q/cluster.py +++ b/django_q/cluster.py @@ -745,7 +745,7 @@ def rss_check(): def localtime() -> datetime: - """" Override for timezone.localtime to deal with naive times and local times""" + """ Override for timezone.localtime to deal with naive times and local times""" if settings.USE_TZ: return timezone.localtime() return datetime.now() diff --git a/django_q/tests/test_scheduler.py b/django_q/tests/test_scheduler.py index 5f71853..8be35ea 100644 --- a/django_q/tests/test_scheduler.py +++ b/django_q/tests/test_scheduler.py @@ -283,7 +283,7 @@ def test_scheduler(broker, monkeypatch): ) @pytest.mark.django_db def test_scheduler_atomic_transaction_must_specify_a_database_when_no_replicas_are_used( - orm_no_replica_broker: Broker, + orm_no_replica_broker: Broker, ): """ GIVEN a environment without a read replica database @@ -302,7 +302,7 @@ def test_scheduler_atomic_transaction_must_specify_a_database_when_no_replicas_a ) @pytest.mark.django_db def test_scheduler_atomic_transaction_must_specify_no_database_when_read_write_replicas_are_used( - orm_replica_broker: Broker, + orm_replica_broker: Broker, ): """ GIVEN a environment with a read/write configured replica database @@ -320,7 +320,7 @@ def test_scheduler_atomic_transaction_must_specify_no_database_when_read_write_r ) @pytest.mark.django_db def test_scheduler_atomic_transaction_must_specify_the_database_based_on_router_redirection( - orm_no_replica_broker: Broker, + orm_no_replica_broker: Broker, ): """ GIVEN a environment without a read replica database diff --git a/poetry.lock b/poetry.lock index 1eb4dfe..c21a05a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -121,20 +121,20 @@ wcwidth = ">=0.1.4" [[package]] name = "boto3" -version = "1.17.89" +version = "1.17.91" description = "The AWS SDK for Python" category = "main" optional = true python-versions = ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.dependencies] -botocore = ">=1.20.89,<1.21.0" +botocore = ">=1.20.91,<1.21.0" jmespath = ">=0.7.1,<1.0.0" s3transfer = ">=0.4.0,<0.5.0" [[package]] name = "botocore" -version = "1.20.89" +version = "1.20.91" description = "Low-level, data-driven core of boto 3." category = "main" optional = true @@ -963,12 +963,12 @@ blessed = [ {file = "blessed-1.18.0.tar.gz", hash = "sha256:1312879f971330a1b7f2c6341f2ae7e2cbac244bfc9d0ecfbbecd4b0293bc755"}, ] boto3 = [ - {file = "boto3-1.17.89-py2.py3-none-any.whl", hash = "sha256:1f02cd513b130f9cd86c99836de6a0a5f78ea55110bdbc9011d9d78ff0fd3204"}, - {file = "boto3-1.17.89.tar.gz", hash = "sha256:06d8dca85a0bb66b7bf2721745895d44691c78dbe7eb3b146702aff85e34af34"}, + {file = "boto3-1.17.91-py2.py3-none-any.whl", hash = "sha256:b0808a58c54c595b6cc6271cbc14a09bb89f0951ca9e8b105d1e94bef3ed24a0"}, + {file = "boto3-1.17.91.tar.gz", hash = "sha256:4cfab400cd9ca9b27b7dffb43f5675525ea5d36c81223d64d15542fdb16cdf7e"}, ] botocore = [ - {file = "botocore-1.20.89-py2.py3-none-any.whl", hash = "sha256:e112f9a45db1c5a42f787e4b228a35da6e823bcba70f43f43005b4fb58066446"}, - {file = "botocore-1.20.89.tar.gz", hash = "sha256:ce0fa8bc260ad187824052805d224cee239d953bb4bfb1e52cf35ad79481b316"}, + {file = "botocore-1.20.91-py2.py3-none-any.whl", hash = "sha256:cbd0d5d57ec96319f8629347631b00cde72a9ae8826d36ad172c2ab61b299cb1"}, + {file = "botocore-1.20.91.tar.gz", hash = "sha256:462e75419e6537efb2709b7eb5b8c7ade007d30209416f0476bd7c51a2ddc78d"}, ] certifi = [ {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"},