Skip to content

Commit ff7f56b

Browse files
committed
Merge branch 'master' into release
2 parents bbd4865 + 64f0c8b commit ff7f56b

File tree

5 files changed

+31
-10
lines changed

5 files changed

+31
-10
lines changed

emmett/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.6.1"
1+
__version__ = "2.6.2"

emmett/cli.py

+25-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import code
1717
import os
18+
import pathlib
1819
import re
1920
import sys
2021
import types
@@ -232,8 +233,18 @@ def main(self, *args, **kwargs):
232233
@click.option(
233234
"--loop", type=click.Choice(["auto", "asyncio", "uvloop"]), default="auto", help="Event loop implementation."
234235
)
235-
@click.option("--ssl-certfile", type=str, default=None, help="SSL certificate file")
236-
@click.option("--ssl-keyfile", type=str, default=None, help="SSL key file")
236+
@click.option(
237+
"--ssl-certfile",
238+
type=click.Path(exists=True, file_okay=True, dir_okay=False, readable=True, path_type=pathlib.Path),
239+
default=None,
240+
help="SSL certificate file",
241+
)
242+
@click.option(
243+
"--ssl-keyfile",
244+
type=click.Path(exists=True, file_okay=True, dir_okay=False, readable=True, path_type=pathlib.Path),
245+
default=None,
246+
help="SSL key file",
247+
)
237248
@click.option("--reloader/--no-reloader", is_flag=True, default=True, help="Runs with reloader.")
238249
@pass_script_info
239250
def develop_command(info, host, port, interface, loop, ssl_certfile, ssl_keyfile, reloader):
@@ -296,8 +307,18 @@ def develop_command(info, host, port, interface, loop, ssl_certfile, ssl_keyfile
296307
@click.option("--access-log/--no-access-log", is_flag=True, default=False, help="Enable access log.")
297308
@click.option("--backlog", type=int, default=2048, help="Maximum number of connections to hold in backlog")
298309
@click.option("--backpressure", type=int, help="Maximum number of requests to process concurrently (per worker)")
299-
@click.option("--ssl-certfile", type=str, default=None, help="SSL certificate file")
300-
@click.option("--ssl-keyfile", type=str, default=None, help="SSL key file")
310+
@click.option(
311+
"--ssl-certfile",
312+
type=click.Path(exists=True, file_okay=True, dir_okay=False, readable=True, path_type=pathlib.Path),
313+
default=None,
314+
help="SSL certificate file",
315+
)
316+
@click.option(
317+
"--ssl-keyfile",
318+
type=click.Path(exists=True, file_okay=True, dir_okay=False, readable=True, path_type=pathlib.Path),
319+
default=None,
320+
help="SSL key file",
321+
)
301322
@pass_script_info
302323
def serve_command(
303324
info,

emmett/forms.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ async def _process(self, **kwargs):
384384
#: handle uploads
385385
for field in filter(lambda f: f.type == "upload", self.writable_fields):
386386
upload = self.files[field.name]
387-
del_field = field.name + "__del"
388-
if not upload.filename:
387+
if not upload:
388+
del_field = field.name + "__del"
389389
if self.input_params.get(del_field, False):
390390
self.params[field.name] = self.table[field.name].default or ""
391391
# TODO: do we want to physically delete file?

emmett/routing/response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from typing import Any, Dict, Tuple, Union
1515

16-
from emmett_core.http.response import HTTPResponse, HTTPStringResponse
16+
from emmett_core.http.response import HTTPStringResponse
1717
from emmett_core.routing.response import ResponseProcessor
1818
from renoir.errors import TemplateMissingError
1919

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "emmett"
7-
version = "2.6.1"
7+
version = "2.6.2"
88
description = "The web framework for inventors"
99
readme = "README.md"
1010
license = "BSD-3-Clause"
@@ -35,7 +35,7 @@ classifiers = [
3535

3636
dependencies = [
3737
"click>=6.0",
38-
"emmett-core[granian,rapidjson]~=1.0.2",
38+
"emmett-core[granian,rapidjson]~=1.0.4",
3939
"emmett-pydal==17.3.1",
4040
"pendulum~=3.0.0",
4141
"pyyaml~=6.0",

0 commit comments

Comments
 (0)