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

Skip to content

Tighten tempfile() return types #10232

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

Merged
merged 8 commits into from
Jun 8, 2023
Merged

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented May 30, 2023

No description provided.

@srittau
Copy link
Collaborator Author

srittau commented May 30, 2023

A first stab. We also have to split _TextMode and _BinaryMode, similar to how they are split in builtins.pyi. We probably don't need to handle the read case, as a read-only temp file makes no sense. This could even help catch further bugs.

@github-actions

This comment has been minimized.

@srittau
Copy link
Collaborator Author

srittau commented May 31, 2023

Depends on #10233.

@github-actions

This comment has been minimized.

@srittau srittau marked this pull request as ready for review June 7, 2023 14:58
@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2023

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

pandas (https://github.com/pandas-dev/pandas) got 1.05x slower (126.4s -> 133.3s)

@srittau
Copy link
Collaborator Author

srittau commented Jun 7, 2023

This is the last prerequisite for trying #10229 again.

@JelleZijlstra JelleZijlstra merged commit 0fe724d into python:main Jun 8, 2023
@srittau srittau deleted the tempfile-ret branch June 8, 2023 07:56
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.

3 participants