Problem description:
When starting a Python repl flet-pyodide
package is loaded instead of flet
.
Expected behavior:
Correct flet
package is loaded as configured in pyproject.toml
.
Actual behavior:
Wrong flet-pyodide
package is loaded and pyproject.toml
updated, so it contains both flet
and flet-pyodide
.
Steps to reproduce:
- I’m creating a new repl from Python template, go to “Packages” and install “flet” package. All nice,
pyproject.toml
looks good, nothing unusual:
[tool.poetry]
name = "python-template"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = ">=3.10.0,<3.11"
numpy = "^1.22.2"
replit = "^3.2.4"
Flask = "^2.2.0"
urllib3 = "^1.26.12"
flet = "0.5.0"
[tool.poetry.dev-dependencies]
debugpy = "^1.6.2"
replit-python-lsp-server = {extras = ["yapf", "rope", "pyflakes"], version = "^1.5.9"}
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
- Typing a minimal Flet program:
import flet as ft
def main(page: ft.Page):
page.add(ft.Text("Hello, world!"))
ft.app(main, view=ft.WEB_BROWSER)
- Hit “Run” and a wonder happens - out of nowhere it’s installing
flet-pyodide
package:
As a result the app is not working.
-
pyproject.toml
has both packages -flet-pyodide
was “automagically” added after trying to run a program:
[tool.poetry]
name = "python-template"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = ">=3.10.0,<3.11"
numpy = "^1.22.2"
replit = "^3.2.4"
Flask = "^2.2.0"
urllib3 = "^1.26.12"
flet = "0.5.0"
flet-pyodide = "^0.5.0"
[tool.poetry.dev-dependencies]
debugpy = "^1.6.2"
replit-python-lsp-server = {extras = ["yapf", "rope", "pyflakes"], version = "^1.5.9"}
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Bug appears at this link:
n/a
Browser/OS/Device:
n/a