reflex 0.5.10__py3-none-any.whl → 0.5.10a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/utils/prerequisites.py +12 -12
- {reflex-0.5.10.dist-info → reflex-0.5.10a1.dist-info}/METADATA +2 -2
- {reflex-0.5.10.dist-info → reflex-0.5.10a1.dist-info}/RECORD +6 -7
- reflex/utils/net.py +0 -43
- {reflex-0.5.10.dist-info → reflex-0.5.10a1.dist-info}/LICENSE +0 -0
- {reflex-0.5.10.dist-info → reflex-0.5.10a1.dist-info}/WHEEL +0 -0
- {reflex-0.5.10.dist-info → reflex-0.5.10a1.dist-info}/entry_points.txt +0 -0
reflex/utils/prerequisites.py
CHANGED
|
@@ -34,7 +34,7 @@ from reflex import constants, model
|
|
|
34
34
|
from reflex.base import Base
|
|
35
35
|
from reflex.compiler import templates
|
|
36
36
|
from reflex.config import Config, get_config
|
|
37
|
-
from reflex.utils import console,
|
|
37
|
+
from reflex.utils import console, path_ops, processes
|
|
38
38
|
from reflex.utils.format import format_library_name
|
|
39
39
|
from reflex.utils.registry import _get_best_registry
|
|
40
40
|
|
|
@@ -80,7 +80,7 @@ def check_latest_package_version(package_name: str):
|
|
|
80
80
|
# Get the latest version from PyPI
|
|
81
81
|
current_version = importlib.metadata.version(package_name)
|
|
82
82
|
url = f"https://pypi.org/pypi/{package_name}/json"
|
|
83
|
-
response =
|
|
83
|
+
response = httpx.get(url)
|
|
84
84
|
latest_version = response.json()["info"]["version"]
|
|
85
85
|
if (
|
|
86
86
|
version.parse(current_version) < version.parse(latest_version)
|
|
@@ -670,7 +670,7 @@ def download_and_run(url: str, *args, show_status: bool = False, **env):
|
|
|
670
670
|
"""
|
|
671
671
|
# Download the script
|
|
672
672
|
console.debug(f"Downloading {url}")
|
|
673
|
-
response =
|
|
673
|
+
response = httpx.get(url)
|
|
674
674
|
if response.status_code != httpx.codes.OK:
|
|
675
675
|
response.raise_for_status()
|
|
676
676
|
|
|
@@ -700,11 +700,11 @@ def download_and_extract_fnm_zip():
|
|
|
700
700
|
try:
|
|
701
701
|
# Download the FNM zip release.
|
|
702
702
|
# TODO: show progress to improve UX
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
703
|
+
with httpx.stream("GET", url, follow_redirects=True) as response:
|
|
704
|
+
response.raise_for_status()
|
|
705
|
+
with open(fnm_zip_file, "wb") as output_file:
|
|
706
|
+
for chunk in response.iter_bytes():
|
|
707
|
+
output_file.write(chunk)
|
|
708
708
|
|
|
709
709
|
# Extract the downloaded zip file.
|
|
710
710
|
with zipfile.ZipFile(fnm_zip_file, "r") as zip_ref:
|
|
@@ -1222,7 +1222,7 @@ def fetch_app_templates(version: str) -> dict[str, Template]:
|
|
|
1222
1222
|
"""
|
|
1223
1223
|
|
|
1224
1224
|
def get_release_by_tag(tag: str) -> dict | None:
|
|
1225
|
-
response =
|
|
1225
|
+
response = httpx.get(constants.Reflex.RELEASES_URL)
|
|
1226
1226
|
response.raise_for_status()
|
|
1227
1227
|
releases = response.json()
|
|
1228
1228
|
for release in releases:
|
|
@@ -1243,7 +1243,7 @@ def fetch_app_templates(version: str) -> dict[str, Template]:
|
|
|
1243
1243
|
else:
|
|
1244
1244
|
templates_url = asset["browser_download_url"]
|
|
1245
1245
|
|
|
1246
|
-
templates_data =
|
|
1246
|
+
templates_data = httpx.get(templates_url, follow_redirects=True).json()["templates"]
|
|
1247
1247
|
|
|
1248
1248
|
for template in templates_data:
|
|
1249
1249
|
if template["name"] == "blank":
|
|
@@ -1286,7 +1286,7 @@ def create_config_init_app_from_remote_template(app_name: str, template_url: str
|
|
|
1286
1286
|
zip_file_path = Path(temp_dir) / "template.zip"
|
|
1287
1287
|
try:
|
|
1288
1288
|
# Note: following redirects can be risky. We only allow this for reflex built templates at the moment.
|
|
1289
|
-
response =
|
|
1289
|
+
response = httpx.get(template_url, follow_redirects=True)
|
|
1290
1290
|
console.debug(f"Server responded download request: {response}")
|
|
1291
1291
|
response.raise_for_status()
|
|
1292
1292
|
except httpx.HTTPError as he:
|
|
@@ -1417,7 +1417,7 @@ def initialize_main_module_index_from_generation(app_name: str, generation_hash:
|
|
|
1417
1417
|
generation_hash: The generation hash from reflex.build.
|
|
1418
1418
|
"""
|
|
1419
1419
|
# Download the reflex code for the generation.
|
|
1420
|
-
resp =
|
|
1420
|
+
resp = httpx.get(
|
|
1421
1421
|
constants.Templates.REFLEX_BUILD_CODE_URL.format(
|
|
1422
1422
|
generation_hash=generation_hash
|
|
1423
1423
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: reflex
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.10a1
|
|
4
4
|
Summary: Web apps in pure Python.
|
|
5
5
|
Home-page: https://reflex.dev
|
|
6
6
|
License: Apache-2.0
|
|
@@ -34,7 +34,7 @@ Requires-Dist: python-engineio (!=4.6.0)
|
|
|
34
34
|
Requires-Dist: python-multipart (>=0.0.5,<0.1)
|
|
35
35
|
Requires-Dist: python-socketio (>=5.7.0,<6.0)
|
|
36
36
|
Requires-Dist: redis (>=4.3.5,<6.0)
|
|
37
|
-
Requires-Dist: reflex-chakra (>=0.1.1a1
|
|
37
|
+
Requires-Dist: reflex-chakra (>=0.1.1a1)
|
|
38
38
|
Requires-Dist: reflex-hosting-cli (>=0.1.2,<2.0)
|
|
39
39
|
Requires-Dist: rich (>=13.0.0,<14.0)
|
|
40
40
|
Requires-Dist: setuptools (>=69.1.1,<70.2)
|
|
@@ -394,9 +394,8 @@ reflex/utils/export.py,sha256=3dI9QjoU0ZA_g8OSQipVLpFWQcxWa_sHkpezWemvWbo,2366
|
|
|
394
394
|
reflex/utils/format.py,sha256=elfO3XY5dVBvv6drfZFbfMUokcldiOk03qupvvRuDkk,26389
|
|
395
395
|
reflex/utils/imports.py,sha256=Pvdcr_bkFpTgZ5gZfc5SKKPCvbcqlZSfwyGVhxNh2kc,4770
|
|
396
396
|
reflex/utils/lazy_loader.py,sha256=utVpUjKcz32GC1I7g0g7OlTyvVoZNFcuAjNtnxiSYww,1282
|
|
397
|
-
reflex/utils/net.py,sha256=UFCfaOjvRDVLTeTzLKJ5iDAWtPNuhng5gOs-pIMYQek,1267
|
|
398
397
|
reflex/utils/path_ops.py,sha256=XQVq_r_2tFHECWuJPyxzk3GzijCJemgXxfI5w2rc_Vs,4924
|
|
399
|
-
reflex/utils/prerequisites.py,sha256=
|
|
398
|
+
reflex/utils/prerequisites.py,sha256=Im3BuRUbKuXxXPhaU16EkEljcpblsh_KLd6KYsqVHik,51763
|
|
400
399
|
reflex/utils/processes.py,sha256=y8X5PxycEWT1ItLtpIS-rzrUvNQ9MUOkHdIg_zK9Vp0,13228
|
|
401
400
|
reflex/utils/pyi_generator.py,sha256=7kz5F0hzE8nEdybnrU8C_y3xaZwpjX3J50d3PVPwIhs,34363
|
|
402
401
|
reflex/utils/redir.py,sha256=B0K9m6ejDW0ABeclBb4AsRRORvx_stCTWsrDe1YvkzY,1679
|
|
@@ -407,8 +406,8 @@ reflex/utils/types.py,sha256=tTA5z7rSWQjOcKi_hdw9wLioU4UP3fDZQolgdMBc37M,17838
|
|
|
407
406
|
reflex/utils/watch.py,sha256=ukPT3YrvqsXYN6BInWiO_RPry5osSch9lOomQhxDyk0,2685
|
|
408
407
|
reflex/vars.py,sha256=Ft-DOADYSOyWdLuQ9Axjzg777n9ZdZ8glEZMvU5u_G0,85297
|
|
409
408
|
reflex/vars.pyi,sha256=d55fH5lM6vt8RU_CPSvvOYVTr6orhXOCbL_XY2HgGIc,7214
|
|
410
|
-
reflex-0.5.
|
|
411
|
-
reflex-0.5.
|
|
412
|
-
reflex-0.5.
|
|
413
|
-
reflex-0.5.
|
|
414
|
-
reflex-0.5.
|
|
409
|
+
reflex-0.5.10a1.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
|
|
410
|
+
reflex-0.5.10a1.dist-info/METADATA,sha256=lmH0eFd7dHkzeXPRjiq6xXtQbtuPCkOfdr2NUngMtNI,12232
|
|
411
|
+
reflex-0.5.10a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
412
|
+
reflex-0.5.10a1.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
|
|
413
|
+
reflex-0.5.10a1.dist-info/RECORD,,
|
reflex/utils/net.py
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"""Helpers for downloading files from the network."""
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from . import console
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def _httpx_verify_kwarg() -> bool:
|
|
11
|
-
"""Get the value of the HTTPX verify keyword argument.
|
|
12
|
-
|
|
13
|
-
Returns:
|
|
14
|
-
True if SSL verification is enabled, False otherwise
|
|
15
|
-
"""
|
|
16
|
-
ssl_no_verify = os.environ.get("SSL_NO_VERIFY", "").lower() in ["true", "1", "yes"]
|
|
17
|
-
return not ssl_no_verify
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def get(url: str, **kwargs) -> httpx.Response:
|
|
21
|
-
"""Make an HTTP GET request.
|
|
22
|
-
|
|
23
|
-
Args:
|
|
24
|
-
url: The URL to request.
|
|
25
|
-
**kwargs: Additional keyword arguments to pass to httpx.get.
|
|
26
|
-
|
|
27
|
-
Returns:
|
|
28
|
-
The response object.
|
|
29
|
-
|
|
30
|
-
Raises:
|
|
31
|
-
httpx.ConnectError: If the connection cannot be established.
|
|
32
|
-
"""
|
|
33
|
-
kwargs.setdefault("verify", _httpx_verify_kwarg())
|
|
34
|
-
try:
|
|
35
|
-
return httpx.get(url, **kwargs)
|
|
36
|
-
except httpx.ConnectError as err:
|
|
37
|
-
if "CERTIFICATE_VERIFY_FAILED" in str(err):
|
|
38
|
-
# If the error is a certificate verification error, recommend mitigating steps.
|
|
39
|
-
console.error(
|
|
40
|
-
f"Certificate verification failed for {url}. Set environment variable SSL_CERT_FILE to the "
|
|
41
|
-
"path of the certificate file or SSL_NO_VERIFY=1 to disable verification."
|
|
42
|
-
)
|
|
43
|
-
raise
|
|
File without changes
|
|
File without changes
|
|
File without changes
|