public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2018-09-26 14:04 Virgil Dupras
  0 siblings, 0 replies; 10+ messages in thread
From: Virgil Dupras @ 2018-09-26 14:04 UTC (permalink / raw
  To: gentoo-commits

commit:     28e7e2b6ccd187aa7850b3a9201b6d8b43898905
Author:     Virgil Dupras <vdupras <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 26 13:56:25 2018 +0000
Commit:     Virgil Dupras <vdupras <AT> gentoo <DOT> org>
CommitDate: Wed Sep 26 14:00:47 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28e7e2b6

dev-python/paramiko: bump to 2.4.2

Also, disable the server feature by default for security reasons. It can
be re-enabled with the 'server' USE flag, which is going to be
hard-masked.

Bug: https://bugs.gentoo.org/666619
Package-Manager: Portage-2.3.50, Repoman-2.3.11
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |  1 +
 .../files/paramiko-2.4.2-disable-server.patch      | 46 ++++++++++++++++
 dev-python/paramiko/metadata.xml                   |  3 ++
 dev-python/paramiko/paramiko-2.4.2.ebuild          | 62 ++++++++++++++++++++++
 4 files changed, 112 insertions(+)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index d90724711be..25fa5b44f4a 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1,2 +1,3 @@
 DIST paramiko-2.1.2.tar.gz 1196746 BLAKE2B c184e171fe550fc231d67473867db283b706a93aebbd13ffb2503e10d69e43b9ab712237e6698fccae13472f0cb8135b6c015381ac687c4c20d4d1cb1620ae00 SHA512 465c5381b1b0a472d2ad8e690f0916a5f51713880486c7b94cadcf85ea0a52569e18337ccfee5440869e4a0c76bd2b1bc15c414128c07326b40ecd36ea021466
 DIST paramiko-2.4.1.tar.gz 285151 BLAKE2B 767c4ad11da77c5c6796165057715f318cab417c5bae72cd97b51af94ecbf233316fd4286e35b2f855027e05bcf195c869b45a87f66954bee3bb98ae9d0ef1a9 SHA512 5a580d25e7911937f228ef4a2b89b5a1efd771f576c6c68cf1c36e1abbc38adbc6ad5dc91400de7112238fcf7803f5f26c13fe10be4af8a2a86af9398da7a8de
+DIST paramiko-2.4.2.tar.gz 289126 BLAKE2B 767f81a09b32762241eed6661e520e3b3a96acfe8e6e638ea7ae180a8b6866f8f4adeae0a0146d46ecbfccbe71334c5f5c14e2d049744258ca4808ac21365185 SHA512 894c2ebfcfb35a84fe74670d0eb67022a49b7bf165f31acd929045c17509d8a2be111e8319f20513b5034efd033edc6432b2ca2e7027dc7e3c6703166a96790f

diff --git a/dev-python/paramiko/files/paramiko-2.4.2-disable-server.patch b/dev-python/paramiko/files/paramiko-2.4.2-disable-server.patch
new file mode 100644
index 00000000000..19450cbee1b
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-2.4.2-disable-server.patch
@@ -0,0 +1,46 @@
+diff --git a/paramiko/transport.py b/paramiko/transport.py
+index f72eebaf..ec7a1445 100644
+--- a/paramiko/transport.py
++++ b/paramiko/transport.py
+@@ -110,6 +110,8 @@ from paramiko.ssh_exception import (
+ from paramiko.util import retry_on_signal, ClosingContextManager, clamp_value
+ 
+ 
++SERVER_DISABLED_BY_GENTOO = True
++
+ # for thread cleanup
+ _active_threads = []
+ 
+@@ -633,6 +635,8 @@ class Transport(threading.Thread, ClosingContextManager):
+             `.SSHException` -- if negotiation fails (and no ``event`` was
+             passed in)
+         """
++        if SERVER_DISABLED_BY_GENTOO:
++            raise Exception("Disabled by Gentoo for security reasons. Enable with 'server' USE flag")
+         if server is None:
+             server = ServerInterface()
+         self.server_mode = True
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 2b509c5c..bb23ac74 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -4,7 +4,7 @@ import shutil
+ import threading
+ 
+ import pytest
+-from paramiko import RSAKey, SFTPServer, SFTP, Transport
++from paramiko import RSAKey, SFTPServer, SFTP, Transport, transport
+ 
+ from .loop import LoopSocket
+ from .stub_sftp import StubServer, StubSFTPServer
+@@ -15,6 +15,10 @@ from .util import _support
+ # 'nicer'.
+ 
+ 
++# We need the server component for testing
++transport.SERVER_DISABLED_BY_GENTOO = False
++
++
+ # Perform logging by default; pytest will capture and thus hide it normally,
+ # presenting it on error/failure. (But also allow turning it off when doing
+ # very pinpoint debugging - e.g. using breakpoints, so you don't want output

diff --git a/dev-python/paramiko/metadata.xml b/dev-python/paramiko/metadata.xml
index 054a7be7a59..3624b844268 100644
--- a/dev-python/paramiko/metadata.xml
+++ b/dev-python/paramiko/metadata.xml
@@ -21,6 +21,9 @@ are supported. SFTP client mode is now supported too.
 用している所です。有名なCipherとHash処理の全てがサポートされています。SFTPクライ
 アントもサポートされています。
 </longdescription>
+  <use>
+    <flag name="server">Enable server feature</flag>
+  </use>
   <upstream>
     <remote-id type="pypi">paramiko</remote-id>
     <remote-id type="github">paramiko/paramiko</remote-id>

diff --git a/dev-python/paramiko/paramiko-2.4.2.ebuild b/dev-python/paramiko/paramiko-2.4.2.ebuild
new file mode 100644
index 00000000000..fb8e47b707d
--- /dev/null
+++ b/dev-python/paramiko/paramiko-2.4.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="http://www.paramiko.org/ https://github.com/paramiko/paramiko/ https://pypi.org/project/paramiko/"
+# pypi tarballs are missing test data
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris"
+IUSE="doc examples server test"
+
+RDEPEND="
+	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-1.5[${PYTHON_USEDEP}]
+	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/pytest[${PYTHON_USEDEP}]
+		dev-python/pytest-relaxed[${PYTHON_USEDEP}]
+	)
+"
+
+src_prepare() {
+	if ! use server; then
+		eapply "${FILESDIR}/${PN}-2.4.2-disable-server.patch"
+	fi
+	eapply_user
+}
+
+python_test() {
+	py.test -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_compile_all() {
+	use doc && esetup.py build_sphinx -s sites/docs
+}
+
+python_install_all() {
+	use doc && local HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
+
+	distutils-r1_python_install_all
+
+	if use examples; then
+		insinto /usr/share/doc/${PF}/examples
+		doins demos/*
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2019-07-06  8:27 Tim Harder
  0 siblings, 0 replies; 10+ messages in thread
From: Tim Harder @ 2019-07-06  8:27 UTC (permalink / raw
  To: gentoo-commits

commit:     95980684d12ca16c784ff4aad9c1468e5141d5ba
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  6 08:25:31 2019 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sat Jul  6 08:27:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95980684

dev-python/paramiko: version bump to 2.6.0

Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |  1 +
 .../paramiko/files/paramiko-2.6.0-tests.patch      | 34 ++++++++++++
 dev-python/paramiko/paramiko-2.6.0.ebuild          | 64 ++++++++++++++++++++++
 3 files changed, 99 insertions(+)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index 08ccf16d34e..cedc946bc49 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1 +1,2 @@
 DIST paramiko-2.4.2.tar.gz 289126 BLAKE2B 767f81a09b32762241eed6661e520e3b3a96acfe8e6e638ea7ae180a8b6866f8f4adeae0a0146d46ecbfccbe71334c5f5c14e2d049744258ca4808ac21365185 SHA512 894c2ebfcfb35a84fe74670d0eb67022a49b7bf165f31acd929045c17509d8a2be111e8319f20513b5034efd033edc6432b2ca2e7027dc7e3c6703166a96790f
+DIST paramiko-2.6.0.tar.gz 304469 BLAKE2B cde861069c8924b2f685675266fd28600ffd24a39074e9ad5db8fd1d010c6e23ca13a2c78a79b23504dfff395b773b171e7c787119d01e3b92a2eec44ca8b40a SHA512 1ac2c3486cb786a1e4640d7b7f8628087f9b78ee247b09dbd3ac2646790da4f12cf95fc4291f27f200b63ec6c11d9ebf5a1283f88cf2de7c2eb6e6f76e892ef2

diff --git a/dev-python/paramiko/files/paramiko-2.6.0-tests.patch b/dev-python/paramiko/files/paramiko-2.6.0-tests.patch
new file mode 100644
index 00000000000..4b15f6a5050
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-2.6.0-tests.patch
@@ -0,0 +1,34 @@
+Skip tests requiring pytest-relaxed since it was removed from the tree due to
+breaking pytest.
+
+--- paramiko-2.6.0/tests/test_client.py
++++ paramiko-2.6.0/tests/test_client.py
+@@ -33,7 +33,7 @@
+ import weakref
+ from tempfile import mkstemp
+ 
+-from pytest_relaxed import raises
++#from pytest_relaxed import raises
+ from mock import patch, Mock
+ 
+ import paramiko
+@@ -684,7 +684,8 @@
+ 
+     # TODO: more granular exception pending #387; should be signaling "no auth
+     # methods available" because no key and no password
+-    @raises(SSHException)
++    #@raises(SSHException)
++    @unittest.skip("skip tests requiring pytest-relaxed")
+     def test_passphrase_kwarg_not_used_for_password_auth(self):
+         # Using the "right" password in the "wrong" field shouldn't work.
+         self._test_connection(passphrase="pygmalion")
+@@ -705,7 +706,8 @@
+             password="television",
+         )
+ 
+-    @raises(AuthenticationException)  # TODO: more granular
++    #@raises(AuthenticationException)  # TODO: more granular
++    @unittest.skip("skip tests requiring pytest-relaxed")
+     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
+         self
+     ):

diff --git a/dev-python/paramiko/paramiko-2.6.0.ebuild b/dev-python/paramiko/paramiko-2.6.0.ebuild
new file mode 100644
index 00000000000..eaa0bb58a7a
--- /dev/null
+++ b/dev-python/paramiko/paramiko-2.6.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="http://www.paramiko.org/ https://github.com/paramiko/paramiko/ https://pypi.org/project/paramiko/"
+# pypi tarballs are missing test data
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris"
+IUSE="doc examples server test"
+
+RDEPEND="
+	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
+	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/pytest[${PYTHON_USEDEP}]
+	)
+"
+
+src_prepare() {
+	eapply "${FILESDIR}"/${P}-tests.patch
+
+	if ! use server; then
+		eapply "${FILESDIR}/${PN}-2.4.2-disable-server.patch"
+	fi
+
+	eapply_user
+}
+
+python_compile_all() {
+	use doc && esetup.py build_sphinx -s sites/docs
+}
+
+python_test() {
+	py.test -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+	use doc && local HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
+
+	distutils-r1_python_install_all
+
+	if use examples; then
+		insinto /usr/share/doc/${PF}/examples
+		doins demos/*
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2021-10-10  6:45 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2021-10-10  6:45 UTC (permalink / raw
  To: gentoo-commits

commit:     9bd8a54206df1dc6fd844fd0f1678f835748dc09
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 10 06:30:01 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct 10 06:45:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bd8a542

dev-python/paramiko: Bump to 2.8.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |  1 +
 .../paramiko/files/paramiko-2.7.1-tests.patch      | 14 ------
 dev-python/paramiko/paramiko-2.8.0.ebuild          | 54 ++++++++++++++++++++++
 3 files changed, 55 insertions(+), 14 deletions(-)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index a9a727eeb4c..5f64b23a04d 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1 +1,2 @@
 DIST paramiko-2.7.2.tar.gz 331678 BLAKE2B ff96dfd7b114255c15282f4f73e1f9425ccf77106426ccf3ad3f833b56bd5abfde867cf2d322448dc7b3777af6ab080b4e37ff8871ce17f0db17634b7f101747 SHA512 c9bc569428a0a61814cb73941356de5bae7fea7891ba4fd3f5c00ff1ee5083454bfde7e969fb4aaf5254b909f7f0132f590d67803eda8a67503e5c02ec2bf01a
+DIST paramiko-2.8.0.tar.gz 332217 BLAKE2B fcd691159b0306204064806881f8a42e7310fe23daf22c5de5ce8124d1496d48606247ab03c7657ff01560f801121a35011e0e615c5e142c41d191568f5b2300 SHA512 15f6e1cab9afdf3285804ce09b3af6c20ffc1f8e50d2549272f0ea545d1fdc858e72c7cba085db85c69aad2033655ae2f025e8ed2bd0dff574bcc03156bdb6ed

diff --git a/dev-python/paramiko/files/paramiko-2.7.1-tests.patch b/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
index 5791afd044a..a25b7c24ef2 100644
--- a/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
+++ b/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
@@ -27,20 +27,6 @@ index f4f84748..b1b0cdf5 100644
  # pytest-xdist for test dir watching and the inv guard task
  pytest-xdist==1.28.0
  mock==2.0.0
-diff --git a/setup.cfg b/setup.cfg
-index 44d029c4..99159096 100644
---- a/setup.cfg
-+++ b/setup.cfg
-@@ -17,9 +17,6 @@ ignore = E124,E125,E128,E261,E301,E302,E303,E402,E721,W503,E203,E722
- max-line-length = 79
- 
- [tool:pytest]
--# We use pytest-relaxed just for its utils at the moment, so disable it at the
--# plugin level until we adapt test organization to really use it.
--addopts = -p no:relaxed
- # Loop on failure
- looponfailroots = tests paramiko
- # Ignore some warnings we cannot easily handle.
 diff --git a/tests/test_client.py b/tests/test_client.py
 index 60ad310c..88fd1d53 100644
 --- a/tests/test_client.py

diff --git a/dev-python/paramiko/paramiko-2.8.0.ebuild b/dev-python/paramiko/paramiko-2.8.0.ebuild
new file mode 100644
index 00000000000..85abef97830
--- /dev/null
+++ b/dev-python/paramiko/paramiko-2.8.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="https://www.paramiko.org/ https://github.com/paramiko/paramiko/ https://pypi.org/project/paramiko/"
+# pypi tarballs are missing test data
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
+IUSE="examples server"
+
+RDEPEND="
+	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
+	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+	)
+"
+
+distutils_enable_sphinx sites/docs
+distutils_enable_tests pytest
+
+src_prepare() {
+	eapply "${FILESDIR}/${PN}-2.7.1-tests.patch"
+
+	if ! use server; then
+		eapply "${FILESDIR}/${PN}-2.4.2-disable-server.patch"
+	fi
+
+	eapply_user
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	if use examples; then
+		docinto examples
+		dodoc -r demos/*
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2022-05-17  6:54 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2022-05-17  6:54 UTC (permalink / raw
  To: gentoo-commits

commit:     b7eedbb8cc180e0f9f54653582fe6ca86d25a794
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 17 04:57:36 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 17 06:54:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7eedbb8

dev-python/paramiko: Bump to 2.11.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |  1 +
 .../files/paramiko-2.11.0-invoke-tests.patch       | 40 +++++++++
 .../files/paramiko-2.11.0-pytest-relaxed.patch     | 94 ++++++++++++++++++++++
 dev-python/paramiko/paramiko-2.11.0.ebuild         | 63 +++++++++++++++
 4 files changed, 198 insertions(+)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index cda2918825b1..bf23678bc41d 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1,2 +1,3 @@
 DIST paramiko-2.10.3.tar.gz 347738 BLAKE2B ccc66a7e0fe3f777e74b94374ed59435eda440fe0aeab3871e68a132610193d2fadca1fd200db3d194566b8a2a8d6ff889d71594fed69a01fb97ca43b967e957 SHA512 e1fce2ad33ee2942b519458d53497671e66d4777c23877954b135cf9bb8ec43357156147c7e012956ccf6198de800835a617b541a4b0faf54df00f936128514b
 DIST paramiko-2.10.4.tar.gz 348637 BLAKE2B 8ce0d34418b6a1dc1d98fc180d2b2f0fb4333b7e1c52fcf7edabc3b0fc096f1b644dbc21a5b37f9001f046969c3d513ad5f6d7261339a71fa3ec922161cd7be7 SHA512 df39958e647dd6519929f68c4870228a61f54e763751e6b1d07b5e802786c85dfc34af39588009e729c4d189ca17d3aa09a58d4242403a1a1a53d36f6cd313b1
+DIST paramiko-2.11.0.tar.gz 350793 BLAKE2B 86358e08407f8a820a9b33a60e771ac3adb8f3e003ccbc4704ba69a52bd427f38a9c49a20e6a07220d07c25dbcc35a472b2091fa9f7bc1447bab0d7a1ce16b35 SHA512 59e439bd54d83938f91d6c9888f2278bafa4ca48582939580bdabc6207dbe6dc856f6006ad26b7ec91b9d39e92ca70dc6270c6b5d4f77a5e1fa0ec8bd084d4b5

diff --git a/dev-python/paramiko/files/paramiko-2.11.0-invoke-tests.patch b/dev-python/paramiko/files/paramiko-2.11.0-invoke-tests.patch
new file mode 100644
index 000000000000..80fe876ef8e3
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-2.11.0-invoke-tests.patch
@@ -0,0 +1,40 @@
+From 529558cc20e448e45e24dc7b7609cd62300838b8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 16 Apr 2020 09:46:39 +0200
+Subject: [PATCH] Skip tests requiring invoke if it's not installed
+
+Since invoke is an optional dependency and only one group of tests
+require it, skip them gracefully rather than failing if it's not
+present.
+---
+ tests/test_config.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_config.py b/tests/test_config.py
+index 45fb262d..017d4bbf 100644
+--- a/tests/test_config.py
++++ b/tests/test_config.py
+@@ -6,7 +6,11 @@ from socket import gaierror
+ 
+ from paramiko.py3compat import string_types
+ 
+-from invoke import Result
++try:
++    from invoke import Result
++except ImportError:
++    Result = None
++
+ from mock import patch
+ from pytest import raises, mark, fixture
+ 
+@@ -742,6 +746,7 @@ def _expect(success_on):
+     return inner
+ 
+ 
++@mark.skipif(Result is None, reason="requires invoke package")
+ class TestMatchExec(object):
+     @patch("paramiko.config.invoke", new=None)
+     @patch("paramiko.config.invoke_import_error", new=ImportError("meh"))
+-- 
+2.35.1
+

diff --git a/dev-python/paramiko/files/paramiko-2.11.0-pytest-relaxed.patch b/dev-python/paramiko/files/paramiko-2.11.0-pytest-relaxed.patch
new file mode 100644
index 000000000000..6e746aff1863
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-2.11.0-pytest-relaxed.patch
@@ -0,0 +1,94 @@
+From 03741e48c83856e53fc3f1487d660165cb718c11 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 17 May 2022 07:26:36 +0200
+Subject: [PATCH] Replace pytest-relaxed with plain pytest.raises
+
+There is really no technical reason to bring pytest-relaxed to call
+@raises as a decorator while plain pytest works just fine.  Plus,
+pytest.raises() is used in test_sftp already.
+
+pytest-relaxed causes humongous breakage to other packages
+on the system.  It has been banned from Gentoo for this reason.
+---
+ dev-requirements.txt |  1 -
+ pytest.ini           |  3 ---
+ tests/test_client.py | 20 ++++++++++----------
+ 3 files changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/dev-requirements.txt b/dev-requirements.txt
+index 3ed9eb40..e90f3373 100644
+--- a/dev-requirements.txt
++++ b/dev-requirements.txt
+@@ -2,7 +2,6 @@
+ invoke==1.6.0
+ invocations==2.6.0
+ pytest==4.4.2
+-pytest-relaxed==1.1.5
+ # pytest-xdist for test dir watching and the inv guard task
+ pytest-xdist==1.28.0
+ mock==2.0.0
+diff --git a/pytest.ini b/pytest.ini
+index be207cd8..5a506bcd 100644
+--- a/pytest.ini
++++ b/pytest.ini
+@@ -1,7 +1,4 @@
+ [pytest]
+-# We use pytest-relaxed just for its utils at the moment, so disable it at the
+-# plugin level until we adapt test organization to really use it.
+-addopts = -p no:relaxed
+ # Loop on failure
+ looponfailroots = tests paramiko
+ # Ignore some warnings we cannot easily handle.
+diff --git a/tests/test_client.py b/tests/test_client.py
+index fdf19c45..e4af71df 100644
+--- a/tests/test_client.py
++++ b/tests/test_client.py
+@@ -33,7 +33,7 @@ import warnings
+ import weakref
+ from tempfile import mkstemp
+ 
+-from pytest_relaxed import raises
++import pytest
+ from mock import patch, Mock
+ 
+ import paramiko
+@@ -733,11 +733,11 @@ class PasswordPassphraseTests(ClientTest):
+ 
+     # TODO: more granular exception pending #387; should be signaling "no auth
+     # methods available" because no key and no password
+-    @raises(SSHException)
+     @requires_sha1_signing
+     def test_passphrase_kwarg_not_used_for_password_auth(self):
+-        # Using the "right" password in the "wrong" field shouldn't work.
+-        self._test_connection(passphrase="pygmalion")
++        with pytest.raises(SSHException):
++            # Using the "right" password in the "wrong" field shouldn't work.
++            self._test_connection(passphrase="pygmalion")
+ 
+     @requires_sha1_signing
+     def test_passphrase_kwarg_used_for_key_passphrase(self):
+@@ -757,15 +757,15 @@ class PasswordPassphraseTests(ClientTest):
+             password="television",
+         )
+ 
+-    @raises(AuthenticationException)  # TODO: more granular
+     @requires_sha1_signing
+     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
+         self
+     ):
+         # Sanity: if we're given both fields, the password field is NOT used as
+         # a passphrase.
+-        self._test_connection(
+-            key_filename=_support("test_rsa_password.key"),
+-            password="television",
+-            passphrase="wat? lol no",
+-        )
++        with pytest.raises(AuthenticationException):
++            self._test_connection(
++                key_filename=_support("test_rsa_password.key"),
++                password="television",
++                passphrase="wat? lol no",
++            )
+-- 
+2.35.1
+

diff --git a/dev-python/paramiko/paramiko-2.11.0.ebuild b/dev-python/paramiko/paramiko-2.11.0.ebuild
new file mode 100644
index 000000000000..846177cc6874
--- /dev/null
+++ b/dev-python/paramiko/paramiko-2.11.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="
+	https://www.paramiko.org/
+	https://github.com/paramiko/paramiko/
+	https://pypi.org/project/paramiko/
+"
+SRC_URI="
+	https://github.com/paramiko/paramiko/archive/${PV}.tar.gz
+		-> ${P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
+IUSE="examples server"
+
+RDEPEND="
+	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
+	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+	)
+"
+
+distutils_enable_sphinx sites/docs
+distutils_enable_tests pytest
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}/${PN}-2.11.0-pytest-relaxed.patch"
+		"${FILESDIR}/${PN}-2.11.0-invoke-tests.patch"
+	)
+
+	if ! use server; then
+		PATCHES+=( "${FILESDIR}/${PN}-2.4.2-disable-server.patch" )
+	fi
+	distutils-r1_src_prepare
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	if use examples; then
+		docinto examples
+		dodoc -r demos/*
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2022-06-01 10:02 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2022-06-01 10:02 UTC (permalink / raw
  To: gentoo-commits

commit:     cf4b38cf4c8d122af96d0991937a08cbb8fa57fb
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 10:00:21 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 10:00:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf4b38cf

dev-python/paramiko: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |   3 -
 .../paramiko/files/paramiko-2.7.1-tests.patch      | 120 ---------------------
 dev-python/paramiko/paramiko-2.10.3.ebuild         |  55 ----------
 dev-python/paramiko/paramiko-2.10.4.ebuild         |  55 ----------
 dev-python/paramiko/paramiko-2.10.5.ebuild         |  62 -----------
 5 files changed, 295 deletions(-)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index 569c9ed592a5..aa0b682d200c 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1,4 +1 @@
-DIST paramiko-2.10.3.tar.gz 347738 BLAKE2B ccc66a7e0fe3f777e74b94374ed59435eda440fe0aeab3871e68a132610193d2fadca1fd200db3d194566b8a2a8d6ff889d71594fed69a01fb97ca43b967e957 SHA512 e1fce2ad33ee2942b519458d53497671e66d4777c23877954b135cf9bb8ec43357156147c7e012956ccf6198de800835a617b541a4b0faf54df00f936128514b
-DIST paramiko-2.10.4.tar.gz 348637 BLAKE2B 8ce0d34418b6a1dc1d98fc180d2b2f0fb4333b7e1c52fcf7edabc3b0fc096f1b644dbc21a5b37f9001f046969c3d513ad5f6d7261339a71fa3ec922161cd7be7 SHA512 df39958e647dd6519929f68c4870228a61f54e763751e6b1d07b5e802786c85dfc34af39588009e729c4d189ca17d3aa09a58d4242403a1a1a53d36f6cd313b1
-DIST paramiko-2.10.5.tar.gz 349619 BLAKE2B 12ea66afa9a2e8181363dec08d6b1bfe74d2750a45ae98ed00e53d28aa7b88eb380a0d4df4ad34a4fd08f7223eb262d45f04db522bed30e586cd0cc489389c66 SHA512 319e0e765c8fa7c7c86717d081b2431e9b42540adace693088dd2a541922704dc5a02fcb89666f6eca9a08abd79de1c994949d83a910af67326df7e389f266cd
 DIST paramiko-2.11.0.tar.gz 350793 BLAKE2B 86358e08407f8a820a9b33a60e771ac3adb8f3e003ccbc4704ba69a52bd427f38a9c49a20e6a07220d07c25dbcc35a472b2091fa9f7bc1447bab0d7a1ce16b35 SHA512 59e439bd54d83938f91d6c9888f2278bafa4ca48582939580bdabc6207dbe6dc856f6006ad26b7ec91b9d39e92ca70dc6270c6b5d4f77a5e1fa0ec8bd084d4b5

diff --git a/dev-python/paramiko/files/paramiko-2.7.1-tests.patch b/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
deleted file mode 100644
index a25b7c24ef27..000000000000
--- a/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From e91cac80d679dfe16897988b0c14c1293a93c805 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Thu, 16 Apr 2020 09:22:59 +0200
-Subject: [PATCH 1/2] Replace pytest-relaxed with plain pytest.raises
-
-There is really no technical reason to bring pytest-relaxed to call
-@raises as a decorator while plain pytest works just fine.  Plus,
-pytest.raises() is used in test_sftp already.
-
-pytest-relaxed causes humongous breakage to other packages
-on the system.  It has been banned from Gentoo for this reason.
----
- dev-requirements.txt |  1 -
- setup.cfg            |  3 ---
- tests/test_client.py | 20 ++++++++++----------
- 3 files changed, 10 insertions(+), 14 deletions(-)
-
-diff --git a/dev-requirements.txt b/dev-requirements.txt
-index f4f84748..b1b0cdf5 100644
---- a/dev-requirements.txt
-+++ b/dev-requirements.txt
-@@ -2,7 +2,6 @@
- invoke>=1.0,<2.0
- invocations>=1.2.0,<2.0
- pytest==4.4.2
--pytest-relaxed==1.1.5
- # pytest-xdist for test dir watching and the inv guard task
- pytest-xdist==1.28.0
- mock==2.0.0
-diff --git a/tests/test_client.py b/tests/test_client.py
-index 60ad310c..88fd1d53 100644
---- a/tests/test_client.py
-+++ b/tests/test_client.py
-@@ -33,7 +33,7 @@ import warnings
- import weakref
- from tempfile import mkstemp
- 
--from pytest_relaxed import raises
-+import pytest
- from mock import patch, Mock
- 
- import paramiko
-@@ -684,10 +684,10 @@ class PasswordPassphraseTests(ClientTest):
- 
-     # TODO: more granular exception pending #387; should be signaling "no auth
-     # methods available" because no key and no password
--    @raises(SSHException)
-     def test_passphrase_kwarg_not_used_for_password_auth(self):
--        # Using the "right" password in the "wrong" field shouldn't work.
--        self._test_connection(passphrase="pygmalion")
-+        with pytest.raises(SSHException):
-+            # Using the "right" password in the "wrong" field shouldn't work.
-+            self._test_connection(passphrase="pygmalion")
- 
-     def test_passphrase_kwarg_used_for_key_passphrase(self):
-         # Straightforward again, with new passphrase kwarg.
-@@ -705,14 +705,14 @@ class PasswordPassphraseTests(ClientTest):
-             password="television",
-         )
- 
--    @raises(AuthenticationException)  # TODO: more granular
-     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
-         self
-     ):
-         # Sanity: if we're given both fields, the password field is NOT used as
-         # a passphrase.
--        self._test_connection(
--            key_filename=_support("test_rsa_password.key"),
--            password="television",
--            passphrase="wat? lol no",
--        )
-+        with pytest.raises(AuthenticationException):
-+            self._test_connection(
-+                key_filename=_support("test_rsa_password.key"),
-+                password="television",
-+                passphrase="wat? lol no",
-+            )
--- 
-2.26.1
-
-From af228a2d950654ccdd4a5d665da0018bd976c108 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Thu, 16 Apr 2020 09:46:39 +0200
-Subject: [PATCH 2/2] Skip tests requiring invoke if it's not installed
-
-Since invoke is an optional dependency and only one group of tests
-require it, skip them gracefully rather than failing if it's not
-present.
----
- tests/test_config.py | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/tests/test_config.py b/tests/test_config.py
-index 5e9aa059..5eeaeac3 100644
---- a/tests/test_config.py
-+++ b/tests/test_config.py
-@@ -6,7 +6,11 @@ from socket import gaierror
- 
- from paramiko.py3compat import string_types
- 
--from invoke import Result
-+try:
-+    from invoke import Result
-+except ImportError:
-+    Result = None
-+
- from mock import patch
- from pytest import raises, mark, fixture
- 
-@@ -705,6 +709,7 @@ def _expect(success_on):
-     return inner
- 
- 
-+@mark.skipif(Result is None, reason='requires invoke package')
- class TestMatchExec(object):
-     @patch("paramiko.config.invoke", new=None)
-     @patch("paramiko.config.invoke_import_error", new=ImportError("meh"))
--- 
-2.26.1
-

diff --git a/dev-python/paramiko/paramiko-2.10.3.ebuild b/dev-python/paramiko/paramiko-2.10.3.ebuild
deleted file mode 100644
index 01fc4e263788..000000000000
--- a/dev-python/paramiko/paramiko-2.10.3.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="SSH2 protocol library"
-HOMEPAGE="https://www.paramiko.org/ https://github.com/paramiko/paramiko/ https://pypi.org/project/paramiko/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
-IUSE="examples server"
-
-RDEPEND="
-	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
-	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
-	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		dev-python/mock[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_sphinx sites/docs
-distutils_enable_tests pytest
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}/${PN}-2.7.1-tests.patch"
-	)
-
-	if ! use server; then
-		PATCHES+=( "${FILESDIR}/${PN}-2.4.2-disable-server.patch" )
-	fi
-	distutils-r1_src_prepare
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use examples; then
-		docinto examples
-		dodoc -r demos/*
-	fi
-}

diff --git a/dev-python/paramiko/paramiko-2.10.4.ebuild b/dev-python/paramiko/paramiko-2.10.4.ebuild
deleted file mode 100644
index 4e5f232e9ed3..000000000000
--- a/dev-python/paramiko/paramiko-2.10.4.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="SSH2 protocol library"
-HOMEPAGE="https://www.paramiko.org/ https://github.com/paramiko/paramiko/ https://pypi.org/project/paramiko/"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
-IUSE="examples server"
-
-RDEPEND="
-	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
-	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
-	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		dev-python/mock[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_sphinx sites/docs
-distutils_enable_tests pytest
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}/${PN}-2.7.1-tests.patch"
-	)
-
-	if ! use server; then
-		PATCHES+=( "${FILESDIR}/${PN}-2.4.2-disable-server.patch" )
-	fi
-	distutils-r1_src_prepare
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use examples; then
-		docinto examples
-		dodoc -r demos/*
-	fi
-}

diff --git a/dev-python/paramiko/paramiko-2.10.5.ebuild b/dev-python/paramiko/paramiko-2.10.5.ebuild
deleted file mode 100644
index 8d2074df8b7d..000000000000
--- a/dev-python/paramiko/paramiko-2.10.5.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="SSH2 protocol library"
-HOMEPAGE="
-	https://www.paramiko.org/
-	https://github.com/paramiko/paramiko/
-	https://pypi.org/project/paramiko/
-"
-SRC_URI="
-	https://github.com/paramiko/paramiko/archive/${PV}.tar.gz
-		-> ${P}.tar.gz
-"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
-IUSE="examples server"
-
-RDEPEND="
-	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
-	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
-	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		dev-python/mock[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_sphinx sites/docs
-distutils_enable_tests pytest
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}/${PN}-2.7.1-tests.patch"
-	)
-
-	if ! use server; then
-		PATCHES+=( "${FILESDIR}/${PN}-2.4.2-disable-server.patch" )
-	fi
-	distutils-r1_src_prepare
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use examples; then
-		docinto examples
-		dodoc -r demos/*
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2022-11-05  5:00 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2022-11-05  5:00 UTC (permalink / raw
  To: gentoo-commits

commit:     82f480da4dce9d9e32b6f72cb83f7004a305756a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  5 04:09:48 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov  5 04:59:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82f480da

dev-python/paramiko: Bump to 2.12.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |  1 +
 .../files/paramiko-2.12.0-pytest-relaxed.patch     | 93 ++++++++++++++++++++++
 dev-python/paramiko/paramiko-2.12.0.ebuild         | 61 ++++++++++++++
 3 files changed, 155 insertions(+)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index aa0b682d200c..eb655f12f935 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1 +1,2 @@
 DIST paramiko-2.11.0.tar.gz 350793 BLAKE2B 86358e08407f8a820a9b33a60e771ac3adb8f3e003ccbc4704ba69a52bd427f38a9c49a20e6a07220d07c25dbcc35a472b2091fa9f7bc1447bab0d7a1ce16b35 SHA512 59e439bd54d83938f91d6c9888f2278bafa4ca48582939580bdabc6207dbe6dc856f6006ad26b7ec91b9d39e92ca70dc6270c6b5d4f77a5e1fa0ec8bd084d4b5
+DIST paramiko-2.12.0.gh.tar.gz 351956 BLAKE2B d41668f32f28a5c2c3af1d2b5c85bb4c3d2f5af9028cd5ebcb2b8aa21bc25df2c1ead5ddfe61ff12cfacec4b92913833e267f8a3fef07fa9a794f4b064fdb472 SHA512 1bf325ffd393447cb90009d01dc1104d0d43a6acdd08cc6d28310063a649a333323748800dab119ab5e10833975e68f5f5702044fc247a2e8058122a5327f2c7

diff --git a/dev-python/paramiko/files/paramiko-2.12.0-pytest-relaxed.patch b/dev-python/paramiko/files/paramiko-2.12.0-pytest-relaxed.patch
new file mode 100644
index 000000000000..cf34fbfd1c60
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-2.12.0-pytest-relaxed.patch
@@ -0,0 +1,93 @@
+From 935507cc60b6f0b2b83c9c0e3be3900297b41757 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 17 May 2022 07:26:36 +0200
+Subject: [PATCH] Replace pytest-relaxed with plain pytest.raises
+
+There is really no technical reason to bring pytest-relaxed to call
+@raises as a decorator while plain pytest works just fine.  Plus,
+pytest.raises() is used in test_sftp already.
+
+pytest-relaxed causes humongous breakage to other packages
+on the system.  It has been banned from Gentoo for this reason.
+---
+ dev-requirements.txt |  1 -
+ pytest.ini           |  3 ---
+ tests/test_client.py | 19 +++++++++----------
+ 3 files changed, 9 insertions(+), 14 deletions(-)
+
+diff --git a/dev-requirements.txt b/dev-requirements.txt
+index 3ed9eb40..e90f3373 100644
+--- a/dev-requirements.txt
++++ b/dev-requirements.txt
+@@ -2,7 +2,6 @@
+ invoke==1.6.0
+ invocations==2.6.0
+ pytest==4.4.2
+-pytest-relaxed==1.1.5
+ # pytest-xdist for test dir watching and the inv guard task
+ pytest-xdist==1.28.0
+ mock==2.0.0
+diff --git a/pytest.ini b/pytest.ini
+index be207cd8..5a506bcd 100644
+--- a/pytest.ini
++++ b/pytest.ini
+@@ -1,7 +1,4 @@
+ [pytest]
+-# We use pytest-relaxed just for its utils at the moment, so disable it at the
+-# plugin level until we adapt test organization to really use it.
+-addopts = -p no:relaxed
+ # Loop on failure
+ looponfailroots = tests paramiko
+ # Ignore some warnings we cannot easily handle.
+diff --git a/tests/test_client.py b/tests/test_client.py
+index 3eaad4fb..66c41b0b 100644
+--- a/tests/test_client.py
++++ b/tests/test_client.py
+@@ -34,7 +34,6 @@ import weakref
+ from tempfile import mkstemp
+ 
+ import pytest
+-from pytest_relaxed import raises
+ from mock import patch, Mock
+ 
+ import paramiko
+@@ -787,11 +786,11 @@ class PasswordPassphraseTests(ClientTest):
+ 
+     # TODO: more granular exception pending #387; should be signaling "no auth
+     # methods available" because no key and no password
+-    @raises(SSHException)
+     @requires_sha1_signing
+     def test_passphrase_kwarg_not_used_for_password_auth(self):
+-        # Using the "right" password in the "wrong" field shouldn't work.
+-        self._test_connection(passphrase="pygmalion")
++        with pytest.raises(SSHException):
++            # Using the "right" password in the "wrong" field shouldn't work.
++            self._test_connection(passphrase="pygmalion")
+ 
+     @requires_sha1_signing
+     def test_passphrase_kwarg_used_for_key_passphrase(self):
+@@ -811,15 +810,15 @@ class PasswordPassphraseTests(ClientTest):
+             password="television",
+         )
+ 
+-    @raises(AuthenticationException)  # TODO: more granular
+     @requires_sha1_signing
+     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
+         self
+     ):
+         # Sanity: if we're given both fields, the password field is NOT used as
+         # a passphrase.
+-        self._test_connection(
+-            key_filename=_support("test_rsa_password.key"),
+-            password="television",
+-            passphrase="wat? lol no",
+-        )
++        with pytest.raises(AuthenticationException):
++            self._test_connection(
++                key_filename=_support("test_rsa_password.key"),
++                password="television",
++                passphrase="wat? lol no",
++            )
+-- 
+2.38.1
+

diff --git a/dev-python/paramiko/paramiko-2.12.0.ebuild b/dev-python/paramiko/paramiko-2.12.0.ebuild
new file mode 100644
index 000000000000..856b3dd285da
--- /dev/null
+++ b/dev-python/paramiko/paramiko-2.12.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="
+	https://www.paramiko.org/
+	https://github.com/paramiko/paramiko/
+	https://pypi.org/project/paramiko/
+"
+SRC_URI="
+	https://github.com/paramiko/paramiko/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
+IUSE="examples server"
+
+RDEPEND="
+	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
+	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+	)
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}/${PN}-2.12.0-pytest-relaxed.patch"
+	)
+
+	if ! use server; then
+		PATCHES+=( "${FILESDIR}/${PN}-2.4.2-disable-server.patch" )
+	fi
+	distutils-r1_src_prepare
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	if use examples; then
+		docinto examples
+		dodoc -r demos/*
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2023-01-21  6:02 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2023-01-21  6:02 UTC (permalink / raw
  To: gentoo-commits

commit:     5aadf65b4602850a7667cb889a2197150264f5b8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 21 05:33:40 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 05:59:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5aadf65b

dev-python/paramiko: Bump to 3.0.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |  1 +
 .../files/paramiko-3.0.0-nih-test-deps.patch       | 98 ++++++++++++++++++++++
 dev-python/paramiko/paramiko-3.0.0.ebuild          | 56 +++++++++++++
 3 files changed, 155 insertions(+)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index aac53d250edf..f1b32d05ad16 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1 +1,2 @@
 DIST paramiko-2.12.0.gh.tar.gz 351956 BLAKE2B d41668f32f28a5c2c3af1d2b5c85bb4c3d2f5af9028cd5ebcb2b8aa21bc25df2c1ead5ddfe61ff12cfacec4b92913833e267f8a3fef07fa9a794f4b064fdb472 SHA512 1bf325ffd393447cb90009d01dc1104d0d43a6acdd08cc6d28310063a649a333323748800dab119ab5e10833975e68f5f5702044fc247a2e8058122a5327f2c7
+DIST paramiko-3.0.0.gh.tar.gz 350348 BLAKE2B ba7211a3f3c7d4f9c0023017d96ed51511039378b4eba1ace13fbbf6902cda40aa09f2cf7b5ce9f7aee666907d9a662e9bf7eccd5d06669685b9aa25fccfa551 SHA512 3754314fcbd64bf3db5fd6a8d55babc13e639675d09e85d796e99f25eecb55b0f987c0b47bce288c3d154a2dbdb586ecc34bbb09d67786bcc13b0a94a78e6654

diff --git a/dev-python/paramiko/files/paramiko-3.0.0-nih-test-deps.patch b/dev-python/paramiko/files/paramiko-3.0.0-nih-test-deps.patch
new file mode 100644
index 000000000000..26b12f0ce154
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-3.0.0-nih-test-deps.patch
@@ -0,0 +1,98 @@
+From c7d1373554910102846123afb35c8c1a842f2c9a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 17 May 2022 07:26:36 +0200
+Subject: [PATCH] Replace pytest-relaxed with plain pytest.raises
+
+There is really no technical reason to bring pytest-relaxed to call
+@raises as a decorator while plain pytest works just fine.  Plus,
+pytest.raises() is used in test_sftp already.
+
+pytest-relaxed causes humongous breakage to other packages
+on the system.  It has been banned from Gentoo for this reason.
+---
+ dev-requirements.txt |  6 ++++++
+ pytest.ini           |  3 ---
+ tests/test_client.py | 19 +++++++++----------
+ 3 files changed, 15 insertions(+), 13 deletions(-)
+
+diff --git a/tests/test_client.py b/tests/test_client.py
+index dae5b13a..d0e9c434 100644
+--- a/tests/test_client.py
++++ b/tests/test_client.py
+@@ -33,7 +33,6 @@ import weakref
+ from tempfile import mkstemp
+ 
+ import pytest
+-from pytest_relaxed import raises
+ from unittest.mock import patch, Mock
+ 
+ import paramiko
+@@ -786,11 +785,11 @@ class PasswordPassphraseTests(ClientTest):
+ 
+     # TODO: more granular exception pending #387; should be signaling "no auth
+     # methods available" because no key and no password
+-    @raises(SSHException)
+     @requires_sha1_signing
+     def test_passphrase_kwarg_not_used_for_password_auth(self):
+-        # Using the "right" password in the "wrong" field shouldn't work.
+-        self._test_connection(passphrase="pygmalion")
++        with pytest.raises(SSHException):
++            # Using the "right" password in the "wrong" field shouldn't work.
++            self._test_connection(passphrase="pygmalion")
+ 
+     @requires_sha1_signing
+     def test_passphrase_kwarg_used_for_key_passphrase(self):
+@@ -810,15 +809,15 @@ class PasswordPassphraseTests(ClientTest):
+             password="television",
+         )
+ 
+-    @raises(AuthenticationException)  # TODO: more granular
+     @requires_sha1_signing
+     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
+         self,
+     ):
+         # Sanity: if we're given both fields, the password field is NOT used as
+         # a passphrase.
+-        self._test_connection(
+-            key_filename=_support("test_rsa_password.key"),
+-            password="television",
+-            passphrase="wat? lol no",
+-        )
++        with pytest.raises(AuthenticationException):
++            self._test_connection(
++                key_filename=_support("test_rsa_password.key"),
++                password="television",
++                passphrase="wat? lol no",
++            )
+-- 
+2.39.1
+
+From becd215434a7c01c74b407cbf2cbcb192e138a15 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 21 Jan 2023 06:56:09 +0100
+Subject: [PATCH] Remove icecream dep
+
+---
+ tests/conftest.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index b28d2a17..3cecb7e8 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -10,12 +10,6 @@ from .loop import LoopSocket
+ from .stub_sftp import StubServer, StubSFTPServer
+ from .util import _support
+ 
+-from icecream import ic, install as install_ic
+-
+-
+-install_ic()
+-ic.configureOutput(includeContext=True)
+-
+ 
+ # Perform logging by default; pytest will capture and thus hide it normally,
+ # presenting it on error/failure. (But also allow turning it off when doing
+-- 
+2.39.1
+

diff --git a/dev-python/paramiko/paramiko-3.0.0.ebuild b/dev-python/paramiko/paramiko-3.0.0.ebuild
new file mode 100644
index 000000000000..f521b9dc0990
--- /dev/null
+++ b/dev-python/paramiko/paramiko-3.0.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="
+	https://www.paramiko.org/
+	https://github.com/paramiko/paramiko/
+	https://pypi.org/project/paramiko/
+"
+SRC_URI="
+	https://github.com/paramiko/paramiko/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
+IUSE="examples server"
+
+RDEPEND="
+	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
+	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}/${PN}-3.0.0-nih-test-deps.patch"
+	)
+
+	if ! use server; then
+		PATCHES+=( "${FILESDIR}/${PN}-2.4.2-disable-server.patch" )
+	fi
+	distutils-r1_src_prepare
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	if use examples; then
+		docinto examples
+		dodoc -r demos/*
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2023-05-26  4:26 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2023-05-26  4:26 UTC (permalink / raw
  To: gentoo-commits

commit:     580240beb0451c74ebde79904f3bec0b7f907287
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 26 04:19:15 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 26 04:26:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=580240be

dev-python/paramiko: Bump to 3.2.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |   1 +
 .../files/paramiko-3.2.0-disable-server.patch      |  58 +++++++++
 .../files/paramiko-3.2.0-nih-test-deps.patch       | 134 +++++++++++++++++++++
 dev-python/paramiko/paramiko-3.2.0.ebuild          |  57 +++++++++
 4 files changed, 250 insertions(+)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index e8f8b589c1eb..1b3bc344a812 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1 +1,2 @@
 DIST paramiko-3.1.0.gh.tar.gz 351910 BLAKE2B 7350626f3a8e54d8950085cbd8253f5564355abb4db7c65113c0df22674e3df0081da7299cfad779f1fcf9569b01720b6ab5dc2bde32c4a71500e79910caf4c8 SHA512 1a556a5b7a6ebc72a0c61b59f326a95c9f2784d74fdc1a171455867ba7b4b07a15741e168747b5a3a225685ad069e2d58021f54dadf7feb00f8acf65b0c07d51
+DIST paramiko-3.2.0.gh.tar.gz 374709 BLAKE2B 80ec5678a51dc8a0eadd28228ae70a8912fb9a4be1807f5f65a925dd2252fd43ebba6f63b350b62ff7545d9ed0db6e4a78710fb73cff332e6d1ed996b0f1a7d9 SHA512 1d87a19284cef73a76eb7402d0492eb35d4a0588becd2f67ba19fe1498d6c10927127617398de11184d4865c8ce0f3e0c48194d50ef546414a17cf6faff3c39d

diff --git a/dev-python/paramiko/files/paramiko-3.2.0-disable-server.patch b/dev-python/paramiko/files/paramiko-3.2.0-disable-server.patch
new file mode 100644
index 000000000000..942f5161ee6f
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-3.2.0-disable-server.patch
@@ -0,0 +1,58 @@
+From a47e9bdc80224c9ceafcea6da5cea1539ddfbd4d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 26 May 2023 06:05:13 +0200
+Subject: [PATCH 3/3] Disable server component due to security issues
+
+---
+ paramiko/transport.py | 4 ++++
+ tests/conftest.py     | 5 +++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/paramiko/transport.py b/paramiko/transport.py
+index 8785d6bb..803d07d1 100644
+--- a/paramiko/transport.py
++++ b/paramiko/transport.py
+@@ -120,6 +120,8 @@ from paramiko.util import (
+ )
+ 
+ 
++SERVER_DISABLED_BY_GENTOO = True
++
+ # for thread cleanup
+ _active_threads = []
+ 
+@@ -768,6 +770,8 @@ class Transport(threading.Thread, ClosingContextManager):
+             `.SSHException` -- if negotiation fails (and no ``event`` was
+             passed in)
+         """
++        if SERVER_DISABLED_BY_GENTOO:
++            raise Exception("Disabled by Gentoo for security reasons. Enable with 'server' USE flag")
+         if server is None:
+             server = ServerInterface()
+         self.server_mode = True
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 7546aae4..804a289e 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -16,6 +16,7 @@ from paramiko import (
+     Ed25519Key,
+     ECDSAKey,
+     PKey,
++    transport,
+ )
+ 
+ from ._loop import LoopSocket
+@@ -23,6 +24,10 @@ from ._stub_sftp import StubServer, StubSFTPServer
+ from ._util import _support
+ 
+ 
++# We need the server component for testing
++transport.SERVER_DISABLED_BY_GENTOO = False
++
++
+ # Perform logging by default; pytest will capture and thus hide it normally,
+ # presenting it on error/failure. (But also allow turning it off when doing
+ # very pinpoint debugging - e.g. using breakpoints, so you don't want output
+-- 
+2.40.1
+

diff --git a/dev-python/paramiko/files/paramiko-3.2.0-nih-test-deps.patch b/dev-python/paramiko/files/paramiko-3.2.0-nih-test-deps.patch
new file mode 100644
index 000000000000..84fb618dffb8
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-3.2.0-nih-test-deps.patch
@@ -0,0 +1,134 @@
+From 33c56a44f425bb5c4bf63759fbe85cfee06ab087 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 17 May 2022 07:26:36 +0200
+Subject: [PATCH 1/3] Replace pytest-relaxed with plain pytest.raises
+
+There is really no technical reason to bring pytest-relaxed to call
+@raises as a decorator while plain pytest works just fine.  Plus,
+pytest.raises() is used in test_sftp already.
+
+pytest-relaxed causes humongous breakage to other packages
+on the system.  It has been banned from Gentoo for this reason.
+---
+ tests/test_client.py | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/tests/test_client.py b/tests/test_client.py
+index 1c0c6c84..c12cbe9a 100644
+--- a/tests/test_client.py
++++ b/tests/test_client.py
+@@ -33,7 +33,6 @@ import weakref
+ from tempfile import mkstemp
+ 
+ import pytest
+-from pytest_relaxed import raises
+ from unittest.mock import patch, Mock
+ 
+ import paramiko
+@@ -799,11 +798,11 @@ class PasswordPassphraseTests(ClientTest):
+ 
+     # TODO: more granular exception pending #387; should be signaling "no auth
+     # methods available" because no key and no password
+-    @raises(SSHException)
+     @requires_sha1_signing
+     def test_passphrase_kwarg_not_used_for_password_auth(self):
+-        # Using the "right" password in the "wrong" field shouldn't work.
+-        self._test_connection(passphrase="pygmalion")
++        with pytest.raises(SSHException):
++            # Using the "right" password in the "wrong" field shouldn't work.
++            self._test_connection(passphrase="pygmalion")
+ 
+     @requires_sha1_signing
+     def test_passphrase_kwarg_used_for_key_passphrase(self):
+@@ -823,15 +822,15 @@ class PasswordPassphraseTests(ClientTest):
+             password="television",
+         )
+ 
+-    @raises(AuthenticationException)  # TODO: more granular
+     @requires_sha1_signing
+     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
+         self,
+     ):
+         # Sanity: if we're given both fields, the password field is NOT used as
+         # a passphrase.
+-        self._test_connection(
+-            key_filename=_support("test_rsa_password.key"),
+-            password="television",
+-            passphrase="wat? lol no",
+-        )
++        with pytest.raises(AuthenticationException):
++            self._test_connection(
++                key_filename=_support("test_rsa_password.key"),
++                password="television",
++                passphrase="wat? lol no",
++            )
+-- 
+2.40.1
+
+From a75bdc46a6eb72a0b0e80eeafad2e2a2536a9bd8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 21 Jan 2023 06:56:09 +0100
+Subject: [PATCH 2/3] Remove icecream dep
+
+---
+ tests/conftest.py | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 12b97283..7546aae4 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -22,13 +22,6 @@ from ._loop import LoopSocket
+ from ._stub_sftp import StubServer, StubSFTPServer
+ from ._util import _support
+ 
+-from icecream import ic, install as install_ic
+-
+-
+-# Better print() for debugging - use ic()!
+-install_ic()
+-ic.configureOutput(includeContext=True)
+-
+ 
+ # Perform logging by default; pytest will capture and thus hide it normally,
+ # presenting it on error/failure. (But also allow turning it off when doing
+-- 
+2.40.1
+
+From a4f96f21450942398b46f2b5f125b89297f3f3f2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 26 May 2023 06:18:25 +0200
+Subject: [PATCH] Remove pointless use of Lexicon vendored from invoke with
+ class
+
+---
+ tests/conftest.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 7546aae4..45362de8 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -4,8 +4,6 @@ import shutil
+ import threading
+ from pathlib import Path
+ 
+-from invoke.vendor.lexicon import Lexicon
+-
+ import pytest
+ from paramiko import (
+     SFTPServer,
+@@ -132,6 +130,10 @@ for datum in key_data:
+     datum.insert(0, short)
+ 
+ 
++class Lexicon:
++    pass
++
++
+ @pytest.fixture(scope="session", params=key_data, ids=lambda x: x[0])
+ def keys(request):
+     """
+-- 
+2.40.1
+

diff --git a/dev-python/paramiko/paramiko-3.2.0.ebuild b/dev-python/paramiko/paramiko-3.2.0.ebuild
new file mode 100644
index 000000000000..74945454d841
--- /dev/null
+++ b/dev-python/paramiko/paramiko-3.2.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="
+	https://www.paramiko.org/
+	https://github.com/paramiko/paramiko/
+	https://pypi.org/project/paramiko/
+"
+SRC_URI="
+	https://github.com/paramiko/paramiko/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+# the release is broken
+# https://github.com/paramiko/paramiko/issues/2245
+KEYWORDS=""
+IUSE="examples server"
+
+RDEPEND="
+	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
+	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}/${PN}-3.2.0-nih-test-deps.patch"
+	)
+
+	if ! use server; then
+		PATCHES+=( "${FILESDIR}/${PN}-3.2.0-disable-server.patch" )
+	fi
+	distutils-r1_src_prepare
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	if use examples; then
+		docinto examples
+		dodoc -r demos/*
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2024-05-28 22:39 Petr Vaněk
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Vaněk @ 2024-05-28 22:39 UTC (permalink / raw
  To: gentoo-commits

commit:     b1e608faac2d815d4d38c8d65d24f830c52d59da
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Tue May 28 22:03:28 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Tue May 28 22:38:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1e608fa

dev-python/paramiko: fix tests with >=pytest-8.1

SSHConfig related tests are failing since pytest 8.1. The issue was
already addressed in PR [1] in upstream, which is backported in this
commit.

[1] https://github.com/paramiko/paramiko/pull/2306

Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 .../files/paramiko-3.4.0-pytest-fixes.patch        | 34 ++++++++++++++++++++++
 dev-python/paramiko/paramiko-3.4.0.ebuild          |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch b/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch
new file mode 100644
index 000000000000..5d8eb3ffbb43
--- /dev/null
+++ b/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch
@@ -0,0 +1,34 @@
+From 71dd9c098b800a358065070a44d2803b759f222a Mon Sep 17 00:00:00 2001
+From: marston <manuelfern1997@gmail.com>
+Date: Wed, 27 Sep 2023 21:04:25 -0400
+Subject: [PATCH] Fix deprecated nose tests and 'isSet()'
+
+Upstream-PR: https://github.com/paramiko/paramiko/pull/2306
+Upstream-Issue: https://github.com/paramiko/paramiko/issues/2290
+
+diff --git a/tests/test_client.py b/tests/test_client.py
+index 1c0c6c84b..feb27bbec 100644
+--- a/tests/test_client.py
++++ b/tests/test_client.py
+@@ -689,7 +689,7 @@ def _setup_for_env(self):
+         )
+ 
+         self.event.wait(1.0)
+-        self.assertTrue(self.event.isSet())
++        self.assertTrue(self.event.is_set())
+         self.assertTrue(self.ts.is_active())
+ 
+     def test_update_environment(self):
+diff --git a/tests/test_config.py b/tests/test_config.py
+index 2e49aa3de..1e623e0ad 100644
+--- a/tests/test_config.py
++++ b/tests/test_config.py
+@@ -53,7 +53,7 @@ def load_config(name):
+ 
+ 
+ class TestSSHConfig:
+-    def setup(self):
++    def setup_method(self):
+         self.config = load_config("robey")
+ 
+     def test_init(self):

diff --git a/dev-python/paramiko/paramiko-3.4.0.ebuild b/dev-python/paramiko/paramiko-3.4.0.ebuild
index 0d9df530e354..3ca6df11fc94 100644
--- a/dev-python/paramiko/paramiko-3.4.0.ebuild
+++ b/dev-python/paramiko/paramiko-3.4.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -44,6 +44,7 @@ EPYTEST_DESELECT=(
 src_prepare() {
 	local PATCHES=(
 		"${FILESDIR}/${PN}-3.2.0-nih-test-deps.patch"
+		"${FILESDIR}/${PN}-3.4.0-pytest-fixes.patch"
 	)
 
 	if ! use server; then


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/
@ 2024-08-13 20:41 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2024-08-13 20:41 UTC (permalink / raw
  To: gentoo-commits

commit:     965e52481fed394ca5d800bc3045e095d5350ed1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 13 20:08:41 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 13 20:08:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=965e5248

dev-python/paramiko: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/paramiko/Manifest                       |  1 -
 .../files/paramiko-3.4.0-pytest-fixes.patch        | 34 ------------
 dev-python/paramiko/paramiko-3.4.0.ebuild          | 63 ----------------------
 3 files changed, 98 deletions(-)

diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index a7911890a0e2..e53522899f9b 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1,2 +1 @@
-DIST paramiko-3.4.0.gh.tar.gz 374441 BLAKE2B a6ea03d40e477cb02c1293c46025909251f8eec2be70638bf850638d9fe8c15bfe0e278697e41f3595f482b8f0755d911b905b11db2324eca597fc9be2a22f24 SHA512 f78fccf653d05acee78dfb76fb662c85fbfea7901fd94460a2d2e526c9b25169993051d20c16cfe0b7745008b1ea3a745fc9a280386d98a06689aaadf78f6752
 DIST paramiko-3.4.1.gh.tar.gz 375155 BLAKE2B 576cc5b23010eaf46eec7dc98e5930c134948038b5588a2cf198289f11a9ab33978e582f273e39d3154fa5fa48109a9bb493745c658e2a2082af055a8f0bc80e SHA512 99026c1045a7f9f4aa7484d089a94dfff141c5d8c565d0bfb3f5c9b1387d963b8f8b3718a79668b1cfe1ec581ab3cb76af787f8011d254aa14c00a5496a805eb

diff --git a/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch b/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch
deleted file mode 100644
index 5d8eb3ffbb43..000000000000
--- a/dev-python/paramiko/files/paramiko-3.4.0-pytest-fixes.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 71dd9c098b800a358065070a44d2803b759f222a Mon Sep 17 00:00:00 2001
-From: marston <manuelfern1997@gmail.com>
-Date: Wed, 27 Sep 2023 21:04:25 -0400
-Subject: [PATCH] Fix deprecated nose tests and 'isSet()'
-
-Upstream-PR: https://github.com/paramiko/paramiko/pull/2306
-Upstream-Issue: https://github.com/paramiko/paramiko/issues/2290
-
-diff --git a/tests/test_client.py b/tests/test_client.py
-index 1c0c6c84b..feb27bbec 100644
---- a/tests/test_client.py
-+++ b/tests/test_client.py
-@@ -689,7 +689,7 @@ def _setup_for_env(self):
-         )
- 
-         self.event.wait(1.0)
--        self.assertTrue(self.event.isSet())
-+        self.assertTrue(self.event.is_set())
-         self.assertTrue(self.ts.is_active())
- 
-     def test_update_environment(self):
-diff --git a/tests/test_config.py b/tests/test_config.py
-index 2e49aa3de..1e623e0ad 100644
---- a/tests/test_config.py
-+++ b/tests/test_config.py
-@@ -53,7 +53,7 @@ def load_config(name):
- 
- 
- class TestSSHConfig:
--    def setup(self):
-+    def setup_method(self):
-         self.config = load_config("robey")
- 
-     def test_init(self):

diff --git a/dev-python/paramiko/paramiko-3.4.0.ebuild b/dev-python/paramiko/paramiko-3.4.0.ebuild
deleted file mode 100644
index 595554941099..000000000000
--- a/dev-python/paramiko/paramiko-3.4.0.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{10..13} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="SSH2 protocol library"
-HOMEPAGE="
-	https://www.paramiko.org/
-	https://github.com/paramiko/paramiko/
-	https://pypi.org/project/paramiko/
-"
-SRC_URI="
-	https://github.com/paramiko/paramiko/archive/${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="examples server"
-
-RDEPEND="
-	>=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
-	>=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
-	>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
-"
-
-distutils_enable_tests pytest
-
-EPYTEST_DESELECT=(
-	# upstream doesn't really maintain the gssapi support
-	tests/test_gssapi.py
-	tests/test_kex_gss.py
-	tests/test_ssh_gss.py
-)
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}/${PN}-3.2.0-nih-test-deps.patch"
-		"${FILESDIR}/${PN}-3.4.0-pytest-fixes.patch"
-	)
-
-	if ! use server; then
-		PATCHES+=( "${FILESDIR}/${PN}-3.2.0-disable-server.patch" )
-	fi
-	distutils-r1_src_prepare
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use examples; then
-		docinto examples
-		dodoc -r demos/*
-	fi
-}


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

end of thread, other threads:[~2024-08-13 20:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-17  6:54 [gentoo-commits] repo/gentoo:master commit in: dev-python/paramiko/, dev-python/paramiko/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-08-13 20:41 Michał Górny
2024-05-28 22:39 Petr Vaněk
2023-05-26  4:26 Michał Górny
2023-01-21  6:02 Michał Górny
2022-11-05  5:00 Michał Górny
2022-06-01 10:02 Michał Górny
2021-10-10  6:45 Michał Górny
2019-07-06  8:27 Tim Harder
2018-09-26 14:04 Virgil Dupras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox