MarketSquare / robotframework-browser

Robot Framework Browser library powered by Playwright.
Apache License 2.0
524 stars 106 forks source link

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

Open mika-b opened 1 week ago

mika-b commented 1 week ago

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:

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 "", line 1, in File "/usr/lib/python3/dist-packages/urllib3/init.py", line 7, in from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 11, in from .exceptions import ( File "/usr/lib/python3/dist-packages/urllib3/exceptions.py", line 2, in 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 commented 1 week ago

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 commented 1 week ago

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.

aaltat commented 1 week ago

@allcontributors please add @mika-b for bugs

allcontributors[bot] commented 1 week ago

@aaltat

I've put up a pull request to add @mika-b! :tada: