Bug 2245672 - python-ldap fails to build with Python 3.13: SystemError: invalid format string: %f
Summary: python-ldap fails to build with Python 3.13: SystemError: invalid format stri...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ldap
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Simon Pichugin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2023-10-23 14:55 UTC by Karolina Surma
Modified: 2023-11-29 23:43 UTC (History)
8 users (show)

Fixed In Version: python-ldap-3.4.4-1.fc40
Clone Of:
Environment:
Last Closed: 2023-11-29 23:42:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github python-ldap python-ldap pull 537 0 None Merged Test with Python 3.12 2023-10-23 16:50:11 UTC

Description Karolina Surma 2023-10-23 14:55:58 UTC
python-ldap fails to build with Python 3.13.0a1.

======================================================================
ERROR: test_network_timeout (t_ldap_options.TestGlobalOptions.test_network_timeout)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 84, in test_network_timeout
    self._test_timeout(ldap.OPT_NETWORK_TIMEOUT)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 66, in _test_timeout
    self._check_option(option, -5)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 46, in _check_option
    self.set_option(option, value)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 135, in set_option
    return ldap.set_option(option, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/functions.py", line 112, in set_option
    return _ldap_function_call(None,_ldap.set_option,option,invalue)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/functions.py", line 52, in _ldap_function_call
    result = func(*args,**kwargs)
             ^^^^^^^^^^^^^^^^^^^^
SystemError: invalid format string: %f

======================================================================
ERROR: test_timeout (t_ldap_options.TestGlobalOptions.test_timeout)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 81, in test_timeout
    self._test_timeout(ldap.OPT_TIMEOUT)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 66, in _test_timeout
    self._check_option(option, -5)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 46, in _check_option
    self.set_option(option, value)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 135, in set_option
    return ldap.set_option(option, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/functions.py", line 112, in set_option
    return _ldap_function_call(None,_ldap.set_option,option,invalue)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/functions.py", line 52, in _ldap_function_call
    result = func(*args,**kwargs)
             ^^^^^^^^^^^^^^^^^^^^
SystemError: invalid format string: %f

======================================================================
ERROR: test_network_timeout (t_ldap_options.TestLDAPObjectOptions.test_network_timeout)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 84, in test_network_timeout
    self._test_timeout(ldap.OPT_NETWORK_TIMEOUT)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 66, in _test_timeout
    self._check_option(option, -5)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 46, in _check_option
    self.set_option(option, value)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 158, in set_option
    return self.conn.set_option(option, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/ldapobject.py", line 698, in set_option
    return self._ldap_call(self._l.set_option,option,invalue)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/ldapobject.py", line 128, in _ldap_call
    result = func(*args,**kwargs)
             ^^^^^^^^^^^^^^^^^^^^
SystemError: invalid format string: %f

======================================================================
ERROR: test_timeout (t_ldap_options.TestLDAPObjectOptions.test_timeout)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 81, in test_timeout
    self._test_timeout(ldap.OPT_TIMEOUT)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 66, in _test_timeout
    self._check_option(option, -5)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 46, in _check_option
    self.set_option(option, value)
  File "/builddir/build/BUILD/python-ldap-3.4.3/Tests/t_ldap_options.py", line 158, in set_option
    return self.conn.set_option(option, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/ldapobject.py", line 698, in set_option
    return self._ldap_call(self._l.set_option,option,invalue)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILDROOT/python-ldap-3.4.3-4.fc40.x86_64/usr/lib64/python3.13/site-packages/ldap/ldapobject.py", line 128, in _ldap_call
    result = func(*args,**kwargs)
             ^^^^^^^^^^^^^^^^^^^^
SystemError: invalid format string: %f

----------------------------------------------------------------------
Ran 253 tests in 8.370s

FAILED (errors=4, skipped=1, expected failures=3)

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/06551215-python-ldap/

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

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 Christian Heimes 2023-10-23 16:50:12 UTC
I have noticed the issue in upstream CI and fixed it in https://github.com/python-ldap/python-ldap/pull/537 .

Simon, can you cut a new upstream release?

Comment 2 Simon Pichugin 2023-11-29 23:43:36 UTC
Update:
https://bodhi.fedoraproject.org/updates/FEDORA-2023-d134d899f2


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