emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42792: closed ([PATCH] gnu: Add python-pydantic.)


From: GNU bug Tracking System
Subject: bug#42792: closed ([PATCH] gnu: Add python-pydantic.)
Date: Mon, 10 Aug 2020 10:06:02 +0000

Your message dated Mon, 10 Aug 2020 12:05:21 +0200
with message-id <87wo26g6ji.fsf@gnu.org>
and subject line Re: [bug#42792] [PATCH] gnu: Add python-pydantic.
has caused the debbugs.gnu.org bug report #42792,
regarding [PATCH] gnu: Add python-pydantic.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
42792: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42792
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: Add python-pydantic. Date: Mon, 10 Aug 2020 10:43:43 +0200
* gnu/packages/python-xyz.scm (python-pydantic): New variable.
---
 gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4026d13f2d..a36e99aa32 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3820,6 +3820,41 @@ Language (TOML) configuration files.")
      "This package provides a JSON RPC 2.0 server library for Python.")
     (license license:expat)))
 
+(define-public python-pydantic
+  (package
+    (name "python-pydantic")
+    (version "1.6.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/samuelcolvin/pydantic";)
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256 (base32 
"1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; Reported upstream: 
<https://github.com/samuelcolvin/pydantic/issues/1580>
+         ;; Not sure how to apply the suggested fix!?
+         (add-before 'check 'disable-test
+           (lambda _
+             (substitute* "tests/test_validators.py"
+               (("test_assert_raises_validation_error")
+                 "_test_assert_raises_validation_error"))
+             #t))
+         (replace 'check
+           (lambda _ (invoke "pytest" "-vv" "tests"))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/samuelcolvin/pydantic";)
+    (synopsis "Data validation and settings management using python type 
hinting")
+    (description
+      "Pydantic enforces type hints at runtime, and provides user friendly 
errors
+when data is invalid.")
+    (license license:expat)))
+
 (define-public python-pydocstyle
   (package
     (name "python-pydocstyle")
-- 
2.28.0




--- End Message ---
--- Begin Message --- Subject: Re: [bug#42792] [PATCH] gnu: Add python-pydantic. Date: Mon, 10 Aug 2020 12:05:21 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Hello Tanguy,

> * gnu/packages/python-xyz.scm (python-pydantic): New variable.

Applied with the following diff:

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a36e99aa32..4102902465 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3829,30 +3829,32 @@ Language (TOML) configuration files.")
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/samuelcolvin/pydantic";)
-              (commit (string-append "v" version))))
+             (commit (string-append "v" version))))
        (file-name (git-file-name name version))
-       (sha256 (base32 
"1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
+       (sha256
+        (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-         ;; Reported upstream: 
<https://github.com/samuelcolvin/pydantic/issues/1580>
-         ;; Not sure how to apply the suggested fix!?
+         ;; Reported upstream:
+         ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
+         ;; Disable the faulty test as the fix is unclear.
          (add-before 'check 'disable-test
            (lambda _
              (substitute* "tests/test_validators.py"
                (("test_assert_raises_validation_error")
-                 "_test_assert_raises_validation_error"))
+                "_test_assert_raises_validation_error"))
              #t))
          (replace 'check
            (lambda _ (invoke "pytest" "-vv" "tests"))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/samuelcolvin/pydantic";)
-    (synopsis "Data validation and settings management using python type 
hinting")
+    (synopsis "Python data validation and settings management")
     (description
-      "Pydantic enforces type hints at runtime, and provides user friendly 
errors
-when data is invalid.")
+     "Pydantic enforces type hints at runtime, and provides user friendly
+errors when data is invalid.")
     (license license:expat)))

Thanks,

Mathieu


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]