Bug 1914468

Summary: Cannot import six.moves.urllib on bpython
Product: [Fedora] Fedora Reporter: Michel Lind <michel>
Component: bpythonAssignee: Terje Røsten <terje.rosten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: admiller, michel, terje.rosten
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bpython-0.20.1-2.fc32 bpython-0.20.1-2.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-02 02:22:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michel Lind 2021-01-08 23:50:06 UTC
Description of problem:
On Fedora's bpython I cannot import six.moves.urllib, so working interactively with fedora.client or bodhi.client is not possible

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


How reproducible:
Always

Steps to Reproduce:
1. sudo dnf install bpython python3-{fedora,bodhi-client}
2. bpython
3. import six.moves.urllib
4. from fedora import client
5. from bodhi import client


Actual results:
```
~ 
❯ bpython
bpython version unknown on top of Python 3.9.0 /usr/bin/python3
>>> from fedora import client
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    from fedora import client
  File "/usr/lib/python3.9/site-packages/fedora/client/__init__.py", line 157, in <module>
    from fedora.client.proxyclient import ProxyClient
  File "/usr/lib/python3.9/site-packages/fedora/client/proxyclient.py", line 39, in <module>
    from six.moves.urllib.parse import quote, urljoin, urlparse
ModuleNotFoundError: No module named 'six.moves.urllib'
>>> import six
>>> from six.moves import urllib
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    from six.moves import urllib
  File "/usr/lib/python3.9/site-packages/six.py", line 92, in __get__
    result = self._resolve()
  File "/usr/lib/python3.9/site-packages/six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "/usr/lib/python3.9/site-packages/six.py", line 82, in _import_module
    __import__(name)
ModuleNotFoundError: No module named 'six.moves.urllib'
>>> from bodhi import client
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    from bodhi import client
  File "/usr/lib/python3.9/site-packages/bodhi/client/__init__.py", line 30, in <module>
    from fedora.client import AuthError, openidproxyclient
  File "/usr/lib/python3.9/site-packages/fedora/client/__init__.py", line 157, in <module>
    from fedora.client.proxyclient import ProxyClient
  File "/usr/lib/python3.9/site-packages/fedora/client/proxyclient.py", line 39, in <module>
    from six.moves.urllib.parse import quote, urljoin, urlparse
ModuleNotFoundError: No module named 'six.moves.urllib'
>>> 
```

Expected results:
These should succeed

Additional info:
The imports succeed using `python3`. It fails using bpython installed into a venv so it seems like an upstream issue.

Comment 1 Terje Røsten 2021-01-19 20:51:01 UTC
Verified:

$ python3
Python 3.9.1 (default, Dec  8 2020, 00:00:00) 
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import  six.moves.urllib
>>> 

$ bpython
bpython version unknown on top of Python 3.9.1 /usr/bin/python3
>>> import six.moves.urllib
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    import six.moves.urllib
ModuleNotFoundError: No module named 'six.moves.urllib'

Comment 2 Fedora Update System 2021-01-24 19:11:31 UTC
FEDORA-2021-d722e538be has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d722e538be

Comment 3 Fedora Update System 2021-01-24 19:11:31 UTC
FEDORA-2021-9d363d098e has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-9d363d098e

Comment 4 Terje Røsten 2021-01-24 19:13:29 UTC
Please try the new update, it contains an attempt to backport the upstream fix to bpython 0.20.1.

Comment 5 Fedora Update System 2021-01-25 02:08:04 UTC
FEDORA-2021-d722e538be has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d722e538be`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d722e538be

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2021-01-25 02:19:02 UTC
FEDORA-2021-9d363d098e has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-9d363d098e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-9d363d098e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2021-02-02 02:22:26 UTC
FEDORA-2021-d722e538be has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2021-02-02 03:09:52 UTC
FEDORA-2021-9d363d098e has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Terje Røsten 2021-02-07 15:01:28 UTC
Hi Michel, 

can you review: 
 
 https://bugzilla.redhat.com/show_bug.cgi?id=1925940

so bpython 0.21 with proper fix can be imported into Fedora?