Skip to content

Commit

Permalink
Merge pull request #8521 from cfpb/update/deps
Browse files Browse the repository at this point in the history
Update some of our Python dependencies
  • Loading branch information
willbarton authored Jul 26, 2024
2 parents 9880439 + 376b314 commit 9fd8200
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions cfgov/search/elasticsearch_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
pre_page_move,
)

from django_opensearch_dsl.signals import BaseSignalProcessor
from django_opensearch_dsl.signals import RealTimeSignalProcessor
from opensearchpy import analyzer, token_filter, tokenizer

from search.models import Synonym
Expand Down Expand Up @@ -173,7 +173,7 @@ def rebuild_elasticsearch_index(*indices, stdout=sys.stdout):
)


class WagtailSignalProcessor(BaseSignalProcessor):
class WagtailSignalProcessor(RealTimeSignalProcessor):
"""Signal processor that reflects Wagtail changes in Elasticsearch.
When Wagtail pages are saved, deleted, or moved, we want to update the
Expand All @@ -198,20 +198,20 @@ def check_afp(self, instance):

return instance

def handle_delete(self, sender, instance, **kwargs):
super().handle_delete(sender, self.check_afp(instance), **kwargs)
def handle_pre_delete(self, sender, instance, **kwargs):
super().handle_pre_delete(sender, self.check_afp(instance), **kwargs)

def handle_save(self, sender, instance, **kwargs):
super().handle_save(sender, self.check_afp(instance), **kwargs)

def setup(self):
page_published.connect(self.handle_save)
page_unpublished.connect(self.handle_delete)
pre_page_move.connect(self.handle_delete)
page_unpublished.connect(self.handle_pre_delete)
pre_page_move.connect(self.handle_pre_delete)
post_page_move.connect(self.handle_save)

def teardown(self):
page_published.disconnect(self.handle_save)
page_unpublished.disconnect(self.handle_delete)
pre_page_move.disconnect(self.handle_delete)
page_unpublished.disconnect(self.handle_pre_delete)
pre_page_move.disconnect(self.handle_pre_delete)
post_page_move.disconnect(self.handle_save)
22 changes: 11 additions & 11 deletions requirements/libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
base36==0.1.1
backports.zoneinfo==0.2.1
beautifulsoup4==4.11.2
boto3==1.34.54
boto3==1.34.144
django-autocomplete-light==3.11.0
django-cors-headers==4.3.1
django-cors-headers==4.4.0
django-csp==3.8
django-opensearch-dsl==0.5.2
django-opensearch-dsl==0.6.2
django-extensions==3.2.3
django-flags==5.0.13
django-formtools==2.5.1
django-health-check==3.18.1
django-htmx==1.17.3
django-health-check==3.18.3
django-htmx==1.18.0
django-localflavor==4.0
django-mptt==0.14.0
django-storages==1.14.2
django-storages==1.14.4
django-treebeard==4.7.1
edgegrid-python==1.3.1
elasticsearch<7.11 # Keep pinned to the deployed ES version
Expand All @@ -23,14 +23,14 @@ Jinja2==3.1.4
lxml==5.1.0
matplotlib==3.7.5
mozilla-django-oidc==4.0.1
opensearch-py==2.4.2
psycopg2-binary==2.9.6
opensearch-py==2.6.0
psycopg2-binary==2.9.9
python-dateutil==2.9.0
regdown==1.0.7
requests-aws4auth==1.2.3
s3transfer==0.10.0
s3transfer==0.10.2
setuptools>=65.5.1
tailslide==0.1.1
tailslide==0.2.0
wagtail-autocomplete==0.11.0
wagtail-content-audit==0.1
wagtail_draftail_anchors==0.6.0
Expand All @@ -40,7 +40,7 @@ wagtail-inventory==2.6
wagtail-placeholder-images==0.1.1
wagtail-sharing==2.12.1
wagtail-treemodeladmin==1.9.2
wagtailmedia==0.15.1
wagtailmedia==0.15.2

# These packages are installed from GitHub.
https://github.com/cfpb/owning-a-home-api/releases/download/0.18.2/owning_a_home_api-0.18.2-py3-none-any.whl
Expand Down
4 changes: 2 additions & 2 deletions requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r base.txt
django-cprofile-middleware==1.0.5
django-debug-toolbar==4.3.0
django-debug-toolbar==4.4.6
django-sslserver==0.22
pre-commit==3.5.0
tox==4.13.0
tox==4.16.0

0 comments on commit 9fd8200

Please sign in to comment.