From 24699e786c239a0a75896f62c2ece00809e915d7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Aug 2024 05:52:04 +0200 Subject: [PATCH 1/3] python312Packages.django-filter: 24.2 -> 24.3 https://github.com/carltongibson/django-filter/blob/24.3/CHANGES.rst --- .../python-modules/django-filter/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/django-filter/default.nix b/pkgs/development/python-modules/django-filter/default.nix index f1d0f1a5aaeb..212d5318b3fd 100644 --- a/pkgs/development/python-modules/django-filter/default.nix +++ b/pkgs/development/python-modules/django-filter/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, flit-core, django, djangorestframework, @@ -12,12 +12,14 @@ buildPythonPackage rec { pname = "django-filter"; - version = "24.2"; + version = "24.3"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-SOX8HaPM1soNX5u1UJc1GM6Xek7d6dKooVSn9PC5+W4="; + src = fetchFromGitHub { + owner = "carltongibson"; + repo = "django-filter"; + rev = "refs/tags/${version}"; + hash = "sha256-4q/x9FO9ErKnGeJDEXDMcvUKA4nlA7nkwwM2xj3WGWs="; }; build-system = [ flit-core ]; From 132814bc5a3f874fc7b94870308913881746269b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Aug 2024 06:32:19 +0200 Subject: [PATCH 2/3] pretix: 2024.7.1 -> 2024.8.0 https://pretix.eu/about/en/blog/20240828-release-2024-8/ https://github.com/pretix/pretix/compare/refs/tags/v2024.7.1...v2024.8.0 --- pkgs/by-name/pr/pretix/package.nix | 14 +++----- pkgs/by-name/pr/pretix/pr4362.patch | 50 ----------------------------- 2 files changed, 5 insertions(+), 59 deletions(-) delete mode 100644 pkgs/by-name/pr/pretix/pr4362.patch diff --git a/pkgs/by-name/pr/pretix/package.nix b/pkgs/by-name/pr/pretix/package.nix index 4ea10340adb1..ebcab4bda0cc 100644 --- a/pkgs/by-name/pr/pretix/package.nix +++ b/pkgs/by-name/pr/pretix/package.nix @@ -51,13 +51,13 @@ let }; pname = "pretix"; - version = "2024.7.1"; + version = "2024.8.0"; src = fetchFromGitHub { owner = "pretix"; repo = "pretix"; rev = "refs/tags/v${version}"; - hash = "sha256-lOcV3+CNGyKR0QiQXr/hP/9rhWauEvnSLOvxmQa/DSg="; + hash = "sha256-3flZoDzS3SI7nAi1skEqVPXJM9vSBrGN+F0esbYKQDw="; }; npmDeps = buildNpmPackage { @@ -65,7 +65,7 @@ let inherit version src; sourceRoot = "${src.name}/src/pretix/static/npm_dir"; - npmDepsHash = "sha256-BfvKuwB5VLX09Lxji+EpMBvZeKTIQvptVtrHSRYY+14="; + npmDepsHash = "sha256-ZS+80LLyS2UBnVGRclYhwVwF1BR17D/79F2moQtqh80="; dontBuild = true; @@ -87,17 +87,15 @@ python.pkgs.buildPythonApplication rec { # Discover pretix.plugin entrypoints during build and add them into # INSTALLED_APPS, so that their static files are collected. ./plugin-build.patch - - # https://github.com/pretix/pretix/pull/4362 - # Fix TOCTOU race in directory creation - ./pr4362.patch ]; pythonRelaxDeps = [ "importlib-metadata" "kombu" + "markdown" "pillow" "protobuf" + "pyjwt" "python-bidi" "requests" "sentry-sdk" @@ -140,7 +138,6 @@ python.pkgs.buildPythonApplication rec { cryptography css-inline defusedcsv - dj-static django django-bootstrap3 django-compressor @@ -199,7 +196,6 @@ python.pkgs.buildPythonApplication rec { sentry-sdk sepaxml slimit - static3 stripe text-unidecode tlds diff --git a/pkgs/by-name/pr/pretix/pr4362.patch b/pkgs/by-name/pr/pretix/pr4362.patch deleted file mode 100644 index 97d4a20c2239..000000000000 --- a/pkgs/by-name/pr/pretix/pr4362.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 5688f3624005d02803f2a434db025f367b4963d3 Mon Sep 17 00:00:00 2001 -From: Martin Weinelt -Date: Thu, 1 Aug 2024 02:39:59 +0200 -Subject: [PATCH] Prevent race condition in directory creation - -Checking whether a path does not exist before trying to create it does -not follow the Python paradigm of asking for forgiveness, rather than -permission, and opens up a time-of-check to time-of-use race. ---- - src/pretix/settings.py | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/src/pretix/settings.py b/src/pretix/settings.py -index 81ff644be..854187f05 100644 ---- a/src/pretix/settings.py -+++ b/src/pretix/settings.py -@@ -37,6 +37,7 @@ import configparser - import logging - import os - import sys -+from contextlib import suppress - from json import loads - from urllib.parse import urlparse - -@@ -70,14 +71,14 @@ MEDIA_ROOT = os.path.join(DATA_DIR, 'media') - PROFILE_DIR = os.path.join(DATA_DIR, 'profiles') - CACHE_DIR = config.get('pretix', 'cachedir', fallback=os.path.join(DATA_DIR, 'cache')) - --if not os.path.exists(DATA_DIR): -- os.mkdir(DATA_DIR) --if not os.path.exists(LOG_DIR): -- os.mkdir(LOG_DIR) --if not os.path.exists(MEDIA_ROOT): -- os.mkdir(MEDIA_ROOT) --if not os.path.exists(CACHE_DIR): -- os.mkdir(CACHE_DIR) -+def mkdir(path): -+ with suppress(FileExistsError): -+ os.mkdir(path) -+ -+mkdir(DATA_DIR) -+mkdir(LOG_DIR) -+mkdir(MEDIA_ROOT) -+mkdir(CACHE_DIR) - - if config.has_option('django', 'secret'): - SECRET_KEY = config.get('django', 'secret') --- -2.45.2 - From fab2e0a071272120badc554d18afb84652532c3e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Aug 2024 13:32:02 +0200 Subject: [PATCH 3/3] pretix.plugins.zugferd: 2.2.0 -> 2.2.1 https://github.com/pretix/pretix-zugferd/compare/v2.2.0...v2.2.1 --- pkgs/by-name/pr/pretix/plugins/zugferd.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pr/pretix/plugins/zugferd.nix b/pkgs/by-name/pr/pretix/plugins/zugferd.nix index e96193a52b50..e7aeb78b346f 100644 --- a/pkgs/by-name/pr/pretix/plugins/zugferd.nix +++ b/pkgs/by-name/pr/pretix/plugins/zugferd.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "pretix-zugferd"; - version = "2.2.0"; + version = "2.2.1"; pyproject = true; src = fetchFromGitHub { owner = "pretix"; repo = "pretix-zugferd"; rev = "v${version}"; - hash = "sha256-ozFDNIA+0feHrHHvxcf+6Jh4L83svmPEE/rerd4Yim8="; + hash = "sha256-AJbrx1n32YAZnJGYX67qqaEnOeegYfSUEekvQnmjt+0="; }; postPatch = ''