reactpy 2.0.0b6__py3-none-any.whl → 2.0.0b7__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.
Files changed (45) hide show
  1. reactpy/__init__.py +2 -2
  2. reactpy/config.py +1 -1
  3. reactpy/core/_thread_local.py +1 -1
  4. reactpy/core/hooks.py +11 -19
  5. reactpy/executors/asgi/pyscript.py +4 -1
  6. reactpy/executors/asgi/standalone.py +1 -1
  7. reactpy/{pyscript → executors/pyscript}/component_template.py +1 -1
  8. reactpy/{pyscript → executors/pyscript}/components.py +1 -1
  9. reactpy/executors/utils.py +32 -7
  10. reactpy/reactjs/__init__.py +2 -4
  11. reactpy/reactjs/module.py +106 -42
  12. reactpy/reactjs/utils.py +49 -20
  13. reactpy/static/{index-sbddj6ms.js → index-64wy0fss.js} +4 -4
  14. reactpy/static/{index-sbddj6ms.js.map → index-64wy0fss.js.map} +1 -1
  15. reactpy/static/index-beq660xy.js +5 -0
  16. reactpy/static/index-beq660xy.js.map +12 -0
  17. reactpy/static/index.js +2 -2
  18. reactpy/static/index.js.map +6 -5
  19. reactpy/static/preact-dom.js +4 -0
  20. reactpy/static/{react-dom.js.map → preact-dom.js.map} +3 -3
  21. reactpy/static/preact-jsx-runtime.js +4 -0
  22. reactpy/static/{react-jsx-runtime.js.map → preact-jsx-runtime.js.map} +1 -1
  23. reactpy/static/preact.js +4 -0
  24. reactpy/static/{react.js.map → preact.js.map} +3 -3
  25. reactpy/templatetags/jinja.py +4 -1
  26. reactpy/testing/__init__.py +2 -7
  27. reactpy/testing/backend.py +20 -8
  28. reactpy/testing/common.py +1 -9
  29. reactpy/testing/display.py +68 -32
  30. {reactpy-2.0.0b6.dist-info → reactpy-2.0.0b7.dist-info}/METADATA +1 -1
  31. {reactpy-2.0.0b6.dist-info → reactpy-2.0.0b7.dist-info}/RECORD +37 -40
  32. reactpy/static/index-h31022cd.js +0 -5
  33. reactpy/static/index-h31022cd.js.map +0 -11
  34. reactpy/static/index-y71bxs88.js +0 -5
  35. reactpy/static/index-y71bxs88.js.map +0 -10
  36. reactpy/static/react-dom.js +0 -4
  37. reactpy/static/react-jsx-runtime.js +0 -4
  38. reactpy/static/react.js +0 -4
  39. reactpy/testing/utils.py +0 -27
  40. /reactpy/{pyscript → executors/pyscript}/__init__.py +0 -0
  41. /reactpy/{pyscript → executors/pyscript}/layout_handler.py +0 -0
  42. /reactpy/{pyscript → executors/pyscript}/utils.py +0 -0
  43. {reactpy-2.0.0b6.dist-info → reactpy-2.0.0b7.dist-info}/WHEEL +0 -0
  44. {reactpy-2.0.0b6.dist-info → reactpy-2.0.0b7.dist-info}/entry_points.txt +0 -0
  45. {reactpy-2.0.0b6.dist-info → reactpy-2.0.0b7.dist-info}/licenses/LICENSE +0 -0
reactpy/testing/utils.py DELETED
@@ -1,27 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import socket
4
- import sys
5
- from contextlib import closing
6
-
7
-
8
- def find_available_port(
9
- host: str, port_min: int = 8000, port_max: int = 9000
10
- ) -> int: # nocov
11
- """Get a port that's available for the given host and port range"""
12
- for port in range(port_min, port_max):
13
- with closing(socket.socket()) as sock:
14
- try:
15
- if sys.platform in ("linux", "darwin"):
16
- # Fixes bug on Unix-like systems where every time you restart the
17
- # server you'll get a different port on Linux. This cannot be set
18
- # on Windows otherwise address will always be reused.
19
- # Ref: https://stackoverflow.com/a/19247688/3159288
20
- sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
21
- sock.bind((host, port))
22
- except OSError:
23
- pass
24
- else:
25
- return port
26
- msg = f"Host {host!r} has no available port in range {port_max}-{port_max}"
27
- raise RuntimeError(msg)
File without changes
File without changes