Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TYP: deprecatema.round_#28917

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dineshcsdev wants to merge8 commits intonumpy:main
base:main
Choose a base branch
Loading
fromdineshcsdev:fix-deprecate-ma-round

Conversation

dineshcsdev
Copy link

@dineshcsdevdineshcsdev commentedMay 7, 2025
edited
Loading

@jorenham
Added@deprecated decorator toma.round_ stub in core.pyi and importeddeprecated fromtyping_extensions to fixed

@jorenhamjorenham changed the titleFix deprecate ma roundTYP: deprecatema.round_May 7, 2025
@jorenhamjorenham self-requested a reviewMay 7, 2025 12:11
Copy link
Member

@jorenhamjorenham left a comment

Choose a reason for hiding this comment

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

becauseround aliasesround_, you're also deprecatingnp.ma.round with this

@jorenham
Copy link
Member

for reference:#28899 (review)

@dineshcsdev
Copy link
Author

I’ve removed the@deprecated decorator from round_ as suggested since it also deprecates round. Added a note in the stub file to clarify. Please let me know if further changes are needed!

@dineshcsdev
Copy link
Author

I’ve removed the@deprecated decorator from round_ as suggested since it also deprecates round. Added a note in the stub file to clarify. Please let me know if further changes are needed!

@jorenham
Copy link
Member

I’ve removed the@deprecated decorator from round_ as suggested since it also deprecates round.

That's not what I meant actually:@deprecated shouldonly be applied toround_. Therefore,round should no longer aliasround_, and should instead have its own (identical) signature.

@ngoldbaum
Copy link
Member

why are there two PRs now? this makes more sense in the PR you already have open...

@dineshcsdev
Copy link
Author

Added@deprecated("np.ma.round_ is deprecated. Please use np.round instead.") above the round_ function.

Kept round function unchanged and added a comment noting it's retained for compatibility.

@dineshcsdev
Copy link
Author

@ngoldbaum You're right, and thanks for pointing that out. I initially opened this separate PR to isolate the deprecation change for ma.round_ and keep it focused based on the feedback. But I now realize it would have been better to update the existing PR instead of opening a new one

dineshcsdevand others added2 commitsMay 8, 2025 14:29
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
@dineshcsdev
Copy link
Author

Remove redundant comments as per review

Co-authored-by: Joren Hammudoglu <jhammudoglu@gmail.com>
Copy link
Member

@jorenhamjorenham left a comment

Choose a reason for hiding this comment

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

merging this should wait until after#28899

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jorenhamjorenhamjorenham approved these changes

Assignees
No one assigned
Projects
Status: Needs decision
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@dineshcsdev@jorenham@ngoldbaum

[8]ページ先頭

©2009-2025 Movatter.jp