From 5e67203b97163ac45c159e006dbaa1aac36b9f9d Mon Sep 17 00:00:00 2001 From: Peter French Date: Tue, 30 Jul 2024 09:32:34 +0200 Subject: [PATCH 1/6] Update CHANGES.txt --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index f6297a0..8c93141 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,4 +11,4 @@ v1.2.5, 2022-07-12 -- Block some more bot useragents v1.2.6, 2022-07-13 -- Block one more useragent - "gh" v1.2.7, 2022-07-15 -- Block more user agents - "Petalbot" v1.3.0, 2023-02-20 -- Add rate limits -v1.4.0, 2-24-06-21 -- Migrate to Flask.Limiter for rate limits +v1.4.0, 2-24-06-21 -- Migrate to Flask.Limiter for rate limits. Breaking Change: 'app' must be passed to 'build_search_view' as the positon 1 argument From 62d2a4e209589b6af1fdbcc6b761dccd21bbdd08 Mon Sep 17 00:00:00 2001 From: Pete Date: Fri, 2 Aug 2024 10:19:03 +0200 Subject: [PATCH 2/6] Bump version number --- CHANGES.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 8c93141..10b2aad 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,4 +11,4 @@ v1.2.5, 2022-07-12 -- Block some more bot useragents v1.2.6, 2022-07-13 -- Block one more useragent - "gh" v1.2.7, 2022-07-15 -- Block more user agents - "Petalbot" v1.3.0, 2023-02-20 -- Add rate limits -v1.4.0, 2-24-06-21 -- Migrate to Flask.Limiter for rate limits. Breaking Change: 'app' must be passed to 'build_search_view' as the positon 1 argument +v2.0.0, 2-24-06-21 -- Migrate to Flask.Limiter for rate limits. Breaking Change: 'app' must be passed to 'build_search_view' as the positon 1 argument diff --git a/setup.py b/setup.py index 4f9854f..0ed95b3 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="canonicalwebteam.search", - version="1.4.0", + version="2.0.0", author="Canonical webteam", author_email="webteam@canonical.com", url="https://github.com/canonical/canonicalwebteam.search", From 58a6daa802751ae5a03767276620893a4706bcd6 Mon Sep 17 00:00:00 2001 From: Pete Date: Fri, 2 Aug 2024 10:35:33 +0200 Subject: [PATCH 3/6] Further readme updates based on review --- CHANGES.txt | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 10b2aad..0e94b8d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,4 +11,4 @@ v1.2.5, 2022-07-12 -- Block some more bot useragents v1.2.6, 2022-07-13 -- Block one more useragent - "gh" v1.2.7, 2022-07-15 -- Block more user agents - "Petalbot" v1.3.0, 2023-02-20 -- Add rate limits -v2.0.0, 2-24-06-21 -- Migrate to Flask.Limiter for rate limits. Breaking Change: 'app' must be passed to 'build_search_view' as the positon 1 argument +v1.4.0, 2024-07-26 -- Migrate to Flask.Limiter for rate limits. Breaking Change: 'app' must be passed to 'build_search_view' as the positon 1 argument diff --git a/README.md b/README.md index 559d63a..0e4e22a 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,10 @@ import talisker.requests from flask import Flask from canonicalwebteam.search import build_search_view -app = Flask("myapp") +app = Flask("myapp") # You must provide app session = talisker.requests.get_session() # You must provide a requests session -app.add_url_rule("/search", "search", build_search_view(session)) +app.add_url_rule("/search", "search", build_search_view(app, session)) # Or, a bit more complex example @@ -38,7 +38,7 @@ app.add_url_rule( "/docs/search", "docs-search", build_search_view( - app=app + app=app # require in version 1.4.0 onwards session=session, site="maas.io/docs", template_path="docs/search.html", From ab54bb8c994dee3a556e0df0b0906725c503dfbf Mon Sep 17 00:00:00 2001 From: Pete Date: Fri, 2 Aug 2024 10:37:42 +0200 Subject: [PATCH 4/6] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e4e22a..38388e1 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ app.add_url_rule( "/docs/search", "docs-search", build_search_view( - app=app # require in version 1.4.0 onwards + app=app # required in version 1.4.0 onwards session=session, site="maas.io/docs", template_path="docs/search.html", From b4b58749c88ea61f3436092499ff228dcb646694 Mon Sep 17 00:00:00 2001 From: Pete Date: Fri, 2 Aug 2024 10:38:03 +0200 Subject: [PATCH 5/6] Revert version bump --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0ed95b3..4f9854f 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="canonicalwebteam.search", - version="2.0.0", + version="1.4.0", author="Canonical webteam", author_email="webteam@canonical.com", url="https://github.com/canonical/canonicalwebteam.search", From 755c97fe4cbd3dc8303847279ff7b817d9d9d8d9 Mon Sep 17 00:00:00 2001 From: Pete Date: Fri, 2 Aug 2024 11:06:51 +0200 Subject: [PATCH 6/6] Bump version --- CHANGES.txt | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0e94b8d..81d8726 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,3 +12,4 @@ v1.2.6, 2022-07-13 -- Block one more useragent - "gh" v1.2.7, 2022-07-15 -- Block more user agents - "Petalbot" v1.3.0, 2023-02-20 -- Add rate limits v1.4.0, 2024-07-26 -- Migrate to Flask.Limiter for rate limits. Breaking Change: 'app' must be passed to 'build_search_view' as the positon 1 argument +v2.0.0, 2024-08-02 -- Release 1.4.0 as major version change. Migrate to Flask.Limiter for rate limits. Breaking Change: 'app' must be passed to 'build_search_view' as the positon 1 argument diff --git a/setup.py b/setup.py index 4f9854f..0ed95b3 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="canonicalwebteam.search", - version="1.4.0", + version="2.0.0", author="Canonical webteam", author_email="webteam@canonical.com", url="https://github.com/canonical/canonicalwebteam.search",