python3Packages.icalendar: 7.2.0 -> 7.2.2 (#545121)
This commit is contained in:
@@ -9,20 +9,23 @@
|
||||
python-dateutil,
|
||||
pytz,
|
||||
setuptools,
|
||||
pyprojectVersionPatchHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "django-scheduler";
|
||||
version = "1.0";
|
||||
version = "0.11.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "llazzaro";
|
||||
repo = "django-scheduler";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-TgIp2oqju3O6zPp3WMEB9HeNgAJILNkWWfbDFmMQ3eA=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-VdnKXyXGNPlOH50s8vPmF1A6BinntC1i+8v5gup7mts=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pyprojectVersionPatchHook ];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@@ -41,31 +44,13 @@ buildPythonPackage rec {
|
||||
export DJANGO_SETTINGS_MODULE=tests.settings
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Remove in Django 5.1
|
||||
# https://github.com/llazzaro/django-scheduler/pull/567
|
||||
./index_together.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Remove in Django 5.1
|
||||
substituteInPlace tests/settings.py \
|
||||
--replace-fail "SHA1PasswordHasher" "PBKDF2PasswordHasher"
|
||||
'';
|
||||
|
||||
disabledTests = lib.optionals (lib.versionAtLeast django.version "5.1") [
|
||||
# test_delete_event_authenticated_user - AssertionError: 302 != 200
|
||||
"test_delete_event_authenticated_user"
|
||||
"test_event_creation_authenticated_user"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "schedule" ];
|
||||
|
||||
meta = {
|
||||
description = "Calendar app for Django";
|
||||
homepage = "https://github.com/llazzaro/django-scheduler";
|
||||
changelog = "https://github.com/llazzaro/django-scheduler/releases/tag/${src.tag}";
|
||||
changelog = "https://github.com/llazzaro/django-scheduler/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ derdennisop ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
From d691550163941db6dbcec2f347fee4d3941615a0 Mon Sep 17 00:00:00 2001
|
||||
From: Robin <robin@whoisearth.com>
|
||||
Date: Wed, 1 Jan 2025 10:31:44 -0500
|
||||
Subject: [PATCH 1/2] Update calendars.py
|
||||
|
||||
Django 5.1 ... index_together deprecated.
|
||||
---
|
||||
schedule/models/calendars.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/schedule/models/calendars.py b/schedule/models/calendars.py
|
||||
index 81f8a7de..d37097a7 100644
|
||||
--- a/schedule/models/calendars.py
|
||||
+++ b/schedule/models/calendars.py
|
||||
@@ -231,7 +231,7 @@ class CalendarRelation(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _("calendar relation")
|
||||
verbose_name_plural = _("calendar relations")
|
||||
- index_together = [("content_type", "object_id")]
|
||||
+ indexes = [models.Index(fields=["content_type", "object_id"])]
|
||||
|
||||
def __str__(self):
|
||||
return "{} - {}".format(self.calendar, self.content_object)
|
||||
|
||||
From 768d2d3842ce6af8115741ef5758a72ab4659491 Mon Sep 17 00:00:00 2001
|
||||
From: Robin <robin@whoisearth.com>
|
||||
Date: Wed, 1 Jan 2025 10:32:56 -0500
|
||||
Subject: [PATCH 2/2] Update events.py
|
||||
|
||||
Django 5.1 .... index_together deprecated
|
||||
---
|
||||
schedule/models/events.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/schedule/models/events.py b/schedule/models/events.py
|
||||
index bf6fa5f1..bc9671c5 100644
|
||||
--- a/schedule/models/events.py
|
||||
+++ b/schedule/models/events.py
|
||||
@@ -92,7 +92,7 @@ class Event(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _("event")
|
||||
verbose_name_plural = _("events")
|
||||
- index_together = (("start", "end"),)
|
||||
+ indexes = [models.Index(fields=["start", "end"])]
|
||||
|
||||
def __str__(self):
|
||||
return gettext("%(title)s: %(start)s - %(end)s") % {
|
||||
@@ -571,7 +571,7 @@ class EventRelation(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _("event relation")
|
||||
verbose_name_plural = _("event relations")
|
||||
- index_together = [("content_type", "object_id")]
|
||||
+ indexes = [models.Index(fields=["content_type", "object_id"])]
|
||||
|
||||
def __str__(self):
|
||||
return "{}({})-{}".format(
|
||||
@@ -594,7 +594,7 @@ class Occurrence(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _("occurrence")
|
||||
verbose_name_plural = _("occurrences")
|
||||
- index_together = (("start", "end"),)
|
||||
+ indexes = [models.Index(fields=["start", "end"])]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
replaceVars,
|
||||
pythonOlder,
|
||||
hatch-vcs,
|
||||
hatchling,
|
||||
@@ -14,16 +13,16 @@
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "7.2.0";
|
||||
buildPythonPackage (finalAttrs: {
|
||||
version = "7.2.2";
|
||||
pname = "icalendar";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "collective";
|
||||
repo = "icalendar";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-0NKNbWigZ3BOfKBM8Q+XrOdoFBOF5Lu4XujJcYCMuMw=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-QDxyMotlG50khBP9luRwoXa9YyZ5qOA/vbdHMwFXv3g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -58,11 +57,11 @@ buildPythonPackage rec {
|
||||
enabledTestPaths = [ "src/icalendar" ];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/collective/icalendar/blob/${src.tag}/CHANGES.rst";
|
||||
changelog = "https://github.com/collective/icalendar/blob/${finalAttrs.src.tag}/CHANGES.rst";
|
||||
description = "Parser/generator of iCalendar files";
|
||||
mainProgram = "icalendar";
|
||||
homepage = "https://github.com/collective/icalendar";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ olcai ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user