Skip to content

[geopandas] Some @final methods are overridden#14657

Merged
srittau merged 1 commit intopython:mainfrom
srittau:fix-geopandas
Aug 28, 2025
Merged

[geopandas] Some @final methods are overridden#14657
srittau merged 1 commit intopython:mainfrom
srittau:fix-geopandas

Conversation

@srittau
Copy link
Copy Markdown
Collaborator

@srittau srittau commented Aug 28, 2025

Closes: #14655

@AlexWaygood
Copy link
Copy Markdown
Member

I wonder if it might be worth putting a lower bound on our pandas-stubs dependency here?

requires = ["numpy>=1.20", "pandas-stubs", "types-shapely", "pyproj"]

The breakage was caused by a new pandas-stubs release. But putting a lower bound wouldn't stop us being broken by the next pandas-stubs release, and if you have an older version of pandas-stubs installed then type checkers will just find some of the new type: ignores here unnecessary -- that shouldn't cause them to emit diagnostics when analysing user code. So there would probably be marginal benefit in adding a lower bound, and some cost as well.

@srittau
Copy link
Copy Markdown
Collaborator Author

srittau commented Aug 28, 2025

The breakage was caused by a new pandas-stubs release. But putting a lower bound wouldn't stop us being broken by the next pandas-stubs release, and if you have an older version of pandas-stubs installed then type checkers will just find some of the new type: ignores here unnecessary -- that shouldn't cause them to emit diagnostics when analysing user code. So there would probably be marginal benefit in adding a lower bound, and some cost as well.

So am I right in reading your conclusion as: "No, let's not do that, because there's no benefit, but rather a slight regression for users"? 😀 In that case I would agree, although I'm a bit indifferent overall.

@AlexWaygood
Copy link
Copy Markdown
Member

So am I right in reading your conclusion as: "No, let's not do that, because there's no benefit, but rather a slight regression for users"? 😀 In that case I would agree, although I'm a bit indifferent overall.

Yes! But I decided to show my working in how I reached that conclusion ;)

@github-actions
Copy link
Copy Markdown
Contributor

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

discord.py (https://github.com/Rapptz/discord.py)
- discord/ext/commands/hybrid.py:508: error: Overlap between argument names and ** TypedDict items: "description", "name"  [misc]
+ discord/ext/commands/hybrid.py:508: error: Overlap between argument names and ** TypedDict items: "name", "description"  [misc]
- discord/ext/commands/hybrid.py:629: error: Overlap between argument names and ** TypedDict items: "description", "name"  [misc]
+ discord/ext/commands/hybrid.py:629: error: Overlap between argument names and ** TypedDict items: "name", "description"  [misc]
- discord/ext/commands/hybrid.py:834: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
+ discord/ext/commands/hybrid.py:834: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
- discord/ext/commands/hybrid.py:858: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
+ discord/ext/commands/hybrid.py:858: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
- discord/ext/commands/hybrid.py:883: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
+ discord/ext/commands/hybrid.py:883: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
- discord/ext/commands/hybrid.py:935: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
+ discord/ext/commands/hybrid.py:935: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
- discord/ext/commands/bot.py:290: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
+ discord/ext/commands/bot.py:290: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
- discord/ext/commands/bot.py:314: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
+ discord/ext/commands/bot.py:314: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]

@srittau srittau merged commit 014818d into python:main Aug 28, 2025
48 checks passed
@srittau srittau deleted the fix-geopandas branch August 28, 2025 10:44
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.

Daily tests failed on Thu Aug 28 2025

2 participants