GNU bug report logs -
#42792
[PATCH] gnu: Add python-pydantic.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42792 in the body.
You can then email your comments to 42792 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#42792
; Package
guix-patches
.
(Mon, 10 Aug 2020 08:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tanguy Le Carrour <tanguy <at> bioneland.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 10 Aug 2020 08:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Reply sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
You have taken responsibility.
(Mon, 10 Aug 2020 10:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tanguy Le Carrour <tanguy <at> bioneland.org>
:
bug acknowledged by developer.
(Mon, 10 Aug 2020 10:06:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 42792-done <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#42792
; Package
guix-patches
.
(Mon, 10 Aug 2020 14:20:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 42792-done <at> debbugs.gnu.org (full text, mbox):
Hi Mathieu,
Le 08/10, Mathieu Othacehe a écrit :
> > * 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"))))
Thanks for paying attention to every details!!
Actually, those things have been bothering me for quiet a while…
They are not reported by `./pre-inst-env guix lint python-pydantic` or
fixed by `emacs --script etc/indent-code.el gnu/packages/python-xyz.scm python-pydantic`. :-(
Would the following have been acceptable?
```
> + (sha256 (base32
> + "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
```
And what about this? (2-space indent instead of 1, like `add-before` below)
```
> + (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.
Much better, thanks!
In retrospect, I realize that I should have put the question in the
commit message for a maintainer to read, not in the package definition.
Would that have been better?!
> (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")
Sorry, I still suck at synopsis! :-(
> (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!
--
Tanguy
Information forwarded
to
guix-patches <at> gnu.org
:
bug#42792
; Package
guix-patches
.
(Tue, 11 Aug 2020 08:37:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 42792-done <at> debbugs.gnu.org (full text, mbox):
Hey Tanguy,
>> (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"))))
>
> Thanks for paying attention to every details!!
> Actually, those things have been bothering me for quiet a while…
> They are not reported by `./pre-inst-env guix lint python-pydantic` or
> fixed by `emacs --script etc/indent-code.el gnu/packages/python-xyz.scm python-pydantic`. :-(
The first diff is fixed when running "./etc/indent-code.el
gnu/packages/python-xyz.scm python-pydantic" for me.
>
> Would the following have been acceptable?
>
> ```
>> + (sha256 (base32
>> + "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
> ```
It is acceptable but the convention is to put "base32" on the next line.
>
> And what about this? (2-space indent instead of 1, like `add-before` below)
>
> ```
>> + (sha256
>> + (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
> ```
No only one space here, this is also handled by the indent script for me.
>
>
>> (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.
>
> Much better, thanks!
> In retrospect, I realize that I should have put the question in the
> commit message for a maintainer to read, not in the package definition.
> Would that have been better?!
No it's perfectly fine in the package declaration :)
Hope I'm not bothering you to much with this boring syntactic stuff :p
Thanks,
Mathieu
Information forwarded
to
guix-patches <at> gnu.org
:
bug#42792
; Package
guix-patches
.
(Tue, 11 Aug 2020 09:01:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 42792-done <at> debbugs.gnu.org (full text, mbox):
Hi Mathieu,
Le 08/11, Mathieu Othacehe a écrit :
> Hey Tanguy,
>
> >> (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"))))
> >
> > Thanks for paying attention to every details!!
> > Actually, those things have been bothering me for quiet a while…
> > They are not reported by `./pre-inst-env guix lint python-pydantic` or
> > fixed by `emacs --script etc/indent-code.el gnu/packages/python-xyz.scm python-pydantic`. :-(
>
> The first diff is fixed when running "./etc/indent-code.el
> gnu/packages/python-xyz.scm python-pydantic" for me.
>
> >
> > Would the following have been acceptable?
> >
> > ```
> >> + (sha256 (base32
> >> + "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
> > ```
>
> It is acceptable but the convention is to put "base32" on the next line.
>
> >
> > And what about this? (2-space indent instead of 1, like `add-before` below)
> >
> > ```
> >> + (sha256
> >> + (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
> > ```
>
> No only one space here, this is also handled by the indent script for me.
Actually, I think there might be a problem with the way I use the
script, because it does not fix anything!? :-(
And before you say it, I know, I should be using Emacs and not Vim! ;-)
I've considered moving to Emacs as my dev environment (not as my text editor),
but there are so many things I have to set up to feel at home: evil,
python, fuzzy file search… I hope I'll have some time to work on this
later this month.
> >> (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.
> >
> > Much better, thanks!
> > In retrospect, I realize that I should have put the question in the
> > commit message for a maintainer to read, not in the package definition.
> > Would that have been better?!
>
> No it's perfectly fine in the package declaration :)
>
> Hope I'm not bothering you to much with this boring syntactic stuff :p
Not at all! I actually very much appreciate the fact that people take the
time to review and discuss contributions!
Regards
--
Tanguy
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 Sep 2020 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.