[Python-modules-commits] [python-bcrypt] 02/05: change version to 2.0.0-2 (UNRELEASED) Added import-tests-from-github.patch.
Daniel Stender
danstender-guest at moszumanska.debian.org
Sat Jan 9 12:07:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
danstender-guest pushed a commit to branch master
in repository python-bcrypt.
commit d58957c5f72f2bda2176e8c6b9a91d75c0e1a20e
Merge: aedb8b6 a4c82f9
Author: Daniel Stender <debian at danielstender.com>
Date: Sat Jan 9 12:25:42 2016 +0100
change version to 2.0.0-2 (UNRELEASED)
Added import-tests-from-github.patch.
debian/.git-dpm | 4 +-
debian/changelog | 6 +
debian/patches/0001-import-tests-from-github.patch | 298 +++++++++++++++++++++
debian/patches/series | 1 +
tests/test_bcrypt.py | 276 +++++++++++++++++++
5 files changed, 583 insertions(+), 2 deletions(-)
diff --cc debian/.git-dpm
index 72d073e,0000000..9a495cf
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- f0c87673943ca9ae04935bbe74d759199263c98e
- f0c87673943ca9ae04935bbe74d759199263c98e
++a4c82f96721dcf9ed1212f608750b9cd9c7cedb4
++a4c82f96721dcf9ed1212f608750b9cd9c7cedb4
+f0c87673943ca9ae04935bbe74d759199263c98e
+f0c87673943ca9ae04935bbe74d759199263c98e
+python-bcrypt_2.0.0.orig.tar.xz
+f135325b6893a5224ac3f55edde4f5379dc6de13
+33416
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/changelog
index 81d7fd3,0000000..cd9d276
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,64 -1,0 +1,70 @@@
++python-bcrypt (2.0.0-2) UNRELEASED; urgency=medium
++
++ * Added import-tests-from-github.patch.
++
++ -- Daniel Stender <debian at danielstender.com> Sat, 09 Jan 2016 12:25:42 +0100
++
+python-bcrypt (2.0.0-1) unstable; urgency=medium
+
+ [ Daniel Stender ]
+ * New upstream release (Closes: #803096).
+ * Switched upstream from py-bcrypt to pyuca/bcrypt (Closes: #796853).
+ * deb/control:
+ + changed Priority from "extra" to "optional".
+ + added Daniel Stender to Uploaders.
+ + added dh-python and python{,3}-cffi and to build depends.
+ + bumped Standards-Version to 3.9.6 (no changes needed).
+ + updated Homepage.
+ + added Vcs-Git and Vcs-Browser.
+ + removed extended infos in long description text concerning py-bcrypt,
+ made short description easier, updated URI of the mentioned paper.
+ * deb/copyright:
+ + updated.
+ + added Daniel Stender to copyright holders of debian/.
+ * deb/rules:
+ + added exports for DH_VERBOSE and DEB_BUILD_OPTIONS=nocheck.
+ + build with Pybuild.
+ + use override for dh_installdocs to contribute into both packages.
+ * deb/watch:
+ + watch bcrypt on Pypi.
+ * Added:
+ + deb/.git-dpm (Repo initialzed for Git-dpm).
+ + deb/upstream/signing-key.asc.
+ * Dropped:
+ + deb/manpage and deb/python-bcrypt.1 (belonging to py-bcrypt).
+ + deb/docs (using dh_installdocs in deb/rules).
+
+ [ Raphaël Hertzog ]
+ * Add build-dependencies on python{3,}-pytest and python-six that will be
+ useful once we have actual tests in the tarball.
+
+ -- Daniel Stender <debian at danielstender.com> Fri, 08 Jan 2016 15:07:04 +0100
+
+python-bcrypt (0.4-2) unstable; urgency=medium
+
+ * Team upload.
+ * Build-depend on python-all-dev and python3-all-dev, instead of just
+ default python3?-dev. (Closes: #741770)
+
+ -- Dimitri John Ledkov <xnox at ubuntu.com> Mon, 31 Mar 2014 22:40:17 +0100
+
+python-bcrypt (0.4-1) unstable; urgency=low
+
+ * New Upstream release
+ * Migrate to git-buildpackage
+ * Update control file to reflect more modern debian standards (no changes)
+ * Update to use debhelper 9
+ * Add source/format of "3.0 (quilt)"
+ * Fix spelling of parametrised throughout debian/ directory
+ * Update watch file to use google code
+ * Remove depricated pycompat file
+ * Update copyright file to be machine-readable
+
+ -- Simon Fondrie-Teitler <simonft at riseup.net> Sat, 21 Sep 2013 16:26:21 -0500
+
+python-bcrypt (0.1-1) unstable; urgency=low
+
+ * Initial release (Closes: #454627)
+ * Added man page.
+
+ -- Kevin Coyner <kcoyner at debian.org> Sat, 22 Dec 2007 13:45:05 -0500
diff --cc debian/patches/0001-import-tests-from-github.patch
index 0000000,0000000..8cd9fe1
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-import-tests-from-github.patch
@@@ -1,0 -1,0 +1,298 @@@
++From a4c82f96721dcf9ed1212f608750b9cd9c7cedb4 Mon Sep 17 00:00:00 2001
++From: Daniel Stender <debian at danielstender.com>
++Date: Sat, 9 Jan 2016 12:23:35 +0100
++Subject: import-tests-from-github
++
++Import tests which are currently missing in the Pypi tarball from the
++Github repo.
++Author: Daniel Stender <debian at danielstender.com>
++Origin: https://github.com/pyca/bcrypt/blob/master/tests/test_bcrypt.py
++Forwarded: https://github.com/pyca/bcrypt/issues/48
++Last-Update: 2016-01-06
++---
++ tests/test_bcrypt.py | 276 +++++++++++++++++++++++++++++++++++++++++++++++++++
++ 1 file changed, 276 insertions(+)
++ create mode 100644 tests/test_bcrypt.py
++
++diff --git a/tests/test_bcrypt.py b/tests/test_bcrypt.py
++new file mode 100644
++index 0000000..32fa15f
++--- /dev/null
+++++ b/tests/test_bcrypt.py
++@@ -0,0 +1,276 @@
+++import os
+++
+++import pytest
+++
+++import six
+++
+++import bcrypt
+++
+++
+++def test_gensalt_basic(monkeypatch):
+++ monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
+++ assert bcrypt.gensalt() == b"$2b$12$KB.uKB.uKB.uKB.uKB.uK."
+++
+++
+++ at pytest.mark.parametrize(("rounds", "expected"), [
+++ (4, b"$2b$04$KB.uKB.uKB.uKB.uKB.uK."),
+++ (5, b"$2b$05$KB.uKB.uKB.uKB.uKB.uK."),
+++ (6, b"$2b$06$KB.uKB.uKB.uKB.uKB.uK."),
+++ (7, b"$2b$07$KB.uKB.uKB.uKB.uKB.uK."),
+++ (8, b"$2b$08$KB.uKB.uKB.uKB.uKB.uK."),
+++ (9, b"$2b$09$KB.uKB.uKB.uKB.uKB.uK."),
+++ (10, b"$2b$10$KB.uKB.uKB.uKB.uKB.uK."),
+++ (11, b"$2b$11$KB.uKB.uKB.uKB.uKB.uK."),
+++ (12, b"$2b$12$KB.uKB.uKB.uKB.uKB.uK."),
+++ (13, b"$2b$13$KB.uKB.uKB.uKB.uKB.uK."),
+++ (14, b"$2b$14$KB.uKB.uKB.uKB.uKB.uK."),
+++ (15, b"$2b$15$KB.uKB.uKB.uKB.uKB.uK."),
+++ (16, b"$2b$16$KB.uKB.uKB.uKB.uKB.uK."),
+++ (17, b"$2b$17$KB.uKB.uKB.uKB.uKB.uK."),
+++ (18, b"$2b$18$KB.uKB.uKB.uKB.uKB.uK."),
+++ (19, b"$2b$19$KB.uKB.uKB.uKB.uKB.uK."),
+++ (20, b"$2b$20$KB.uKB.uKB.uKB.uKB.uK."),
+++ (21, b"$2b$21$KB.uKB.uKB.uKB.uKB.uK."),
+++ (22, b"$2b$22$KB.uKB.uKB.uKB.uKB.uK."),
+++ (23, b"$2b$23$KB.uKB.uKB.uKB.uKB.uK."),
+++ (24, b"$2b$24$KB.uKB.uKB.uKB.uKB.uK."),
+++])
+++def test_gensalt_rounds_valid(rounds, expected, monkeypatch):
+++ monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
+++ assert bcrypt.gensalt(rounds) == expected
+++
+++
+++ at pytest.mark.parametrize("rounds", list(range(1, 4)))
+++def test_gensalt_rounds_invalid(rounds, monkeypatch):
+++ monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
+++
+++ with pytest.raises(ValueError):
+++ bcrypt.gensalt(rounds)
+++
+++
+++def test_gensalt_bad_prefix():
+++ with pytest.raises(ValueError):
+++ bcrypt.gensalt(prefix="bad")
+++
+++
+++def test_gensalt_2a_prefix(monkeypatch):
+++ monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
+++ assert bcrypt.gensalt(prefix=b"2a") == b"$2a$12$KB.uKB.uKB.uKB.uKB.uK."
+++
+++
+++ at pytest.mark.parametrize(("password", "salt", "expected"), [
+++ (
+++ b"Kk4DQuMMfZL9o",
+++ b"$2b$04$cVWp4XaNU8a4v1uMRum2SO",
+++ b"$2b$04$cVWp4XaNU8a4v1uMRum2SO026BWLIoQMD/TXg5uZV.0P.uO8m3YEm",
+++ ),
+++ (
+++ b"9IeRXmnGxMYbs",
+++ b"$2b$04$pQ7gRO7e6wx/936oXhNjrO",
+++ b"$2b$04$pQ7gRO7e6wx/936oXhNjrOUNOHL1D0h1N2IDbJZYs.1ppzSof6SPy",
+++ ),
+++ (
+++ b"xVQVbwa1S0M8r",
+++ b"$2b$04$SQe9knOzepOVKoYXo9xTte",
+++ b"$2b$04$SQe9knOzepOVKoYXo9xTteNYr6MBwVz4tpriJVe3PNgYufGIsgKcW",
+++ ),
+++ (
+++ b"Zfgr26LWd22Za",
+++ b"$2b$04$eH8zX.q5Q.j2hO1NkVYJQO",
+++ b"$2b$04$eH8zX.q5Q.j2hO1NkVYJQOM6KxntS/ow3.YzVmFrE4t//CoF4fvne",
+++ ),
+++ (
+++ b"Tg4daC27epFBE",
+++ b"$2b$04$ahiTdwRXpUG2JLRcIznxc.",
+++ b"$2b$04$ahiTdwRXpUG2JLRcIznxc.s1.ydaPGD372bsGs8NqyYjLY1inG5n2",
+++ ),
+++ (
+++ b"xhQPMmwh5ALzW",
+++ b"$2b$04$nQn78dV0hGHf5wUBe0zOFu",
+++ b"$2b$04$nQn78dV0hGHf5wUBe0zOFu8n07ZbWWOKoGasZKRspZxtt.vBRNMIy",
+++ ),
+++ (
+++ b"59je8h5Gj71tg",
+++ b"$2b$04$cvXudZ5ugTg95W.rOjMITu",
+++ b"$2b$04$cvXudZ5ugTg95W.rOjMITuM1jC0piCl3zF5cmGhzCibHZrNHkmckG",
+++ ),
+++ (
+++ b"wT4fHJa2N9WSW",
+++ b"$2b$04$YYjtiq4Uh88yUsExO0RNTu",
+++ b"$2b$04$YYjtiq4Uh88yUsExO0RNTuEJ.tZlsONac16A8OcLHleWFjVawfGvO",
+++ ),
+++ (
+++ b"uSgFRnQdOgm4S",
+++ b"$2b$04$WLTjgY/pZSyqX/fbMbJzf.",
+++ b"$2b$04$WLTjgY/pZSyqX/fbMbJzf.qxCeTMQOzgL.CimRjMHtMxd/VGKojMu",
+++ ),
+++ (
+++ b"tEPtJZXur16Vg",
+++ b"$2b$04$2moPs/x/wnCfeQ5pCheMcu",
+++ b"$2b$04$2moPs/x/wnCfeQ5pCheMcuSJQ/KYjOZG780UjA/SiR.KsYWNrC7SG",
+++ ),
+++ (
+++ b"vvho8C6nlVf9K",
+++ b"$2b$04$HrEYC/AQ2HS77G78cQDZQ.",
+++ b"$2b$04$HrEYC/AQ2HS77G78cQDZQ.r44WGcruKw03KHlnp71yVQEwpsi3xl2",
+++ ),
+++ (
+++ b"5auCCY9by0Ruf",
+++ b"$2b$04$vVYgSTfB8KVbmhbZE/k3R.",
+++ b"$2b$04$vVYgSTfB8KVbmhbZE/k3R.ux9A0lJUM4CZwCkHI9fifke2.rTF7MG",
+++ ),
+++ (
+++ b"GtTkR6qn2QOZW",
+++ b"$2b$04$JfoNrR8.doieoI8..F.C1O",
+++ b"$2b$04$JfoNrR8.doieoI8..F.C1OQgwE3uTeuardy6lw0AjALUzOARoyf2m",
+++ ),
+++ (
+++ b"zKo8vdFSnjX0f",
+++ b"$2b$04$HP3I0PUs7KBEzMBNFw7o3O",
+++ b"$2b$04$HP3I0PUs7KBEzMBNFw7o3O7f/uxaZU7aaDot1quHMgB2yrwBXsgyy",
+++ ),
+++ (
+++ b"I9VfYlacJiwiK",
+++ b"$2b$04$xnFVhJsTzsFBTeP3PpgbMe",
+++ b"$2b$04$xnFVhJsTzsFBTeP3PpgbMeMREb6rdKV9faW54Sx.yg9plf4jY8qT6",
+++ ),
+++ (
+++ b"VFPO7YXnHQbQO",
+++ b"$2b$04$WQp9.igoLqVr6Qk70mz6xu",
+++ b"$2b$04$WQp9.igoLqVr6Qk70mz6xuRxE0RttVXXdukpR9N54x17ecad34ZF6",
+++ ),
+++ (
+++ b"VDx5BdxfxstYk",
+++ b"$2b$04$xgZtlonpAHSU/njOCdKztO",
+++ b"$2b$04$xgZtlonpAHSU/njOCdKztOPuPFzCNVpB4LGicO4/OGgHv.uKHkwsS",
+++ ),
+++ (
+++ b"dEe6XfVGrrfSH",
+++ b"$2b$04$2Siw3Nv3Q/gTOIPetAyPr.",
+++ b"$2b$04$2Siw3Nv3Q/gTOIPetAyPr.GNj3aO0lb1E5E9UumYGKjP9BYqlNWJe",
+++ ),
+++ (
+++ b"cTT0EAFdwJiLn",
+++ b"$2b$04$7/Qj7Kd8BcSahPO4khB8me",
+++ b"$2b$04$7/Qj7Kd8BcSahPO4khB8me4ssDJCW3r4OGYqPF87jxtrSyPj5cS5m",
+++ ),
+++ (
+++ b"J8eHUDuxBB520",
+++ b"$2b$04$VvlCUKbTMjaxaYJ.k5juoe",
+++ b"$2b$04$VvlCUKbTMjaxaYJ.k5juoecpG/7IzcH1AkmqKi.lIZMVIOLClWAk.",
+++ ),
+++])
+++def test_hashpw_new(password, salt, expected):
+++ assert bcrypt.hashpw(password, salt) == expected
+++
+++
+++ at pytest.mark.parametrize(("password", "hashed"), [
+++ (
+++ b"Kk4DQuMMfZL9o",
+++ b"$2b$04$cVWp4XaNU8a4v1uMRum2SO026BWLIoQMD/TXg5uZV.0P.uO8m3YEm",
+++ ),
+++ (
+++ b"9IeRXmnGxMYbs",
+++ b"$2b$04$pQ7gRO7e6wx/936oXhNjrOUNOHL1D0h1N2IDbJZYs.1ppzSof6SPy",
+++ ),
+++ (
+++ b"xVQVbwa1S0M8r",
+++ b"$2b$04$SQe9knOzepOVKoYXo9xTteNYr6MBwVz4tpriJVe3PNgYufGIsgKcW",
+++ ),
+++ (
+++ b"Zfgr26LWd22Za",
+++ b"$2b$04$eH8zX.q5Q.j2hO1NkVYJQOM6KxntS/ow3.YzVmFrE4t//CoF4fvne",
+++ ),
+++ (
+++ b"Tg4daC27epFBE",
+++ b"$2b$04$ahiTdwRXpUG2JLRcIznxc.s1.ydaPGD372bsGs8NqyYjLY1inG5n2",
+++ ),
+++ (
+++ b"xhQPMmwh5ALzW",
+++ b"$2b$04$nQn78dV0hGHf5wUBe0zOFu8n07ZbWWOKoGasZKRspZxtt.vBRNMIy",
+++ ),
+++ (
+++ b"59je8h5Gj71tg",
+++ b"$2b$04$cvXudZ5ugTg95W.rOjMITuM1jC0piCl3zF5cmGhzCibHZrNHkmckG",
+++ ),
+++ (
+++ b"wT4fHJa2N9WSW",
+++ b"$2b$04$YYjtiq4Uh88yUsExO0RNTuEJ.tZlsONac16A8OcLHleWFjVawfGvO",
+++ ),
+++ (
+++ b"uSgFRnQdOgm4S",
+++ b"$2b$04$WLTjgY/pZSyqX/fbMbJzf.qxCeTMQOzgL.CimRjMHtMxd/VGKojMu",
+++ ),
+++ (
+++ b"tEPtJZXur16Vg",
+++ b"$2b$04$2moPs/x/wnCfeQ5pCheMcuSJQ/KYjOZG780UjA/SiR.KsYWNrC7SG",
+++ ),
+++ (
+++ b"vvho8C6nlVf9K",
+++ b"$2b$04$HrEYC/AQ2HS77G78cQDZQ.r44WGcruKw03KHlnp71yVQEwpsi3xl2",
+++ ),
+++ (
+++ b"5auCCY9by0Ruf",
+++ b"$2b$04$vVYgSTfB8KVbmhbZE/k3R.ux9A0lJUM4CZwCkHI9fifke2.rTF7MG",
+++ ),
+++ (
+++ b"GtTkR6qn2QOZW",
+++ b"$2b$04$JfoNrR8.doieoI8..F.C1OQgwE3uTeuardy6lw0AjALUzOARoyf2m",
+++ ),
+++ (
+++ b"zKo8vdFSnjX0f",
+++ b"$2b$04$HP3I0PUs7KBEzMBNFw7o3O7f/uxaZU7aaDot1quHMgB2yrwBXsgyy",
+++ ),
+++ (
+++ b"I9VfYlacJiwiK",
+++ b"$2b$04$xnFVhJsTzsFBTeP3PpgbMeMREb6rdKV9faW54Sx.yg9plf4jY8qT6",
+++ ),
+++ (
+++ b"VFPO7YXnHQbQO",
+++ b"$2b$04$WQp9.igoLqVr6Qk70mz6xuRxE0RttVXXdukpR9N54x17ecad34ZF6",
+++ ),
+++ (
+++ b"VDx5BdxfxstYk",
+++ b"$2b$04$xgZtlonpAHSU/njOCdKztOPuPFzCNVpB4LGicO4/OGgHv.uKHkwsS",
+++ ),
+++ (
+++ b"dEe6XfVGrrfSH",
+++ b"$2b$04$2Siw3Nv3Q/gTOIPetAyPr.GNj3aO0lb1E5E9UumYGKjP9BYqlNWJe",
+++ ),
+++ (
+++ b"cTT0EAFdwJiLn",
+++ b"$2b$04$7/Qj7Kd8BcSahPO4khB8me4ssDJCW3r4OGYqPF87jxtrSyPj5cS5m",
+++ ),
+++ (
+++ b"J8eHUDuxBB520",
+++ b"$2b$04$VvlCUKbTMjaxaYJ.k5juoecpG/7IzcH1AkmqKi.lIZMVIOLClWAk.",
+++ ),
+++])
+++def test_hashpw_existing(password, hashed):
+++ assert bcrypt.hashpw(password, hashed) == hashed
+++
+++
+++def test_hashpw_invalid():
+++ with pytest.raises(ValueError):
+++ bcrypt.hashpw(b"password", b"$2z$04$cVWp4XaNU8a4v1uMRum2SO")
+++
+++
+++def test_hashpw_str_password():
+++ with pytest.raises(TypeError):
+++ bcrypt.hashpw(
+++ six.text_type("password"),
+++ b"$2b$04$cVWp4XaNU8a4v1uMRum2SO",
+++ )
+++
+++
+++def test_hashpw_str_salt():
+++ with pytest.raises(TypeError):
+++ bcrypt.hashpw(
+++ b"password",
+++ six.text_type("$2b$04$cVWp4XaNU8a4v1uMRum2SO"),
+++ )
+++
+++
+++def test_nul_byte():
+++ with pytest.raises(ValueError):
+++ bcrypt.hashpw(b"abc\0def", bcrypt.gensalt(0))
diff --cc debian/patches/series
index 0000000,0000000..2487fad
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++0001-import-tests-from-github.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-bcrypt.git
More information about the Python-modules-commits
mailing list