Skip to content

replace PyString::from_object with PyString::from_encoded_object #5017

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidhewitt
Copy link
Member

Followup to #5008, as per my suggestion in #5005

@davidhewitt davidhewitt force-pushed the deprecate-string-from-object branch 3 times, most recently from ec502ec to 5de3f93 Compare March 28, 2025 15:09
@davidhewitt
Copy link
Member Author

Looks like adding a deprecation is discouraged in a patch, so will keep this for 0.25.

Think we'll start merging all those changes in shortly, I just want to get 0.24.1 done first.

@davidhewitt davidhewitt marked this pull request as draft March 28, 2025 15:10
@Icxolu Icxolu added this to the 0.25 milestone Mar 28, 2025
@davidhewitt davidhewitt marked this pull request as ready for review March 28, 2025 21:10
@davidhewitt
Copy link
Member Author

With #5021 prepped, I think this is ready for merge, if others agree this is a good idea?

Comment on lines +217 to +218
encoding: &CStr,
errors: &CStr,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be Options to "have the interface use the default values" or do we want to explicitly not provide that option?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah good spot. I'll have a think about this, I'm not sure which I prefer 🤔

}

/// Deprecated name for [`PyString::from_object`].
#[deprecated(since = "0.23.0", note = "renamed to `PyString::from_object`")]
#[deprecated(
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this was deprecated already, we can probably just remove it already, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, just a race with the other prs, think this function is deleted now 🙌

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