Skip to content

Don't require ssl module #3211

@davidism

Description

@davidism

Python can be compiled without certain modules, including ssl. It's somewhat common for that to happen when users compile Python from source and don't have the libssl headers set up. flask.cli imports ssl unconditionally, but it's only for optional SSL cert support in the dev server, so this can be guarded with except ImportErrror. Werkzeug already has such a workaround, although it's a little more complicated than what needs to be done in Flask.

If no ssl module is imported, using the cert-related options in the CLI should raise a usage error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuesave-for-sprintPlease don't pick this unless you're participating in an official sprint.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions