diff --git a/.github/contributors.json b/.github/contributors.json index 7a029c764..013d2c99d 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1473,5 +1473,10 @@ "name": "Jakub Boukal", "github_login": "SukiCZ", "twitter_username": "" + }, + { + "name": "Christian Jauvin", + "github_login": "cjauvin", + "twitter_username": "" } ] \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a302a6664..c01710499 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.3" + rev: "v3.1.0" hooks: - id: prettier args: ["--tab-width", "2"] diff --git a/CHANGELOG.md b/CHANGELOG.md index 9405e5444..e7a89380c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,28 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.11.20 + + +### Fixed + +- Fix bug with social account adapter name override, in very specific conditions ([#4650](https://github.com/cookiecutter/cookiecutter-django/pull/4650)) + +### Updated + +- Update django-cors-headers to 4.3.1 ([#4684](https://github.com/cookiecutter/cookiecutter-django/pull/4684)) + +- Update psycopg to 3.1.13 ([#4685](https://github.com/cookiecutter/cookiecutter-django/pull/4685)) + +## 2023.11.14 + + +### Updated + +- Update sentry-sdk to 1.35.0 ([#4681](https://github.com/cookiecutter/cookiecutter-django/pull/4681)) + +- Auto-update pre-commit hooks ([#4683](https://github.com/cookiecutter/cookiecutter-django/pull/4683)) + ## 2023.11.11 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 070199124..98d8b32f9 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -509,6 +509,13 @@ Listed in alphabetical order. + + Christian Jauvin + + cjauvin + + + Christopher Clarke diff --git a/requirements.txt b/requirements.txt index 0e2c84421..67553f687 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ pre-commit==3.5.0 # ------------------------------------------------------------------------------ tox==4.11.3 pytest==7.4.3 -pytest-xdist==3.3.1 +pytest-xdist==3.4.0 pytest-cookies==0.7.0 pytest-instafail==0.5.0 pyyaml==6.0.1 diff --git a/setup.py b/setup.py index 658cbb69b..3266981c7 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.11.11" +version = "2023.11.20" with open("README.md") as readme_file: long_description = readme_file.read() diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index dfff5e696..3601ebce4 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.3 + rev: v3.1.0 hooks: - id: prettier args: ['--tab-width', '2', '--single-quote'] diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index f8129e7fc..3c1694ba9 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -41,7 +41,7 @@ django-redis==5.4.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} # Django REST Framework djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework -django-cors-headers==4.3.0 # https://github.com/adamchainz/django-cors-headers +django-cors-headers==4.3.1 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation drf-spectacular==0.26.5 # https://github.com/tfranzel/drf-spectacular {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 65f7fbdc7..78ffc43d7 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -3,9 +3,9 @@ Werkzeug[watchdog]==3.0.1 # https://github.com/pallets/werkzeug ipdb==0.13.13 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} -psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg +psycopg[c]==3.1.13 # https://github.com/psycopg/psycopg {%- else %} -psycopg[binary]==3.1.12 # https://github.com/psycopg/psycopg +psycopg[binary]==3.1.13 # https://github.com/psycopg/psycopg {%- endif %} {%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %} watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 40e6df006..2a17f253e 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -3,12 +3,12 @@ -r base.txt gunicorn==21.2.0 # https://github.com/benoitc/gunicorn -psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg +psycopg[c]==3.1.13 # https://github.com/psycopg/psycopg {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.34.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.35.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py index c5c824bda..874ad61d9 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py @@ -27,11 +27,12 @@ class SocialAccountAdapter(DefaultSocialAccountAdapter): See: https://django-allauth.readthedocs.io/en/latest/advanced.html?#creating-and-populating-user-instances """ - user = sociallogin.user - if name := data.get("name"): - user.name = name - elif first_name := data.get("first_name"): - user.name = first_name - if last_name := data.get("last_name"): - user.name += f" {last_name}" - return super().populate_user(request, sociallogin, data) + user = super().populate_user(request, sociallogin, data) + if not user.name: + if name := data.get("name"): + user.name = name + elif first_name := data.get("first_name"): + user.name = first_name + if last_name := data.get("last_name"): + user.name += f" {last_name}" + return user