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

Remove socketfromfd dependency to be able to launch thumbor with the --fd option #1422

Merged
merged 4 commits into from Apr 12, 2022
Merged

Conversation

ebilheude
Copy link
Contributor

@ebilheude ebilheude commented Mar 10, 2022

Closes #1418

@marcelometal
Copy link
Member

Hi @ebilheude,
Thank you for help in improving the Thumbor.

Could you please fix the unittest too?

@mock.patch.object(thumbor.server, "socket_from_fd")

ERROR: test_can_run_server_with_fd (tests.test_server.ServerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/mock.py", line 1333, in patched
    with self.decoration_helper(patched,
  File "/usr/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.9/unittest/mock.py", line 1315, in decoration_helper
    arg = exit_stack.enter_context(patching)
  File "/usr/lib/python3.9/contextlib.py", line 448, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.9/unittest/mock.py", line 1404, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3.9/unittest/mock.py", line 1377, in get_original
    raise AttributeError(
AttributeError: <module 'thumbor.server' from '/home/metal/debian/thumbor/.pybuild/cpython3_3.9_thumbor/build/thumbor/server.py'> does not have the attribute 'socket_from_fd'

@sonarcloud
Copy link

sonarcloud bot commented Mar 28, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ebilheude
Copy link
Contributor Author

Hi @marcelometal,
It is ok now.

Copy link
Member

@scorphus scorphus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

Thanks for your contribution, @ebilheude! 👍

@marcelometal marcelometal merged commit 278a9d7 into thumbor:master Apr 12, 2022
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

Successfully merging this pull request may close these issues.

Ability to launch thumbor with --fd option
3 participants