unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54601] Add python-flask-compress and python-flask-seasurf
@ 2022-03-27 19:43 kiasoc5--- via Guix-patches via
  2022-03-27 19:47 ` Maxime Devos
  2023-07-10 11:29 ` bug#54601: " Ricardo Wurmus
  0 siblings, 2 replies; 5+ messages in thread
From: kiasoc5--- via Guix-patches via @ 2022-03-27 19:43 UTC (permalink / raw)
  To: 54601

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0001-gnu-Add-python-flask-compress.patch --]
[-- Type: text/x-patch, Size: 1619 bytes --]

From 0d09e7fb5d68f30995663d9ff9621a234678c546 Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@tutanota.com>
Date: Sun, 27 Mar 2022 15:27:43 -0400
Subject: [PATCH 1/2] gnu: Add python-flask-compress.

* gnu/packages/python-web.scm (python-flask-compress): New variable.
---
 gnu/packages/python-web.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 9c2a48166a..3de2629b29 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6388,3 +6388,23 @@ (define-public python-tweepy
     (description "This package provides @code{Tweepy}, an easy-to-use Python
 library for accessing the Twitter API.")
     (license license:expat)))
+
+(define-public python-flask-compress
+  (package
+    (name "python-flask-compress")
+    (version "1.11")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "Flask-Compress" version))
+        (sha256
+          (base32 "0762n6g1rz1n01dh0y16fgpi262kl01m0z9liv52asvd8hng6sgm"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-brotli python-flask))
+    (native-inputs (list python-setuptools-scm))
+    (home-page "https://github.com/colour-science/flask-compress")
+    (synopsis
+      "Compress responses in your Flask app with gzip, deflate or brotli.")
+    (description
+      "Compress responses in your Flask app with gzip, deflate or brotli.")
+    (license license:expat)))

base-commit: 2344fb10972a4cefead8e7aa3e0b807da4cf4570
prerequisite-patch-id: 7bac83669fb48a2cf3bf087016093da017ba7ec5
-- 
2.35.1


[-- Attachment #3: 0002-gnu-Add-python-flask-seasurf.patch --]
[-- Type: text/x-patch, Size: 1615 bytes --]

From 7664077a8444286755cf82168d7dc2ad7efb06c1 Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@tutanota.com>
Date: Sun, 27 Mar 2022 15:27:59 -0400
Subject: [PATCH 2/2] gnu: Add python-flask-seasurf.

* gnu/packages/python-web.scm (python-flask-seasurf): New variable.
---
 gnu/packages/python-web.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 3de2629b29..931d1500b7 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6408,3 +6408,28 @@ (define-public python-flask-compress
     (description
       "Compress responses in your Flask app with gzip, deflate or brotli.")
     (license license:expat)))
+
+(define-public python-flask-seasurf
+  (package
+  (name "python-flask-seasurf")
+  (version "0.3.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "Flask-SeaSurf" version))
+      (sha256
+        (base32 "04yfwln40iji7vn517mmkflnzxy7wa11yfhs124rch4s7pqhvygz"))))
+  (build-system python-build-system)
+    (arguments
+         `(#:phases
+           (modify-phases %standard-phases
+             (replace 'check
+               (lambda* (#:key tests? #:allow-other-keys)
+                 (when tests?
+                   (invoke "python" "-m" "unittest")))))))
+  (propagated-inputs (list python-flask))
+  (native-inputs (list python-tox))
+  (home-page "https://github.com/maxcountryman/flask-seasurf/")
+  (synopsis "An updated CSRF extension for Flask.")
+  (description "An updated CSRF extension for Flask.")
+  (license license:bsd-3)))
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#54601] Add python-flask-compress and python-flask-seasurf
  2022-03-27 19:43 [bug#54601] Add python-flask-compress and python-flask-seasurf kiasoc5--- via Guix-patches via
@ 2022-03-27 19:47 ` Maxime Devos
  2022-03-27 20:49   ` kiasoc5--- via Guix-patches via
  2023-07-10 11:29 ` bug#54601: " Ricardo Wurmus
  1 sibling, 1 reply; 5+ messages in thread
From: Maxime Devos @ 2022-03-27 19:47 UTC (permalink / raw)
  To: kiasoc5, 54601

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

kiasoc5--- via Guix-patches via schreef op zo 27-03-2022 om 21:43
[+0200]:
> +    (synopsis
> +      "Compress responses in your Flask app with gzip, deflate or
> brotli.")
> +    (description
> +      "Compress responses in your Flask app with gzip, deflate or
> brotli.")

The description is missing, and ‘do foo in your Brand(TM) app’ reads
like marketing.  ’(guix)Synopses and Descriptions’ recommends longer,
and more descriptive, descriptions.  E.g., what do ‘responses’ mean
here?  Is it Flask-exclusive, or can it also be used outside a Flask
context?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#54601] Add python-flask-compress and python-flask-seasurf
  2022-03-27 19:47 ` Maxime Devos
@ 2022-03-27 20:49   ` kiasoc5--- via Guix-patches via
  2022-03-28 12:22     ` Maxime Devos
  0 siblings, 1 reply; 5+ messages in thread
From: kiasoc5--- via Guix-patches via @ 2022-03-27 20:49 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 54601

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

Mar 27, 2022, 19:47 by maximedevos@telenet.be:

> kiasoc5--- via Guix-patches via schreef op zo 27-03-2022 om 21:43
> [+0200]:
>
>> +    (synopsis
>> +      "Compress responses in your Flask app with gzip, deflate or
>> brotli.")
>> +    (description
>> +      "Compress responses in your Flask app with gzip, deflate or
>> brotli.")
>>
>
> The description is missing, and ‘do foo in your Brand(TM) app’ reads
> like marketing.  ’(guix)Synopses and Descriptions’ recommends longer,
> and more descriptive, descriptions.  E.g., what do ‘responses’ mean
> here?  Is it Flask-exclusive, or can it also be used outside a Flask
> context?
>
Forgot to check that. Please see updated patches. Also removed unneeded python-tox input.

> Greetings,
> Maxime.
>


[-- Attachment #2: 0001-gnu-Add-python-flask-compress.patch --]
[-- Type: text/x-patch, Size: 2048 bytes --]

From 35aa7b6052b1096ec1d4279cda31b0cdb8484ba0 Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@tutanota.com>
Date: Sun, 27 Mar 2022 15:27:43 -0400
Subject: [PATCH 1/2] gnu: Add python-flask-compress.

* gnu/packages/python-web.scm (python-flask-compress): New variable.
---
 gnu/packages/python-web.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 9c2a48166a..38164d8243 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6388,3 +6388,26 @@ (define-public python-tweepy
     (description "This package provides @code{Tweepy}, an easy-to-use Python
 library for accessing the Twitter API.")
     (license license:expat)))
+
+(define-public python-flask-compress
+  (package
+    (name "python-flask-compress")
+    (version "1.11")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "Flask-Compress" version))
+              (sha256
+               (base32
+                "0762n6g1rz1n01dh0y16fgpi262kl01m0z9liv52asvd8hng6sgm"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-brotli python-flask))
+    (native-inputs (list python-setuptools-scm))
+    (home-page "https://github.com/colour-science/flask-compress")
+    (synopsis "Compress Flask application responses and static files.")
+    (description
+     "Compress Flask application responses and static files with gzip, deflate and brotli without
+a server (like Nginx). Flask-Compress both adds the various headers required for a compressed response
+and compresses the response data. Internally, every time a request is made the extension will check
+if it matches one of the compressible MIME types and whether the client and the server use some common
+compression algorithm, and will automatically attach the appropriate headers.")
+    (license license:expat)))

base-commit: 2344fb10972a4cefead8e7aa3e0b807da4cf4570
prerequisite-patch-id: 7bac83669fb48a2cf3bf087016093da017ba7ec5
-- 
2.35.1


[-- Attachment #3: 0002-gnu-Add-python-flask-seasurf.patch --]
[-- Type: text/x-patch, Size: 2027 bytes --]

From 7406000b099aca3dfaa2cf152e2b4fa1581e60f6 Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@tutanota.com>
Date: Sun, 27 Mar 2022 15:27:59 -0400
Subject: [PATCH 2/2] gnu: Add python-flask-seasurf.

* gnu/packages/python-web.scm (python-flask-seasurf): New variable.
---
 gnu/packages/python-web.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 38164d8243..3b70ea7843 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6411,3 +6411,30 @@ (define-public python-flask-compress
 if it matches one of the compressible MIME types and whether the client and the server use some common
 compression algorithm, and will automatically attach the appropriate headers.")
     (license license:expat)))
+
+(define-public python-flask-seasurf
+  (package
+    (name "python-flask-seasurf")
+    (version "0.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "Flask-SeaSurf" version))
+              (sha256
+               (base32
+                "04yfwln40iji7vn517mmkflnzxy7wa11yfhs124rch4s7pqhvygz"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "python" "-m" "unittest")))))))
+    (propagated-inputs (list python-flask))
+    (home-page "https://github.com/maxcountryman/flask-seasurf")
+    (synopsis "Cross-site request forgery (CSRF) extension for Flask.")
+    (description
+     "SeaSurf is a Flask extension for preventing cross-site request forgery (CSRF).
+CSRF attacks are problematic because the mechanism they use is relatively easy to exploit. This
+extension attempts to aid you in securing your application from such attacks. This extension is
+based on the Django middleware.")
+    (license license:bsd-3)))
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#54601] Add python-flask-compress and python-flask-seasurf
  2022-03-27 20:49   ` kiasoc5--- via Guix-patches via
@ 2022-03-28 12:22     ` Maxime Devos
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2022-03-28 12:22 UTC (permalink / raw)
  To: kiasoc5; +Cc: 54601

kiasoc5@tutanota.com schreef op zo 27-03-2022 om 22:49 [+0200]:
> +    (synopsis "Compress Flask application responses and static
> files.")
> +    (description
> +     "Compress Flask application responses and static files with
> gzip, deflate and brotli without
> +a server (like Nginx). Flask-Compress both adds the various headers
> required for a compressed response
> +and compresses the response data. Internally, every time a request
> is made the extension will check
> +if it matches one of the compressible MIME types and whether the
> client and the server use some common
> +compression algorithm, and will automatically attach the appropriate
> headers.")

The new descriptions look nice.

Greetings,
Maxime.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#54601: Add python-flask-compress and python-flask-seasurf
  2022-03-27 19:43 [bug#54601] Add python-flask-compress and python-flask-seasurf kiasoc5--- via Guix-patches via
  2022-03-27 19:47 ` Maxime Devos
@ 2023-07-10 11:29 ` Ricardo Wurmus
  1 sibling, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2023-07-10 11:29 UTC (permalink / raw)
  To: 54601-done

I updated the patches for the latest versions, used the
pyproject-build-system, and trimmed the descriptions a bit.

Pushed to the master branch.  Thank you!

-- 
Ricardo




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-10 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-27 19:43 [bug#54601] Add python-flask-compress and python-flask-seasurf kiasoc5--- via Guix-patches via
2022-03-27 19:47 ` Maxime Devos
2022-03-27 20:49   ` kiasoc5--- via Guix-patches via
2022-03-28 12:22     ` Maxime Devos
2023-07-10 11:29 ` bug#54601: " Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).