Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change of default /usr/local/python3 from python3.8 to python3.12 breaks library imports #3843

Open
mika-b opened this issue Oct 14, 2024 · 2 comments

Comments

@mika-b
Copy link

mika-b commented Oct 14, 2024

Describe the bug
Python 3.12 installed from a PPA conflicts with libraries from the official repositories. If newer python is required, better solution would be to update the base image to v1.48.0-jammy or v1.48.0-noble.

To Reproduce
Steps to reproduce the behavior:

  • Launch container and try to import urllib3 in python
docker run -ti --rm marketsquare/robotframework-browser:18.9.1 bash
Unable to find image 'marketsquare/robotframework-browser:18.9.1' locally
18.9.1: Pulling from marketsquare/robotframework-browser
Digest: sha256:065293e926afa8db99fb4248287ae65a41eeeda163ed2b6e80b338a4818c6f96
Status: Downloaded newer image for marketsquare/robotframework-browser:18.9.1

pwuser@5a76ff979f44:/$ python3
Python 3.12.7 (main, Oct  1 2024, 08:52:11) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/urllib3/__init__.py", line 7, in <module>
    from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 11, in <module>
    from .exceptions import (
  File "/usr/lib/python3/dist-packages/urllib3/exceptions.py", line 2, in <module>
    from six.moves.http_client import IncompleteRead as httplib_IncompleteRead
ModuleNotFoundError: No module named 'six.moves'
>>> 

Expected behavior
import of urllib3 works when you explicitly use the python provided by the official Ubuntu repositories.

docker run -ti --rm marketsquare/robotframework-browser:18.9.1 bash
pwuser@9519c297bcbf:/$ python3.8 
Python 3.8.10 (default, Sep 11 2024, 16:02:53) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib3
>>> 

Additional context
Was working fine with 18.8.0

@aaltat
Copy link
Member

aaltat commented Oct 14, 2024

I don’t quite follow, what is actually broken? I see that urllib3 import failed, but as far I can see it’s not Browser library dependency. Therefore I don’t see what is actually broken?

@mika-b
Copy link
Author

mika-b commented Oct 14, 2024

It's not a Browser library dependency but people use robotframework-browser container to run their test suites with their libraries and other tools. So the python version change breaks any user test library that tries to import for example urllib3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants