Source: python-enum-tools
Version: 0.12.0-1
Severity: normal
User: debian-pyt...@lists.debian.org
Usertags: python3.13
https://github.com/domdfcoding/enum_tools/commit/e62bdef38ad1d0a34514fa55e41d623a9e7fa04c

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.

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

Log snippet:

   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_enum-tools/build; python3.13 -m pytest 
-v --ignore=tests/test_autoenum.py
============================= test session starts 
==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0 -- 
/usr/bin/python3.13
cachedir: .pytest_cache
Test session started at 01:30:02
rootdir: /<<PKGBUILDDIR>>
configfile: tox.ini
plugins: typeguard-4.3.0, cov-5.0.0, timeout-2.3.1, regressions-2.5.0+ds, 
rerunfailures-12.0, datadir-1.4.1+ds
timeout: 300.0s
timeout method: signal
timeout func_only: False
collecting ... collected 57 items

tests/test_documented_enum.py::test_people FAILED                 
       [  1%]
tests/test_documented_enum.py::test_documented_enum PASSED        
       [  3%]
tests/test_documented_enum.py::test_document_enum_wrong_types[string] 
PASSED [  5%]
tests/test_documented_enum.py::test_document_enum_wrong_types[bytes] 
PASSED [  7%]
tests/test_documented_enum.py::test_document_enum_wrong_types[\x00\x01] 
PASSED [  8%]
tests/test_documented_enum.py::test_document_enum_wrong_types[12345] 
PASSED [ 10%]
tests/test_documented_enum.py::test_document_enum_wrong_types[123.45] 
PASSED [ 12%]
tests/test_documented_enum.py::test_document_enum_wrong_types[obj5] 
PASSED [ 14%]
tests/test_documented_enum.py::test_document_enum_wrong_types[obj6] 
PASSED [ 15%]
tests/test_documented_enum.py::test_document_enum_wrong_types[print] 
PASSED [ 17%]
tests/test_documented_enum.py::test_document_enum_wrong_types[ceil] 
PASSED [ 19%]
tests/test_documented_enum.py::test_document_enum_wrong_types[Path] 
PASSED [ 21%]
tests/test_documented_enum.py::test_document_enum_wrong_types[Decimal] 
PASSED [ 22%]
tests/test_documented_enum.py::test_document_enum_wrong_types[str] 
PASSED [ 24%]
tests/test_documented_enum.py::test_document_enum_wrong_types[float] 
PASSED [ 26%]
tests/test_documented_enum.py::test_document_member_wrong_types[string] 
PASSED [ 28%]
tests/test_documented_enum.py::test_document_member_wrong_types[bytes] 
PASSED [ 29%]
tests/test_documented_enum.py::test_document_member_wrong_types[\x00\x01] 
PASSED [ 31%]
tests/test_documented_enum.py::test_document_member_wrong_types[12345] 
PASSED [ 33%]
tests/test_documented_enum.py::test_document_member_wrong_types[123.45] 
PASSED [ 35%]
tests/test_documented_enum.py::test_document_member_wrong_types[obj5] 
PASSED [ 36%]
tests/test_documented_enum.py::test_document_member_wrong_types[obj6] 
PASSED [ 38%]
tests/test_documented_enum.py::test_document_member_wrong_types[print] 
PASSED [ 40%]
tests/test_documented_enum.py::test_document_member_wrong_types[ceil] 
PASSED [ 42%]
tests/test_documented_enum.py::test_document_member_wrong_types[Path] 
PASSED [ 43%]
tests/test_documented_enum.py::test_document_member_wrong_types[Decimal] 
PASSED [ 45%]
tests/test_documented_enum.py::test_document_member_wrong_types[str] 
PASSED [ 47%]
tests/test_documented_enum.py::test_document_member_wrong_types[float] 
PASSED [ 49%]
tests/test_documented_enum.py::test_document_enum_not_interactive 
FAILED [ 50%]
tests/test_documented_enum.py::test_multiple_docstring_warning 
FAILED    [ 52%]
tests/test_enums.py::test_str_enum FAILED                         
       [ 54%]
tests/test_enums.py::test_int_enum PASSED                         
       [ 56%]
tests/test_enums.py::test_member_iter_int_flag PASSED             
       [ 57%]
tests/test_enums.py::test_member_iter_flag PASSED                 
       [ 59%]
tests/test_enums.py::test_strenum PASSED                          
       [ 61%]
tests/test_enums.py::test_member_dir_enum PASSED                  
       [ 63%]
tests/test_enums.py::test_auto_number_enum PASSED                 
       [ 64%]
tests/test_enums.py::test_ordered_enum PASSED                     
       [ 66%]
tests/test_utils.py::test_is_enum[Enum-True] PASSED               
       [ 68%]
tests/test_utils.py::test_is_enum[HTTPStatus-True] PASSED         
       [ 70%]
tests/test_utils.py::test_is_enum[406-False] PASSED               
       [ 71%]
tests/test_utils.py::test_is_enum[123-False] PASSED               
       [ 73%]
tests/test_utils.py::test_is_enum[abc-False] PASSED               
       [ 75%]
tests/test_utils.py::test_is_enum_member[Enum-False] PASSED       
       [ 77%]
tests/test_utils.py::test_is_enum_member[HTTPStatus-False] PASSED 
       [ 78%]
tests/test_utils.py::test_is_enum_member[406-True] PASSED         
       [ 80%]
tests/test_utils.py::test_is_enum_member[123-False] PASSED        
       [ 82%]
tests/test_utils.py::test_is_enum_member[abc-False] PASSED        
       [ 84%]
tests/test_utils.py::test_is_flag[Enum-False] PASSED              
       [ 85%]
tests/test_utils.py::test_is_flag[HTTPStatus-False] PASSED        
       [ 87%]
tests/test_utils.py::test_is_flag[406-False] PASSED               
       [ 89%]
tests/test_utils.py::test_is_flag[123-False] PASSED               
       [ 91%]
tests/test_utils.py::test_is_flag[abc-False] PASSED               
       [ 92%]
tests/test_utils.py::test_is_flag[Colours-True] PASSED            
       [ 94%]
tests/test_utils.py::test_is_flag[Colours.RED-False] PASSED       
       [ 96%]
tests/test_utils.py::test_is_flag[Colours.RED|BLUE-False] PASSED  
       [ 98%]
tests/test_utils.py::test_get_base_object PASSED                  
       [100%]

=================================== FAILURES ===================================
_________________________________ test_people 
__________________________________

    @xfail_313
    def test_people():
    
        assert People.Bob == 1
        assert isinstance(People.Bob, 
People)
        assert isinstance(People.Bob, 
int)
>       assert repr(People.Bob) == 
> "People.Bob" 
> if NEW_ENUM_REPR else 
> "<People.Bob: 
> 1>"
E    assert False

tests/test_documented_enum.py:66: AssertionError
______________________ test_document_enum_not_interactive 
______________________

    @xfail_313
    def 
test_document_enum_not_interactive():
        interactive_last_value = 
enum_tools.documentation.INTERACTIVE
    
        enum_tools.documentation.INTERACTIVE = 
False
    
        @document_enum
        class People(int, 
Enum):
                   """
                   An enumeration of people
                   """
    
                Bob = bob = 1  # noqa  # doc: A person 
called Bob  # doc: another doc # isort: ignore
                Alice = 2  # doc: A person called 
Alice
                Carol = 3  # doc: A person called 
Carol
    
                @classmethod
                def 
iter_values(cls):  # noqa: 
MAN002
                        return 
iter(cls)
    
        assert People.Bob == 1
        assert isinstance(People.Bob, 
People)
        assert isinstance(People.Bob, 
int)
>       assert repr(People.Bob) == 
> "People.Bob" 
> if NEW_ENUM_REPR else 
> "<People.Bob: 
> 1>"
E    assert False

tests/test_documented_enum.py:171: AssertionError
_______________________ test_multiple_docstring_warning 
________________________

    @xfail_313
    # yapf: disable
    def 
test_multiple_docstring_warning():
>       with pytest.warns(UserWarning) 
> as record:
E    Failed: DID NOT WARN. No warnings of type (<class 
'UserWarning'>,) were emitted.
E     Emitted warnings: [].

tests/test_documented_enum.py:197: Failed
________________________________ test_str_enum 
_________________________________

    @xfail_313
    def test_str_enum():
        assert DramatisPersonae.Message == 
"a secret 
message"
        assert DramatisPersonae.Alice != 
"An 
eavesdropper"
        assert str(DramatisPersonae.Craig) == 
"A password 
cracker"
        assert DramatisPersonae("The 
sender") == DramatisPersonae.Bob == 
"The sender"
    
        if NEW_ENUM_REPR:
>               assert 
> repr(DramatisPersonae.Bob) == 
> "DramatisPersonae.Bob"
E     assert "<DramatisPer...'The sender'>" == 
'DramatisPersonae.Bob'
E       
E       - DramatisPersonae.Bob
E       + <DramatisPersonae.Bob: 'The sender'>

tests/test_enums.py:42: AssertionError
============================= slowest 25 durations =============================

(25 durations < 0.005s hidden.  Use -vv to show these durations.)
=========================== short test summary info 
============================
FAILED tests/test_documented_enum.py::test_people - assert 
False
FAILED 
tests/test_documented_enum.py::test_document_enum_not_interactive - 
assert False
FAILED 
tests/test_documented_enum.py::test_multiple_docstring_warning - 
Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emi...
FAILED tests/test_enums.py::test_str_enum - assert 
"<DramatisPer...'The sender'>" == 'DramatisPersonae.Bob'
========================= 4 failed, 53 passed 
in 0.20s =========================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_enum-tools/build; python3.13 -m pytest 
-v --ignore=tests/test_autoenum.py
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_enum-tools/build; python3.12 -m pytest 
-v --ignore=tests/test_autoenum.py
============================= test session starts 
==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 -- 
/usr/bin/python3.12
cachedir: .pytest_cache
Test session started at 01:30:03
rootdir: /<<PKGBUILDDIR>>
configfile: tox.ini
plugins: typeguard-4.3.0, cov-5.0.0, timeout-2.3.1, regressions-2.5.0+ds, 
rerunfailures-12.0, datadir-1.4.1+ds
timeout: 300.0s
timeout method: signal
timeout func_only: False
collecting ... collected 57 items

tests/test_documented_enum.py::test_people PASSED                 
       [  1%]
tests/test_documented_enum.py::test_documented_enum PASSED        
       [  3%]
tests/test_documented_enum.py::test_document_enum_wrong_types[string] 
PASSED [  5%]
tests/test_documented_enum.py::test_document_enum_wrong_types[bytes] 
PASSED [  7%]
tests/test_documented_enum.py::test_document_enum_wrong_types[\x00\x01] 
PASSED [  8%]
tests/test_documented_enum.py::test_document_enum_wrong_types[12345] 
PASSED [ 10%]
tests/test_documented_enum.py::test_document_enum_wrong_types[123.45] 
PASSED [ 12%]
tests/test_documented_enum.py::test_document_enum_wrong_types[obj5] 
PASSED [ 14%]
tests/test_documented_enum.py::test_document_enum_wrong_types[obj6] 
PASSED [ 15%]
tests/test_documented_enum.py::test_document_enum_wrong_types[print] 
PASSED [ 17%]
tests/test_documented_enum.py::test_document_enum_wrong_types[ceil] 
PASSED [ 19%]
tests/test_documented_enum.py::test_document_enum_wrong_types[Path] 
PASSED [ 21%]
tests/test_documented_enum.py::test_document_enum_wrong_types[Decimal] 
PASSED [ 22%]
tests/test_documented_enum.py::test_document_enum_wrong_types[str] 
PASSED [ 24%]
tests/test_documented_enum.py::test_document_enum_wrong_types[float] 
PASSED [ 26%]
tests/test_documented_enum.py::test_document_member_wrong_types[string] 
PASSED [ 28%]
tests/test_documented_enum.py::test_document_member_wrong_types[bytes] 
PASSED [ 29%]
tests/test_documented_enum.py::test_document_member_wrong_types[\x00\x01] 
PASSED [ 31%]
tests/test_documented_enum.py::test_document_member_wrong_types[12345] 
PASSED [ 33%]
tests/test_documented_enum.py::test_document_member_wrong_types[123.45] 
PASSED [ 35%]
tests/test_documented_enum.py::test_document_member_wrong_types[obj5] 
PASSED [ 36%]
tests/test_documented_enum.py::test_document_member_wrong_types[obj6] 
PASSED [ 38%]
tests/test_documented_enum.py::test_document_member_wrong_types[print] 
PASSED [ 40%]
tests/test_documented_enum.py::test_document_member_wrong_types[ceil] 
PASSED [ 42%]
tests/test_documented_enum.py::test_document_member_wrong_types[Path] 
PASSED [ 43%]
tests/test_documented_enum.py::test_document_member_wrong_types[Decimal] 
PASSED [ 45%]
tests/test_documented_enum.py::test_document_member_wrong_types[str] 
PASSED [ 47%]
tests/test_documented_enum.py::test_document_member_wrong_types[float] 
PASSED [ 49%]
tests/test_documented_enum.py::test_document_enum_not_interactive 
PASSED [ 50%]
tests/test_documented_enum.py::test_multiple_docstring_warning 
PASSED    [ 52%]
tests/test_enums.py::test_str_enum PASSED                         
       [ 54%]
tests/test_enums.py::test_int_enum PASSED                         
       [ 56%]
tests/test_enums.py::test_member_iter_int_flag PASSED             
       [ 57%]
tests/test_enums.py::test_member_iter_flag PASSED                 
       [ 59%]
tests/test_enums.py::test_strenum PASSED                          
       [ 61%]
tests/test_enums.py::test_member_dir_enum PASSED                  
       [ 63%]
tests/test_enums.py::test_auto_number_enum PASSED                 
       [ 64%]
tests/test_enums.py::test_ordered_enum PASSED                     
       [ 66%]
tests/test_utils.py::test_is_enum[Enum-True] PASSED               
       [ 68%]
tests/test_utils.py::test_is_enum[HTTPStatus-True] PASSED         
       [ 70%]
tests/test_utils.py::test_is_enum[406-False] PASSED               
       [ 71%]
tests/test_utils.py::test_is_enum[123-False] PASSED               
       [ 73%]
tests/test_utils.py::test_is_enum[abc-False] PASSED               
       [ 75%]
tests/test_utils.py::test_is_enum_member[Enum-False] PASSED       
       [ 77%]
tests/test_utils.py::test_is_enum_member[HTTPStatus-False] PASSED 
       [ 78%]
tests/test_utils.py::test_is_enum_member[406-True] PASSED         
       [ 80%]
tests/test_utils.py::test_is_enum_member[123-False] PASSED        
       [ 82%]
tests/test_utils.py::test_is_enum_member[abc-False] PASSED        
       [ 84%]
tests/test_utils.py::test_is_flag[Enum-False] PASSED              
       [ 85%]
tests/test_utils.py::test_is_flag[HTTPStatus-False] PASSED        
       [ 87%]
tests/test_utils.py::test_is_flag[406-False] PASSED               
       [ 89%]
tests/test_utils.py::test_is_flag[123-False] PASSED               
       [ 91%]
tests/test_utils.py::test_is_flag[abc-False] PASSED               
       [ 92%]
tests/test_utils.py::test_is_flag[Colours-True] PASSED            
       [ 94%]
tests/test_utils.py::test_is_flag[Colours.RED-False] PASSED       
       [ 96%]
tests/test_utils.py::test_is_flag[Colours.RED|BLUE-False] PASSED  
       [ 98%]
tests/test_utils.py::test_get_base_object PASSED                  
       [100%]

============================= slowest 25 durations =============================

(25 durations < 0.005s hidden.  Use -vv to show these durations.)
============================== 57 passed in 
0.18s ==============================
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-19T01:30:03Z

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

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