all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27081: Update python-cryptography to 1.8.1
@ 2017-05-26  7:38 Leo Famulari
  2017-05-26  7:41 ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2017-05-26  7:38 UTC (permalink / raw)
  To: 27081

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

This updates python-cryptography to 1.8.1.

I found that it needed the 'packaging' module available during the
tests. Also, python-pyopenssl required 'packaging' once I updated
python-cryptography, so this patch propagates 'packaging' from
python-cryptography.

WDYT?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#27081: [PATCH 1/2] gnu: Add python-packaging.
  2017-05-26  7:38 bug#27081: Update python-cryptography to 1.8.1 Leo Famulari
@ 2017-05-26  7:41 ` Leo Famulari
  2017-05-26  7:41   ` bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1 Leo Famulari
  2017-05-26 13:11   ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Marius Bakke
  0 siblings, 2 replies; 9+ messages in thread
From: Leo Famulari @ 2017-05-26  7:41 UTC (permalink / raw)
  To: 27081

---
 gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 62fada66a..e7dba73c6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14676,3 +14676,34 @@ JSON APIs with Behave.")
 
 (define-public python2-behave-web-api
   (package-with-python2 python-behave-web-api))
+
+(define-public python-packaging
+  (package
+    (name "python-packaging")
+    (version "16.8")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "packaging" version))
+        (sha256
+         (base32
+          "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pretend" ,python-pretend)
+       ("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-pyparsing" ,python-pyparsing)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/pypa/packaging")
+    (synopsis "Core utilities for Python packages")
+    (description "Packaging is a Python module for dealing with Python packages.
+It offers an interface for working with package versions, names, and dependency
+information.")
+;;; From 'LICENSE': This software is made available under the terms of *either*
+;;; of the licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions to
+;;; this software is made under the terms of *both* these licenses.
+    (license (list license:asl2.0 license:bsd-2)))) ; Users can choose between these licenses.
+
+(define-public python2-packaging
+  (package-with-python2 python-packaging))
-- 
2.13.0

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

* bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1.
  2017-05-26  7:41 ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Leo Famulari
@ 2017-05-26  7:41   ` Leo Famulari
  2017-05-26 13:19     ` Marius Bakke
  2017-05-26 13:11   ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Marius Bakke
  1 sibling, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2017-05-26  7:41 UTC (permalink / raw)
  To: 27081

* gnu/packages/python.scm (python-cryptography, python2-cryptography,
python-cryptography-vectors, python2-cryptography-vectors):
Update to 1.8.1.
(python-cryptography, python2-cryptography)[propagated-inputs]: Add
python-asn1crypto and python-packaging.
---
 gnu/packages/python.scm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e7dba73c6..5897863b6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -65,6 +65,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages django)
   #:use-module (gnu packages file)
@@ -7327,14 +7328,14 @@ responses, rather than doing any computation.")
 (define-public python-cryptography-vectors
   (package
     (name "python-cryptography-vectors")
-    (version "1.7.1")
+    (version "1.8.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cryptography_vectors" version))
        (sha256
         (base32
-         "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
+         "1mmd68apr62ixg6jjnq291kax9s85z8gc8y9ialhr008xan1zmig"))))
     (build-system python-build-system)
     (home-page "https://github.com/pyca/cryptography")
     (synopsis "Test vectors for the cryptography package")
@@ -7349,22 +7350,24 @@ responses, rather than doing any computation.")
 (define-public python-cryptography
   (package
     (name "python-cryptography")
-    (version "1.7.1")
+    (version "1.8.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cryptography" version))
        (sha256
         (base32
-         "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
+         "1441hal140550hlqmlji95a4wrz9wn50rrd7pig5crxl5cqj8d9j"))))
     (build-system python-build-system)
     (inputs
      `(("openssl" ,openssl)))
     (propagated-inputs
-     `(("python-cffi" ,python-cffi)
+     `(("python-asn1crypto" ,python-asn1crypto)
+       ("python-cffi" ,python-cffi)
        ("python-six" ,python-six)
        ("python-pyasn1" ,python-pyasn1)
        ("python-idna" ,python-idna)
+       ("python-packaging" ,python-packaging)
        ("python-iso8601" ,python-iso8601)))
     (native-inputs
      `(("python-cryptography-vectors" ,python-cryptography-vectors)
-- 
2.13.0

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

* bug#27081: [PATCH 1/2] gnu: Add python-packaging.
  2017-05-26  7:41 ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Leo Famulari
  2017-05-26  7:41   ` bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1 Leo Famulari
@ 2017-05-26 13:11   ` Marius Bakke
  2017-05-26 16:43     ` Leo Famulari
  1 sibling, 1 reply; 9+ messages in thread
From: Marius Bakke @ 2017-05-26 13:11 UTC (permalink / raw)
  To: Leo Famulari, 27081

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

Leo Famulari <leo@famulari.name> writes:

> ---
>  gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 62fada66a..e7dba73c6 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -14676,3 +14676,34 @@ JSON APIs with Behave.")
>  
>  (define-public python2-behave-web-api
>    (package-with-python2 python-behave-web-api))
> +
> +(define-public python-packaging
> +  (package
> +    (name "python-packaging")
> +    (version "16.8")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "packaging" version))
> +        (sha256
> +         (base32
> +          "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
> +    (build-system python-build-system)
> +    (native-inputs
> +     `(("python-pretend" ,python-pretend)
> +       ("python-pytest" ,python-pytest)))
> +    (propagated-inputs
> +     `(("python-pyparsing" ,python-pyparsing)
> +       ("python-six" ,python-six)))
> +    (home-page "https://github.com/pypa/packaging")
> +    (synopsis "Core utilities for Python packages")
> +    (description "Packaging is a Python module for dealing with Python packages.
> +It offers an interface for working with package versions, names, and dependency
> +information.")
> +;;; From 'LICENSE': This software is made available under the terms of *either*
> +;;; of the licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions to
> +;;; this software is made under the terms of *both* these licenses.

Please only use two semicolons here, with indentation. IMO the "triple
semicolons" are for "meta-commentary" about the module, not for code
comments.

Other than that looks good. As a side note, I typically don't append to
modules since the patch context quickly becomes outdated (like now), but
that's another issue entirely :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1.
  2017-05-26  7:41   ` bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1 Leo Famulari
@ 2017-05-26 13:19     ` Marius Bakke
  2017-05-26 16:41       ` Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Marius Bakke @ 2017-05-26 13:19 UTC (permalink / raw)
  To: Leo Famulari, 27081

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

Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/python.scm (python-cryptography, python2-cryptography,
> python-cryptography-vectors, python2-cryptography-vectors):
> Update to 1.8.1.
> (python-cryptography, python2-cryptography)[propagated-inputs]: Add
> python-asn1crypto and python-packaging.

I'm very confused about the 'packaging' dependency. Grepping for
'packaging' in the code returns zero hits. Do you know how it's used?
How does it fail without it? A comment would be good.

Also note, 1.8.2 was released a few hours ago. I assume you've tested
some of the important-looking dependencies, so let's get this in :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1.
  2017-05-26 13:19     ` Marius Bakke
@ 2017-05-26 16:41       ` Leo Famulari
  2017-05-26 16:57         ` Marius Bakke
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2017-05-26 16:41 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27081

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

On Fri, May 26, 2017 at 03:19:06PM +0200, Marius Bakke wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > * gnu/packages/python.scm (python-cryptography, python2-cryptography,
> > python-cryptography-vectors, python2-cryptography-vectors):
> > Update to 1.8.1.
> > (python-cryptography, python2-cryptography)[propagated-inputs]: Add
> > python-asn1crypto and python-packaging.
> 
> I'm very confused about the 'packaging' dependency. Grepping for
> 'packaging' in the code returns zero hits. Do you know how it's used?

Here are the results:

$ pwd
/home/leo/tmp/cryptography-1.8.1
$ grep -rI packaging
src/cryptography/utils.py:from packaging.version import parse
src/cryptography.egg-info/requires.txt:packaging

Did you search in another version of the code?

> How does it fail without it? A comment would be good.

The program uses the packaging.version module at run-time, and
simply crashes when it can't find it. Here is the part where it uses
code from that module:

$ sed -n 103,105p src/cryptography/utils.py
def _version_check(version, required_version):
    # This is used to check if we support update_into on CipherContext.
    return parse(version) >= parse(required_version)

This function gets used to check the version of python-cffi in
'src/cryptography/hazmat/primitives/ciphers/base.py' and branch based on
it.

Having read that code, perhaps we should try updating cffi soon. It
checks if cffi is version 1.7. We package 1.4.2; 1.10.0 is the latest.

> Also note, 1.8.2 was released a few hours ago. I assume you've tested
> some of the important-looking dependencies, so let's get this in :-)

Yes, of course I tested some important packages, like certbot :)

I'll retest with this new version. I don't expect big changes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#27081: [PATCH 1/2] gnu: Add python-packaging.
  2017-05-26 13:11   ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Marius Bakke
@ 2017-05-26 16:43     ` Leo Famulari
  0 siblings, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2017-05-26 16:43 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27081

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

On Fri, May 26, 2017 at 03:11:15PM +0200, Marius Bakke wrote:
> Leo Famulari <leo@famulari.name> writes:
> > +;;; From 'LICENSE': This software is made available under the terms of *either*
> > +;;; of the licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions to
> > +;;; this software is made under the terms of *both* these licenses.
> 
> Please only use two semicolons here, with indentation. IMO the "triple
> semicolons" are for "meta-commentary" about the module, not for code
> comments.

Okay, the Guile manual doesn't suggest this, but it seems fine.

> Other than that looks good. As a side note, I typically don't append to
> modules since the patch context quickly becomes outdated (like now), but
> that's another issue entirely :-)

That's my burden to bear in this case :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1.
  2017-05-26 16:41       ` Leo Famulari
@ 2017-05-26 16:57         ` Marius Bakke
  2017-05-26 18:52           ` Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Marius Bakke @ 2017-05-26 16:57 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 27081

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

Leo Famulari <leo@famulari.name> writes:

> On Fri, May 26, 2017 at 03:19:06PM +0200, Marius Bakke wrote:
>> Leo Famulari <leo@famulari.name> writes:
>> 
>> > * gnu/packages/python.scm (python-cryptography, python2-cryptography,
>> > python-cryptography-vectors, python2-cryptography-vectors):
>> > Update to 1.8.1.
>> > (python-cryptography, python2-cryptography)[propagated-inputs]: Add
>> > python-asn1crypto and python-packaging.
>> 
>> I'm very confused about the 'packaging' dependency. Grepping for
>> 'packaging' in the code returns zero hits. Do you know how it's used?
>
> Here are the results:
>
> $ pwd
> /home/leo/tmp/cryptography-1.8.1
> $ grep -rI packaging
> src/cryptography/utils.py:from packaging.version import parse
> src/cryptography.egg-info/requires.txt:packaging
>
> Did you search in another version of the code?

Odd. Since the patch did not apply, I went ahead and cloned the
repository:

0 ✓ ~/git/python-cryptography $ git grep -i packaging
1 ✗ ~/git/python-cryptography $ 

Digging through the log, it seems this dependency is removed in 1.9. Can
you mention that in a comment? :-)

https://github.com/pyca/cryptography/pull/3524/commits/d25152ba9e8a466d9521543002a2ee2f2b4cafc3

> Having read that code, perhaps we should try updating cffi soon. It
> checks if cffi is version 1.7. We package 1.4.2; 1.10.0 is the latest.

Sounds good!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1.
  2017-05-26 16:57         ` Marius Bakke
@ 2017-05-26 18:52           ` Leo Famulari
  0 siblings, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2017-05-26 18:52 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27081-done

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

On Fri, May 26, 2017 at 06:57:45PM +0200, Marius Bakke wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Fri, May 26, 2017 at 03:19:06PM +0200, Marius Bakke wrote:
> >> Leo Famulari <leo@famulari.name> writes:
> >> 
> >> > * gnu/packages/python.scm (python-cryptography, python2-cryptography,
> >> > python-cryptography-vectors, python2-cryptography-vectors):
> >> > Update to 1.8.1.
> >> > (python-cryptography, python2-cryptography)[propagated-inputs]: Add
> >> > python-asn1crypto and python-packaging.
> >> 
> >> I'm very confused about the 'packaging' dependency. Grepping for
> >> 'packaging' in the code returns zero hits. Do you know how it's used?
> >
> > Here are the results:
> >
> > $ pwd
> > /home/leo/tmp/cryptography-1.8.1
> > $ grep -rI packaging
> > src/cryptography/utils.py:from packaging.version import parse
> > src/cryptography.egg-info/requires.txt:packaging
> >
> > Did you search in another version of the code?
> 
> Odd. Since the patch did not apply, I went ahead and cloned the
> repository:
> 
> 0 ✓ ~/git/python-cryptography $ git grep -i packaging
> 1 ✗ ~/git/python-cryptography $ 
> 
> Digging through the log, it seems this dependency is removed in 1.9. Can
> you mention that in a comment? :-)
> 
> https://github.com/pyca/cryptography/pull/3524/commits/d25152ba9e8a466d9521543002a2ee2f2b4cafc3
> 
> > Having read that code, perhaps we should try updating cffi soon. It
> > checks if cffi is version 1.7. We package 1.4.2; 1.10.0 is the latest.
> 
> Sounds good!

Thanks for reviewing! Pushed as dc1bd2b560a490be17fed67131544ebe1e60673f

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-05-26 18:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26  7:38 bug#27081: Update python-cryptography to 1.8.1 Leo Famulari
2017-05-26  7:41 ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Leo Famulari
2017-05-26  7:41   ` bug#27081: [PATCH 2/2] gnu: python-cryptography: Update to 1.8.1 Leo Famulari
2017-05-26 13:19     ` Marius Bakke
2017-05-26 16:41       ` Leo Famulari
2017-05-26 16:57         ` Marius Bakke
2017-05-26 18:52           ` Leo Famulari
2017-05-26 13:11   ` bug#27081: [PATCH 1/2] gnu: Add python-packaging Marius Bakke
2017-05-26 16:43     ` Leo Famulari

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.