Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Jul 8, 2024
2 parents 7730d8c + a055220 commit 4684473
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion emmett/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.5.11"
__version__ = "2.5.12"
9 changes: 5 additions & 4 deletions emmett/_reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import os
import signal
import subprocess
import ssl
import sys
import time

Expand Down Expand Up @@ -151,8 +150,8 @@ def run(self, process):
def run_with_reloader(
interface,
app_target,
host,
port,
host='127.0.0.1',
port=8000,
loop='auto',
log_level=None,
log_access=False,
Expand All @@ -174,8 +173,10 @@ def run_with_reloader(

process = multiprocessing.Process(
target=_server_run,
args=(interface, app_target, host, port),
args=(interface, app_target),
kwargs={
"host": host,
"port": port,
"loop": loop,
"log_level": log_level,
"log_access": log_access,
Expand Down
11 changes: 7 additions & 4 deletions emmett/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,11 @@ def develop_command(
runner(
interface,
app_target,
host,
port,
host=host,
port=port,
loop=loop,
log_level='debug',
log_access=True,
threads=1,
threading_mode="workers",
ssl_certfile=ssl_certfile,
ssl_keyfile=ssl_keyfile,
Expand All @@ -315,6 +314,9 @@ def develop_command(
@click.option(
'--interface', type=click.Choice(['rsgi', 'asgi']), default='rsgi',
help='Application interface.')
@click.option(
'--http', type=click.Choice(['auto', '1', '2']), default='auto',
help='HTTP version.')
@click.option(
'--ws/--no-ws', is_flag=True, default=True,
help='Enable websockets support.')
Expand Down Expand Up @@ -342,7 +344,7 @@ def develop_command(
'--ssl-keyfile', type=str, default=None, help='SSL key file')
@pass_script_info
def serve_command(
info, host, port, workers, threads, threading_mode, interface, ws, loop, opt,
info, host, port, workers, threads, threading_mode, interface, http, ws, loop, opt,
log_level, access_log, backlog, backpressure, ssl_certfile, ssl_keyfile
):
app_target = info._get_import_name()
Expand All @@ -360,6 +362,7 @@ def serve_command(
threading_mode=threading_mode,
backlog=backlog,
backpressure=backpressure,
http=http,
enable_websockets=ws,
ssl_certfile=ssl_certfile,
ssl_keyfile=ssl_keyfile,
Expand Down
2 changes: 2 additions & 0 deletions emmett/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def run(
threading_mode='workers',
backlog=1024,
backpressure=None,
http='auto',
enable_websockets=True,
ssl_certfile: Optional[str] = None,
ssl_keyfile: Optional[str] = None
Expand All @@ -43,6 +44,7 @@ def run(
threading_mode=threading_mode,
loop=loop,
loop_opt=loop_opt,
http=http,
websockets=enable_websockets,
backlog=backlog,
backpressure=backpressure,
Expand Down
4 changes: 2 additions & 2 deletions emmett/tools/auth/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,14 @@ def _registration_email(self, user, data):
data['email'] = user.email
return self.app.ext.MailExtension.send_mail(
recipients=user.email,
subject=self.config.messages['registration_email_subject'],
subject=str(self.config.messages['registration_email_subject']),
body=str(self.config.messages['registration_email_text'] % data))

def _reset_password_email(self, user, data):
data['email'] = user.email
return self.app.ext.MailExtension.send_mail(
recipients=user.email,
subject=self.config.messages['reset_password_email_subject'],
subject=str(self.config.messages['reset_password_email_subject']),
body=str(self.config.messages['reset_password_email_text'] % data))


Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name = "emmett"

[tool.poetry]
name = "emmett"
version = "2.5.11"
version = "2.5.12"
description = "The web framework for inventors"
authors = ["Giovanni Barillari <[email protected]>"]
authors = ["Giovanni Barillari <[email protected]>"]
license = "BSD-3-Clause"

readme = "README.md"
Expand Down Expand Up @@ -47,7 +47,7 @@ emmett = "emmett.cli:main"
[tool.poetry.dependencies]
python = "^3.8"
click = ">=6.0"
granian = "~1.4.1"
granian = "~1.5.0"
emmett-crypto = "^0.6"
pendulum = "~3.0.0"
pyDAL = "17.3"
Expand Down

0 comments on commit 4684473

Please sign in to comment.