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

support python 3.10 #393

Closed
aleksandr-kotlyar opened this issue Oct 30, 2021 · 0 comments · Fixed by #414
Closed

support python 3.10 #393

aleksandr-kotlyar opened this issue Oct 30, 2021 · 0 comments · Fixed by #414
Assignees

Comments

@aleksandr-kotlyar
Copy link
Collaborator

aleksandr-kotlyar commented Oct 30, 2021

What

support python 3.10

Why

Currently selene not work with python 3.10 cause of these errors

(.venv-3.10.0) $ pytest
ImportError while loading conftest '/Users/user/selene/tests/conftest.py'.
tests/conftest.py:7: in <module>
    from selene import Config, Browser
selene/__init__.py:24: in <module>
    from selene.core.entity import (
selene/core/entity.py:1712: in <module>
    from selene.core.conditions import (
selene/core/conditions.py:26: in <module>
    class ElementCondition(Condition[Element]):
../../.pyenv/versions/3.10.0/lib/python3.10/_collections_abc.py:430: in __new__
    raise TypeError(
E   TypeError: Callable must be used as Callable[[arg, ...], result].
(.venv-3.10.0) $
aleksandr-kotlyar added a commit to aleksandr-kotlyar/selene that referenced this issue Oct 30, 2021
- fix type hints for Callable objects.
aleksandr-kotlyar added a commit to aleksandr-kotlyar/selene that referenced this issue Oct 30, 2021
- fix type hints for Callable objects.
@yashaka yashaka changed the title python 3.10 support python 3.10 Feb 21, 2022
@yashaka yashaka self-assigned this Feb 21, 2022
yashaka added a commit that referenced this issue May 29, 2022
etc.:
- refactor a bit condition.call method implementation
- refactor from BrowserCondition = Condition[Browser] to class BrowserCondition(Condition[Browser]) to fix potential error «Subscripted generics cannot be used with class and instance checks»
yashaka added a commit that referenced this issue May 29, 2022
and...
- update black formatter
yashaka added a commit that referenced this issue May 29, 2022
- disable unsubscriptable-object/ E1136 pylint rule to ignore «E1136: Value 'Callable' is unsubscriptable (unsubscriptable-object)» happening on condition.py at 41:28 if py version == 3.7.* or 3.8.* (works fine on 3.9.* and 3.10.*). Seems like it had been failing in the past and everything was OK:)
aleksandr-kotlyar added a commit to aleksandr-kotlyar/selene that referenced this issue May 30, 2022
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

Successfully merging a pull request may close this issue.

2 participants