Skip to content

Remove accidental playwright dependency #906

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

Closed
Archmonger opened this issue Feb 3, 2023 · 0 comments · Fixed by #907
Closed

Remove accidental playwright dependency #906

Archmonger opened this issue Feb 3, 2023 · 0 comments · Fixed by #907
Labels
priority-1-high Should be resolved ASAP.
Milestone

Comments

@Archmonger
Copy link
Contributor

Current Situation

In 1.0.0 we are importing from .testing.backend import _hotswap, _MountFunc within idom.widgets. This was a bad idea since the import stack now forces users to have to install playwright.

User environments aren't going to have playwright installed.

  File "C:\Users\Markg\Documents\Repositories\Conreq\conreq\config\__init__.py", line 1, in <module>
    from conreq.config.types import (
  File "C:\Users\Markg\Documents\Repositories\Conreq\conreq\config\types.py", line 8, in <module>
    from idom.html import div, span
  File "C:\Users\Markg\Documents\Repositories\Conreq\.venv\lib\site-packages\idom\__init__.py", line 1, in <module>
    from idom import backend, config, html, logging, sample, svg, types, web, widgets
  File "C:\Users\Markg\Documents\Repositories\Conreq\.venv\lib\site-packages\idom\widgets.py", line 13, in <module>
    from .testing.backend import _hotswap, _MountFunc
  File "C:\Users\Markg\Documents\Repositories\Conreq\.venv\lib\site-packages\idom\testing\__init__.py", line 3, in <module>
    from .display import DisplayFixture
  File "C:\Users\Markg\Documents\Repositories\Conreq\.venv\lib\site-packages\idom\testing\display.py", line 7, in <module>
    from playwright.async_api import (
ModuleNotFoundError: No module named 'playwright'

Proposed Actions

Either completely remove hotswap (to be honest, I don't think anyone other than IDOM Core currently uses it), or do some lazy imports for _hotswap and manually define the type hint.

@Archmonger Archmonger added the priority-1-high Should be resolved ASAP. label Feb 3, 2023
@Archmonger Archmonger added this to the 1.0 milestone Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-1-high Should be resolved ASAP.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant