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