unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#53821] [PATCH] Add the python-psycopg2-binary package.
@ 2022-02-06 14:38 Pierre-Henry Fröhring
  2022-02-06 14:50 ` Maxime Devos
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pierre-Henry Fröhring @ 2022-02-06 14:38 UTC (permalink / raw)
  To: 53821; +Cc: Pierre-Henry Fröhring

`(#:tests? #f)' because tests require a live PostegreSQL instance.
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7c1b5e8ed3..a136de9990 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28931,3 +28931,39 @@ (define-public python-types-dataclasses
      "This packages provides a collection of library stubs for Python, with
 static types.")
     (license license:asl2.0)))
+
+(define-public python-psycopg2-binary
+  (package
+    (name "python-psycopg2-binary")
+    (version "2.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "psycopg2-binary" version))
+              (sha256
+               (base32
+                "0kpaxg3lg5wg5ww5kxmzi2z2d7arsx13ci915d8a2pf17lqza7bn"))))
+    (build-system python-build-system)
+    (native-inputs (list postgresql))
+    (arguments
+     '(#:tests? #f))
+    (home-page "https://psycopg.org/")
+    (synopsis "Python-PostgreSQL Database Adapter")
+    (description
+     "Psycopg is the most popular PostgreSQL database
+adapter for the Python programming language.  Its main features are the
+complete implementation of the Python DB API 2.0 specification and the
+thread safety (several threads can share the same connection).  It was
+designed for heavily multi-threaded applications that create and
+destroy lots of cursors and make a large number of concurrent
+“INSERT”s or “UPDATE”s.
+
+Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in
+being both efficient and secure.  It features client-side and
+server-side cursors, asynchronous communication and notifications,
+“COPY TO/COPY FROM” support.  Many Python types are supported
+out-of-the-box and adapted to matching PostgreSQL data types;
+adaptation can be extended and customized thanks to a flexible objects
+adaptation system.
+
+Psycopg 2 is both Unicode and Python 3 friendly.")
+    (license license:lgpl3+)))
-- 
2.34.0





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

* [bug#53821] [PATCH] Add the python-psycopg2-binary package.
  2022-02-06 14:38 [bug#53821] [PATCH] Add the python-psycopg2-binary package Pierre-Henry Fröhring
@ 2022-02-06 14:50 ` Maxime Devos
  2022-02-06 15:27   ` Pierre-Henry Fröhring
  2022-02-06 14:51 ` Maxime Devos
  2022-02-06 15:35 ` Pierre-Henry Fröhring
  2 siblings, 1 reply; 7+ messages in thread
From: Maxime Devos @ 2022-02-06 14:50 UTC (permalink / raw)
  To: Pierre-Henry Fröhring, 53821

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

Pierre-Henry Fröhring schreef op zo 06-02-2022 om 15:38 [+0100]:
> +     "Psycopg is the most popular [...]
> +
> +[...], resulting in being both efficient and secure.
> 

From (guix)Synopses and Descriptions:

Please avoid marketing phrases such as “world-leading”,
“industrial-strength”, and “next-generation”, and avoid superlatives
like “the most advanced”—they are not helpful to users looking for a
package and may even sound suspicious.  Instead, try to be factual,
mentioning use cases and features.

Here, ‘most popular’ would could as marketing (it isn't important
whether it's popular, what is important is that it works well),
and to a lesser degree ‘efficient and secure’ -- everything is
supposed to be efficient and secure (with varying success).

Greetings,
Maxime.

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

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

* [bug#53821] [PATCH] Add the python-psycopg2-binary package.
  2022-02-06 14:38 [bug#53821] [PATCH] Add the python-psycopg2-binary package Pierre-Henry Fröhring
  2022-02-06 14:50 ` Maxime Devos
@ 2022-02-06 14:51 ` Maxime Devos
  2022-02-06 15:35 ` Pierre-Henry Fröhring
  2 siblings, 0 replies; 7+ messages in thread
From: Maxime Devos @ 2022-02-06 14:51 UTC (permalink / raw)
  To: Pierre-Henry Fröhring, 53821

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

Pierre-Henry Fröhring schreef op zo 06-02-2022 om 15:38 [+0100]:
> `(#:tests? #f)' because tests require a live PostegreSQL instance.
> ---
>  gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)

This needs to be documented ...

> +    (arguments
> +     '(#:tests? #f))

... here, as a comment, to aid future readers, and to avoid
accidentally teaching people to just disable tests.

Greetings,
Maxime.

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

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

* [bug#53821] [PATCH] Add the python-psycopg2-binary package.
  2022-02-06 14:50 ` Maxime Devos
@ 2022-02-06 15:27   ` Pierre-Henry Fröhring
  2022-02-06 15:44     ` Maxime Devos
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre-Henry Fröhring @ 2022-02-06 15:27 UTC (permalink / raw)
  To: Maxime Devos, 53821

Hello Maxime,

I've just copy-pasted the author's description as in:

  https://pypi.org/project/psycopg2-binary/

So, if I understand correctly, package contributors should (re)write
packages descriptions?

PHF

On Sun, 2022-02-06 at 15:50 +0100, Maxime Devos wrote:
> Pierre-Henry Fröhring schreef op zo 06-02-2022 om 15:38 [+0100]:
> > +     "Psycopg is the most popular [...]
> > +
> > +[...], resulting in being both efficient and secure.
> > 
> 
> From (guix)Synopses and Descriptions:
> 
> Please avoid marketing phrases such as “world-leading”,
> “industrial-strength”, and “next-generation”, and avoid superlatives
> like “the most advanced”—they are not helpful to users looking for a
> package and may even sound suspicious.  Instead, try to be factual,
> mentioning use cases and features.
> 
> Here, ‘most popular’ would could as marketing (it isn't important
> whether it's popular, what is important is that it works well),
> and to a lesser degree ‘efficient and secure’ -- everything is
> supposed to be efficient and secure (with varying success).
> 
> Greetings,
> Maxime.






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

* [bug#53821] [PATCH] Add the python-psycopg2-binary package.
  2022-02-06 14:38 [bug#53821] [PATCH] Add the python-psycopg2-binary package Pierre-Henry Fröhring
  2022-02-06 14:50 ` Maxime Devos
  2022-02-06 14:51 ` Maxime Devos
@ 2022-02-06 15:35 ` Pierre-Henry Fröhring
  2022-03-24 22:23   ` bug#53821: " Ludovic Courtès
  2 siblings, 1 reply; 7+ messages in thread
From: Pierre-Henry Fröhring @ 2022-02-06 15:35 UTC (permalink / raw)
  To: 53821; +Cc: Pierre-Henry Fröhring

`(#:tests? #f)' because tests require a live PostegreSQL instance.

Maxime's suggestions are taken into account in this patch:
  - `(#:tests? #f)' is commented in the code
  - superlatives in the description have been removed
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7c1b5e8ed3..7b2df04fd2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28931,4 +28931,39 @@ (define-public python-types-dataclasses
      "This packages provides a collection of library stubs for Python, with
 static types.")
     (license license:asl2.0)))
+
+(define-public python-psycopg2-binary
+  (package
+    (name "python-psycopg2-binary")
+    (version "2.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "psycopg2-binary" version))
+              (sha256
+               (base32
+                "0kpaxg3lg5wg5ww5kxmzi2z2d7arsx13ci915d8a2pf17lqza7bn"))))
+    (build-system python-build-system)
+    (native-inputs (list postgresql))
+    (arguments
+     ;; Tests are disable because they need a live instance of PostgreSQL.
+     '(#:tests? #f))
+    (home-page "https://psycopg.org/")
+    (synopsis "Python-PostgreSQL Database Adapter")
+    (description
+     "Psycopg is a PostgreSQL database adapter for the Python programming
+language.  Its main features are the complete implementation of the Python DB
+API 2.0 specification and the thread safety (several threads can share the
+same connection).  It was designed for heavily multi-threaded applications
+that create and destroy lots of cursors and make a large number of concurrent
+“INSERT”s or “UPDATE”s.
+
+Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in
+being both efficient and secure.  It features client-side and
+server-side cursors, asynchronous communication and notifications,
+“COPY TO/COPY FROM” support.  Many Python types are supported
+out-of-the-box and adapted to matching PostgreSQL data types;
+adaptation can be extended and customized thanks to a flexible objects
+adaptation system.
+
+Psycopg 2 is both Unicode and Python 3 friendly.")
+    (license license:lgpl3+)))
--
2.34.0





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

* [bug#53821] [PATCH] Add the python-psycopg2-binary package.
  2022-02-06 15:27   ` Pierre-Henry Fröhring
@ 2022-02-06 15:44     ` Maxime Devos
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Devos @ 2022-02-06 15:44 UTC (permalink / raw)
  To: Pierre-Henry Fröhring, 53821

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

Pierre-Henry Fröhring schreef op zo 06-02-2022 om 16:27 [+0100]:
> Hello Maxime,
> 
> I've just copy-pasted the author's description as in:
> 
>   https://pypi.org/project/psycopg2-binary/
> 
> So, if I understand correctly, package contributors should (re)write
> packages descriptions?

Yes, package descriptions from upstream are useful but may need to
be rewritten a bit.

Also, for whatever reason, people seem to always ignore the copyright
and license on upstream's description, but I don't understand how this
would be justified legally.

Greetings,
Maxime.

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

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

* bug#53821: [PATCH] Add the python-psycopg2-binary package.
  2022-02-06 15:35 ` Pierre-Henry Fröhring
@ 2022-03-24 22:23   ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2022-03-24 22:23 UTC (permalink / raw)
  To: Pierre-Henry Fröhring; +Cc: 53821-done

Hi,

Pierre-Henry Fröhring <contact@phfrohring.com> skribis:

> `(#:tests? #f)' because tests require a live PostegreSQL instance.
>
> Maxime's suggestions are taken into account in this patch:
>   - `(#:tests? #f)' is commented in the code
>   - superlatives in the description have been removed
> ---
>  gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 7c1b5e8ed3..7b2df04fd2 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -28931,4 +28931,39 @@ (define-public python-types-dataclasses
>       "This packages provides a collection of library stubs for Python, with
>  static types.")
>      (license license:asl2.0)))
> +
> +(define-public python-psycopg2-binary

Applied with minor tweaks to the synopsis and description and a commit
log that follows our conventions:

  https://guix.gnu.org/manual/devel/en/html_node/Submitting-Patches.html

Thanks, and thank you Maxime!

Ludo’.




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

end of thread, other threads:[~2022-03-24 22:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-06 14:38 [bug#53821] [PATCH] Add the python-psycopg2-binary package Pierre-Henry Fröhring
2022-02-06 14:50 ` Maxime Devos
2022-02-06 15:27   ` Pierre-Henry Fröhring
2022-02-06 15:44     ` Maxime Devos
2022-02-06 14:51 ` Maxime Devos
2022-02-06 15:35 ` Pierre-Henry Fröhring
2022-03-24 22:23   ` bug#53821: " Ludovic Courtès

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).