Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_request_uri_plus_pass test fails #345

Closed
ryandesign opened this issue Feb 19, 2022 · 4 comments
Closed

test_request_uri_plus_pass test fails #345

ryandesign opened this issue Feb 19, 2022 · 4 comments

Comments

@ryandesign
Copy link

The test_request_uri_plus_pass test fails. I tested treq 22.2.0 with Python 3.10.2 as installed by MacPorts on macOS 10.15.7.

    test_request_uri_plus_pass ...                                      [ERROR]
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/path/to/treq-22.2.0/build/lib/treq/test/test_client.py", line 112, in test_request_uri_plus_pass
    self.agent.request.assert_called_once_with(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/unittest/mock.py", line 931, in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/unittest/mock.py", line 919, in assert_called_with
    raise AssertionError(_error_message()) from cause
builtins.AssertionError: expected call not found.
Expected: request(b'GET', b'https://example.com/?foo+bar=baz+biff', Headers({b'accept-encoding': [b'gzip']}), None)
Actual: request(b'GET', b'https://example.com/?foo%2Bbar=baz%2Bbiff', Headers({b'accept-encoding': [b'gzip']}), None)

treq.test.test_client.HTTPClientTests.test_request_uri_plus_pass
-------------------------------------------------------------------------------
Ran 227 tests in 46.644s

FAILED (errors=1, successes=226)
@twm
Copy link
Contributor

twm commented Mar 7, 2022

Hi @ryandesign, Python 3.10 is part of our test matrix so I think it's unlikely that's the issue here. Given URL escaping is the issue what version of Hyperlink is installed? This smells like python-hyper/hyperlink#146

@ryandesign
Copy link
Author

Thanks. Hyperlink 19.0.0 was installed. I see that issue the was fixed in Hyperlink 21.0.0. I'll advise the MacPorts maintainer of Hyperlink to update it.

@twm
Copy link
Contributor

twm commented Mar 7, 2022

It sounds like there is something wrong with the translation of Treq's requirements, then. Treq requires a sufficiently new version of Hyperlink. I'm not familiar with Macports, but in something like Debian this would be represented in the package.

@ryandesign
Copy link
Author

MacPorts does not offer multiple different versions of Python modules, nor of any port, nor, therefore, does MacPorts have the capability of specifying a dependency on a specific version of another port. One only specifies a dependency on another port, and MacPorts ensures that it is upgraded to the latest version available in MacPorts first.

I am not very familiar with how Python works so I cannot say whether or how the module versioning requirements specified in the treq setup.py would be checked; I can only observe that no such checking appears to be taking place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants