Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

IP-7044: [audiometer] PyO3 0.27 마이그레이션 및 코드 품질 개선#32

Merged
novdov merged 8 commits intomainfrom
ip-7044
Mar 5, 2026
Merged

IP-7044: [audiometer] PyO3 0.27 마이그레이션 및 코드 품질 개선#32
novdov merged 8 commits intomainfrom
ip-7044

Conversation

@novdov
Copy link
Copy Markdown
Contributor

@novdov novdov commented Mar 5, 2026

목적

PyO3 0.19.2에서 사용 중인 GIL Refs API가 0.23에서 제거되어 0.27로 마이그레이션하고, 리뷰에서 발견된 버그와 API 불일치를 함께 수정

변경 사항

  • PyO3 0.27 Bound API 전환
    • &PyAny, &PyModule, &PyBytes 등 GIL Refs를 Bound<'_, T> 기반으로 교체
    • FromPyObject trait 구현을 0.27 시그니처(extract(Borrowed))로 변경
  • ratio_to_db 버그 수정: silence 입력 시 +∞ 대신 -∞ 반환 (pydub과 일관성 확보)
  • measure_loudness 반환 타입 개선: untyped PyDict#[pyclass(frozen)] Loudness 구조체로 변경하여 타입 안전성 확보
  • API 타입 통일: channels/sample_rate 파라미터를 isize/usizeu32로 통일하여 불필요한 캐스팅 제거
  • GIL 해제: measure_rms, measure_peak, measure_loudness의 순수 Rust 연산 구간에 py.detach() 적용

TODO

  • pydub 연동 코드에서 measure_loudness 반환값 접근 방식 변경 필요 (actual["integrated"]actual.integrated)

novdov and others added 8 commits March 5, 2026 10:42
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@novdov novdov self-assigned this Mar 5, 2026
@novdov novdov merged commit 9920f46 into main Mar 5, 2026
2 checks passed
@novdov novdov deleted the ip-7044 branch March 5, 2026 01:58
@novdov novdov added the enhancement New feature or request label Mar 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant