robotframework / PythonRemoteServer

Robot Framework remote server implemented with Python
Apache License 2.0
152 stars 83 forks source link

Deprecation warning for broken import on future Python 3.10 #78

Closed HelioGuilherme66 closed 1 year ago

HelioGuilherme66 commented 3 years ago

I was just experimenting the Example, and got the following output:

C:\Users\Helio>python -m robotremoteserver test
C:\Python39\lib\site-packages\robotremoteserver.py:18: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  from collections import Mapping
Remote server running at http://127.0.0.1:8270.

C:\Users\Helio>python --version
Python 3.9.6
DanielPenning commented 2 years ago

Can confirm for the current pip release (also for python 3.10). However, this was already fixed 2 years ago on master (e625c7470323496f5699441bc535eb314be501fb). This fix works fine for me.

@pekkaklarck Is it easily possible to publish a release containing the above fix?

ShemTovYosef commented 2 years ago

Hi @pekkaklarck Since robot framework supports it from 4.1.1, we want to move to python 3.10 but missing this fix in PythonRemoteServer stops us. Any chance to get it?

With regards, Yosef

SePossum commented 2 years ago

Hi,

I found the same problem today when setting up a new computer with python 3.10.4 and robotframework 5.0:

The following change fixes the problem for me:

In ...\Python\Python310\Lib\site-packages\robotremoteserver.py change line 18 """ from collections import Mapping """ to """ try: from collections import Mapping except:

for Python 3.10

from collections.abc import Mapping

"""

Regards, Bernd

oberi01 commented 2 years ago

Hi @pekkaklarck, same as Yosef: the broken import stops us from moving to Python310. Any plans of releasing a fix? Thanks! Richard

Snooz82 commented 2 years ago

+1

UyttenhoveSimon commented 2 years ago

I concur with the above folks, it would greatly help us if you could push a new release. Thanks ! Simon

pekkaklarck commented 1 year ago

This problem has been reported and already fixed in 2020 (#58) but there hasn't been any release after that. A bug fix release with this and other Python compatibility fixes is now planned for next Thursday.

pekkaklarck commented 1 year ago

Closing this as a duplicate of #58.

pekkaklarck commented 1 year ago

Already fixed #81 covers similar problem with Python 3.11. Need to think should I create v1.1.1 bug fix release with these fixes already this weekend instead of waiting for next Thursday. We could then possibly have v1.2 with other enhancements later.

ShemTovYosef commented 1 year ago

Already fixed #81 covers similar problem with Python 3.11. Need to think should I create v1.1.1 bug fix release with these fixes already this weekend instead of waiting for next Thursday. We could then possibly have v1.2 with other enhancements later.

Thank you , great news! Better to provide 1.1.1 so a new functionality will not affect current projects

pekkaklarck commented 1 year ago

If we do 1.2 instead of 1.1.1, it will be a small release and should be safe to upgrade to. It would mainly (only?) add get_library_information method (#75) which would speed up Remote library usage considerably especially with bigger libraries.