From 8e188303f67a96ac25c4e7dfe92c6fc5e9ad872c Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Wed, 18 Dec 2024 18:32:39 -0300 Subject: [PATCH 01/40] feat(admin): add date_created to ProcessingQueueAdmin and PacerFetchQueueAdmin Both admins now support filtering by date_created, and they display the date_created in the list. --- cl/recap/admin.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/cl/recap/admin.py b/cl/recap/admin.py index 73391d39dd..e0af2c367a 100644 --- a/cl/recap/admin.py +++ b/cl/recap/admin.py @@ -21,8 +21,9 @@ class ProcessingQueueAdmin(CursorPaginatorAdmin): "pacer_case_id", "document_number", "attachment_number", + "date_created", ) - list_filter = ("status",) + list_filter = ("status", "date_created") search_fields = ( "pacer_case_id", "court__pk", @@ -41,15 +42,8 @@ class ProcessingQueueAdmin(CursorPaginatorAdmin): @admin.register(PacerFetchQueue) class PacerFetchQueueAdmin(CursorPaginatorAdmin): - list_display = ( - "__str__", - "court", - "request_type", - ) - list_filter = ( - "status", - "request_type", - ) + list_display = ("__str__", "court", "request_type", "date_created") + list_filter = ("status", "request_type", "date_created") readonly_fields = ( "date_created", "date_modified", From d76d64e728504cc9ae01327f4a57943f47a4c8a5 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Wed, 18 Dec 2024 18:35:31 -0300 Subject: [PATCH 02/40] feat(admin): add autocomplete field for 'court' in DocketAdmin --- cl/search/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cl/search/admin.py b/cl/search/admin.py index eebdef50ad..968fd9bf89 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -249,6 +249,7 @@ class DocketAdmin(CursorPaginatorAdmin): "date_modified", "view_count", ) + autocomplete_fields = ("court",) raw_id_fields = ( "panel", "tags", From 2a3a40ae6462f8b1511df8a41f896e5ebdc9493d Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Wed, 18 Dec 2024 18:35:54 -0300 Subject: [PATCH 03/40] feat(admin): add autocomplete field for 'user' in SCOTUSMapAdmin --- cl/visualizations/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cl/visualizations/admin.py b/cl/visualizations/admin.py index 5b8064d274..3287fb258c 100644 --- a/cl/visualizations/admin.py +++ b/cl/visualizations/admin.py @@ -72,6 +72,7 @@ class SCOTUSMapAdmin(admin.ModelAdmin): "published", "deleted", ) + autocomplete_fields = ("user",) search_fields = ( "id", "title", From e85e13b98799ac08bf8930551292224751e14b6c Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Wed, 18 Dec 2024 18:49:55 -0300 Subject: [PATCH 04/40] feat(admin): add date_created and date_modified to EmailProcessingQueueAdmin --- cl/recap/admin.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cl/recap/admin.py b/cl/recap/admin.py index e0af2c367a..16296682ac 100644 --- a/cl/recap/admin.py +++ b/cl/recap/admin.py @@ -88,14 +88,15 @@ def reprocess_failed_epq(modeladmin, request, queryset): @admin.register(EmailProcessingQueue) class EmailProcessingQueueAdmin(CursorPaginatorAdmin): - list_display = ( - "__str__", - "status", - ) - list_filter = ("status",) + list_display = ("__str__", "status", "date_created") + list_filter = ("status", "date_created") actions = [reprocess_failed_epq] raw_id_fields = ["uploader", "court"] exclude = ["recap_documents", "filepath"] + readonly_fields = ( + "date_created", + "date_modified", + ) admin.site.register(FjcIntegratedDatabase) From 94c4640116bae5d39d01c71a468138f7a420118a Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Thu, 19 Dec 2024 14:25:04 -0300 Subject: [PATCH 05/40] feat(admin): add jurisdiction to CourtAdmin list_display --- cl/search/admin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cl/search/admin.py b/cl/search/admin.py index 968fd9bf89..4fd70397ee 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -88,7 +88,14 @@ class OpinionClusterAdmin(CursorPaginatorAdmin): @admin.register(Court) class CourtAdmin(admin.ModelAdmin): - list_display = ("full_name", "short_name", "position", "in_use", "pk") + list_display = ( + "full_name", + "short_name", + "position", + "in_use", + "pk", + "jurisdiction", + ) list_filter = ( "jurisdiction", "in_use", From 83132b17d1278672500cbee06c42ff0452fbaa98 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Thu, 19 Dec 2024 15:45:29 -0300 Subject: [PATCH 06/40] feat(admin): optimize queryset for user_permissions in User form --- cl/users/admin.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cl/users/admin.py b/cl/users/admin.py index dd34ba4641..241c5d24ca 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -1,4 +1,5 @@ from django.contrib import admin +from django.contrib.auth.forms import UserChangeForm from django.contrib.auth.models import Permission, User from rest_framework.authtoken.models import Token @@ -42,7 +43,24 @@ class UserProfileInline(admin.StackedInline): model = UserProfile +class CustomUserChangeForm(UserChangeForm): + class Meta(UserChangeForm.Meta): + model = User + fields = "__all__" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Ensure user_permissions field uses an optimized queryset + if "user_permissions" in self.fields: + self.fields["user_permissions"].queryset = ( + Permission.objects.select_related("content_type").order_by( + "content_type__app_label", "codename" + ) + ) + + class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): + form = CustomUserChangeForm # optimize queryset for user_permissions field inlines = ( UserProfileInline, DonationInline, From 5e77e85a0161c0d5e4f3c90809354ff507e2b4d4 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Thu, 19 Dec 2024 20:05:18 -0300 Subject: [PATCH 07/40] feat(admin): include admin for UserProxyEvent and UserProfileEvent models --- cl/assets/templates/user_change_form.html | 0 cl/users/admin.py | 48 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 cl/assets/templates/user_change_form.html diff --git a/cl/assets/templates/user_change_form.html b/cl/assets/templates/user_change_form.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cl/users/admin.py b/cl/users/admin.py index 241c5d24ca..9f37f982b5 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -1,3 +1,4 @@ +from django.apps import apps from django.contrib import admin from django.contrib.auth.forms import UserChangeForm from django.contrib.auth.models import Permission, User @@ -20,6 +21,9 @@ UserProfile, ) +UserProxyEvent = apps.get_model("users", "UserProxyEvent") +UserProfileEvent = apps.get_model("users", "UserProfileEvent") + def get_email_confirmed(obj): return obj.profile.email_confirmed @@ -135,6 +139,50 @@ class FailedEmailAdmin(admin.ModelAdmin): raw_id_fields = ("stored_email",) +class BaseUserEventAdmin(admin.ModelAdmin): + ordering = ("-pgh_created_at",) + # Define common attributes to be extended: + common_list_display = ("get_pgh_created", "get_pgh_label") + common_list_filters = ("pgh_created_at",) + common_search_fields = ("pgh_obj",) + # Default to common attributes: + list_display = common_list_display + list_filter = common_list_filters + search_fields = common_search_fields + + @admin.display(ordering="pgh_created_at", description="Event triggered") + def get_pgh_created(self, obj): + return obj.pgh_created_at + + @admin.display(ordering="pgh_label", description="Event label") + def get_pgh_label(self, obj): + return obj.pgh_label + + +@admin.register(UserProxyEvent) +class UserProxyEventAdmin(BaseUserEventAdmin): + search_fields = BaseUserEventAdmin.common_search_fields + ( + "email", + "username", + ) + list_display = BaseUserEventAdmin.list_display + ( + "email", + "username", + ) + + +@admin.register(UserProfileEvent) +class UserProfileEventAdmin(BaseUserEventAdmin): + search_fields = BaseUserEventAdmin.common_search_fields + ( + "user__username", + ) + list_display = BaseUserEventAdmin.common_list_display + ( + "user", + "email_confirmed", + ) + list_filter = BaseUserEventAdmin.common_list_filters + ("email_confirmed",) + + # Replace the normal User admin with our better one. admin.site.unregister(User) admin.site.register(User, UserAdmin) From 85c8a3ee73c4378e5a7076d4afbf5a8eb592aa20 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Thu, 19 Dec 2024 20:06:28 -0300 Subject: [PATCH 08/40] feat(admin): add links to related Events admins in User instance detail --- cl/assets/templates/user_change_form.html | 19 +++++++++++++++++++ cl/users/admin.py | 23 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/cl/assets/templates/user_change_form.html b/cl/assets/templates/user_change_form.html index e69de29bb2..1fff0b9c1f 100644 --- a/cl/assets/templates/user_change_form.html +++ b/cl/assets/templates/user_change_form.html @@ -0,0 +1,19 @@ +{% extends "admin/change_form.html" %} + +{% block object-tools-items %} + {% if proxy_events_url %} +
  • + + View UserProxy Events + +
  • + {% endif %} + {% if profile_events_url %} +
  • + + View UserProfile Events + +
  • + {% endif %} + {{ block.super }} +{% endblock object-tools-items %} diff --git a/cl/users/admin.py b/cl/users/admin.py index 9f37f982b5..e16d59f90f 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -65,6 +65,7 @@ def __init__(self, *args, **kwargs): class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): form = CustomUserChangeForm # optimize queryset for user_permissions field + change_form_template = "user_change_form.html" inlines = ( UserProfileInline, DonationInline, @@ -89,6 +90,28 @@ class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): "email", ) + def change_view(self, request, object_id, form_url="", extra_context=None): + """Add links to related event admin pages filtered by user/profile.""" + extra_context = extra_context or {} + user = self.get_object(request, object_id) + proxy_events_url = ( + f"/admin/{UserProxyEvent._meta.app_label}/" + f"{UserProxyEvent._meta.model_name}/?pgh_obj={object_id}" + ) + extra_context["proxy_events_url"] = proxy_events_url + + if user and hasattr(user, "profile"): + profile_id = user.profile.pk + profile_events_url = ( + f"/admin/{UserProfileEvent._meta.app_label}/" + f"{UserProfileEvent._meta.model_name}/?pgh_obj={profile_id}" + ) + extra_context["profile_events_url"] = profile_events_url + + return super().change_view( + request, object_id, form_url, extra_context=extra_context + ) + @admin.register(EmailFlag) class EmailFlagAdmin(admin.ModelAdmin): From 36d70025bbf5eb4e70673c7e960bdbc0d2f776eb Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Thu, 19 Dec 2024 21:05:56 -0300 Subject: [PATCH 09/40] refactor(admin): move get_email_confirmed and get_stub_account to UserAdmin class as methods This improves code organization by localizing user-admin-related logic to the UserAdmin class, enhancing readability and maintainability. --- cl/users/admin.py | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/cl/users/admin.py b/cl/users/admin.py index e16d59f90f..4ebe5993e3 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -25,20 +25,6 @@ UserProfileEvent = apps.get_model("users", "UserProfileEvent") -def get_email_confirmed(obj): - return obj.profile.email_confirmed - - -get_email_confirmed.short_description = "Email Confirmed?" - - -def get_stub_account(obj): - return obj.profile.stub_account - - -get_stub_account.short_description = "Stub Account?" - - class TokenInline(admin.StackedInline): model = Token @@ -80,8 +66,8 @@ class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): ) list_display = ( "username", - get_email_confirmed, - get_stub_account, + "get_email_confirmed", + "get_stub_account", ) search_fields = ( "username", @@ -112,6 +98,14 @@ def change_view(self, request, object_id, form_url="", extra_context=None): request, object_id, form_url, extra_context=extra_context ) + @admin.display(description="Email Confirmed?") + def get_email_confirmed(self, obj): + return obj.profile.email_confirmed + + @admin.display(description="Stub Account?") + def get_stub_account(self, obj): + return obj.profile.stub_account + @admin.register(EmailFlag) class EmailFlagAdmin(admin.ModelAdmin): From 3cca3c58c4816f1d0c89b9beb64a896809827e3b Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 15:48:39 -0300 Subject: [PATCH 10/40] refactor(admin): use decorator to register UserAdmin --- cl/assets/templates/{ => admin}/user_change_form.html | 0 cl/users/admin.py | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) rename cl/assets/templates/{ => admin}/user_change_form.html (100%) diff --git a/cl/assets/templates/user_change_form.html b/cl/assets/templates/admin/user_change_form.html similarity index 100% rename from cl/assets/templates/user_change_form.html rename to cl/assets/templates/admin/user_change_form.html diff --git a/cl/users/admin.py b/cl/users/admin.py index 4ebe5993e3..b6d0d1c808 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -49,6 +49,11 @@ def __init__(self, *args, **kwargs): ) +# Replace the normal User admin with our better one. +admin.site.unregister(User) + + +@admin.register(User) class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): form = CustomUserChangeForm # optimize queryset for user_permissions field change_form_template = "user_change_form.html" @@ -200,8 +205,5 @@ class UserProfileEventAdmin(BaseUserEventAdmin): list_filter = BaseUserEventAdmin.common_list_filters + ("email_confirmed",) -# Replace the normal User admin with our better one. -admin.site.unregister(User) -admin.site.register(User, UserAdmin) admin.site.register(BarMembership) admin.site.register(Permission) From 10e6d083580598ea5de9269bbe49d91189a1e387 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 16:29:33 -0300 Subject: [PATCH 11/40] feat(admin): make all events fields readonly --- cl/users/admin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cl/users/admin.py b/cl/users/admin.py index b6d0d1c808..b3691a137d 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -191,6 +191,9 @@ class UserProxyEventAdmin(BaseUserEventAdmin): "email", "username", ) + readonly_fields = [ + field.name for field in UserProxyEvent._meta.get_fields() + ] @admin.register(UserProfileEvent) @@ -203,6 +206,9 @@ class UserProfileEventAdmin(BaseUserEventAdmin): "email_confirmed", ) list_filter = BaseUserEventAdmin.common_list_filters + ("email_confirmed",) + readonly_fields = [ + field.name for field in UserProfileEvent._meta.get_fields() + ] admin.site.register(BarMembership) From 265058eed89a125bfab5e439e2b9299b2effe7ce Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 19:21:48 -0300 Subject: [PATCH 12/40] feat(admin): add list_filter fields to UserAdmin --- cl/users/admin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cl/users/admin.py b/cl/users/admin.py index b3691a137d..a3ea6d9b29 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -74,6 +74,11 @@ class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): "get_email_confirmed", "get_stub_account", ) + list_filter = ( + "is_superuser", + "profile__email_confirmed", + "profile__stub_account", + ) search_fields = ( "username", "first_name", From 50aa258a9c8cd465ac7c9ea893245c640223523b Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 19:23:16 -0300 Subject: [PATCH 13/40] feat(admin): enhance DocketEntryAdmin list view - Enable searching by description, docket__id, docket__case_name and recap_sequence_number - Display more fields in list view - Enable filtering by date_filed, date_created and date_modified --- cl/search/admin.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/cl/search/admin.py b/cl/search/admin.py index 4fd70397ee..11870c4dd9 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -6,6 +6,7 @@ from cl.alerts.admin import DocketAlertInline from cl.lib.cloud_front import invalidate_cloudfront from cl.lib.models import THUMBNAIL_STATUSES +from cl.lib.string_utils import trunc from cl.recap.management.commands.delete_document_from_ia import delete_from_ia from cl.search.models import ( BankruptcyInformation, @@ -222,11 +223,35 @@ class RECAPDocumentInline(admin.StackedInline): @admin.register(DocketEntry) class DocketEntryAdmin(CursorPaginatorAdmin): inlines = (RECAPDocumentInline,) + search_fields = ( + "description", + "docket__id", + "docket__case_name", + "recap_sequence_number", + ) + list_display = ( + "get_pk", + "get_trunc_description", + "date_filed", + "time_filed", + "entry_number", + "recap_sequence_number", + "pacer_sequence_number", + ) raw_id_fields = ("docket", "tags") readonly_fields = ( "date_created", "date_modified", ) + list_filter = ("date_filed", "date_created", "date_modified") + + @admin.display(description="Docket entry") + def get_pk(self, obj): + return obj.pk + + @admin.display(description="Description") + def get_trunc_description(self, obj): + return trunc(obj.description, 35, ellipsis="...") class DocketEntryInline(admin.TabularInline): From 60b05f70d64951f847efbaf183c729f0f0fb221c Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 19:42:52 -0300 Subject: [PATCH 14/40] feat(admin): replace DocketEntryInline in DocketAdmin To improve performance in dockets with several entries, the inline was replaced by a button that redirects to the list of docket entries filtered by the docket, so they don't have to all be loaded when browsing a docket instance detail. --- .../templates/admin/docket_change_form.html | 12 ++++++++++ cl/search/admin.py | 24 +++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 cl/assets/templates/admin/docket_change_form.html diff --git a/cl/assets/templates/admin/docket_change_form.html b/cl/assets/templates/admin/docket_change_form.html new file mode 100644 index 0000000000..5268ef2087 --- /dev/null +++ b/cl/assets/templates/admin/docket_change_form.html @@ -0,0 +1,12 @@ +{% extends "admin/change_form.html" %} + +{% block object-tools-items %} + {% if docket_entries_url %} +
  • + + View Docket Entries + +
  • + {% endif %} + {{ block.super }} +{% endblock object-tools-items %} diff --git a/cl/search/admin.py b/cl/search/admin.py index 11870c4dd9..c2eb1e9cb5 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -254,12 +254,6 @@ def get_trunc_description(self, obj): return trunc(obj.description, 35, ellipsis="...") -class DocketEntryInline(admin.TabularInline): - model = DocketEntry - extra = 1 - raw_id_fields = ("tags",) - - @admin.register(OriginatingCourtInformation) class OriginatingCourtInformationAdmin(admin.ModelAdmin): raw_id_fields = ( @@ -270,9 +264,9 @@ class OriginatingCourtInformationAdmin(admin.ModelAdmin): @admin.register(Docket) class DocketAdmin(CursorPaginatorAdmin): + change_form_template = "admin/docket_change_form.html" prepopulated_fields = {"slug": ["case_name"]} inlines = ( - DocketEntryInline, BankruptcyInformationInline, DocketAlertInline, ) @@ -292,6 +286,22 @@ class DocketAdmin(CursorPaginatorAdmin): "parent_docket", ) + def change_view(self, request, object_id, form_url="", extra_context=None): + """Add links to pre-filtered related admin pages.""" + extra_context = extra_context or {} + docket = self.get_object(request, object_id) + + if docket and hasattr(docket, "docket_entries"): + docket_entries_url = ( + f"/admin/{DocketEntry._meta.app_label}/" + f"{DocketEntry._meta.model_name}/?docket={object_id}" + ) + extra_context["docket_entries_url"] = docket_entries_url + + return super().change_view( + request, object_id, form_url, extra_context=extra_context + ) + @admin.register(OpinionsCited) class OpinionsCitedAdmin(CursorPaginatorAdmin): From 1ec8c0f22ab992bf10738beeea5abf5d4b6a8df0 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 20:26:31 -0300 Subject: [PATCH 15/40] feat(admin): enhance DocketAdmin list view - Enable searching by pk, pacer_case_id and docket_number - Display more fields in list view --- cl/search/admin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cl/search/admin.py b/cl/search/admin.py index c2eb1e9cb5..f8e808b854 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -266,6 +266,14 @@ class OriginatingCourtInformationAdmin(admin.ModelAdmin): class DocketAdmin(CursorPaginatorAdmin): change_form_template = "admin/docket_change_form.html" prepopulated_fields = {"slug": ["case_name"]} + list_display = ( + "__str__", + "pacer_case_id", + "docket_number", + "pacer_case_id", + ) + search_help_text = "Search dockets by PK, PACER case ID, or Docket number." + search_fields = ("pk", "pacer_case_id", "docket_number") inlines = ( BankruptcyInformationInline, DocketAlertInline, From 58f99e5513e9978f4a87ace5c2615dcb0e3d6145 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 20:35:03 -0300 Subject: [PATCH 16/40] feat(admin): add search_help_text to admins with search fields --- cl/recap/admin.py | 1 + cl/search/admin.py | 3 +++ cl/users/admin.py | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/cl/recap/admin.py b/cl/recap/admin.py index 16296682ac..8f78037988 100644 --- a/cl/recap/admin.py +++ b/cl/recap/admin.py @@ -24,6 +24,7 @@ class ProcessingQueueAdmin(CursorPaginatorAdmin): "date_created", ) list_filter = ("status", "date_created") + search_help_text = "Search ProcessingQueues by pacer_case_id or court__pk." search_fields = ( "pacer_case_id", "court__pk", diff --git a/cl/search/admin.py b/cl/search/admin.py index f8e808b854..29feba25f8 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -223,6 +223,9 @@ class RECAPDocumentInline(admin.StackedInline): @admin.register(DocketEntry) class DocketEntryAdmin(CursorPaginatorAdmin): inlines = (RECAPDocumentInline,) + search_help_text = ( + "Search DocketEntries by Docket ID or RECAP sequence number." + ) search_fields = ( "description", "docket__id", diff --git a/cl/users/admin.py b/cl/users/admin.py index a3ea6d9b29..2c845500b9 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -79,6 +79,9 @@ class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): "profile__email_confirmed", "profile__stub_account", ) + search_help_text = ( + "Search Users by username, first name, last name, or email." + ) search_fields = ( "username", "first_name", @@ -188,6 +191,7 @@ def get_pgh_label(self, obj): @admin.register(UserProxyEvent) class UserProxyEventAdmin(BaseUserEventAdmin): + search_help_text = "Search UserProxyEvents by pgh_obj, email, or username." search_fields = BaseUserEventAdmin.common_search_fields + ( "email", "username", @@ -203,6 +207,7 @@ class UserProxyEventAdmin(BaseUserEventAdmin): @admin.register(UserProfileEvent) class UserProfileEventAdmin(BaseUserEventAdmin): + search_help_text = "Search UserProxyEvents by pgh_obj or username." search_fields = BaseUserEventAdmin.common_search_fields + ( "user__username", ) From e11424154502acd4270ccd2e065e0fb988396bef Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 20:40:20 -0300 Subject: [PATCH 17/40] fix(admin): remove non-indexed fields from DocketEntryAdmin search fields to avoid overhead --- cl/search/admin.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cl/search/admin.py b/cl/search/admin.py index 29feba25f8..a02c8806c8 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -227,9 +227,7 @@ class DocketEntryAdmin(CursorPaginatorAdmin): "Search DocketEntries by Docket ID or RECAP sequence number." ) search_fields = ( - "description", "docket__id", - "docket__case_name", "recap_sequence_number", ) list_display = ( From e779c3cff4e5878b4cd4eaedbab9d38395491e22 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Fri, 20 Dec 2024 21:22:48 -0300 Subject: [PATCH 18/40] feat(admin): replace DocketAlertInline in DocketAdmin To improve performance in dockets with several alerts, the inline was replaced by a button that redirects to the list of docket alerts filtered by the docket, so they don't have to all be loaded when browsing a docket instance detail. --- cl/assets/templates/admin/docket_change_form.html | 7 +++++++ cl/search/admin.py | 13 +++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/cl/assets/templates/admin/docket_change_form.html b/cl/assets/templates/admin/docket_change_form.html index 5268ef2087..c3a4b000fc 100644 --- a/cl/assets/templates/admin/docket_change_form.html +++ b/cl/assets/templates/admin/docket_change_form.html @@ -8,5 +8,12 @@ {% endif %} + {% if docket_alerts_url %} +
  • + + View Docket Alerts + +
  • + {% endif %} {{ block.super }} {% endblock object-tools-items %} diff --git a/cl/search/admin.py b/cl/search/admin.py index a02c8806c8..26c3098a31 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -4,6 +4,7 @@ from django.http import HttpRequest from cl.alerts.admin import DocketAlertInline +from cl.alerts.models import DocketAlert from cl.lib.cloud_front import invalidate_cloudfront from cl.lib.models import THUMBNAIL_STATUSES from cl.lib.string_utils import trunc @@ -275,10 +276,7 @@ class DocketAdmin(CursorPaginatorAdmin): ) search_help_text = "Search dockets by PK, PACER case ID, or Docket number." search_fields = ("pk", "pacer_case_id", "docket_number") - inlines = ( - BankruptcyInformationInline, - DocketAlertInline, - ) + inlines = (BankruptcyInformationInline,) readonly_fields = ( "date_created", "date_modified", @@ -307,6 +305,13 @@ def change_view(self, request, object_id, form_url="", extra_context=None): ) extra_context["docket_entries_url"] = docket_entries_url + if docket and hasattr(docket, "alerts"): + docket_alerts_url = ( + f"/admin/{DocketAlert._meta.app_label}/" + f"{DocketAlert._meta.model_name}/?docket={object_id}" + ) + extra_context["docket_alerts_url"] = docket_alerts_url + return super().change_view( request, object_id, form_url, extra_context=extra_context ) From 13832c0cd25738885ee39c5cfe5d9b490f038558 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 23 Dec 2024 13:18:32 -0300 Subject: [PATCH 19/40] feat(admin): add appeal_from to autocomplete fields in DocketAdmin --- cl/search/admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cl/search/admin.py b/cl/search/admin.py index 26c3098a31..ad8a7270ed 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -282,7 +282,10 @@ class DocketAdmin(CursorPaginatorAdmin): "date_modified", "view_count", ) - autocomplete_fields = ("court",) + autocomplete_fields = ( + "court", + "appeal_from", + ) raw_id_fields = ( "panel", "tags", From 89e6d58ec78864fc4272a29f4700558ce1cfd0ba Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 23 Dec 2024 13:19:20 -0300 Subject: [PATCH 20/40] fix(admin): update UserAdmin change_form_template path --- cl/users/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl/users/admin.py b/cl/users/admin.py index 2c845500b9..0a29c9f074 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -56,7 +56,7 @@ def __init__(self, *args, **kwargs): @admin.register(User) class UserAdmin(admin.ModelAdmin, AdminTweaksMixin): form = CustomUserChangeForm # optimize queryset for user_permissions field - change_form_template = "user_change_form.html" + change_form_template = "admin/user_change_form.html" inlines = ( UserProfileInline, DonationInline, From a1e9d4a54d328229143380a3889ef502ed6911e4 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 23 Dec 2024 16:56:44 -0300 Subject: [PATCH 21/40] refactor(admin): introduce method to build admin URLs for a given model - Uses urlencode to safely parse query paramteres. - Replace repeated logic from UserAdmin and DocketAdmin with new method. --- cl/lib/admin.py | 28 ++++++++++++++++++++++++++++ cl/search/admin.py | 17 ++++++++--------- cl/users/admin.py | 17 ++++++++--------- 3 files changed, 44 insertions(+), 18 deletions(-) diff --git a/cl/lib/admin.py b/cl/lib/admin.py index 754bce6f08..73f443e4eb 100644 --- a/cl/lib/admin.py +++ b/cl/lib/admin.py @@ -1,4 +1,7 @@ +from urllib.parse import urlencode + from django.contrib.contenttypes.admin import GenericTabularInline +from django.urls import reverse from cl.lib.models import Note @@ -13,3 +16,28 @@ class Media: class NotesInline(GenericTabularInline): model = Note extra = 1 + + +def build_admin_url(model_class, query_params=None, view_name="changelist"): + """ + Construct a URL for a given model's admin view, optionally appending query parameters. + + :param model_class: The Django model class for which the admin URL will be built. + :param query_params: A dictionary of query parameters to append to the URL (e.g. {"docket": 123}). + :param view_name: An admin view suffix, such as "changelist", "change", or "delete". Defaults to "changelist". + :return: A string representing the fully constructed admin URL, including any query parameters. + + Example usage: + >>> from cl.search.models import DocketEntry + >>> build_admin_url(DocketEntry, {"docket": "1234"}) + '/admin/search/docketentry/?docket=1234' + """ + query_params = query_params or {} + app_label = model_class._meta.app_label + model_name = model_class._meta.model_name + # "admin:app_label_modelname_changelist" is the standard naming for admin changelist + entries_changelist_url = reverse( + f"admin:{app_label}_{model_name}_{view_name}" + ) + query_params = urlencode(query_params) + return f"{entries_changelist_url}?{query_params}" diff --git a/cl/search/admin.py b/cl/search/admin.py index ad8a7270ed..45344c67d2 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -3,8 +3,8 @@ from django.db.models import QuerySet from django.http import HttpRequest -from cl.alerts.admin import DocketAlertInline from cl.alerts.models import DocketAlert +from cl.lib.admin import build_admin_url from cl.lib.cloud_front import invalidate_cloudfront from cl.lib.models import THUMBNAIL_STATUSES from cl.lib.string_utils import trunc @@ -300,20 +300,19 @@ def change_view(self, request, object_id, form_url="", extra_context=None): """Add links to pre-filtered related admin pages.""" extra_context = extra_context or {} docket = self.get_object(request, object_id) + query_params = {"docket": object_id} if docket and hasattr(docket, "docket_entries"): - docket_entries_url = ( - f"/admin/{DocketEntry._meta.app_label}/" - f"{DocketEntry._meta.model_name}/?docket={object_id}" + extra_context["docket_entries_url"] = build_admin_url( + DocketEntry, + query_params, ) - extra_context["docket_entries_url"] = docket_entries_url if docket and hasattr(docket, "alerts"): - docket_alerts_url = ( - f"/admin/{DocketAlert._meta.app_label}/" - f"{DocketAlert._meta.model_name}/?docket={object_id}" + extra_context["docket_alerts_url"] = build_admin_url( + DocketAlert, + query_params, ) - extra_context["docket_alerts_url"] = docket_alerts_url return super().change_view( request, object_id, form_url, extra_context=extra_context diff --git a/cl/users/admin.py b/cl/users/admin.py index 0a29c9f074..d501b392bb 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -12,7 +12,7 @@ NeonMembershipInline, ) from cl.favorites.admin import NoteInline, UserTagInline -from cl.lib.admin import AdminTweaksMixin +from cl.lib.admin import AdminTweaksMixin, build_admin_url from cl.users.models import ( BarMembership, EmailFlag, @@ -93,19 +93,18 @@ def change_view(self, request, object_id, form_url="", extra_context=None): """Add links to related event admin pages filtered by user/profile.""" extra_context = extra_context or {} user = self.get_object(request, object_id) - proxy_events_url = ( - f"/admin/{UserProxyEvent._meta.app_label}/" - f"{UserProxyEvent._meta.model_name}/?pgh_obj={object_id}" + + extra_context["proxy_events_url"] = build_admin_url( + UserProxyEvent, + {"pgh_obj": object_id}, ) - extra_context["proxy_events_url"] = proxy_events_url if user and hasattr(user, "profile"): profile_id = user.profile.pk - profile_events_url = ( - f"/admin/{UserProfileEvent._meta.app_label}/" - f"{UserProfileEvent._meta.model_name}/?pgh_obj={profile_id}" + extra_context["profile_events_url"] = build_admin_url( + UserProfileEvent, + {"pgh_obj": profile_id}, ) - extra_context["profile_events_url"] = profile_events_url return super().change_view( request, object_id, form_url, extra_context=extra_context From 50eee455607f5f574d09271204c104073866dd9e Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:27:33 -0300 Subject: [PATCH 22/40] refactor(admin): remove unused arg in build_admin_url method --- cl/lib/admin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cl/lib/admin.py b/cl/lib/admin.py index 73f443e4eb..feb796642e 100644 --- a/cl/lib/admin.py +++ b/cl/lib/admin.py @@ -18,13 +18,12 @@ class NotesInline(GenericTabularInline): extra = 1 -def build_admin_url(model_class, query_params=None, view_name="changelist"): +def build_admin_url(model_class, query_params=None): """ Construct a URL for a given model's admin view, optionally appending query parameters. :param model_class: The Django model class for which the admin URL will be built. :param query_params: A dictionary of query parameters to append to the URL (e.g. {"docket": 123}). - :param view_name: An admin view suffix, such as "changelist", "change", or "delete". Defaults to "changelist". :return: A string representing the fully constructed admin URL, including any query parameters. Example usage: @@ -37,7 +36,7 @@ def build_admin_url(model_class, query_params=None, view_name="changelist"): model_name = model_class._meta.model_name # "admin:app_label_modelname_changelist" is the standard naming for admin changelist entries_changelist_url = reverse( - f"admin:{app_label}_{model_name}_{view_name}" + f"admin:{app_label}_{model_name}_changelist" ) query_params = urlencode(query_params) return f"{entries_changelist_url}?{query_params}" From 43d192f29857686d53d609c59ada1adde0f79426 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:28:13 -0300 Subject: [PATCH 23/40] refactor(admin): add type hints to build_admin_url method --- cl/lib/admin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cl/lib/admin.py b/cl/lib/admin.py index feb796642e..2f72b2b753 100644 --- a/cl/lib/admin.py +++ b/cl/lib/admin.py @@ -1,6 +1,8 @@ +from typing import Any, Dict, Optional, Type from urllib.parse import urlencode from django.contrib.contenttypes.admin import GenericTabularInline +from django.db.models import Model from django.urls import reverse from cl.lib.models import Note @@ -18,7 +20,10 @@ class NotesInline(GenericTabularInline): extra = 1 -def build_admin_url(model_class, query_params=None): +def build_admin_url( + model_class: Type[Model], + query_params: Optional[Dict[str, Any]] = None, +) -> str: """ Construct a URL for a given model's admin view, optionally appending query parameters. From 271fd7a81c14f41937e34f1e54db0fe1d0b8ebf4 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:34:08 -0300 Subject: [PATCH 24/40] refactor(admin): remove redundant Meta class override --- cl/users/admin.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/cl/users/admin.py b/cl/users/admin.py index d501b392bb..23dcbf67df 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -34,9 +34,6 @@ class UserProfileInline(admin.StackedInline): class CustomUserChangeForm(UserChangeForm): - class Meta(UserChangeForm.Meta): - model = User - fields = "__all__" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) From ba39fddd9350826aafe29f62cf544d146924445c Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:34:48 -0300 Subject: [PATCH 25/40] fix(admin): restore default permissions ordering --- cl/users/admin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cl/users/admin.py b/cl/users/admin.py index 23dcbf67df..8e66cffb11 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -40,9 +40,7 @@ def __init__(self, *args, **kwargs): # Ensure user_permissions field uses an optimized queryset if "user_permissions" in self.fields: self.fields["user_permissions"].queryset = ( - Permission.objects.select_related("content_type").order_by( - "content_type__app_label", "codename" - ) + Permission.objects.select_related("content_type") ) From 2d636425cabe8907df5a9837420e7bc494122943 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:35:26 -0300 Subject: [PATCH 26/40] refactor(admin): add get_readonly_fields method to BaseUserEventAdmin --- cl/users/admin.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cl/users/admin.py b/cl/users/admin.py index 8e66cffb11..7a949910d8 100644 --- a/cl/users/admin.py +++ b/cl/users/admin.py @@ -182,6 +182,9 @@ def get_pgh_created(self, obj): def get_pgh_label(self, obj): return obj.pgh_label + def get_readonly_fields(self, request, obj=None): + return [field.name for field in self.model._meta.get_fields()] + @admin.register(UserProxyEvent) class UserProxyEventAdmin(BaseUserEventAdmin): @@ -194,9 +197,6 @@ class UserProxyEventAdmin(BaseUserEventAdmin): "email", "username", ) - readonly_fields = [ - field.name for field in UserProxyEvent._meta.get_fields() - ] @admin.register(UserProfileEvent) @@ -210,9 +210,6 @@ class UserProfileEventAdmin(BaseUserEventAdmin): "email_confirmed", ) list_filter = BaseUserEventAdmin.common_list_filters + ("email_confirmed",) - readonly_fields = [ - field.name for field in UserProfileEvent._meta.get_fields() - ] admin.site.register(BarMembership) From b71d743ba6f3ff76f2bc1ec796e22127fb91f21d Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:44:44 -0300 Subject: [PATCH 27/40] fix(admin): remove repeated field from docket list_display --- cl/search/admin.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cl/search/admin.py b/cl/search/admin.py index 45344c67d2..d354f9a0d4 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -272,7 +272,6 @@ class DocketAdmin(CursorPaginatorAdmin): "__str__", "pacer_case_id", "docket_number", - "pacer_case_id", ) search_help_text = "Search dockets by PK, PACER case ID, or Docket number." search_fields = ("pk", "pacer_case_id", "docket_number") From 72ca108c34c31361ab1e967f60b27787546b1ae4 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:45:19 -0300 Subject: [PATCH 28/40] refactor(admin): remove checks for entries and alerts in DocketAdmin --- cl/search/admin.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/cl/search/admin.py b/cl/search/admin.py index d354f9a0d4..7a42e7117e 100644 --- a/cl/search/admin.py +++ b/cl/search/admin.py @@ -298,20 +298,17 @@ class DocketAdmin(CursorPaginatorAdmin): def change_view(self, request, object_id, form_url="", extra_context=None): """Add links to pre-filtered related admin pages.""" extra_context = extra_context or {} - docket = self.get_object(request, object_id) query_params = {"docket": object_id} - if docket and hasattr(docket, "docket_entries"): - extra_context["docket_entries_url"] = build_admin_url( - DocketEntry, - query_params, - ) + extra_context["docket_entries_url"] = build_admin_url( + DocketEntry, + query_params, + ) - if docket and hasattr(docket, "alerts"): - extra_context["docket_alerts_url"] = build_admin_url( - DocketAlert, - query_params, - ) + extra_context["docket_alerts_url"] = build_admin_url( + DocketAlert, + query_params, + ) return super().change_view( request, object_id, form_url, extra_context=extra_context From 8ef173826a93aabba3408387e5cf4a9f94a76a19 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Mon, 30 Dec 2024 19:49:42 -0300 Subject: [PATCH 29/40] refactor(admin): rename variable to avoid type checker error --- cl/lib/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl/lib/admin.py b/cl/lib/admin.py index 2f72b2b753..3feb1d7edd 100644 --- a/cl/lib/admin.py +++ b/cl/lib/admin.py @@ -43,5 +43,5 @@ def build_admin_url( entries_changelist_url = reverse( f"admin:{app_label}_{model_name}_changelist" ) - query_params = urlencode(query_params) - return f"{entries_changelist_url}?{query_params}" + encoded_query_params = urlencode(query_params) + return f"{entries_changelist_url}?{encoded_query_params}" From 1878a86d1c527156f2368fa11ba796fdf6429d21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 08:03:26 +0000 Subject: [PATCH 30/40] build(deps): bump openai from 1.52.0 to 1.58.1 Bumps [openai](https://github.com/openai/openai-python) from 1.52.0 to 1.58.1. - [Release notes](https://github.com/openai/openai-python/releases) - [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md) - [Commits](https://github.com/openai/openai-python/compare/v1.52.0...v1.58.1) --- updated-dependencies: - dependency-name: openai dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 11 ++++++----- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index cb36c09e88..34aad40200 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2932,13 +2932,13 @@ files = [ [[package]] name = "openai" -version = "1.52.0" +version = "1.58.1" description = "The official Python library for the openai API" optional = false -python-versions = ">=3.7.1" +python-versions = ">=3.8" files = [ - {file = "openai-1.52.0-py3-none-any.whl", hash = "sha256:0c249f20920183b0a2ca4f7dba7b0452df3ecd0fa7985eb1d91ad884bc3ced9c"}, - {file = "openai-1.52.0.tar.gz", hash = "sha256:95c65a5f77559641ab8f3e4c3a050804f7b51d278870e2ec1f7444080bfe565a"}, + {file = "openai-1.58.1-py3-none-any.whl", hash = "sha256:e2910b1170a6b7f88ef491ac3a42c387f08bd3db533411f7ee391d166571d63c"}, + {file = "openai-1.58.1.tar.gz", hash = "sha256:f5a035fd01e141fc743f4b0e02c41ca49be8fab0866d3b67f5f29b4f4d3c0973"}, ] [package.dependencies] @@ -2953,6 +2953,7 @@ typing-extensions = ">=4.11,<5" [package.extras] datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] +realtime = ["websockets (>=13,<15)"] [[package]] name = "outcome" @@ -5690,4 +5691,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "638849e8b93312af48bcd4bae74b198fde89a59a666e21b546ada9dae6a656c4" +content-hash = "f99a477fe844d879bccb287ac5527e20b709a7577fc92dc396f1f592ea45648c" diff --git a/pyproject.toml b/pyproject.toml index 03f2c0b45c..82e55d7796 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,7 +106,7 @@ django-model-utils = "^5.0.0" django-permissions-policy = "^4.22.0" tiktoken = "^0.8.0" hyperscan = "^0.7.8" -openai = "^1.52.0" +openai = "^1.58.1" seal-rookery = "^2.2.5" types-pytz = "^2024.2.0.20241003" psycopg = {version = "3.2.3", extras = ["binary", "pool"]} From 760ccb2f644319f79f820f5ab55fa1086cac42cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 17:34:19 +0000 Subject: [PATCH 31/40] build(deps): bump django-cors-headers from 4.5.0 to 4.6.0 Bumps [django-cors-headers](https://github.com/adamchainz/django-cors-headers) from 4.5.0 to 4.6.0. - [Changelog](https://github.com/adamchainz/django-cors-headers/blob/main/CHANGELOG.rst) - [Commits](https://github.com/adamchainz/django-cors-headers/compare/4.5.0...4.6.0) --- updated-dependencies: - dependency-name: django-cors-headers dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 34aad40200..6337eef987 100644 --- a/poetry.lock +++ b/poetry.lock @@ -992,18 +992,18 @@ dev = ["black", "flake8", "therapist", "tox", "twine"] [[package]] name = "django-cors-headers" -version = "4.5.0" +version = "4.6.0" description = "django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS)." optional = false python-versions = ">=3.9" files = [ - {file = "django_cors_headers-4.5.0-py3-none-any.whl", hash = "sha256:28c1ded847aa70208798de3e42422a782f427b8b720e8d7319d34b654b5978e6"}, - {file = "django_cors_headers-4.5.0.tar.gz", hash = "sha256:6c01a85cf1ec779a7bde621db853aa3ce5c065a5ba8e27df7a9f9e8dac310f4f"}, + {file = "django_cors_headers-4.6.0-py3-none-any.whl", hash = "sha256:8edbc0497e611c24d5150e0055d3b178c6534b8ed826fb6f53b21c63f5d48ba3"}, + {file = "django_cors_headers-4.6.0.tar.gz", hash = "sha256:14d76b4b4c8d39375baeddd89e4f08899051eeaf177cb02a29bd6eae8cf63aa8"}, ] [package.dependencies] asgiref = ">=3.6" -django = ">=3.2" +django = ">=4.2" [[package]] name = "django-csp" @@ -5691,4 +5691,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "f99a477fe844d879bccb287ac5527e20b709a7577fc92dc396f1f592ea45648c" +content-hash = "4de84144bc4401866f7a7efb59c2fe9bf89c57fa0e177cf12ec70584ac2951e5" diff --git a/pyproject.toml b/pyproject.toml index 82e55d7796..8d31be1cbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ courts-db = "*" disposable-email-domains = "*" Django = "^5.1.2" django-cache-memoize = "==0.*" -django-cors-headers = "^4.5.0" +django-cors-headers = "^4.6.0" django-csp = "^3.8" django-extensions = "^3.2.3" django-filter = "^23.5" From acd4e25d36b1a160445f591463b57ac467ce1ee6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:44:32 +0000 Subject: [PATCH 32/40] build(deps): bump django-filter from 23.5 to 24.3 Bumps [django-filter](https://github.com/carltongibson/django-filter) from 23.5 to 24.3. - [Release notes](https://github.com/carltongibson/django-filter/releases) - [Changelog](https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst) - [Commits](https://github.com/carltongibson/django-filter/compare/23.5...24.3) --- updated-dependencies: - dependency-name: django-filter dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- poetry.lock | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6337eef987..f6356fd96d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1088,17 +1088,17 @@ Django = ">=3.2" [[package]] name = "django-filter" -version = "23.5" +version = "24.3" description = "Django-filter is a reusable Django application for allowing users to filter querysets dynamically." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "django-filter-23.5.tar.gz", hash = "sha256:67583aa43b91fe8c49f74a832d95f4d8442be628fd4c6d65e9f811f5153a4e5c"}, - {file = "django_filter-23.5-py3-none-any.whl", hash = "sha256:99122a201d83860aef4fe77758b69dda913e874cc5e0eaa50a86b0b18d708400"}, + {file = "django_filter-24.3-py3-none-any.whl", hash = "sha256:c4852822928ce17fb699bcfccd644b3574f1a2d80aeb2b4ff4f16b02dd49dc64"}, + {file = "django_filter-24.3.tar.gz", hash = "sha256:d8ccaf6732afd21ca0542f6733b11591030fa98669f8d15599b358e24a2cd9c3"}, ] [package.dependencies] -Django = ">=3.2" +Django = ">=4.2" [[package]] name = "django-hcaptcha" @@ -5691,4 +5691,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "4de84144bc4401866f7a7efb59c2fe9bf89c57fa0e177cf12ec70584ac2951e5" +content-hash = "f3f18f766dff485b3ee4a1c91cf1ae2bdf79c1e651a8eabf1b2c23155842bf3d" diff --git a/pyproject.toml b/pyproject.toml index 8d31be1cbf..75c1edf4b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ django-cache-memoize = "==0.*" django-cors-headers = "^4.6.0" django-csp = "^3.8" django-extensions = "^3.2.3" -django-filter = "^23.5" +django-filter = "^24.3" django-localflavor = "^4.0" django-markdown-deux = "^1.0.6" django-mathfilters = "*" From 12e3274f32546102ff6c5770c39a32449fc0df51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:44:23 +0000 Subject: [PATCH 33/40] build(deps): bump httpx from 0.27.2 to 0.28.1 Bumps [httpx](https://github.com/encode/httpx) from 0.27.2 to 0.28.1. - [Release notes](https://github.com/encode/httpx/releases) - [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/httpx/compare/0.27.2...0.28.1) --- updated-dependencies: - dependency-name: httpx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 9 ++++----- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index f6356fd96d..b1234a0c33 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1903,13 +1903,13 @@ test = ["Cython (>=0.29.24)"] [[package]] name = "httpx" -version = "0.27.2" +version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, - {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -1918,7 +1918,6 @@ certifi = "*" h2 = {version = ">=3,<5", optional = true, markers = "extra == \"http2\""} httpcore = "==1.*" idna = "*" -sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] @@ -5691,4 +5690,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "f3f18f766dff485b3ee4a1c91cf1ae2bdf79c1e651a8eabf1b2c23155842bf3d" +content-hash = "d4faadfd7929e86b3e259811de69b0acbf9966237b57f15e281399c7678270b9" diff --git a/pyproject.toml b/pyproject.toml index 75c1edf4b3..a5b71920e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,7 @@ dateparser = "1.2.0" types-dateparser = "^1.2.0.20240420" uvicorn = {extras = ["standard"], version = "^0.32.0"} daphne = "^4.1.2" -httpx = {extras = ["http2"], version = "^0.27.2"} +httpx = {extras = ["http2"], version = "^0.28.1"} django-model-utils = "^5.0.0" django-permissions-policy = "^4.22.0" tiktoken = "^0.8.0" From edb614c13f323f0603d07bee8af59230e4a1a921 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:38:47 +0000 Subject: [PATCH 34/40] build(deps): bump uvicorn from 0.32.0 to 0.34.0 Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.32.0 to 0.34.0. - [Release notes](https://github.com/encode/uvicorn/releases) - [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/uvicorn/compare/0.32.0...0.34.0) --- updated-dependencies: - dependency-name: uvicorn dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 14 +++++++------- pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index b1234a0c33..bc14d03751 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5286,20 +5286,20 @@ dev = ["black", "flake8", "isort", "mypy", "parserator", "pytest"] [[package]] name = "uvicorn" -version = "0.32.0" +version = "0.34.0" description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "uvicorn-0.32.0-py3-none-any.whl", hash = "sha256:60b8f3a5ac027dcd31448f411ced12b5ef452c646f76f02f8cc3f25d8d26fd82"}, - {file = "uvicorn-0.32.0.tar.gz", hash = "sha256:f78b36b143c16f54ccdb8190d0a26b5f1901fe5a3c777e1ab29f26391af8551e"}, + {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, + {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, ] [package.dependencies] click = ">=7.0" colorama = {version = ">=0.4", optional = true, markers = "sys_platform == \"win32\" and extra == \"standard\""} h11 = ">=0.8" -httptools = {version = ">=0.5.0", optional = true, markers = "extra == \"standard\""} +httptools = {version = ">=0.6.3", optional = true, markers = "extra == \"standard\""} python-dotenv = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} pyyaml = {version = ">=5.1", optional = true, markers = "extra == \"standard\""} uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "(sys_platform != \"win32\" and sys_platform != \"cygwin\") and platform_python_implementation != \"PyPy\" and extra == \"standard\""} @@ -5307,7 +5307,7 @@ watchfiles = {version = ">=0.13", optional = true, markers = "extra == \"standar websockets = {version = ">=10.4", optional = true, markers = "extra == \"standard\""} [package.extras] -standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] +standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] [[package]] name = "uvloop" @@ -5690,4 +5690,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "d4faadfd7929e86b3e259811de69b0acbf9966237b57f15e281399c7678270b9" +content-hash = "89f5afe2c603ed7d4ba94cd5b282d1a3bd72bd80b4f68a8149238c98cb5b9614" diff --git a/pyproject.toml b/pyproject.toml index a5b71920e5..9d5b202185 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,7 +99,7 @@ ipython = "^8.28.0" time-machine = "^2.16.0" dateparser = "1.2.0" types-dateparser = "^1.2.0.20240420" -uvicorn = {extras = ["standard"], version = "^0.32.0"} +uvicorn = {extras = ["standard"], version = "^0.34.0"} daphne = "^4.1.2" httpx = {extras = ["http2"], version = "^0.28.1"} django-model-utils = "^5.0.0" From 0f8dee75205c8030de2d90edf5fa7f2e417c1ac1 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Thu, 2 Jan 2025 19:32:42 -0300 Subject: [PATCH 35/40] refactor(admin): use built-in types in build_admin_url --- cl/lib/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl/lib/admin.py b/cl/lib/admin.py index 3feb1d7edd..41f1fe4931 100644 --- a/cl/lib/admin.py +++ b/cl/lib/admin.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Optional, Type +from typing import Any, Type from urllib.parse import urlencode from django.contrib.contenttypes.admin import GenericTabularInline @@ -22,7 +22,7 @@ class NotesInline(GenericTabularInline): def build_admin_url( model_class: Type[Model], - query_params: Optional[Dict[str, Any]] = None, + query_params: dict[str, Any] | None = None, ) -> str: """ Construct a URL for a given model's admin view, optionally appending query parameters. From ef5fad6a694ab8675eec1fd559edd1ff778d9fe2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 23:33:38 +0000 Subject: [PATCH 36/40] build(deps): bump certifi from 2024.8.30 to 2024.12.14 Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.8.30 to 2024.12.14. - [Commits](https://github.com/certifi/python-certifi/compare/2024.08.30...2024.12.14) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index bc14d03751..3ae6c3b161 100644 --- a/poetry.lock +++ b/poetry.lock @@ -412,13 +412,13 @@ zstd = ["zstandard (==0.22.0)"] [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -5690,4 +5690,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "89f5afe2c603ed7d4ba94cd5b282d1a3bd72bd80b4f68a8149238c98cb5b9614" +content-hash = "4f394a6ae7c28100fb79846f78cd910bda5a0ceb8360bfa477c1db21ddc06cc1" diff --git a/pyproject.toml b/pyproject.toml index 9d5b202185..5213ffcec7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ ada-url = "^1.15.0" argparse = "*" beautifulsoup4 = "==4.12.*" celery = "^5.4.0" -certifi = "^2024.8.30" +certifi = "^2024.12.14" courts-db = "*" disposable-email-domains = "*" Django = "^5.1.2" From 2e7c5eab4bcb626c43bfaeb29f03eb64eeacb0fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 23:51:47 +0000 Subject: [PATCH 37/40] build(deps): bump django-pghistory from 3.4.4 to 3.5.1 Bumps [django-pghistory](https://github.com/AmbitionEng/django-pghistory) from 3.4.4 to 3.5.1. - [Release notes](https://github.com/AmbitionEng/django-pghistory/releases) - [Changelog](https://github.com/AmbitionEng/django-pghistory/blob/main/CHANGELOG.md) - [Commits](https://github.com/AmbitionEng/django-pghistory/compare/3.4.4...3.5.1) --- updated-dependencies: - dependency-name: django-pghistory dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3ae6c3b161..adf5f3eab6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1192,13 +1192,13 @@ django = ">=3.2" [[package]] name = "django-pghistory" -version = "3.4.4" +version = "3.5.1" description = "History tracking for Django and Postgres" optional = false -python-versions = "<4,>=3.8.0" +python-versions = "<4,>=3.9.0" files = [ - {file = "django_pghistory-3.4.4-py3-none-any.whl", hash = "sha256:d0402a8ef5a40ce39283bbf68d9f3388dbabf183d7efc0925972d231cba89621"}, - {file = "django_pghistory-3.4.4.tar.gz", hash = "sha256:2e68d5ee3a9e811a0f0663eb9c35ab6b3b92c8d93a4fa865aeaef2359eef0a41"}, + {file = "django_pghistory-3.5.1-py3-none-any.whl", hash = "sha256:900e5be084d20519528a1c66a354464a74b80ec0101abb7541ded61ff46759b7"}, + {file = "django_pghistory-3.5.1.tar.gz", hash = "sha256:28a4238326651d60c33a22337c3c93edc0e657d26ef7faac412875c7b4d40d1c"}, ] [package.dependencies] @@ -5690,4 +5690,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "4f394a6ae7c28100fb79846f78cd910bda5a0ceb8360bfa477c1db21ddc06cc1" +content-hash = "815286f13042965eb2b513b27e167cc232f4a92360b12c4961589a6bb12062ac" diff --git a/pyproject.toml b/pyproject.toml index 5213ffcec7..3452229182 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ django-filter = "^24.3" django-localflavor = "^4.0" django-markdown-deux = "^1.0.6" django-mathfilters = "*" -django-pghistory = "^3.4.4" +django-pghistory = "^3.5.1" django-ratelimit = "^4.1.0" django-storages = "^1.14.3" djangorestframework = {git = "https://github.com/encode/django-rest-framework.git", rev = "cc3c89a11c7ee9cf7cfd732e0a329c318ace71b2"} From d7ff7a745b4e7a7336bb671f85e4a4f26720f309 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 00:22:48 +0000 Subject: [PATCH 38/40] build(deps): bump sentry-sdk from 2.17.0 to 2.19.2 Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.17.0 to 2.19.2. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.17.0...2.19.2) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 14 ++++++++------ pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index adf5f3eab6..6bf559ed05 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4467,13 +4467,13 @@ websocket-client = ">=1.8,<2.0" [[package]] name = "sentry-sdk" -version = "2.17.0" +version = "2.19.2" description = "Python client for Sentry (https://sentry.io)" optional = false python-versions = ">=3.6" files = [ - {file = "sentry_sdk-2.17.0-py2.py3-none-any.whl", hash = "sha256:625955884b862cc58748920f9e21efdfb8e0d4f98cca4ab0d3918576d5b606ad"}, - {file = "sentry_sdk-2.17.0.tar.gz", hash = "sha256:dd0a05352b78ffeacced73a94e86f38b32e2eae15fff5f30ca5abb568a72eacf"}, + {file = "sentry_sdk-2.19.2-py2.py3-none-any.whl", hash = "sha256:ebdc08228b4d131128e568d696c210d846e5b9d70aa0327dec6b1272d9d40b84"}, + {file = "sentry_sdk-2.19.2.tar.gz", hash = "sha256:467df6e126ba242d39952375dd816fbee0f217d119bf454a8ce74cf1e7909e8d"}, ] [package.dependencies] @@ -4501,14 +4501,16 @@ grpcio = ["grpcio (>=1.21.1)", "protobuf (>=3.8.0)"] http2 = ["httpcore[http2] (==1.*)"] httpx = ["httpx (>=0.16.0)"] huey = ["huey (>=2)"] -huggingface-hub = ["huggingface-hub (>=0.22)"] +huggingface-hub = ["huggingface_hub (>=0.22)"] langchain = ["langchain (>=0.0.210)"] +launchdarkly = ["launchdarkly-server-sdk (>=9.8.0)"] litestar = ["litestar (>=2.0.0)"] loguru = ["loguru (>=0.5)"] openai = ["openai (>=1.0.0)", "tiktoken (>=0.3.0)"] +openfeature = ["openfeature-sdk (>=0.7.1)"] opentelemetry = ["opentelemetry-distro (>=0.35b0)"] opentelemetry-experimental = ["opentelemetry-distro"] -pure-eval = ["asttokens", "executing", "pure-eval"] +pure-eval = ["asttokens", "executing", "pure_eval"] pymongo = ["pymongo (>=3.1)"] pyspark = ["pyspark (>=2.4.4)"] quart = ["blinker (>=1.1)", "quart (>=0.16.1)"] @@ -5690,4 +5692,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.13, <3.14" -content-hash = "815286f13042965eb2b513b27e167cc232f4a92360b12c4961589a6bb12062ac" +content-hash = "8703160c5832be62299f5a926fa8670aed8715cb7c03dc7dd7be2d1a5c84fb2a" diff --git a/pyproject.toml b/pyproject.toml index 3452229182..ecff70afd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,7 +93,7 @@ django-override-storage = "^0.3.2" django-environ = "^0.11.2" judge-pics = "^2.0.5" django-admin-cursor-paginator = "^0.1.6" -sentry-sdk = {extras = ["celery", "django"], version = "^2.17.0"} +sentry-sdk = {extras = ["celery", "django"], version = "^2.19.2"} selenium = "^4.25.0" ipython = "^8.28.0" time-machine = "^2.16.0" From 89595fa9470f1dd99cb40a88233ade2f9c1cc380 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 00:58:12 +0000 Subject: [PATCH 39/40] build(deps-dev): bump express from 4.21.0 to 4.21.2 in /cl Bumps [express](https://github.com/expressjs/express) from 4.21.0 to 4.21.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md) - [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] --- cl/package-lock.json | 48 ++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/cl/package-lock.json b/cl/package-lock.json index b8a7038e1e..c2aa3c8d41 100644 --- a/cl/package-lock.json +++ b/cl/package-lock.json @@ -3435,9 +3435,9 @@ } }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, "engines": { "node": ">= 0.6" @@ -4477,9 +4477,9 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, "dependencies": { "accepts": "~1.3.8", @@ -4487,7 +4487,7 @@ "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -4501,7 +4501,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -4516,6 +4516,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/array-flatten": { @@ -6505,9 +6509,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true }, "node_modules/path-type": { @@ -11781,9 +11785,9 @@ } }, "cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true }, "cookie-signature": { @@ -12535,9 +12539,9 @@ } }, "express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, "requires": { "accepts": "~1.3.8", @@ -12545,7 +12549,7 @@ "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -12559,7 +12563,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -14010,9 +14014,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true }, "path-type": { From 99e58cf144061f0fbca1112c4aba7ce99c1f3941 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:26:05 +0000 Subject: [PATCH 40/40] build(deps): bump pyopenssl from 24.2.1 to 24.3.0 Bumps [pyopenssl](https://github.com/pyca/pyopenssl) from 24.2.1 to 24.3.0. - [Changelog](https://github.com/pyca/pyopenssl/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/pyopenssl/compare/24.2.1...24.3.0) --- updated-dependencies: - dependency-name: pyopenssl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6bf559ed05..3703770058 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3660,20 +3660,20 @@ testutils = ["gitpython (>3)"] [[package]] name = "pyopenssl" -version = "24.2.1" +version = "24.3.0" description = "Python wrapper module around the OpenSSL library" optional = false python-versions = ">=3.7" files = [ - {file = "pyOpenSSL-24.2.1-py3-none-any.whl", hash = "sha256:967d5719b12b243588573f39b0c677637145c7a1ffedcd495a487e58177fbb8d"}, - {file = "pyopenssl-24.2.1.tar.gz", hash = "sha256:4247f0dbe3748d560dcbb2ff3ea01af0f9a1a001ef5f7c4c647956ed8cbf0e95"}, + {file = "pyOpenSSL-24.3.0-py3-none-any.whl", hash = "sha256:e474f5a473cd7f92221cc04976e48f4d11502804657a08a989fb3be5514c904a"}, + {file = "pyopenssl-24.3.0.tar.gz", hash = "sha256:49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36"}, ] [package.dependencies] -cryptography = ">=41.0.5,<44" +cryptography = ">=41.0.5,<45" [package.extras] -docs = ["sphinx (!=5.2.0,!=5.2.0.post0,!=7.2.5)", "sphinx-rtd-theme"] +docs = ["sphinx (!=5.2.0,!=5.2.0.post0,!=7.2.5)", "sphinx_rtd_theme"] test = ["pretend", "pytest (>=3.0.1)", "pytest-rerunfailures"] [[package]]