opencv/modules/python/src2
Stefan Dragnev 2791bb7062
Merge pull request #24773 from tailsu:sd/pathlike
python: accept path-like objects wherever file names are expected #24773

Merry Christmas, all 🎄

Implements #15731

Support is enabled for all arguments named `filename` or `filepath` (case-insensitive), or annotated with `CV_WRAP_FILE_PATH`.

Support is based on `PyOS_FSPath`, which is available in Python 3.6+. When running on older Python versions the arguments must have a `str` value as before.

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [x] 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
2024-01-12 16:23:05 +03:00
..
typing_stubs_generation feat: re-export cv2.typing module as typing 2023-10-03 14:12:55 +03:00
copy_typings_stubs_on_success.py Merge pull request #20370 from ddacw:stub-gen-next 2023-05-26 18:25:46 +03:00
cv2_convert.cpp Merge pull request #24773 from tailsu:sd/pathlike 2024-01-12 16:23:05 +03:00
cv2_convert.hpp Enabled VAS OT in G-API Python interface 2023-12-19 17:51:59 +00:00
cv2_highgui.cpp Merge pull request #21182 from mshabunin:split-cv2cpp 2021-12-05 12:49:36 +00:00
cv2_highgui.hpp Merge pull request #21182 from mshabunin:split-cv2cpp 2021-12-05 12:49:36 +00:00
cv2_numpy.cpp Merge pull request #23691 from dkurt:pycv_float16_fixes 2023-05-26 18:56:21 +03:00
cv2_numpy.hpp Fixed most clang -Wextra-semi warnings 2022-09-27 18:06:46 -04:00
cv2_util.cpp Proposed solution for issue #23633 2023-05-17 23:06:59 +02:00
cv2_util.hpp Fixed tests execution with Python 2.7 2023-07-11 18:24:08 +03:00
cv2.cpp Merge pull request #23679 from dkurt:py_cv_type_macro 2023-05-25 15:54:41 +03:00
cv2.hpp Merge pull request #24773 from tailsu:sd/pathlike 2024-01-12 16:23:05 +03:00
gen2.py Merge pull request #24773 from tailsu:sd/pathlike 2024-01-12 16:23:05 +03:00
hdr_parser.py Merge pull request #24773 from tailsu:sd/pathlike 2024-01-12 16:23:05 +03:00
pycompat.hpp Enabled VAS OT in G-API Python interface 2023-12-19 17:51:59 +00:00
typing_stubs_generator.py Merge pull request #23801 from VadimLevin:dev/vlevin/python-stubs-api-refinement 2023-06-21 10:44:36 +03:00