Created attachment 219446 [details] Patch to update to 2.24.0 net/py-GeoIP2 requires www/py-requests 2.24.0. So here is a patch to update it.
Any news about this PR ?
Any news?
This needs comprehensive QA, in particular for dependency compatibility and reverse dependents.
We're up to 2.25.1 now. The current version (upstream and in ports) of devel/py-cookiecutter needs at least 2.23.0 to run, as another consumer data point.
(In reply to Charlie Li from comment #4) Currently wrestling with the test suite (which is crashing). Needed to complete QA
(In reply to Kubilay Kocak from comment #5) Same. Noticed that it was downloading dependencies on its own using Python tooling before any tests had a chance to crash.
(In reply to Charlie Li from comment #6) setup.py test downloads deps (via tests_require), which was very convenienent, particularly for un-ported test dependencies (eg: requests wants pytest-httpbin, very old pinned version) setup.py test is 'deprecated' (but pypa hasn't provided a canonical replacement that does the same) pytest et al don't install dependencies defined in tests_require, which is annoying. Would love help diagnosing/isolating the test crash issue (related to pytest --boxed multiprocessing)
Their CI got moved to GitHub Actions, and it appears that they install dependencies and run pytest separately. Probably best to run it from their Makefile.
(In reply to Charlie Li from comment #8) They run pytest tests, whereas I was running pytest without working dir. Will try.
(In reply to Kubilay Kocak from comment #9) This is slightly better, but need to resolve (157 instances of the error): E recursive dependency involving fixture 'httpbin' detected Found one google result on this with no indicated specific resolution
Yakception: pytest-httpbin (NEW PORT) httpbin (NEW PORT) 9 failed, 522 passed, 12 skipped, 1 xfailed, 14 warnings in 57.28 seconds Several "requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support" to resolve Plus a few more.
1 failed, 530 passed, 12 skipped, 1 xfailed, 14 warnings in 61.34 seconds ____________ TestRequests.test_https_warnings _____________________________ self = <tests.test_requests.TestRequests object at 0x804ad9490>, httpbin_secure = <function prepare_url.<locals>.inner at 0x805d6c4c0>, httpbin_ca_bundle = None def test_https_warnings(self, httpbin_secure, httpbin_ca_bundle): """warnings are emitted with requests.get""" if HAS_MODERN_SSL or HAS_PYOPENSSL: warnings_expected = ('SubjectAltNameWarning', ) else: warnings_expected = ('SNIMissingWarning', 'InsecurePlatformWarning', 'SubjectAltNameWarning', ) with pytest.warns(None) as warning_records: warnings.simplefilter('always') requests.get(httpbin_secure('status', '200'), verify=httpbin_ca_bundle) warning_records = [item for item in warning_records if item.category.__name__ != 'ResourceWarning'] warnings_category = tuple( item.category.__name__ for item in warning_records) > assert warnings_category == warnings_expected E AssertionError: assert () == ('SubjectAltNameWarning',) E Right contains one more item: 'SubjectAltNameWarning' E Full diff: E - () E + ('SubjectAltNameWarning',) tests/test_requests.py:857: AssertionError
(In reply to Kubilay Kocak from comment #12) https://github.com/psf/requests/issues/5530 Will exclude the test.
There may or may not be a bug with test_requests with current versions of httpbin and pytest-httpbin. Removing the SubjectAltNameWarning from the warnings_expected tuple allows the test to pass: --- tests/test_requests.py.orig 2020-12-16 17:43:25 UTC +++ tests/test_requests.py @@ -838,7 +838,7 @@ class TestRequests: def test_https_warnings(self, httpbin_secure, httpbin_ca_bundle): """warnings are emitted with requests.get""" if HAS_MODERN_SSL or HAS_PYOPENSSL: - warnings_expected = ('SubjectAltNameWarning', ) + warnings_expected = () else: warnings_expected = ('SNIMissingWarning', 'InsecurePlatformWarning', 531 passed, 12 skipped, 1 xfailed in 63.20 seconds
yakception [1]. I'm currently 4 levels deep, do not know when I'll come back from this, or how deep this rabbithole goes [1] requests -> pytest-httpbin (new port) -> httpbin (new port) -> flasgger (new port) -> apispec-webframeworks (new port) | flask-jwt (new port) ...
Apart from httpbin (bug 251847) and pytest-httpbin (bug 252187), the other new ports are not needed to run the tests.
Created attachment 220983 [details] 2.25.1 v1 This one has all tests passing, with the slight adjustment included. Note that httpbin and pytest-httpbin are in TEST_DEPENDS.
(In reply to Charlie Li from comment #16) Thanks Charlie. I should have made it clearer that I already have all of comment 15 ported so far
(In reply to Charlie Li from comment #16) flasgger is required for httpbin to be completed correctly, it imports it at runtime
DONE: requests -> pytest-httpbin -> httpbin -> flasgger -> pispec-webframeworks | flask-jwt latest requests test: 531 passed, 12 skipped, 1 xfailed, 14 warnings in 61.24 seconds Pending reverse dependents test
As another point, with textproc/py-chardet updating to 4.0.0 today, www/py-requests now breaks upon startup. This prevented me from building devel/cmake (not exactly sure why it's a requirement, but alas). I updated the Makefile to use 2.25.1 with no patches and everything built successfully.
Any progress on this? Ran into this again with the latest update to devel/py-cookiecutter
(In reply to Matthew Seaman from comment #22) dbaio and/or kai will be assisting getting this landed (i'm blocked on git migration currently) per https://wiki.freebsd.org/KubilayKocak#MAINTAINER_POLICY Last QA update/test on my end was all necessary ports required for tests we're ported, to be landed (i'll provide diffs for these), and an initial consumer QA went OK, which needs to be rerun.
Request halp from dbaio if available
(In reply to Kubilay Kocak from comment #24) I've just started a build of all consumers (309, queued 1931 ports), it will take some time, will let you know.
(In reply to Danilo G. Baio from comment #25) still building, this is the only issue until now: sysutils/py-hcloud py38-hcloud-1.12.0 depends on package: py38-requests>=2.20,<2.23 - not found seems easy to fix, matthew@ is maintainer, could you take a look? https://github.com/hetznercloud/hcloud-python/blob/v1.12.0/setup.py#L17
(In reply to Danilo G. Baio from comment #26) The <version-spec> in the ports RUN_DEPENDS appear to be incorrect (bugs). Should check the rest and make sure they match the setup.py. Those changes are: Approved by: portmgr (blanket: fix dependencies) MFH: 2020Q2 (blanket: fix dependencies)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=31ac02bd2729f5701ff471453720e90c9e5d3e48 commit 31ac02bd2729f5701ff471453720e90c9e5d3e48 Author: Matthew Seaman <matthew@FreeBSD.org> AuthorDate: 2021-05-18 17:34:03 +0000 Commit: Matthew Seaman <matthew@FreeBSD.org> CommitDate: 2021-05-18 17:37:10 +0000 sysutils/py-hcloud -- fix dependency versions This removes one impediment to the pending update of www/py-requests PR: 250941 sysutils/py-hcloud/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
(In reply to commit-hook from comment #28) Thanks Matthew. Can you MFH this bug fix, we may need to MFH the update too
(In reply to Danilo G. Baio from comment #26) All consumers building fine now. OK Runtime tests with several ports. OK make test: 1 failed, 530 passed, 12 skipped, 1 xfailed in 59.57 seconds ... tests/test_requests.py::TestRequests::test_pyopenssl_redirect attempting to ignore so the rest of the tests can run FAILED [ 22%] ... /usr/local/lib/python3.8/http/client.py:276: ProtocolError During handling of the above exception, another exception occurred: self = <tests.test_requests.TestRequests object at 0x805e5ca30> httpbin_secure = <function prepare_url.<locals>.inner at 0x8054dff70> httpbin_ca_bundle = None βdef test_pyopenssl_redirect(self, httpbin_secure, httpbin_ca_bundle): > requests.get(httpbin_secure('status', '301'), verify=httpbin_ca_bundle) tests/test_requests.py:816: Downgrade pytest_httpbin to 0.3.0 didn't solve. Did you see this before? Or is it new test issue?
(In reply to Danilo G. Baio from comment #30) I did not, but if you don't have the whole test stack that could be why. I'll submit a diff for those ports shortly
A commit in branch 2021Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a52944442ca77bf18f587e70ab7b31c5daaeb1d0 commit a52944442ca77bf18f587e70ab7b31c5daaeb1d0 Author: Matthew Seaman <matthew@FreeBSD.org> AuthorDate: 2021-05-18 17:34:03 +0000 Commit: Matthew Seaman <matthew@FreeBSD.org> CommitDate: 2021-05-19 06:01:51 +0000 sysutils/py-hcloud -- fix dependency versions This removes one impediment to the pending update of www/py-requests PR: 250941 (cherry picked from commit 31ac02bd2729f5701ff471453720e90c9e5d3e48) sysutils/py-hcloud/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
More runtime tests OK, issue just in that test, I'll push this and wait a few days before merging it to quarterly.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7d02ece23c1a68e64e5220bea3c28275ff5152e4 commit 7d02ece23c1a68e64e5220bea3c28275ff5152e4 Author: Charlie Li <vishwin@FreeBSD.org> AuthorDate: 2021-05-19 23:05:25 +0000 Commit: Danilo G. Baio <dbaio@FreeBSD.org> CommitDate: 2021-05-19 23:17:55 +0000 www/py-requests: Update to 2.25.1 - Patches removed were incorporated upstream. - Update WWW with current project's information. Changelog: https://github.com/psf/requests/blob/v2.25.1/HISTORY.md PR: 250941 Approved by: koobs (maintainer, implicit) MFH: 2021Q2 Co-authored-by: Olivier Cochard <olivier@FreeBSD.org> Co-authored-by: Danilo G. Baio <dbaio@FreeBSD.org> www/py-requests/Makefile | 14 +++++++---- www/py-requests/distinfo | 6 ++--- www/py-requests/files/patch-setup.py (gone) | 29 ---------------------- .../files/patch-tests_test__requests.py (new) | 12 +++++++++ .../files/patch-tests_test__utils.py (gone) | 17 ------------- www/py-requests/pkg-descr | 15 ++++++----- 6 files changed, 33 insertions(+), 60 deletions(-)
A commit in branch 2021Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d3a2475bbfbd9f8ff6600dafdbca745370f2f40c commit d3a2475bbfbd9f8ff6600dafdbca745370f2f40c Author: Charlie Li <vishwin@FreeBSD.org> AuthorDate: 2021-05-19 23:05:25 +0000 Commit: Danilo G. Baio <dbaio@FreeBSD.org> CommitDate: 2021-05-22 09:56:11 +0000 www/py-requests: Update to 2.25.1 - Patches removed were incorporated upstream. - Update WWW with current project's information. Changelog: https://github.com/psf/requests/blob/v2.25.1/HISTORY.md PR: 250941 Approved by: koobs (maintainer, implicit) Co-authored-by: Olivier Cochard <olivier@FreeBSD.org> Co-authored-by: Danilo G. Baio <dbaio@FreeBSD.org> (cherry picked from commit 7d02ece23c1a68e64e5220bea3c28275ff5152e4) www/py-requests/Makefile | 14 +++++++---- www/py-requests/distinfo | 6 ++--- www/py-requests/files/patch-setup.py (gone) | 29 ---------------------- .../files/patch-tests_test__requests.py (new) | 12 +++++++++ .../files/patch-tests_test__utils.py (gone) | 17 ------------- www/py-requests/pkg-descr | 15 ++++++----- 6 files changed, 33 insertions(+), 60 deletions(-)
Committed, thank you all!