Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "lru_cache preserves signature of wrapped function (#6221)" #6356

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

JukkaL
Copy link
Contributor

@JukkaL JukkaL commented Nov 22, 2021

This reverts commit 8bda66a.

The change causes issues with ParamSpec implementations in type
checkers, at least pyright and my work-in-progress support for
ParamSpec in mypy. It's not yet clear how to fix the issues, so I
think that it's best to revert this, at least temporarily until we've
found a good solution. See #6347 for context.

This reverts commit 8bda66a.

The change causes issues with ParamSpec implementations in type
checkers, at least pyright and my work-in-progress support for
ParamSpec in mypy. It's not yet clear how to fix the issues, so I
think that it's best to revert this, at least temporarily until we've
found a good solution. See python#6347 for context.
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

isort (https://github.com/pycqa/isort.git)
- isort/place.py:17: error: Returning Any from function declared to return "str"

pandas (https://github.com/pandas-dev/pandas.git)
- pandas/core/dtypes/cast.py:498: error: unused "type: ignore" comment

pydantic (https://github.com/samuelcolvin/pydantic.git)
- pydantic/tools.py:34: error: unused "type: ignore" comment

pytest (https://github.com/pytest-dev/pytest.git)
+ src/_pytest/config/__init__.py:1683: error: Argument 1 to "filterwarnings" has incompatible type "*Tuple[str, str, Type[Warning], str, int]"; expected "Union[Literal['default'], Literal['error'], Literal['ignore'], Literal['always'], Literal['module'], Literal['once']]"  [arg-type]
+ src/_pytest/config/__init__.py:1686: error: Argument 1 to "filterwarnings" has incompatible type "*Tuple[str, str, Type[Warning], str, int]"; expected "Union[Literal['default'], Literal['error'], Literal['ignore'], Literal['always'], Literal['module'], Literal['once']]"  [arg-type]
- src/_pytest/fixtures.py:1323: error: Unexpected keyword argument "params" for "FixtureFunctionMarker"  [call-arg]

aiohttp (https://github.com/aio-libs/aiohttp.git)
- aiohttp/multipart.py:518: error: Returning Any from function declared to return "str"  [no-any-return]
- aiohttp/multipart.py:692: error: Returning Any from function declared to return "str"  [no-any-return]
- aiohttp/connector.py:919: error: Returning Any from function declared to return "Optional[SSLContext]"  [no-any-return]
- aiohttp/connector.py:925: error: Returning Any from function declared to return "Optional[SSLContext]"  [no-any-return]
- aiohttp/connector.py:926: error: Returning Any from function declared to return "Optional[SSLContext]"  [no-any-return]
- aiohttp/client_reqrep.py:1010: error: Returning Any from function declared to return "str"  [no-any-return]

edgedb (https://github.com/edgedb/edgedb.git)
- edb/schema/objects.py:997: error: unused "type: ignore" comment
- edb/schema/objects.py:1992:9: error: Returning Any from function declared to return "QualName"
- edb/schema/objects.py:2223: error: unused "type: ignore" comment
- edb/schema/objects.py:2637:9: error: Returning Any from function declared to return "Name"
- edb/schema/schema.py:1146:9: error: Returning Any from function declared to return "FrozenSet[Cast]"
- edb/schema/schema.py:1156:9: error: Returning Any from function declared to return "FrozenSet[Cast]"
- edb/schema/schema.py:1166:9: error: Returning Any from function declared to return "FrozenSet[so.Object_T]"
- edb/schema/schema.py:1412:9: error: Returning Any from function declared to return "Optional[Migration]"
- edb/schema/scalars.py:132:9: error: Returning Any from function declared to return "bool"
- edb/schema/scalars.py:163:9: error: Returning Any from function declared to return "bool"
- edb/schema/scalars.py:176:9: error: Returning Any from function declared to return "int"
- edb/schema/casts.py:91:5: error: Returning Any from function declared to return "bool"
- edb/schema/casts.py:119:21: error: Returning Any from function declared to return "Optional[Type]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants