libres 0.10.0__py3-none-any.whl → 0.10.1__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.
libres/__init__.py CHANGED
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  libres/.gitignore,sha256=tyWYoDW7-zMdsfiJIVONRWJ5JmqJCTHzBOsi_rkIYZg,49
2
- libres/__init__.py,sha256=9v-iLfER2w_g4fiTMUPafUATTCY4gPd72_57PqtTeog,260
2
+ libres/__init__.py,sha256=-HTpgjL18mN101cTf5qlPy_SacZ67ivw_To5W7fu2Zs,260
3
3
  libres/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  libres/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  libres/context/core.py,sha256=AZMmFVqTVSkK3pomhoamLWOeqynY23g_uf32yjhgrRQ,7353
@@ -11,16 +11,16 @@ libres/db/__init__.py,sha256=Fks6T8aEacYVvXB9U1v182zKX7SuEUAkC5hTK50AuQk,145
11
11
  libres/db/queries.py,sha256=EqsrKL5x5OlTWefvcESs5zg7ZyneXavTC-sGARX4OxM,11043
12
12
  libres/db/scheduler.py,sha256=mPuA-48VWQvzHQVy0VsXz4Be_f1YDVlElXWjwGaI6hA,77373
13
13
  libres/db/models/__init__.py,sha256=ESy82b2y6YX_D143QP2cns1MRsXxO32fQUvrc7DE6VY,408
14
- libres/db/models/allocation.py,sha256=4n6zjHWUSzxICjkap1s0pQgDOMki1vkO4l1MI65Ynk8,30699
14
+ libres/db/models/allocation.py,sha256=BzDE7SDvcP1AH_T_P2g5JmcWop06b2rYIUbno8OtXPY,30717
15
15
  libres/db/models/base.py,sha256=Y2Lc60vJ1Du73D0sLozVNi1TfhtrQ3i_64NV7hsnc4g,117
16
16
  libres/db/models/blocker.py,sha256=P30FLf-ILqT03ZHnbFBVykY37xFAuCeOglhIH6B_1-c,4488
17
17
  libres/db/models/other.py,sha256=XRdyLo1gFY-Sg4iBSPBwOxeqZSpL5PerZISexcAQyDg,853
18
- libres/db/models/reservation.py,sha256=NnsH1PL_Tu2zt-fHMl_KURfj0RsvJzCPj-SmE-GR86Q,5819
18
+ libres/db/models/reservation.py,sha256=3hLIgyIAAi1f5HuQekLx1FVyZeVn0jMc6tKm4p8cGKM,5852
19
19
  libres/db/models/reserved_slot.py,sha256=nVggmkPBB4oR1f5dEH-bsLggX5hAUNqfH7CApcRoApw,3263
20
20
  libres/db/models/timespan.py,sha256=uo6Xjie5rzm8JklsdCp0CyjeUPYOSHO9tOZI3b1oShs,220
21
21
  libres/db/models/timestamp.py,sha256=EsuxdQSUsPCkHb1F7HdrDevWZ5wDWerDFRIhqfhefNw,1301
22
22
  libres/db/models/types/__init__.py,sha256=8fx7ecDasCKsCJxGjt4qP5BbDJCG88dJRa0nzD6IetY,186
23
- libres/db/models/types/json_type.py,sha256=ko6K4YRWERWCpg0wYzuwJ_u-VLJ4K3j3ksJ7cGyiMzw,1137
23
+ libres/db/models/types/json_type.py,sha256=yDRc0RQfVRLGfXH_hKDqPaVUkdy8m9XYrr5PU8GPdeU,1157
24
24
  libres/db/models/types/utcdatetime.py,sha256=4Wlk0Yc6e3PljOjngUGuYvo8jps76RYVkCEwmPygzsY,1285
25
25
  libres/db/models/types/uuid_type.py,sha256=sesgyF65JV0Zh2ty7rSeALpZxKjVg1Y68_Pv7gJAuAo,1675
26
26
  libres/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -28,8 +28,8 @@ libres/modules/errors.py,sha256=afcvKDfu7XYnGt6CfTG1gpmCaoMTPgtxwmTe2Cyz9qc,2146
28
28
  libres/modules/events.py,sha256=-YHwFJKory8RSIRTths5LBn92sodEPkhARH_a1Xml3c,5299
29
29
  libres/modules/rasterizer.py,sha256=-KYG03YkaPNnyohl_HrEJZqdHrhmGesbLgxxPahNTCc,3155
30
30
  libres/modules/utils.py,sha256=W5Kuu9LhhUWZMKLAhw7DmQEuNYb9aXWpW_HXCn62lhU,1871
31
- libres-0.10.0.dist-info/licenses/LICENSE,sha256=w1rojULT3naueSnr4r62MSQipL4VPtsfEcTFmSKpVuI,1069
32
- libres-0.10.0.dist-info/METADATA,sha256=f3P6JcW2iBhZb666Qj1BDmttM6Z1YQiILrOGTsabres,10924
33
- libres-0.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- libres-0.10.0.dist-info/top_level.txt,sha256=Exs6AnhZc0UTcsD5Ylyx1P89j19hJ4Dy13jxQyZwi3k,7
35
- libres-0.10.0.dist-info/RECORD,,
31
+ libres-0.10.1.dist-info/licenses/LICENSE,sha256=w1rojULT3naueSnr4r62MSQipL4VPtsfEcTFmSKpVuI,1069
32
+ libres-0.10.1.dist-info/METADATA,sha256=TB23WZed7MiH2ShovWJKHXq1bFjnpXwq2RWeMZhpwBc,11646
33
+ libres-0.10.1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
34
+ libres-0.10.1.dist-info/top_level.txt,sha256=Exs6AnhZc0UTcsD5Ylyx1P89j19hJ4Dy13jxQyZwi3k,7
35
+ libres-0.10.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5