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

Feat: Support passing socket directly #4161

Merged
merged 9 commits into from Mar 24, 2024
Merged

Conversation

Poolitzer
Copy link
Member

This adds support to pass sockets instances instead of file paths.

Closes #4078

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Left a few comments below.
Tests don't seem to be happy:

tests.ext.test_updater
collection failure
ImportError while importing test module '/home/runner/work/python-telegram-bot/python-telegram-bot/tests/ext/test_updater.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/init.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/ext/test_updater.py:28: in <module>
from tornado.netutil import bind_unix_socket
E   ModuleNotFoundError: No module named 'tornado'

telegram/ext/_application.py Outdated Show resolved Hide resolved
telegram/ext/_updater.py Outdated Show resolved Hide resolved
telegram/ext/_utils/webhookhandler.py Outdated Show resolved Hide resolved
tests/ext/test_updater.py Outdated Show resolved Hide resolved
telegram/ext/_application.py Outdated Show resolved Hide resolved
tests/ext/test_updater.py Outdated Show resolved Hide resolved
Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

LGTM :) When tests pass & pool can confirm his local tests, we can merge

@Poolitzer
Copy link
Member Author

@Bibo-Joshi Can confirm now, works.

1 similar comment
@Poolitzer
Copy link
Member Author

@Bibo-Joshi Can confirm now, works.

@Bibo-Joshi Bibo-Joshi merged commit 2d8d43f into master Mar 24, 2024
24 checks passed
@Bibo-Joshi Bibo-Joshi deleted the unix_file_descriptor branch March 24, 2024 20:04
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Bind to file descriptor of unix socket
2 participants