Re: git: f5711e95bcd1 - main - security/py-cryptography: Update to 38.0.1

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Fri, 14 Oct 2022 09:40:46 UTC
On 9 Oct 2022, at 17:40, Po-Chuan Hsieh wrote:
> The branch main has been updated by sunpoet:
>
> URL: 
> https://cgit.FreeBSD.org/ports/commit/?id=f5711e95bcd17b154bdd697cb3f1650a788fdf3c
>
> commit f5711e95bcd17b154bdd697cb3f1650a788fdf3c
> Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
> AuthorDate: 2022-10-09 15:32:23 +0000
> Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
> CommitDate: 2022-10-09 15:37:58 +0000
>
>     security/py-cryptography: Update to 38.0.1
>
>     Changes:        
> https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst
>                  https://cryptography.io/en/latest/changelog/
> ---

It looks like this broke scapy too, which in turn breaks a large subset 
of the freebsd-ci regression tests.

	(kp@nut)  ~ % scapy                                                     
                                                                                                            [11:36]
	INFO: Can't import matplotlib. Won't be able to plot.
	INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
	WARNING: No IPv4 address found on bnxt1 !
	WARNING: No IPv4 address found on cc0 !
	WARNING: more No IPv4 address found on vcc0 !
	WARNING: IPython not available. Using standard Python shell instead.
	AutoCompletion, History are disabled.

	                     aSPY//YASa
	             apyyyyCY//////////YCa       |
	            sY//////YSpcs  scpCY//Pp     | Welcome to Scapy
	 ayp ayyyyyyySCP//Pp           syY//C    | Version 2.4.5
	 AYAsAYYYYYYYY///Ps              cY//S   |
	         pCCCCY//p          cSSps y//Y   | 
https://github.com/secdev/scapy
	         SPPPP///a          pP///AC//Y   |
	              A//A            cyP////C   | Have fun!
	              p///Ac            sC///a   |
	              P////YCpc           A//A   | We are in France, we say 
Skappee.
	       scccccp///pSP///p          p//Y   | OK? Merci.
	      sY/////////y  caa           S//P   |             -- Sebastien 
Chabal
	       cayCyayP//Ya              pY/Ya   |
	        sY/PsY////YCc          aC//Yp
	         sc  sccaCY//PCypaapyCP//YSs
	                  spCPY//////YPSps
	                       ccaacs

	>>>
	now exiting InteractiveConsole...
	(kp@nut)  ~ % sudo pkg install py39-cryptography                        
                                                                                                            [11:36]
	Updating FreeBSD repository catalogue...
	FreeBSD repository is up to date.
	All repositories are up to date.
	The following 1 package(s) will be affected (of 0 checked):

	Installed packages to be UPGRADED:
		py39-cryptography: 3.4.8 -> 38.0.1

	Number of packages to be upgraded: 1

	361 KiB to be downloaded.

	Proceed with this action? [y/N]: y
	[1/1] Fetching py39-cryptography-38.0.1.pkg: 100%  361 KiB 369.6kB/s    
00:01
	Checking integrity... done (0 conflicting)
	[1/1] Upgrading py39-cryptography from 3.4.8 to 38.0.1...
	[1/1] Extracting py39-cryptography-38.0.1: 100%
	(kp@nut)  ~ % scapy                                                     
                                                                                                            [11:37]
	INFO: Can't import matplotlib. Won't be able to plot.
	INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
	WARNING: No IPv4 address found on bnxt1 !
	WARNING: No IPv4 address found on cc0 !
	WARNING: more No IPv4 address found on vcc0 !
	/usr/local/lib/python3.9/site-packages/scapy/layers/ipsec.py:471: 
CryptographyDeprecationWarning: Blowfish has been deprecated
	  cipher=algorithms.Blowfish,
	/usr/local/lib/python3.9/site-packages/scapy/layers/ipsec.py:485: 
CryptographyDeprecationWarning: CAST5 has been deprecated
	  cipher=algorithms.CAST5,
	ERROR: Loading module scapy.layers.ipsec
	Traceback (most recent call last):
	  File "/usr/local/lib/python3.9/site-packages/scapy/main.py", line 
163, in _load
	    mod = importlib.import_module(module)
	  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in 
import_module
	    return _bootstrap._gcd_import(name[level:], package, level)
	  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
	  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
	  File "<frozen importlib._bootstrap>", line 986, in 
_find_and_load_unlocked
	  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
	  File "<frozen importlib._bootstrap_external>", line 850, in 
exec_module
	  File "<frozen importlib._bootstrap>", line 228, in 
_call_with_frames_removed
	  File "/usr/local/lib/python3.9/site-packages/scapy/layers/ipsec.py", 
line 490, in <module>
	    from cryptography.hazmat.primitives.hmac import HMAC
	  File 
"/usr/local/lib/python3.9/site-packages/cryptography/hazmat/primitives/hmac.py", 
line 12, in <module>
	    from cryptography.hazmat.backends.openssl.hmac import _HMACContext
	  File 
"/usr/local/lib/python3.9/site-packages/cryptography/hazmat/backends/openssl/__init__.py", 
line 6, in <module>
	    from cryptography.hazmat.backends.openssl.backend import backend
	  File 
"/usr/local/lib/python3.9/site-packages/cryptography/hazmat/backends/openssl/backend.py", 
line 13, in <module>
	    from cryptography import utils, x509
	  File 
"/usr/local/lib/python3.9/site-packages/cryptography/x509/__init__.py", 
line 6, in <module>
	    from cryptography.x509 import certificate_transparency
	  File 
"/usr/local/lib/python3.9/site-packages/cryptography/x509/certificate_transparency.py", 
line 10, in <module>
	    from cryptography.hazmat.bindings._rust import x509 as rust_x509
	ImportError: cannot import name 'x509' from 
'cryptography.hazmat.bindings._rust' (unknown location)
	WARNING: IPython not available. Using standard Python shell instead.
	AutoCompletion, History are disabled.

	                     aSPY//YASa
	             apyyyyCY//////////YCa       |
	            sY//////YSpcs  scpCY//Pp     | Welcome to Scapy
	 ayp ayyyyyyySCP//Pp           syY//C    | Version 2.4.5
	 AYAsAYYYYYYYY///Ps              cY//S   |
	         pCCCCY//p          cSSps y//Y   | 
https://github.com/secdev/scapy
	         SPPPP///a          pP///AC//Y   |
	              A//A            cyP////C   | Have fun!
	              p///Ac            sC///a   |
	              P////YCpc           A//A   | Craft packets like it is 
your last
	       scccccp///pSP///p          p//Y   | day on earth.
	      sY/////////y  caa           S//P   |                      -- 
Lao-Tze
	       cayCyayP//Ya              pY/Ya   |
	        sY/PsY////YCc          aC//Yp
	         sc  sccaCY//PCypaapyCP//YSs
	                  spCPY//////YPSps
	                       ccaacs

	>>>
	now exiting InteractiveConsole...

Best regards,
Kristof