Skip to content

replace tostring() with tobytes()#26932

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
shyama7004:deprecationFix
Feb 18, 2025
Merged

replace tostring() with tobytes()#26932
asmorkalov merged 1 commit intoopencv:4.xfrom
shyama7004:deprecationFix

Conversation

@shyama7004
Copy link
Copy Markdown
Contributor

@shyama7004 shyama7004 commented Feb 18, 2025

Fixes :

test_goodFeaturesToTrack (test_goodfeatures.TestGoodFeaturesToTrack_test) ... /Users/opencv-cn/GHA-0CV-
2/_work/opencv/opencv/opencv/modules/ml/misc/python/test/test_goodfeatures.py:20: DeprecationWarning: tostring() is deprecated.
Use
tobytes() instead.
self.assertTrue(arr.tostring() == original.tostring())

Documentation: https://docs.python.org/3/library/array.html#array.array.tobytes

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov asmorkalov added the cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) label Feb 18, 2025
@asmorkalov asmorkalov added this to the 4.12.0 milestone Feb 18, 2025
@asmorkalov asmorkalov self-assigned this Feb 18, 2025
@asmorkalov asmorkalov merged commit 6092499 into opencv:4.x Feb 18, 2025
28 of 29 checks passed
@shyama7004 shyama7004 deleted the deprecationFix branch February 18, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants