pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/py-pook



Module Name:    pkgsrc
Committed By:   adam
Date:           Wed Aug 28 15:23:11 UTC 2024

Modified Files:
        pkgsrc/www/py-pook: Makefile PLIST distinfo

Log Message:
py-pook: updated to 2.0.0

v2.0.0

Breaking change: Remove Response::body's binary parameter and enforce a keyword argument for chunked.

The binary parameter is no longer needed since responses are now always byte-encoded in all cases (see below).
A keyword argument is now enforced for chunked to ensure unnamed arguments meant for the removed binary parameter cannot be confused as chunked arguments.
Only return byte-encoded response bodies, matching the bahviour of all supported client libraries.

This is possible because for all supported client libraries, pook mocks the actual response sent to the
client library over the wire, which will, in all cases, be bytes. Client libraries that support reading
response content as a string or other formats will continue to work as expected, because they'll always
be handling bytes from pook.
This causes no change to application code for users of pook, except for users of the standard library urllib,
for which this also fixed a bug where non-bytes bodies were returned by pook in certain cases. This is impossible
in real application code. If you rely on pook to mock urllib responses and have code that handles non-bytes response
bodies, that code can be safely deleted (provided the only reason it was there was pook in the first place).
Breaking change: Remove Mock::body's binary parameter.

This parameter was already unused due to a bug in the code (it was not passed through to the BodyMatcher),
so this will not cause any changes to tests that relied on it: it didn't do anything to begin with.
The breaking change is simply the removal of the unused parameter, which should be deleted from tests using pook.
Pook's code has also been updated to remove all cases where non-bytes objects were being handled. Instead, the body
of any interecepted request will always be stored as bytes, and only decoded when necessary for individual downstream
matchers (JSON, XML).
Correct documentation strings for XMLMatcher and JSONMatcher to no longer suggest they can handle regex matchers.

These classes never implemented regex matching.
Add a pytest fixture to the package (kudos @wimglenn)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/www/py-pook/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/www/py-pook/PLIST
cvs rdiff -u -r1.3 -r1.4 pkgsrc/www/py-pook/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/py-pook/Makefile
diff -u pkgsrc/www/py-pook/Makefile:1.4 pkgsrc/www/py-pook/Makefile:1.5
--- pkgsrc/www/py-pook/Makefile:1.4     Fri Feb 23 07:54:16 2024
+++ pkgsrc/www/py-pook/Makefile Wed Aug 28 15:23:11 2024
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2024/02/23 07:54:16 adam Exp $
+# $NetBSD: Makefile,v 1.5 2024/08/28 15:23:11 adam Exp $
 
-DISTNAME=      pook-1.4.3
+DISTNAME=      pook-2.0.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    www python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pook/}
@@ -19,8 +19,6 @@ TEST_DEPENDS+=        ${PYPKGPREFIX}-test-async
 
 USE_LANGUAGES= # none
 
-PYTHON_VERSIONS_INCOMPATIBLE=  27
-
 post-extract:
        ${MKDIR} ${WRKSRC}/src
        ${MV} ${WRKSRC}/pook ${WRKSRC}/src/pook

Index: pkgsrc/www/py-pook/PLIST
diff -u pkgsrc/www/py-pook/PLIST:1.2 pkgsrc/www/py-pook/PLIST:1.3
--- pkgsrc/www/py-pook/PLIST:1.2        Sun Jan 14 15:34:05 2024
+++ pkgsrc/www/py-pook/PLIST    Wed Aug 28 15:23:11 2024
@@ -1,7 +1,8 @@
-@comment $NetBSD: PLIST,v 1.2 2024/01/14 15:34:05 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2024/08/28 15:23:11 adam Exp $
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
 ${PYSITELIB}/${WHEEL_INFODIR}/RECORD
 ${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt
 ${PYSITELIB}/${WHEEL_INFODIR}/licenses/LICENSE
 ${PYSITELIB}/pook/__init__.py
 ${PYSITELIB}/pook/__init__.pyc
@@ -96,6 +97,9 @@ ${PYSITELIB}/pook/mock.pyo
 ${PYSITELIB}/pook/mock_engine.py
 ${PYSITELIB}/pook/mock_engine.pyc
 ${PYSITELIB}/pook/mock_engine.pyo
+${PYSITELIB}/pook/pytest_fixture.py
+${PYSITELIB}/pook/pytest_fixture.pyc
+${PYSITELIB}/pook/pytest_fixture.pyo
 ${PYSITELIB}/pook/regex.py
 ${PYSITELIB}/pook/regex.pyc
 ${PYSITELIB}/pook/regex.pyo

Index: pkgsrc/www/py-pook/distinfo
diff -u pkgsrc/www/py-pook/distinfo:1.3 pkgsrc/www/py-pook/distinfo:1.4
--- pkgsrc/www/py-pook/distinfo:1.3     Fri Feb 23 07:54:16 2024
+++ pkgsrc/www/py-pook/distinfo Wed Aug 28 15:23:11 2024
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.3 2024/02/23 07:54:16 adam Exp $
+$NetBSD: distinfo,v 1.4 2024/08/28 15:23:11 adam Exp $
 
-BLAKE2s (pook-1.4.3.tar.gz) = 080551b7a51e54f4ff335ca4313f59ee02c7fff24a21fe4854bb667d11176c71
-SHA512 (pook-1.4.3.tar.gz) = 37229d2284f445ae90c2642292ea465dd568f8ff802807f9dd5f10195464c333634339e87861bdeebdaab91ff1a25d7deee28c91222f76238f0ca4a83c5b210a
-Size (pook-1.4.3.tar.gz) = 31963 bytes
+BLAKE2s (pook-2.0.0.tar.gz) = 68c0291b27003df0a072995118fccf3df30f5d184928694c4fd089f2ae613970
+SHA512 (pook-2.0.0.tar.gz) = aa9e0643d140145dfc9ab8e0844978494973c5b6a8973c64c390378e4aa0f7761f66849a450094dbfef60586d7bdef1d070ec309ea9aca008562ba846e68a6db
+Size (pook-2.0.0.tar.gz) = 32265 bytes



Home | Main Index | Thread Index | Old Index