Skip to content

Commit

Permalink
Flet 0.21.1 (#2819)
Browse files Browse the repository at this point in the history
* Bump and loose Flet python dependencies

* Install `uvicorn[standard]`

* Dispose _appLifecycleListener

* Remove unused vars

* Bump Flet version to 0.21.1

* Fix event handler: do not call it when converter returned None

Fix #2820

* Update change log
  • Loading branch information
FeodorFitsner authored Mar 7, 2024
1 parent 5f3baa6 commit 398a8d4
Show file tree
Hide file tree
Showing 23 changed files with 403 additions and 90 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Flet changelog

# 0.21.1

* Python dependencies bumped and losen.
* Fixed: "No supported WebSocket library detected." when running web app with Flet 0.21.0 ([#2818](https://github.com/flet-dev/flet/issues/2818)).
* Fix `EventHandler`: do not call it when converter returned `None`.

# 0.21.0

* FastAPI instead of built-in Fletd server. Mixed async/sync apps. ([#2700](https://github.com/flet-dev/flet/issues/2700)).
Expand Down
12 changes: 6 additions & 6 deletions client/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,42 +223,42 @@ packages:
path: "../packages/flet"
relative: true
source: path
version: "0.21.0"
version: "0.21.1"
flet_audio:
dependency: "direct main"
description:
path: "../packages/flet_audio"
relative: true
source: path
version: "0.21.0"
version: "0.21.1"
flet_audio_recorder:
dependency: "direct main"
description:
path: "../packages/flet_audio_recorder"
relative: true
source: path
version: "0.21.0"
version: "0.21.1"
flet_lottie:
dependency: "direct main"
description:
path: "../packages/flet_lottie"
relative: true
source: path
version: "0.21.0"
version: "0.21.1"
flet_video:
dependency: "direct main"
description:
path: "../packages/flet_video"
relative: true
source: path
version: "0.21.0"
version: "0.21.1"
flet_webview:
dependency: "direct main"
description:
path: "../packages/flet_webview"
relative: true
source: path
version: "0.21.0"
version: "0.21.1"
flutter:
dependency: "direct main"
description: flutter
Expand Down
4 changes: 4 additions & 0 deletions packages/flet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.21.1

* Bugfixing.

# 0.21.0

* FastAPI instead of built-in Fletd server. Mixed async/sync apps. ([#2700](https://github.com/flet-dev/flet/issues/2700)).
Expand Down
4 changes: 0 additions & 4 deletions packages/flet/lib/src/controls/cupertino_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import '../utils/edge_insets.dart';
import 'create_control.dart';
import 'error.dart';

const double _kItemExtent = 32.0;
const double _kDefaultDiameterRatio = 1.07;
const double _kSqueeze = 1.45;

class CupertinoBottomSheetControl extends StatefulWidget {
final Control? parent;
final Control control;
Expand Down
1 change: 1 addition & 0 deletions packages/flet/lib/src/controls/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class _PageControlState extends State<PageControl> with FletStoreMixin {
if (_keyboardHandlerSubscribed) {
HardwareKeyboard.instance.removeHandler(_handleKeyDown);
}
_appLifecycleListener.dispose();
super.dispose();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/flet/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet
description: Write entire Flutter app in Python or add server-driven UI experience into existing Flutter app.
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet
version: 0.21.0
version: 0.21.1

# This package supports all platforms listed below.
platforms:
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.21.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.21.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_audio/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_audio
description: Flet Audio control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_audio
version: 0.21.0
version: 0.21.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_audio_recorder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.21.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.21.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_audio_recorder/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_audio_recorder
description: Flet AudioRecorder control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_audio_recorder
version: 0.21.0
version: 0.21.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_lottie/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.21.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.21.0

Initial release of the package.
2 changes: 1 addition & 1 deletion packages/flet_lottie/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_lottie
description: Flet Lottie control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_lottie
version: 0.21.0
version: 0.21.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.21.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.21.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_video/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_video
description: Flet Video control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_video
version: 0.21.0
version: 0.21.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
4 changes: 4 additions & 0 deletions packages/flet_webview/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.21.1

No changes in this release. Version bumped to follow parent `flet` package.

# 0.21.0

No changes in this release. Version bumped to follow parent `flet` package.
Expand Down
2 changes: 1 addition & 1 deletion packages/flet_webview/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flet_webview
description: Flet WebView control
homepage: https://flet.dev
repository: https://github.com/flet-dev/flet/packages/flet_webview
version: 0.21.0
version: 0.21.1

environment:
sdk: '>=3.2.3 <4.0.0'
Expand Down
3 changes: 1 addition & 2 deletions sdk/python/packages/flet-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ repository = "https://github.com/flet-dev/flet"
documentation = "https://flet.dev/docs"

[tool.poetry.dependencies]
python = "^3.7"
typing-extensions = { version = "^4.6.2", python = "<3.8" }
python = "^3.8"
repath = "^0.9.0"

[tool.poetry.group.dev.dependencies]
Expand Down
9 changes: 5 additions & 4 deletions sdk/python/packages/flet-core/src/flet_core/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ async def fn(e: ControlEvent):
ce.control = e.control
ce.page = e.page

if asyncio.iscoroutinefunction(handler):
await handler(ce)
else:
e.page.run_thread(handler, ce)
if ce is not None:
if asyncio.iscoroutinefunction(handler):
await handler(ce)
else:
e.page.run_thread(handler, ce)

return fn

Expand Down
3 changes: 1 addition & 2 deletions sdk/python/packages/flet-embed/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ repository = "https://github.com/flet-dev/flet"
documentation = "https://flet.dev/docs"

[tool.poetry.dependencies]
python = "^3.8"
flet-runtime = "0.1.0"
python = "^3.7"
typing-extensions = { version = "^4.6.2", python = "<3.8" }

[tool.poetry.group.dev.dependencies]
pre-commit = "^2.6"
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/packages/flet-pyodide/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ repository = "https://github.com/flet-dev/flet"
documentation = "https://flet.dev/docs"

[tool.poetry.dependencies]
flet-core = "0.1.0"
python = "^3.9"
flet-core = "0.1.0"

[build-system]
requires = ["poetry-core"]
Expand Down
5 changes: 2 additions & 3 deletions sdk/python/packages/flet-runtime/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ repository = "https://github.com/flet-dev/flet"
documentation = "https://flet.dev/docs"

[tool.poetry.dependencies]
python = "^3.8"
flet-core = "0.1.0"
python = "^3.7"
oauthlib = "^3.2.2"
httpx = "^0.24.1"
typing-extensions = { version = "^4.6.2", python = "<3.8" }
httpx = "^0"

[build-system]
requires = ["poetry-core"]
Expand Down
11 changes: 5 additions & 6 deletions sdk/python/packages/flet/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ repository = "https://github.com/flet-dev/flet"
documentation = "https://flet.dev/docs"

[tool.poetry.dependencies]
flet-runtime = "0.1.0"
python = "^3.8"
typing-extensions = { version = "^4.6.2", python = "<3.8" }
watchdog = "^3.0.0"
flet-runtime = "0.1.0"
watchdog = "^4.0.0"
packaging = "^23.1"
qrcode = "^7.4.2"
cookiecutter = "^2.4.0"
fastapi = "^0.109.2"
uvicorn = "^0.27.1"
cookiecutter = "^2.6.0"
fastapi = "^0"
uvicorn = {extras = ["standard"], version = "^0"}

[tool.poetry.group.dev.dependencies]
pre-commit = "^2.6"
Expand Down
Loading

0 comments on commit 398a8d4

Please sign in to comment.