Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Support for this will be dropped in the first half of 2026!

Contributed by Marc Mueller (PR [20156](https://github.com/python/mypy/pull/20156)).

### Removed Flag: `--force-uppercase-builtins`

Removed the deprecated `--force-uppercase-builtins` flag. It has been a no-op since mypy 1.17.0.

Contributed by Marc Mueller (PR [20410](https://github.com/python/mypy/pull/20410))

### Removed Flag: `--force-union-syntax`

Mypy only supports Python 3.10+. Removed the `--force-union-syntax` flag as it's no longer necessary.
Expand Down
8 changes: 0 additions & 8 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,11 +815,6 @@ def add_invertible_flag(
help="Disable strict Optional checks (inverse: --strict-optional)",
)

# This flag is deprecated, Mypy only supports Python 3.9+
add_invertible_flag(
"--force-uppercase-builtins", default=False, help=argparse.SUPPRESS, group=none_group
)

lint_group = parser.add_argument_group(
title="Configuring warnings",
description="Detect code that is sound but redundant or problematic.",
Expand Down Expand Up @@ -1537,9 +1532,6 @@ def set_strict_flags() -> None:
if options.strict_concatenate and not strict_option_set:
print("Warning: --strict-concatenate is deprecated; use --extra-checks instead")

if options.force_uppercase_builtins:
print("Warning: --force-uppercase-builtins is deprecated; mypy only supports Python 3.9+")

# Set target.
if special_opts.modules + special_opts.packages:
options.build_type = BuildType.MODULE
Expand Down
11 changes: 0 additions & 11 deletions mypy/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import re
import sys
import sysconfig
import warnings
from collections.abc import Callable
from re import Pattern
from typing import Any, Final
Expand Down Expand Up @@ -410,8 +409,6 @@ def __init__(self) -> None:

self.disable_bytearray_promotion = False
self.disable_memoryview_promotion = False
# Deprecated, Mypy only supports Python 3.9+
self.force_uppercase_builtins = False

# Sets custom output format
self.output: str | None = None
Expand All @@ -422,14 +419,6 @@ def __init__(self) -> None:
# preserving manual tweaks to generated C file)
self.mypyc_skip_c_generation = False

def use_lowercase_names(self) -> bool:
warnings.warn(
"options.use_lowercase_names() is deprecated and will be removed in a future version",
DeprecationWarning,
stacklevel=2,
)
return True

def use_star_unpack(self) -> bool:
return self.python_version >= (3, 11)

Expand Down