Bug 1664859 - ImportError: cannot import name NoValue
Summary: ImportError: cannot import name NoValue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-ldap3
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-09 21:09 UTC by Matt Prahl
Modified: 2019-04-14 00:37 UTC (History)
4 users (show)

Fixed In Version: python-ldap3-2.6-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-14 00:37:54 UTC


Attachments (Terms of Use)

Description Matt Prahl 2019-01-09 21:09:06 UTC
Description of problem:

When using v2.5.1 on RHEL 7, I get the following error:
ImportError: cannot import name NoValue

This stems from the fact that v2.5.1 includes commit b54f4e987e53e10457229c7a2bb2bb39c19de0bd, which adds the following line unnecessarily:
from pyasn1.type.univ import NoValue

The version pysan1 in RHEL 7 doesn't have this import.

To fix this, either update to v2.5.2, where commit ba1c24f9605dc004e8231e8ed857aa434d75e45e removes that import, or include that commit as a patch.


Version-Release number of selected component (if applicable):

2.5.1-2


Steps to Reproduce:
1. yum install python-ldap3
2. python -c "import ldap3"

Actual results:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/ldap3/__init__.py", line 138, in <module>
    from .core.connection import Connection
  File "/usr/lib/python2.7/site-packages/ldap3/core/connection.py", line 37, in <module>
    from ..extend import ExtendedOperationsRoot
  File "/usr/lib/python2.7/site-packages/ldap3/extend/__init__.py", line 45, in <module>
    from .standard.whoAmI import WhoAmI
  File "/usr/lib/python2.7/site-packages/ldap3/extend/standard/whoAmI.py", line 27, in <module>
    from pyasn1.type.univ import NoValue
ImportError: cannot import name NoValue


Expected results:

Importing ldap3 on RHEL 7 should not traceback.

Additional info:

Comment 1 Fedora Update System 2019-01-15 22:03:22 UTC
python-ldap3-2.5.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a2eb71c5a6

Comment 2 Fedora Update System 2019-01-16 03:48:01 UTC
python-ldap3-2.5.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a2eb71c5a6

Comment 3 Fedora Update System 2019-03-29 10:01:40 UTC
python-ldap3-2.6-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-ea4ff06cb0

Comment 4 Fedora Update System 2019-03-29 19:08:57 UTC
python-ldap3-2.6-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-ea4ff06cb0

Comment 5 Frank Büttner 2019-04-10 11:18:03 UTC
python36-ldap3-2.6-1.el7.noarch will fix it,

Comment 6 Fedora Update System 2019-04-14 00:37:54 UTC
python-ldap3-2.6-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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