Bug 2245828 - python-idstools fails to build with Python 3.13: 'Logger' object has no attribute 'warn'
Summary: python-idstools fails to build with Python 3.13: 'Logger' object has no attri...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-idstools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: marcindulak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2023-10-24 08:56 UTC by Karolina Surma
Modified: 2023-11-02 17:49 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-11-02 17:49:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2023-10-24 08:56:34 UTC
python-idstools fails to build with Python 3.13.0a1.

Example test failure:

_______________ SpoolEventReaderTestCase.test_with_growing_file ________________

self = <test_unified2.SpoolEventReaderTestCase testMethod=test_with_growing_file>

    def test_with_growing_file(self):
    
>       reader = unified2.SpoolEventReader(self.tmpdir, "unified2")

tests/test_unified2.py:433: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <idstools.unified2.SpoolEventReader object at 0x7f3c78da0d70>
directory = '/tmp/idstools-test.a86zjfp5', prefix = 'unified2', follow = False
delete = False, bookmark = False

    def __init__(self, directory, prefix, follow=False, delete=False,
                 bookmark=False):
>       LOG.warn("idstools.unified2.SpoolEventReader has been deprecated")
E       AttributeError: 'Logger' object has no attribute 'warn'

../../BUILDROOT/python-idstools-0.6.4-11.fc40.x86_64/usr/lib/python3.13/site-packages/idstools/unified2.py:889: AttributeError

=========================== short test summary info ============================
FAILED tests/test_unified2.py::AggregatorTestCase::test_aggregator - Attribut...
FAILED tests/test_unified2.py::AggregatorTestCase::test_interleaved - Attribu...
FAILED tests/test_unified2.py::FileEventReaderTestCase::test - AttributeError...
FAILED tests/test_unified2.py::FileEventReaderTestCase::test_iteration - Attr...
FAILED tests/test_unified2.py::SpoolEventReaderTestCase::test_bookmarking - A...
FAILED tests/test_unified2.py::SpoolEventReaderTestCase::test_eof - Attribute...
FAILED tests/test_unified2.py::SpoolEventReaderTestCase::test_with_file_rotation
FAILED tests/test_unified2.py::SpoolEventReaderTestCase::test_with_growing_file
============= 8 failed, 68 passed, 2 skipped, 6 warnings in 2.84s ==============

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

logging: Remove undocumented and untested Logger.warn() and LoggerAdapter.warn() methods and logging.warn() function.
Deprecated since Python 3.3, they were aliases to the logging.Logger.warning() method,
logging.LoggerAdapter.warning() method and logging.warning() function.
(Contributed by Victor Stinner in gh-105376.)


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/06546788-python-idstools/

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

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 marcindulak 2023-10-24 19:43:14 UTC
Reported upstream https://github.com/jasonish/py-idstools/issues/95

Comment 2 marcindulak 2023-11-02 17:49:50 UTC
Expected to be fixed by https://koji.fedoraproject.org/koji/taskinfo?taskID=108479282


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