Bug 2264854 - python-plac fails to build with Python 3.13: AssertionError: usage: example_all.py [-h] [-o .] [-n 100] [-d] {A,B,C}
Summary: python-plac fails to build with Python 3.13: AssertionError: usage: example_a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-plac
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-02-19 10:05 UTC by Karolina Surma
Modified: 2024-08-12 20:42 UTC (History)
4 users (show)

Fixed In Version: python-plac-1.4.3-1.fc41 python-plac-1.4.3-1.fc40 python-plac-1.4.3-1.fc39 python-plac-1.4.3-4.el10_0
Clone Of:
Environment:
Last Closed: 2024-02-22 23:07:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ialbert plac issues 80 0 None open Tests fail starting with Python 3.13.0a4 due to changes in help text output format 2024-02-19 14:25:53 UTC

Description Karolina Surma 2024-02-19 10:05:32 UTC
python-plac fails to build with Python 3.13.0a4.

+ /usr/bin/python3 doc/test_plac.py
usage: test_plac.py {help,commit} ...
test_plac.py: error: No command 'foo'
Running test_cmd_abbrevs
Running test_cmds
Running test_date_default
Running test_doctest
Running test_expected_help
Traceback (most recent call last):
  File "/builddir/build/BUILD/plac-1.4.2/doc/test_plac.py", line 353, in <module>
    maybegen = test()
               ~~~~^^
  File "/builddir/build/BUILD/plac-1.4.2/doc/test_plac.py", line 85, in test_expected_help
    check_help(fname[:-5])
    ~~~~~~~~~~^^^^^^^^^^^^
  File "/builddir/build/BUILD/plac-1.4.2/doc/test_plac.py", line 73, in check_help
    assert got == expected, got
           ^^^^^^^^^^^^^^^
AssertionError: usage: example_all.py [-h] [-o .] [-n 100] [-d] {A,B,C}

A script for machine learning

positional arguments:
  {A,B,C}             Model name

options:
  -h, --help          show this help message and exit
  -o, --output-dir .  Optional output directory
  -n, --n-iter 100    Number of training iterations
  -d, --debug         Enable debug mode

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07033860-python-plac/

For all our attempts to build python-plac with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-plac/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Ben Beasley 2024-02-19 13:27:48 UTC
The weird thing is that this is a regression from Python 3.13.0a3 to 3.13.0a4.

The actual help text is

'usage: example13.py [-h] [-l] [-y] [-s 100]\n\noptions:\n  -h, --help     show this help message and exit\n  -l, --list\n  -y, --yield    [False]\n  -s, --sys 100  [100]'

and the expected text is

'usage: example13.py [-h] [-l] [-y] [-s 100]\n\noptions:\n  -h, --help         show this help message and exit\n  -l, --list\n  -y, --yield        [False]\n  -s 100, --sys 100  [100]'

so the indentation has changed, but I am not sure why.

Comment 2 Ben Beasley 2024-02-19 14:25:53 UTC
This is due to https://github.com/python/cpython/commit/c4a2e8a2c5188c3288d57b80852e92c83f46f6f3.

I have opened discussion with upstream in https://github.com/ialbert/plac/issues/80.

I have a usable patch in https://github.com/ialbert/plac/pull/81, but it is unconditional: it would break the tests on Python 3.12 and older.

Comment 3 Fedora Update System 2024-02-22 15:38:43 UTC
FEDORA-2024-48d21eff05 (python-plac-1.4.3-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-48d21eff05

Comment 4 Fedora Update System 2024-02-22 15:47:15 UTC
FEDORA-2024-fb9a6a8f03 (python-plac-1.4.3-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-fb9a6a8f03

Comment 5 Fedora Update System 2024-02-22 21:33:11 UTC
FEDORA-2024-d3ac707b84 (python-plac-1.4.3-1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d3ac707b84

Comment 6 Fedora Update System 2024-02-22 23:07:35 UTC
FEDORA-2024-48d21eff05 (python-plac-1.4.3-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2024-02-22 23:07:42 UTC
FEDORA-2024-fb9a6a8f03 (python-plac-1.4.3-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2024-02-23 02:10:23 UTC
FEDORA-2024-d3ac707b84 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-d3ac707b84`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-d3ac707b84

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-03-02 00:40:46 UTC
FEDORA-2024-d3ac707b84 (python-plac-1.4.3-1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2024-08-12 20:33:57 UTC
FEDORA-EPEL-2024-98b346913f (python-plac-1.4.3-4.el10_0) has been submitted as an update to Fedora EPEL 10.0.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-98b346913f

Comment 11 Fedora Update System 2024-08-12 20:42:13 UTC
FEDORA-EPEL-2024-98b346913f (python-plac-1.4.3-4.el10_0) has been pushed to the Fedora EPEL 10.0 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.