pronounce_number_ca warns with no removal version

Open Beginner friendly
#573 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api

Research direction

Start from warn_reader_removed in ovos_number_parser/util.py to see the exact warning wording it builds (VERSION_MAJOR + 1). Then replace the bare warnings.warn(...) in pronounce_number_ca at ovos_number_parser/numbers_ca.py line 459 with that helper, and repeat for the deprecated wrappers in numbers_gl.py (lines 331, 351, 364) and numbers_mwl.py (270, 290, 303). Run the reproduce command with -W always and confirm the message now reads "... is deprecated and is removed in 1.0.0; use ovos_number_parser.pronounce_number(number, "ca")" while the return value stays "vint-i-un".

Written by the indexing model from the issue text.

Description

🤖 Auto-generated by Claude Sonnet 5.5 (claude-sonnet-5-5) via Claude Code — NOT human-reviewed. Verify before acting. The behaviour below was reproduced by running the code on origin/dev (909e3ea) with numtag 0.19.22a6; the expected values come from the source named in each issue, not from the parser.

Observed

pronounce_number_ca warns with no removal version. The deprecated reader names that go through warn_reader_removed say "is deprecated and is removed in 1.0.0; use ...".

>>> pronounce_number_ca(21)   # DeprecationWarning text
migrate to use RomanceNumberExtractor and NumberVocabulary directly instead
>>> extract_number_en("two")   # DeprecationWarning text
extract_number_en is deprecated and is removed in 1.0.0; use ovos_number_parser.extract_number(text, "en")

Expected

A deprecation warning carries the removal version, computed as VERSION_MAJOR + 1 by warn_reader_removed in ovos_number_parser/util.py. The pronounce_number_ca warning reads "pronounce_number_ca is deprecated and is removed in 1.0.0; use ovos_number_parser.pronounce_number(number, "ca")". The output stays "vint-i-un" for 21.

Reproduce

python -W always -c "from ovos_number_parser.numbers_ca import pronounce_number_ca; print(pronounce_number_ca(21))"

Where

ovos_number_parser/numbers_ca.py line 459, pronounce_number_ca. numbers_gl.py and numbers_mwl.py have the same bare warnings.warn(...) text in their deprecated wrappers (lines 331, 351 and 364 in gl; 270, 290 and 303 in mwl). Those were not run in this report.

Dominant language
Python
Stars
4
Forks
5
Avg merge
5h 40m
Merged PRs (30d)
97

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenVoiceOS/ovos-number-parser

All issues in OpenVoiceOS/ovos-number-parser

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.