Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions docs/source/common_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ improved performance. You can ensure the presence of orjson using the ``faster-c

python3 -m pip install -U mypy[faster-cache]

Mypy may depend on orjson by default in the future. To use faster, native parser, use the
``native-parse`` extra. Native parser will be default in near future.
Mypy may depend on orjson by default in the future.

Types of empty collections
--------------------------
Expand Down
1 change: 1 addition & 0 deletions mypy-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ mypy_extensions>=1.0.0
pathspec>=1.0.0
tomli>=1.1.0; python_version<'3.11'
librt>=0.9.0; platform_python_implementation != 'PyPy'
ast-serialize>=0.2.0
4 changes: 2 additions & 2 deletions mypy/nativeparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
try:
import ast_serialize # type: ignore[import-not-found, unused-ignore]
except ImportError:
print("error: native parser not installed")
print("note: to install run `pip install mypy[native-parser]`")
print("error: ast-serialize package not installed")
print("note: to install run `pip install ast-serialize`")
sys.exit(2)

from librt.internal import (
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dependencies = [
"pathspec>=1.0.0",
"tomli>=1.1.0; python_version<'3.11'",
"librt>=0.9.0; platform_python_implementation != 'PyPy'",
"ast-serialize>=0.2.0",
]
dynamic = ["version"]

Expand All @@ -65,7 +66,6 @@ mypyc = ["setuptools>=50"]
reports = ["lxml"]
install-types = ["pip"]
faster-cache = ["orjson"]
native-parser = ["ast-serialize>=0.2.0,<1.0.0"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make it an empty list, to not break builds for brave people who actually tried this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realised recently when removing the python2 extra that this doesn't actually break builds, it just issues a warning


[project.urls]
Homepage = "https://www.mypy-lang.org/"
Expand Down
1 change: 0 additions & 1 deletion test-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ pytest-cov>=2.10.0
setuptools>=77.0.3
tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.10
pre_commit>=3.5.0
ast-serialize>=0.2.0,<1.0.0
Loading