Repository navigation
Fix Pynini wheel selection on Python 3.14 - #531
Open
janbernloehr wants to merge 1 commit into
Open
janbernloehr wants to merge 1 commit into
janbernloehr wants to merge 1 commit into
Conversation
Use pynini 2.1.7 on Python >= 3.14 and preserve 2.1.6.post1 on older interpreters in both runtime and test requirements. Fixes NVIDIA#530 Signed-off-by: Jan Bernloehr <jbernloehr@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do ?
Fixes Linux x86_64 installation on Python 3.14 by selecting
pynini==2.1.7, while retainingpynini==2.1.6.post1on Python versions below 3.14.Fixes #530.
The unconditional 2.1.6.post1 pin forces Python 3.14 installations to build Pynini from source because that release has no compatible wheel. Without OpenFst development headers, the build fails with
fst/util.h: No such file or directory. Pynini 2.1.7 provides a CPython 3.14 Linux x86_64 wheel.Apply the same mutually exclusive environment markers to
requirements/requirements.txtandrequirements/requirements_test.txt, so installing thetestorallextra does not reintroduce the incompatible pin.Packaging verification
Manually resolved the Pynini entries extracted from each changed requirements file against public PyPI, targeting
x86_64-manylinux_2_28with source builds disabled:The unpatched
pynini==2.1.6.post1requirement fails the same Python 3.14 check with “no usable wheels.” The built package'sRequires-Distmetadata preserves both markers for the runtime dependencies and thetestandallextras.To reproduce the resolver check from the patched checkout:
These checks isolate the dependency being changed; they are not full dependency-install or grammar-suite runs. The Python 3.14 Linux installation and English normalization smoke test reported in #530 used the same patch on
r1.2.0; that runtime test was not repeated on this branch. Python versions after 3.14 and other platforms are unverified.If #474 lands first, the markers need to move into its
pyproject.tomlruntime dependencies andtestextra.Before your PR is "Ready for review"
Pre checks:
git commit -sto sign. — Commit includes aSigned-off-bytrailer.pytestor (if your machine does not have GPU)pytest --cpufrom the root folder (given you marked your test cases accordingly@pytest.mark.run_only_on('CPU')).bash tools/text_processing_deployment/export_grammars.sh --MODE=test ...pytestand Sparrowhawk here. — N/A: dependency compatibility fix; no grammar changes.__init__.pyfor every folder and subfolder, includingdatafolder which has .TSV files? — N/A: no new folders.Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.to all newly added Python files? — N/A: no Python files added.Copyright 2015 and onwards Google, Inc.. See an example here. — N/A: no copied code.try import: ... except: ...) if not already done. — N/A: no imports changed.PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Prepared with assistance from OpenAI Codex (GPT-6).