Source: python-plac
Version: 1.4.1-1
Severity: normal
Tags: fixed-upstream
User: debian-pyt...@lists.debian.org
Usertags: python3.13
Forwarded: https://github.com/ialbert/plac/issues/80

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

Looks like 1.4.3 upstream should fix this.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html

Log snippet:

doc/test_plac.py::test_p5 PASSED                                         [ 32%]
doc/test_plac.py::test_global PASSED                                     [ 35%]
doc/test_plac.py::test_flag_with_default PASSED                          [ 39%]
doc/test_plac.py::test_metavar_no_defaults PASSED                        [ 42%]
doc/test_plac.py::test_metavar_with_defaults PASSED                      [ 46%]
doc/test_plac.py::test_metavar_empty_string PASSED                       [ 50%]
doc/test_plac.py::test_kwargs PASSED                                     [ 53%]
doc/test_plac.py::test_kwargs2 PASSED                                    [ 57%]
doc/test_plac.py::test_kwargs3 PASSED                                    [ 60%]
doc/test_plac.py::test_date_default PASSED                               [ 64%]
doc/test_plac.py::test_int_default PASSED                                [ 67%]
doc/test_plac.py::test_none_default PASSED                               [ 71%]
doc/test_plac.py::test_cmds PASSED                                       [ 75%]
doc/test_plac.py::test_cmd_abbrevs PASSED                                [ 78%]
doc/test_plac.py::test_sub_help PASSED                                   [ 82%]
doc/test_plac.py::test_yield PASSED                                      [ 85%]
doc/test_plac.py::test_doctest PASSED                                    [ 89%]
doc/test_runp.py::test1 PASSED                                           [ 92%]
doc/test_runp.py::test2 PASSED                                           [ 96%]
doc/test_server.py::test PASSED                                          [100%]

=================================== FAILURES ===================================
______________________________ test_expected_help ______________________________

    def test_expected_help():
        for fname in os.listdir('.'):
            if fname.endswith('.help'):
                name = fname[:-5]
                if name not in ('vcs', 'ishelve'):
>                   check_help(fname[:-5])

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_plac/build/doc/test_plac.py:85: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'example8_'

    def check_help(name):
        sys.argv[0] = name + '.py'  # avoid issue with pytest
        plac_core._parser_registry.clear()  # makes different imports 
independent
        try:
            try:
                main = plac.import_main(name + '.py')
            except SyntaxError:
                if sys.version < '3':  # expected for Python 2.X
                    return
                else:  # not expected for Python 3.X
                    raise
            p = plac.parser_from(main, formatter_class=PlacTestFormatter)
            expected = fix_today(open(name + '.help').read()).strip()
            got = p.format_help().strip()
>           assert got == expected, got
E           AssertionError: usage: example8_.py [-h] [-c select * from table] 
dsn
E             
E             positional arguments:
E               dsn
E             
E             options:
E               -h, --help            show this help message and exit
E               -c, --command select * from table
E                                     SQL query
E           assert 'usage: example8_.py [-h] [-c select * from table] 
dsn\n\npositional arguments:\n  dsn\n\noptions:\n  -h, --help            show 
this help message and exit\n  -c, --command select * from table\n               
         SQL query' == 'usage: example8_.py [-h] [-c select * from table] 
dsn\n\npositional arguments:\n  dsn\n\noptions:\n  -h, --help            show 
this help message and exit\n  -c select * from table, --command select * from 
table\n                        SQL query'
E             
E               usage: example8_.py [-h] [-c select * from table] dsn
E               
E               positional arguments:
E                 dsn
E               
E               options:
E                 -h, --help            show this help message and exit
E             -   -c select * from table, --command select * from table
E             ?     --------------------
E             +   -c, --command select * from table
E                                       SQL query

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_plac/build/doc/test_plac.py:73: 
AssertionError
=========================== short test summary info ============================
FAILED doc/test_plac.py::test_expected_help - AssertionError: usage: 
example8_.py [-h] [-c select * from table] dsn
  
  positional arguments:
    dsn
  
  options:
    -h, --help            show this help message and exit
    -c, --command select * from table
                          SQL query
assert 'usage: example8_.py [-h] [-c select * from table] dsn\n\npositional 
arguments:\n  dsn\n\noptions:\n  -h, --help            show this help message 
and exit\n  -c, --command select * from table\n                        SQL 
query' == 'usage: example8_.py [-h] [-c select * from table] dsn\n\npositional 
arguments:\n  dsn\n\noptions:\n  -h, --help            show this help message 
and exit\n  -c select * from table, --command select * from table\n             
           SQL query'
  
    usage: example8_.py [-h] [-c select * from table] dsn
    
    positional arguments:
      dsn
    
    options:
      -h, --help            show this help message and exit
  -   -c select * from table, --command select * from table
  ?     --------------------
  +   -c, --command select * from table
                            SQL query
========================= 1 failed, 27 passed in 1.86s =========================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_plac/build; python3.13 -m pytest -vv
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_plac/build; 
python3.12 -m pytest -vv
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 -- 
/usr/bin/python3.12
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collecting ... collected 28 items

doc/test_ishelve.py::test PASSED                                         [  3%]
doc/test_ishelve_more.py::test PASSED                                    [  7%]
doc/test_pi.py::test PASSED                                              [ 10%]
doc/test_plac.py::test_expected_help PASSED                              [ 14%]
doc/test_plac.py::test_p1 PASSED                                         [ 17%]
doc/test_plac.py::test_p2 PASSED                                         [ 21%]
doc/test_plac.py::test_p3 PASSED                                         [ 25%]
doc/test_plac.py::test_p4 PASSED                                         [ 28%]
doc/test_plac.py::test_p5 PASSED                                         [ 32%]
doc/test_plac.py::test_global PASSED                                     [ 35%]
doc/test_plac.py::test_flag_with_default PASSED                          [ 39%]
doc/test_plac.py::test_metavar_no_defaults PASSED                        [ 42%]
doc/test_plac.py::test_metavar_with_defaults PASSED                      [ 46%]
doc/test_plac.py::test_metavar_empty_string PASSED                       [ 50%]
doc/test_plac.py::test_kwargs PASSED                                     [ 53%]
doc/test_plac.py::test_kwargs2 PASSED                                    [ 57%]
doc/test_plac.py::test_kwargs3 PASSED                                    [ 60%]
doc/test_plac.py::test_date_default PASSED                               [ 64%]
doc/test_plac.py::test_int_default PASSED                                [ 67%]
doc/test_plac.py::test_none_default PASSED                               [ 71%]
doc/test_plac.py::test_cmds PASSED                                       [ 75%]
doc/test_plac.py::test_cmd_abbrevs PASSED                                [ 78%]
doc/test_plac.py::test_sub_help PASSED                                   [ 82%]
doc/test_plac.py::test_yield PASSED                                      [ 85%]
doc/test_plac.py::test_doctest PASSED                                    [ 89%]
doc/test_runp.py::test1 PASSED                                           [ 92%]
doc/test_runp.py::test2 PASSED                                           [ 96%]
doc/test_server.py::test PASSED                                          [100%]

============================== 28 passed in 1.86s ==============================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
3.12" returned exit code 13
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T05:53:00Z


If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/787297/

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

Reply via email to