libres 0.10.0__tar.gz → 0.10.1__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.
Files changed (65) hide show
  1. {libres-0.10.0 → libres-0.10.1}/HISTORY.rst +22 -0
  2. {libres-0.10.0/src/libres.egg-info → libres-0.10.1}/PKG-INFO +23 -1
  3. {libres-0.10.0 → libres-0.10.1}/pyproject.toml +1 -1
  4. {libres-0.10.0 → libres-0.10.1}/src/libres/__init__.py +1 -1
  5. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/allocation.py +2 -2
  6. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/reservation.py +3 -2
  7. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/types/json_type.py +1 -0
  8. {libres-0.10.0 → libres-0.10.1/src/libres.egg-info}/PKG-INFO +23 -1
  9. {libres-0.10.0 → libres-0.10.1}/LICENSE +0 -0
  10. {libres-0.10.0 → libres-0.10.1}/MANIFEST.in +0 -0
  11. {libres-0.10.0 → libres-0.10.1}/README.rst +0 -0
  12. {libres-0.10.0 → libres-0.10.1}/docs/Makefile +0 -0
  13. {libres-0.10.0 → libres-0.10.1}/docs/_static/custom.css +0 -0
  14. {libres-0.10.0 → libres-0.10.1}/docs/_static/favicon.ico +0 -0
  15. {libres-0.10.0 → libres-0.10.1}/docs/_static/logo.svg +0 -0
  16. {libres-0.10.0 → libres-0.10.1}/docs/api.rst +0 -0
  17. {libres-0.10.0 → libres-0.10.1}/docs/concepts.rst +0 -0
  18. {libres-0.10.0 → libres-0.10.1}/docs/conf.py +0 -0
  19. {libres-0.10.0 → libres-0.10.1}/docs/customizations.rst +0 -0
  20. {libres-0.10.0 → libres-0.10.1}/docs/faq.rst +0 -0
  21. {libres-0.10.0 → libres-0.10.1}/docs/index.rst +0 -0
  22. {libres-0.10.0 → libres-0.10.1}/docs/requirements.txt +0 -0
  23. {libres-0.10.0 → libres-0.10.1}/docs/under_the_hood.rst +0 -0
  24. {libres-0.10.0 → libres-0.10.1}/setup.cfg +0 -0
  25. {libres-0.10.0 → libres-0.10.1}/src/libres/.gitignore +0 -0
  26. {libres-0.10.0 → libres-0.10.1}/src/libres/context/__init__.py +0 -0
  27. {libres-0.10.0 → libres-0.10.1}/src/libres/context/core.py +0 -0
  28. {libres-0.10.0 → libres-0.10.1}/src/libres/context/exposure.py +0 -0
  29. {libres-0.10.0 → libres-0.10.1}/src/libres/context/registry.py +0 -0
  30. {libres-0.10.0 → libres-0.10.1}/src/libres/context/session.py +0 -0
  31. {libres-0.10.0 → libres-0.10.1}/src/libres/context/settings.py +0 -0
  32. {libres-0.10.0 → libres-0.10.1}/src/libres/db/__init__.py +0 -0
  33. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/__init__.py +0 -0
  34. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/base.py +0 -0
  35. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/blocker.py +0 -0
  36. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/other.py +0 -0
  37. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/reserved_slot.py +0 -0
  38. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/timespan.py +0 -0
  39. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/timestamp.py +0 -0
  40. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/types/__init__.py +0 -0
  41. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/types/utcdatetime.py +0 -0
  42. {libres-0.10.0 → libres-0.10.1}/src/libres/db/models/types/uuid_type.py +0 -0
  43. {libres-0.10.0 → libres-0.10.1}/src/libres/db/queries.py +0 -0
  44. {libres-0.10.0 → libres-0.10.1}/src/libres/db/scheduler.py +0 -0
  45. {libres-0.10.0 → libres-0.10.1}/src/libres/modules/__init__.py +0 -0
  46. {libres-0.10.0 → libres-0.10.1}/src/libres/modules/errors.py +0 -0
  47. {libres-0.10.0 → libres-0.10.1}/src/libres/modules/events.py +0 -0
  48. {libres-0.10.0 → libres-0.10.1}/src/libres/modules/rasterizer.py +0 -0
  49. {libres-0.10.0 → libres-0.10.1}/src/libres/modules/utils.py +0 -0
  50. {libres-0.10.0 → libres-0.10.1}/src/libres/py.typed +0 -0
  51. {libres-0.10.0 → libres-0.10.1}/src/libres.egg-info/SOURCES.txt +0 -0
  52. {libres-0.10.0 → libres-0.10.1}/src/libres.egg-info/dependency_links.txt +0 -0
  53. {libres-0.10.0 → libres-0.10.1}/src/libres.egg-info/not-zip-safe +0 -0
  54. {libres-0.10.0 → libres-0.10.1}/src/libres.egg-info/requires.txt +0 -0
  55. {libres-0.10.0 → libres-0.10.1}/src/libres.egg-info/top_level.txt +0 -0
  56. {libres-0.10.0 → libres-0.10.1}/tests/test_allocation.py +0 -0
  57. {libres-0.10.0 → libres-0.10.1}/tests/test_registry.py +0 -0
  58. {libres-0.10.0 → libres-0.10.1}/tests/test_reservation.py +0 -0
  59. {libres-0.10.0 → libres-0.10.1}/tests/test_reserved_slot.py +0 -0
  60. {libres-0.10.0 → libres-0.10.1}/tests/test_scheduler.py +0 -0
  61. {libres-0.10.0 → libres-0.10.1}/tests/test_scheduler_blockers.py +0 -0
  62. {libres-0.10.0 → libres-0.10.1}/tests/test_session.py +0 -0
  63. {libres-0.10.0 → libres-0.10.1}/tests/test_test.py +0 -0
  64. {libres-0.10.0 → libres-0.10.1}/tests/test_types.py +0 -0
  65. {libres-0.10.0 → libres-0.10.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,28 @@
1
1
  Changelog
2
2
  ---------
3
3
 
4
+ 0.10.1 (21.01.2026)
5
+ ~~~~~~~~~~~~~~~~~~~
6
+
7
+ - Adds proper support for SQLAlchemy 1.4. As a result of this
8
+ `Allocation.type` and `Reservation.type` are no longer nullable
9
+ and have a default value of 'generic', you may use the following
10
+ recipe using an alembic `Operations` object to migrate existing
11
+ databases::
12
+
13
+ context.operations.execute("""
14
+ UPDATE allocations
15
+ SET type = 'generic'
16
+ WHERE type IS NULL;
17
+ """)
18
+ context.operations.alter_column('allocations', 'type', nullable=False)
19
+ context.operations.execute("""
20
+ UPDATE reservations
21
+ SET type = 'generic'
22
+ WHERE type IS NULL;
23
+ """)
24
+ context.operations.alter_column('reservations', 'type', nullable=False)
25
+
4
26
  0.10.0 (15.01.2026)
5
27
  ~~~~~~~~~~~~~~~~~~~
6
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libres
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: A library to reserve things
5
5
  Home-page: http://github.com/seantis/libres/
6
6
  Author: Denis Krienbühl
@@ -142,6 +142,28 @@ After this, create a new release on Github.
142
142
  Changelog
143
143
  ---------
144
144
 
145
+ 0.10.1 (21.01.2026)
146
+ ~~~~~~~~~~~~~~~~~~~
147
+
148
+ - Adds proper support for SQLAlchemy 1.4. As a result of this
149
+ `Allocation.type` and `Reservation.type` are no longer nullable
150
+ and have a default value of 'generic', you may use the following
151
+ recipe using an alembic `Operations` object to migrate existing
152
+ databases::
153
+
154
+ context.operations.execute("""
155
+ UPDATE allocations
156
+ SET type = 'generic'
157
+ WHERE type IS NULL;
158
+ """)
159
+ context.operations.alter_column('allocations', 'type', nullable=False)
160
+ context.operations.execute("""
161
+ UPDATE reservations
162
+ SET type = 'generic'
163
+ WHERE type IS NULL;
164
+ """)
165
+ context.operations.alter_column('reservations', 'type', nullable=False)
166
+
145
167
  0.10.0 (15.01.2026)
146
168
  ~~~~~~~~~~~~~~~~~~~
147
169
 
@@ -11,7 +11,7 @@ branch = true
11
11
  source = ["src"]
12
12
 
13
13
  [tool.bumpversion]
14
- current_version = "0.10.0"
14
+ current_version = "0.10.1"
15
15
  commit = true
16
16
  message = "Release {new_version}"
17
17
  tag = true
@@ -5,7 +5,7 @@ from libres.db import new_scheduler
5
5
 
6
6
  registry = create_default_registry() # noqa: RUF067
7
7
 
8
- __version__ = '0.10.0'
8
+ __version__ = '0.10.1'
9
9
  __all__ = (
10
10
  'new_scheduler',
11
11
  'registry'
@@ -84,7 +84,7 @@ class Allocation(TimestampMixin, ORMBase, OtherModels):
84
84
  resource: Column[uuid.UUID] = Column(UUID(), nullable=False)
85
85
 
86
86
  #: the polymorphic type of the allocation
87
- type: Column[str | None] = Column(types.Text(), nullable=True)
87
+ type: Column[str] = Column(types.Text(), nullable=False, default='generic')
88
88
 
89
89
  #: resource of which this allocation is a mirror. If the mirror_of
90
90
  #: attribute equals the resource, this is a real resource
@@ -153,7 +153,7 @@ class Allocation(TimestampMixin, ORMBase, OtherModels):
153
153
  )
154
154
 
155
155
  __mapper_args__ = {
156
- 'polymorphic_identity': None,
156
+ 'polymorphic_identity': 'generic',
157
157
  'polymorphic_on': type
158
158
  }
159
159
 
@@ -60,7 +60,8 @@ class Reservation(TimestampMixin, ORMBase, OtherModels):
60
60
 
61
61
  type: Column[str | None] = Column(
62
62
  types.Text(),
63
- nullable=True
63
+ nullable=False,
64
+ default='generic'
64
65
  )
65
66
 
66
67
  resource: Column[uuid.UUID] = Column(
@@ -117,7 +118,7 @@ class Reservation(TimestampMixin, ORMBase, OtherModels):
117
118
  )
118
119
 
119
120
  __mapper_args__ = {
120
- 'polymorphic_identity': None,
121
+ 'polymorphic_identity': 'generic',
121
122
  'polymorphic_on': type
122
123
  }
123
124
 
@@ -25,6 +25,7 @@ class JSON(_Base):
25
25
  """
26
26
 
27
27
  impl = JSONB
28
+ cache_ok = True
28
29
 
29
30
  def process_bind_param( # type:ignore[override]
30
31
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libres
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: A library to reserve things
5
5
  Home-page: http://github.com/seantis/libres/
6
6
  Author: Denis Krienbühl
@@ -142,6 +142,28 @@ After this, create a new release on Github.
142
142
  Changelog
143
143
  ---------
144
144
 
145
+ 0.10.1 (21.01.2026)
146
+ ~~~~~~~~~~~~~~~~~~~
147
+
148
+ - Adds proper support for SQLAlchemy 1.4. As a result of this
149
+ `Allocation.type` and `Reservation.type` are no longer nullable
150
+ and have a default value of 'generic', you may use the following
151
+ recipe using an alembic `Operations` object to migrate existing
152
+ databases::
153
+
154
+ context.operations.execute("""
155
+ UPDATE allocations
156
+ SET type = 'generic'
157
+ WHERE type IS NULL;
158
+ """)
159
+ context.operations.alter_column('allocations', 'type', nullable=False)
160
+ context.operations.execute("""
161
+ UPDATE reservations
162
+ SET type = 'generic'
163
+ WHERE type IS NULL;
164
+ """)
165
+ context.operations.alter_column('reservations', 'type', nullable=False)
166
+
145
167
  0.10.0 (15.01.2026)
146
168
  ~~~~~~~~~~~~~~~~~~~
147
169
 
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