Skip to content
Myr

evaluate --cert before --key

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by James Warne · committed by David Lord · parent dba2be9 · Browse files · 3 files+11 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+11 added−1 removed

  • tests:+5 added−0 removed
  • other:+6 added−1 removed

3 files+11 added−1 removed

modified:src/flask/cli.py+4 added-1 removed
761 unmodified lines
762@click.command("run", short_help="Run a development server.")763@click.option("--host", "-h", default="127.0.0.1", help="The interface to bind to.")764@click.option("--port", "-p", default=5000, help="The port to bind to.")765@click.option(766 "--cert", type=CertParamType(), help="Specify a certificate file to use HTTPS."766 "--cert",767 type=CertParamType(),768 help="Specify a certificate file to use HTTPS.",769 is_eager=True,770)771@click.option(772 "--key",773 type=click.Path(exists=True, dir_okay=False, resolve_path=True),
219 unmodified lines
modified:tests/test_cli.py+5 added
551 unmodified lines
552 # no cert553 with pytest.raises(click.BadParameter):554 run_command.make_context("run", ["--key", __file__])555556 # cert specified first557 ctx = run_command.make_context("run", ["--cert", __file__, "--key", __file__])558 assert ctx.params["cert"] == (__file__, __file__)559560 # key specified first561 ctx = run_command.make_context("run", ["--key", __file__, "--cert", __file__])562 assert ctx.params["cert"] == (__file__, __file__)563564565def test_run_cert_adhoc(monkeypatch):566 monkeypatch.setitem(sys.modules, "cryptography", None)567568 # cryptography not installed
91 unmodified lines
modified:CHANGES.rst+2 added
5 unmodified lines
6Unreleased78- Fix type annotation for ``json.loads``, it accepts str or bytes.9 :issue:`4519`10- The ``--cert`` and ``--key`` options on ``flask run`` can be given11 in either order. :issue:`4459`121314Version 2.1.115-------------
1269 unmodified lines