libres 0.9.0__py3-none-any.whl → 0.9.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 +1 -1
- libres/context/registry.py +2 -0
- libres/db/scheduler.py +15 -11
- {libres-0.9.0.dist-info → libres-0.9.1.dist-info}/METADATA +8 -1
- {libres-0.9.0.dist-info → libres-0.9.1.dist-info}/RECORD +8 -8
- {libres-0.9.0.dist-info → libres-0.9.1.dist-info}/WHEEL +1 -1
- {libres-0.9.0.dist-info → libres-0.9.1.dist-info}/licenses/LICENSE +0 -0
- {libres-0.9.0.dist-info → libres-0.9.1.dist-info}/top_level.txt +0 -0
libres/__init__.py
CHANGED
libres/context/registry.py
CHANGED
libres/db/scheduler.py
CHANGED
|
@@ -269,7 +269,7 @@ class Scheduler(ContextServicesMixin):
|
|
|
269
269
|
allocations = allocations.with_entities(Allocation.id)
|
|
270
270
|
allocations = allocations.filter(Allocation.group.in_(groups))
|
|
271
271
|
|
|
272
|
-
query = self.managed_allocations()
|
|
272
|
+
query: Query[Allocation] = self.managed_allocations()
|
|
273
273
|
query = query.join(ReservedSlot)
|
|
274
274
|
query = query.filter(
|
|
275
275
|
ReservedSlot.reservation_token == token
|
|
@@ -1629,8 +1629,6 @@ class Scheduler(ContextServicesMixin):
|
|
|
1629
1629
|
assert start
|
|
1630
1630
|
assert end
|
|
1631
1631
|
|
|
1632
|
-
start, end = self._prepare_range(start, end)
|
|
1633
|
-
|
|
1634
1632
|
assert whole_day in ('yes', 'no', 'any')
|
|
1635
1633
|
assert groups in ('yes', 'no', 'any')
|
|
1636
1634
|
|
|
@@ -1645,7 +1643,7 @@ class Scheduler(ContextServicesMixin):
|
|
|
1645
1643
|
else:
|
|
1646
1644
|
day_numbers = None
|
|
1647
1645
|
|
|
1648
|
-
query = self.allocations_in_range(start, end)
|
|
1646
|
+
query = self.allocations_in_range(*self._prepare_range(start, end))
|
|
1649
1647
|
query = query.order_by(Allocation._start)
|
|
1650
1648
|
|
|
1651
1649
|
allocations = []
|
|
@@ -1657,13 +1655,19 @@ class Scheduler(ContextServicesMixin):
|
|
|
1657
1655
|
|
|
1658
1656
|
if not self.is_allocation_exposed(allocation):
|
|
1659
1657
|
continue
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
s = sedate.
|
|
1666
|
-
|
|
1658
|
+
allocation_start = allocation.display_start()
|
|
1659
|
+
# NOTE: We want the correct timezone, but we don't want the
|
|
1660
|
+
# date to be on the next day for a full-day reservation
|
|
1661
|
+
# so we skip the microsecond addition
|
|
1662
|
+
allocation_end = sedate.to_timezone(allocation.end, self.timezone)
|
|
1663
|
+
s = sedate.standardize_date(datetime.combine(
|
|
1664
|
+
allocation_start.date(),
|
|
1665
|
+
start.time()
|
|
1666
|
+
), self.timezone)
|
|
1667
|
+
e = sedate.standardize_date(datetime.combine(
|
|
1668
|
+
allocation_end.date(),
|
|
1669
|
+
end.time()
|
|
1670
|
+
), self.timezone)
|
|
1667
1671
|
|
|
1668
1672
|
if not allocation.overlaps(s, e):
|
|
1669
1673
|
continue
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libres
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.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,13 @@ After this, create a new release on Github.
|
|
|
142
142
|
Changelog
|
|
143
143
|
---------
|
|
144
144
|
|
|
145
|
+
0.9.1 (05.08.2025)
|
|
146
|
+
~~~~~~~~~~~~~~~~~~~
|
|
147
|
+
|
|
148
|
+
- Fixes bug in `Scheduler.search_allocations` when the searched
|
|
149
|
+
time range contains multiple DST <-> ST transitions.
|
|
150
|
+
[Daverball]
|
|
151
|
+
|
|
145
152
|
0.9.0 (23.05.2025)
|
|
146
153
|
~~~~~~~~~~~~~~~~~~~
|
|
147
154
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
libres/.gitignore,sha256=tyWYoDW7-zMdsfiJIVONRWJ5JmqJCTHzBOsi_rkIYZg,49
|
|
2
|
-
libres/__init__.py,sha256=
|
|
2
|
+
libres/__init__.py,sha256=d2iNp33yOxIx7AAvW064M_9oiCtEl9Zxr1WVwK8Vl1U,243
|
|
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
|
|
6
6
|
libres/context/exposure.py,sha256=0krsky3XYplG7Uf5oLlQgdXp6XuEDjN2JGe3ljgLM14,287
|
|
7
|
-
libres/context/registry.py,sha256=
|
|
7
|
+
libres/context/registry.py,sha256=JfV-QccpDbAEq154aHu7_-hznr5kXYY58czZ-0-m8vA,4986
|
|
8
8
|
libres/context/session.py,sha256=bVvZ7cvSKffGrzxpDM7vKrGgwAPWRoS4No6HK1--xlg,2488
|
|
9
9
|
libres/context/settings.py,sha256=IkdG67QUUuk_sQMXiwsJgelrsbx6M-7f72uJBA2JoJA,1374
|
|
10
10
|
libres/db/__init__.py,sha256=Fks6T8aEacYVvXB9U1v182zKX7SuEUAkC5hTK50AuQk,145
|
|
11
11
|
libres/db/queries.py,sha256=mVLMcFh7tbAOOp8fveB1T-ZBt0X3hQiaN5Krt5Mmhhs,10917
|
|
12
|
-
libres/db/scheduler.py,sha256=
|
|
12
|
+
libres/db/scheduler.py,sha256=Pg-bgyrMgCE54K7sXxChNw_NTIdviCZSO7_X0LG0o34,64711
|
|
13
13
|
libres/db/models/__init__.py,sha256=IL52K-0tg_v6zuiiE2k4UQNqneeb8CLUUVo_t_OBU-g,325
|
|
14
14
|
libres/db/models/allocation.py,sha256=Zi-H3HGz4Xt9VhwUZmoUMc8xGr8rPBNiHGumnYcjlwI,29005
|
|
15
15
|
libres/db/models/base.py,sha256=Y2Lc60vJ1Du73D0sLozVNi1TfhtrQ3i_64NV7hsnc4g,117
|
|
@@ -26,8 +26,8 @@ libres/modules/errors.py,sha256=afcvKDfu7XYnGt6CfTG1gpmCaoMTPgtxwmTe2Cyz9qc,2146
|
|
|
26
26
|
libres/modules/events.py,sha256=-YHwFJKory8RSIRTths5LBn92sodEPkhARH_a1Xml3c,5299
|
|
27
27
|
libres/modules/rasterizer.py,sha256=-KYG03YkaPNnyohl_HrEJZqdHrhmGesbLgxxPahNTCc,3155
|
|
28
28
|
libres/modules/utils.py,sha256=W5Kuu9LhhUWZMKLAhw7DmQEuNYb9aXWpW_HXCn62lhU,1871
|
|
29
|
-
libres-0.9.
|
|
30
|
-
libres-0.9.
|
|
31
|
-
libres-0.9.
|
|
32
|
-
libres-0.9.
|
|
33
|
-
libres-0.9.
|
|
29
|
+
libres-0.9.1.dist-info/licenses/LICENSE,sha256=w1rojULT3naueSnr4r62MSQipL4VPtsfEcTFmSKpVuI,1069
|
|
30
|
+
libres-0.9.1.dist-info/METADATA,sha256=e-7a5dHP6OCJ5ob5wsH1-Wk4pr0qVMMZDU3wtzd4Y98,10222
|
|
31
|
+
libres-0.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
32
|
+
libres-0.9.1.dist-info/top_level.txt,sha256=Exs6AnhZc0UTcsD5Ylyx1P89j19hJ4Dy13jxQyZwi3k,7
|
|
33
|
+
libres-0.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|