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

Change constructor signature for CallbackIntercace. #100

Merged
merged 4 commits into from
Apr 19, 2023
Merged

Conversation

ruthenian8
Copy link
Member

Use ssl_context parameter in Flask.run

Description

Enable passing the ssl_context to CallbackTelegramInterface. Change class constructor signature.
#101

Checklist

  • I have covered the code with tests
  • I have added comments to my code to help others understand it
  • I have updated the documentation to reflect the changes
  • I have performed a self-review of the changes

Use ssl_context parameter in Flask_run
@RLKRo
Copy link
Member

RLKRo commented Apr 10, 2023

Why not allow passing any keywords?

    def __init__(
        ...
        **flask_options
    ):

And

    async def connect(self, callback: PipelineRunnerFunction):
        ...
        self.app.run(host=self.host, port=self.port, **self.flask_options)

@ruthenian8
Copy link
Member Author

Why not allow passing any keywords?

    def __init__(
        ...
        **flask_options
    ):

And

    async def connect(self, callback: PipelineRunnerFunction):
        ...
        self.app.run(host=self.host, port=self.port, **self.flask_options)

In my view, we would be better off recreating the original Flask.run signature without any significant changes.
https://flask.palletsprojects.com/en/2.1.x/api/?highlight=run#flask.Flask.run
Since the keyword arguments of the original method get redirected to wsgi, it would make sense to name them accordingly.

Copy link
Member

@RLKRo RLKRo left a comment

Choose a reason for hiding this comment

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

Ah, OK. Makes sense.

@kudep kudep merged commit 489590d into dev Apr 19, 2023
@kudep kudep deleted the feat/ssl_support branch April 19, 2023 12:57
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.

3 participants