Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Flask 3.0.1 breaks path-separated command line arguments #5391

Closed
Milestone
@alexrudy

Description

@alexrudy

In a minimal flask app, runningflask run --extra-files= or using any other argument that internally usesSeparatedPathType results inTypeError: super(type, obj): obj must be an instance or subtype of type

  1. Create a minimal flask application (followthe Quickstart).
  2. Install flask==3.0.1 (this bug is not reproducible with 3.0.0 AFAIK)
  3. Runflask run --extra-files=a

Expected Behavior:
The server should start up.

Actual Behavior:
The command raises aType Error and exits with code 1

Full Traceback
Traceback (most recent call last):  File ".../flask-cli-bug/..venv/bin/flask", line 8, in <module>    sys.exit(main())             ^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/flask/cli.py", line 1105, in main    cli.main()  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 1078, in main    rv = self.invoke(ctx)         ^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 1686, in invoke    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 943, in make_context    self.parse_args(ctx, args)  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 1408, in parse_args    value, args = param.handle_parse_result(ctx, opts, args)                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 2400, in handle_parse_result    value = self.process_value(ctx, value)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 2356, in process_value    value = self.type_cast_value(ctx, value)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 2344, in type_cast_value    return convert(value)           ^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/core.py", line 2316, in convert    return self.type(value, param=self, ctx=ctx)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/click/types.py", line 83, in __call__    return self.convert(value, param, ctx)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/flask/cli.py", line 861, in convert    return [super().convert(item, param, ctx) for item in items]           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File ".../flask-cli-bug/..venv/lib/python3.11/site-packages/flask/cli.py", line 861, in <listcomp>    return [super().convert(item, param, ctx) for item in items]            ^^^^^^^TypeError: super(type, obj): obj must be an instance or subtype of type

Environment:

  • Python version: 3.11.6
  • Flask version: 3.0.1

Output frompip freeze:

blinker==1.7.0click==8.1.7Flask==3.0.1itsdangerous==2.1.2Jinja2==3.1.3MarkupSafe==2.1.4Werkzeug==3.0.1

Demo Repo:https://github.com/alexrudy/flask-3.0.1-cli-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp