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

Remove unsafe for some safe functions #1404

Merged
merged 1 commit into from
Jan 26, 2021
Merged

Conversation

nw0
Copy link
Contributor

@nw0 nw0 commented Jan 26, 2021

Closes #1389, which noted that some safe functions are marked unsafe.

Noted that this is a breaking change.

@programmerjake
Copy link
Contributor

iirc, removing unsafe shouldn't actually be a breaking change. all functions can be called in an unsafe block and also can be coerced to unsafe function pointers, so the worst that can happen is code gets a warning that it has a unnecessary unsafe block.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

I did say in #1389 that this would be breaking, but actually I think @programmerjake is correct. It's the same level of breaking as if we added #[deprecated] - it won't break builds automatically, only for those who #[deny] certain warnings.

Thanks for following up the discussion with this PR!

@davidhewitt davidhewitt merged commit 3a62758 into PyO3:master Jan 26, 2021
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.

Some safe functions are marked unsafe?
3 participants