dbos 0.10.0a3__tar.gz → 0.11.0a2__tar.gz

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 dbos might be problematic. Click here for more details.

Files changed (75) hide show
  1. {dbos-0.10.0a3 → dbos-0.11.0a2}/PKG-INFO +2 -2
  2. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/system_database.py +8 -3
  3. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/migrations/env.py.dbos +8 -1
  4. {dbos-0.10.0a3 → dbos-0.11.0a2}/pyproject.toml +2 -2
  5. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_schema_migration.py +7 -1
  6. {dbos-0.10.0a3 → dbos-0.11.0a2}/LICENSE +0 -0
  7. {dbos-0.10.0a3 → dbos-0.11.0a2}/README.md +0 -0
  8. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/__init__.py +0 -0
  9. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/admin_sever.py +0 -0
  10. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/application_database.py +0 -0
  11. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/cli.py +0 -0
  12. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/context.py +0 -0
  13. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/core.py +0 -0
  14. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/dbos-config.schema.json +0 -0
  15. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/dbos.py +0 -0
  16. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/dbos_config.py +0 -0
  17. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/decorators.py +0 -0
  18. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/error.py +0 -0
  19. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/fastapi.py +0 -0
  20. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/flask.py +0 -0
  21. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/kafka.py +0 -0
  22. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/kafka_message.py +0 -0
  23. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/logger.py +0 -0
  24. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/env.py +0 -0
  25. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/script.py.mako +0 -0
  26. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/versions/50f3227f0b4b_fix_job_queue.py +0 -0
  27. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/versions/5c361fc04708_added_system_tables.py +0 -0
  28. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/versions/a3b18ad34abe_added_triggers.py +0 -0
  29. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/versions/d76646551a6b_job_queue_limiter.py +0 -0
  30. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/versions/d76646551a6c_workflow_queue.py +0 -0
  31. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/migrations/versions/eab0cc1d9a14_job_queue.py +0 -0
  32. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/py.typed +0 -0
  33. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/queue.py +0 -0
  34. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/recovery.py +0 -0
  35. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/registrations.py +0 -0
  36. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/request.py +0 -0
  37. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/roles.py +0 -0
  38. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/scheduler/croniter.py +0 -0
  39. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/scheduler/scheduler.py +0 -0
  40. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/schemas/__init__.py +0 -0
  41. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/schemas/application_database.py +0 -0
  42. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/schemas/system_database.py +0 -0
  43. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/README.md +0 -0
  44. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/__package/__init__.py +0 -0
  45. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/__package/main.py +0 -0
  46. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/__package/schema.py +0 -0
  47. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/alembic.ini +0 -0
  48. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/dbos-config.yaml.dbos +0 -0
  49. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/migrations/script.py.mako +0 -0
  50. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/migrations/versions/2024_07_31_180642_init.py +0 -0
  51. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/templates/hello/start_postgres_docker.py +0 -0
  52. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/tracer.py +0 -0
  53. {dbos-0.10.0a3 → dbos-0.11.0a2}/dbos/utils.py +0 -0
  54. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/__init__.py +0 -0
  55. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/atexit_no_ctor.py +0 -0
  56. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/atexit_no_launch.py +0 -0
  57. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/classdefs.py +0 -0
  58. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/conftest.py +0 -0
  59. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/more_classdefs.py +0 -0
  60. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/scheduler/test_croniter.py +0 -0
  61. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/scheduler/test_scheduler.py +0 -0
  62. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_admin_server.py +0 -0
  63. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_classdecorators.py +0 -0
  64. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_concurrency.py +0 -0
  65. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_config.py +0 -0
  66. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_dbos.py +0 -0
  67. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_failures.py +0 -0
  68. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_fastapi.py +0 -0
  69. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_fastapi_roles.py +0 -0
  70. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_flask.py +0 -0
  71. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_kafka.py +0 -0
  72. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_package.py +0 -0
  73. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_queue.py +0 -0
  74. {dbos-0.10.0a3 → dbos-0.11.0a2}/tests/test_singleton.py +0 -0
  75. {dbos-0.10.0a3 → dbos-0.11.0a2}/version/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.10.0a3
3
+ Version: 0.11.0a2
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -18,7 +18,7 @@ Requires-Dist: python-dateutil>=2.9.0.post0
18
18
  Requires-Dist: fastapi[standard]>=0.115.2
19
19
  Requires-Dist: psutil>=6.0.0
20
20
  Requires-Dist: tomlkit>=0.13.2
21
- Requires-Dist: psycopg>=3.2.3
21
+ Requires-Dist: psycopg>=3.1
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
 
@@ -1,5 +1,6 @@
1
1
  import datetime
2
2
  import os
3
+ import re
3
4
  import threading
4
5
  import time
5
6
  from enum import Enum
@@ -203,9 +204,13 @@ class SystemDatabase:
203
204
  )
204
205
  alembic_cfg = Config()
205
206
  alembic_cfg.set_main_option("script_location", migration_dir)
206
- alembic_cfg.set_main_option(
207
- "sqlalchemy.url", self.engine.url.render_as_string(hide_password=False)
207
+ # Alembic requires the % in URL-escaped parameters to itself be escaped to %%.
208
+ escaped_conn_string = re.sub(
209
+ r"%(?=[0-9A-Fa-f]{2})",
210
+ "%%",
211
+ self.engine.url.render_as_string(hide_password=False),
208
212
  )
213
+ alembic_cfg.set_main_option("sqlalchemy.url", escaped_conn_string)
209
214
  command.upgrade(alembic_cfg, "head")
210
215
 
211
216
  self.notification_conn: Optional[psycopg.connection.Connection] = None
@@ -793,7 +798,7 @@ class SystemDatabase:
793
798
  self.notification_conn.execute("LISTEN dbos_workflow_events_channel")
794
799
 
795
800
  while self._run_background_processes:
796
- gen = self.notification_conn.notifies(timeout=60)
801
+ gen = self.notification_conn.notifies()
797
802
  for notify in gen:
798
803
  channel = notify.channel
799
804
  dbos_logger.debug(
@@ -1,3 +1,4 @@
1
+ import re
1
2
  from logging.config import fileConfig
2
3
 
3
4
  from alembic import context
@@ -15,7 +16,13 @@ if config.config_file_name is not None:
15
16
  fileConfig(config.config_file_name)
16
17
 
17
18
  # programmatically set the sqlalchemy.url field from DBOS Config
18
- config.set_main_option("sqlalchemy.url", get_dbos_database_url())
19
+ # Alembic requires the % in URL-escaped parameters to itself be escaped to %%.
20
+ escaped_conn_string = re.sub(
21
+ r"%(?=[0-9A-Fa-f]{2})",
22
+ "%%",
23
+ get_dbos_database_url(),
24
+ )
25
+ config.set_main_option("sqlalchemy.url", escaped_conn_string)
19
26
 
20
27
  # add your model's MetaData object here
21
28
  # for 'autogenerate' support
@@ -19,11 +19,11 @@ dependencies = [
19
19
  "fastapi[standard]>=0.115.2",
20
20
  "psutil>=6.0.0",
21
21
  "tomlkit>=0.13.2",
22
- "psycopg>=3.2.3",
22
+ "psycopg>=3.1",
23
23
  ]
24
24
  requires-python = ">=3.9"
25
25
  readme = "README.md"
26
- version = "0.10.0a3"
26
+ version = "0.11.0a2"
27
27
 
28
28
  [project.license]
29
29
  text = "MIT"
@@ -1,4 +1,5 @@
1
1
  import os
2
+ import re
2
3
 
3
4
  import pytest
4
5
  import sqlalchemy as sa
@@ -94,5 +95,10 @@ def rollback_system_db(sysdb_url: str) -> None:
94
95
  )
95
96
  alembic_cfg = Config()
96
97
  alembic_cfg.set_main_option("script_location", migration_dir)
97
- alembic_cfg.set_main_option("sqlalchemy.url", sysdb_url)
98
+ escaped_conn_string = re.sub(
99
+ r"%(?=[0-9A-Fa-f]{2})",
100
+ "%%",
101
+ sysdb_url,
102
+ )
103
+ alembic_cfg.set_main_option("sqlalchemy.url", escaped_conn_string)
98
104
  command.downgrade(alembic_cfg, "base") # Rollback all migrations
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes