Skip to content

Bump PYTHON3_VERSION_MIN #15665

Closed
Closed

Description

@sobolevn

Feature

Right now mypy says:

» mypy mypy/stubgen.py --python-version=3.2
usage: mypy [-h] [-v] [-V] [more options; see below]
            [-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]
mypy: error: argument --python-version: Python 3.2 is not supported (must be 3.4 or higher)

But, it does not look correct, because typeshed does not support 3.4 (currently it supports 3.7+).

So, how mypy can check 3.4?

I think that we need to bump it:

  1. 3.4 is long gone
  2. We don't actually plan any features with this support in mind
  3. typshed does not support it
  4. Users that need it can stay on older versions

Source: https://github.com/python/mypy/blame/2ebd51e881490f4d20635cde92ef9e3edbbad68c/mypy/defaults.py#L15-L15C20

Pitch

Let's use 3.7 as the minimal supported version. (Ideas about it are welcome)

After we decide the version info to be minimal, I will send a PR with the change :)

Activity

  1. self-assigned this
    on Jul 13, 2023
  2. kkirsche commented on Jul 13, 2023

    @kkirsche
    Contributor

    I think this is a great suggestion. I think it would make sense to intend to support all current active versions (leeway for new releases) and the last end-of-life version of Python.

    That allows mypy to move forward without carrying the baggage of legacy code.

    That would align with the suggestion of 3.7 per:
    https://devguide.python.org/versions/

  3. hauntsaninja commented on Jul 13, 2023

    @hauntsaninja
    Collaborator

    Good spot! Yeah, I'd go with whatever the vendored version of typeshed supports, so 3.7 currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions