#9232 ipaserver circular import
Closed: fixed 2 years ago by frenaud. Opened 2 years ago by slev.

[builder@localhost freeipa]$ python3 -c "from ipaserver.install.ldapupdate import LDAPUpdate"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/src/RPM/BUILD/freeipa/ipaserver/install/ldapupdate.py", line 46, in <module>
    from ipaserver.install import installutils, replication
  File "/usr/src/RPM/BUILD/freeipa/ipaserver/install/installutils.py", line 59, in <module>
    from ipaserver.install import certs, service, sysupgrade
  File "/usr/src/RPM/BUILD/freeipa/ipaserver/install/service.py", line 45, in <module>
    from ipaserver.install.ldapupdate import LDAPUpdate, run_ldapi_reload_task
ImportError: cannot import name 'LDAPUpdate' from partially initialized module 'ipaserver.install.ldapupdate' (most likely due to a circular import) (/usr/src/RPM/BUILD/freeipa/ipaserver/install/ldapupdate.py)

for information:
https://github.com/freeipa/freeipa/commit/87cf2a3c789929337abc3ae38192ee64cfd6c9e3 (4.9.0) closed the circle.

A possible solution could be to move

from ipaserver.install.ldapupdate import LDAPUpdate

inside _ldap_update function.


  • 232b5a9 azure tests: move to fedora 37
  • cad0638 pylint: remove unneeded disable=unused-private-member
  • 1206729 pylint: remove useless suppression
  • a9c1c81 pylint: disable redefined-slots-in-subclass
  • 2011d1a pylint: disable used-before-assignment
  • d1f1612 pylint: replace deprecated distutils module
  • be7f0a6 pylint: disable modified-iterating-list
  • 8cd9ddf pylint: remove arguments-renamed warnings
  • d6d8319 pylint: disable using-constant-test
  • 0268857 pylint: disable unnecessary-dunder-call message
  • 18fd448 pylint: globally disable unnecessary-lambda-assignment message
  • 139038c pylint: disable missing-timeout message
  • 2268ef4 pylint: fix implicit-str-concat
  • 8e7e48d pylint: fix duplicate-value
  • 6518855 pylint: fix deprecated-class SafeConfigParser
  • 372a5dc pylint: disable invalid-sequence-index
  • 7915365 pylint: disable unhashable-member
  • 8fad897 pylint: globally disable useless-object-inheritance
  • fdd3dd2 pylint: fix consider-iterating-dictionary
  • 416c210 pylint: disable comparison-of-constants
  • a4102b9 pylint: fix comparison-of-constants
  • fa4b054 pylint: disable deprecated-module message
  • a1a3b90 pylint: Lint in single process mode
  • deaec9b pylint: More allowed C extensions
  • ccdc94b pylint: Replace deprecated extension-pkg-whitelist
  • 4352bd5 pylint: Fix cyclic-import
  • a8dd070 pylint: Replace deprecated pipes
  • 0e03315 pylint: Fix used-before-assignment
  • 24db4dc pylint: Fix modified-iterating-list
  • bf3083c pylint: Fix unnecessary-lambda-assignment
  • c523e85 pylint: Fix unhashable-member
  • b848054 pylint: Fix useless-object-inheritance
  • 691b5d2 pylint: Replace deprecated cgi module


  • 782873a azure tests: move to fedora 37
  • fd21204 pylint: remove unneeded disable=unused-private-member
  • 51e0f75 pylint: remove useless suppression
  • 240b46d pylint: disable redefined-slots-in-subclass
  • 081dd26 pylint: disable used-before-assignment
  • 328fb64 pylint: replace deprecated distutils module
  • ac69ad4 pylint: disable modified-iterating-list
  • 22f182e pylint: remove arguments-renamed warnings
  • 5434c12 pylint: disable using-constant-test
  • 3336236 pylint: disable unnecessary-dunder-call message
  • 2b97c8c pylint: globally disable unnecessary-lambda-assignment message
  • 84c4792 pylint: disable missing-timeout message
  • 71496be pylint: fix implicit-str-concat
  • b9ea3fc pylint: fix duplicate-value
  • 433599f pylint: fix deprecated-class SafeConfigParser
  • a95e11d pylint: disable invalid-sequence-index
  • 0711143 pylint: disable unhashable-member
  • 4e99884 pylint: globally disable useless-object-inheritance
  • 3d211b4 pylint: fix consider-iterating-dictionary
  • 015e25a pylint: disable comparison-of-constants
  • 62e2d11 pylint: fix comparison-of-constants
  • 85037db pylint: disable deprecated-module message
  • d673fda pylint: Lint in single process mode
  • f982269 pylint: More allowed C extensions
  • 68ab438 pylint: Replace deprecated extension-pkg-whitelist
  • c48c76e pylint: Fix cyclic-import
  • 1261bbf pylint: Replace deprecated pipes
  • b123765 pylint: Fix used-before-assignment
  • acc2daf pylint: Fix modified-iterating-list
  • dc8c8a7 pylint: Fix unnecessary-lambda-assignment
  • bd7b5bf pylint: Fix unhashable-member
  • bccd3c9 pylint: Fix useless-object-inheritance
  • 2009889 pylint: Replace deprecated cgi module

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Log in to comment on this ticket.